1

I have recently purchase Godaddy Linux Shared hosting. In My site there is one php.ini file in my root(/) directory. As my requirement i have set ini paramete output_buffering=on but it will not take effect in my site. because after changing ini setting we need to restart server, but as it is godaddy's shared server they are not able to restart server. I have talked also in support. But no result. so can any one give solution how can php.ini change will take effect without restart apache server.

I have tried by setting in .htacces as php_value output_buffering on but it won't work.

2
  • 3
    well they are one of the worst hosts Commented Oct 7, 2013 at 2:48
  • Why do you need output buffering on? If you have a legitimate use case, generally you can do your own output buffering. php.net/manual/en/function.ob-start.php Commented Oct 7, 2013 at 2:48

1 Answer 1

2

One solution would be to use ini_set(). https://www.php.net/ini_set

ini_set('output_buffering', 'on');

Of course this is not completely ideal, as you have to call it wherever you want output buffering to be enabled.

Sign up to request clarification or add additional context in comments.

2 Comments

Actually there is on header already sent error occurs in my site. i know there is blank space anywhere in code so but i am not able to detect it. so after set the buffer on it will omit the space in php tag.
You should try to solve this problem by editing the code which prints the blank spaces.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.