Results 1 to 2 of 2
  1. #1
    vtupser
    Guest
    Question Changing 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.

  2. #2
    lil
    Guest
    Quote Originally Posted by vtupser
    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.
    You should be able to do this (you may have already tried)

    This will test the current value:

    <?php

    $oldsetting=ini_get('output_buffering');

    echo "The old setting is $oldsetting <br>";

    ?>


    To change it do a:

    <?php

    $oldsetting=ini_set('output_buffering',On); // or to the level of bytes of buf'r
    $newsetting=ini_get('output_buffering);

    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!

    Vicky :flower:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 01-16-2015, 12:07 AM
  2. PHP Server and SQL Server on Mac
    By jakenoble in forum Switcher Hangout
    Replies: 3
    Last Post: 08-17-2007, 03:08 AM
  3. Offline php and MYSQL server.
    By StonePatch in forum OS X - Apps and Games
    Replies: 2
    Last Post: 09-10-2006, 12:52 PM
  4. Where is the php.ini file?
    By jimz in forum Web Design and Hosting
    Replies: 1
    Last Post: 04-29-2006, 10:34 PM
  5. mac osx server. (php/mysql)
    By design2 in forum Web Design and Hosting
    Replies: 5
    Last Post: 07-30-2005, 04:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •