Thread: Changing php.ini file on server
10-13-2005, 01:59 PM #1vtupserGuestChanging php.ini file on server
Does anyone know the command line to change the output_buffering directive in the php.ini file by using either the ini_set() function in a php file or using a .htaccess file? The hosting company server that I use has that directive set to 'no value' and I need it to be turned on/set to a certain character size. They seem to not know what I am talking about, so I was checking to see if I could do it through ini_set() or .htaccess. I do not have access to the php.ini file myself since I am using a shared hosting plan and not a dedicated server.
10-15-2005, 07:41 AM #2lilGuestOriginally Posted by vtupser
This will test the current value:
echo "The old setting is $oldsetting <br>";
To change it do a:
$oldsetting=ini_set('output_buffering',On); // or to the level of bytes of buf'r
echo "The OLD setting was: $oldsetting and the NEW setting is now: $newsetting.<br>";
Not wishing to perhaps teach you to suck eggs but output buffering is a variable that is so-called PHP_INI_PERDIR which means you can change the setting in php.ini (for a global setting over your server) or in the .htaccess or httpd.conf files when using apache for a per directory setting of this variable.
However how you do the latter for httpd.conf and php.ini I am not sure. I would be sure php.net or perhaps a search on apache, php.ini, .htaccess may avail some answers if you need this on a per dir setting.
Try the ini_set method first though to make sure that works.
Hope this helps you!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By hipsocialist in forum OS X - Operating SystemReplies: 2Last Post: 01-16-2015, 12:07 AM
By jakenoble in forum Switcher HangoutReplies: 3Last Post: 08-17-2007, 03:08 AM
By StonePatch in forum OS X - Apps and GamesReplies: 2Last Post: 09-10-2006, 12:52 PM
By jimz in forum Web Design and HostingReplies: 1Last Post: 04-29-2006, 10:34 PM
By design2 in forum Web Design and HostingReplies: 5Last Post: 07-30-2005, 04:02 AM