Page 1 of 1

How to configure your local php.ini??

Posted: Fri Sep 17, 2004 10:54 am
by joeRaven
Hi newbie here.

I had finished my whole site on the test server and it run fine. When moved to the productin server, I discovered my includes and session variables don't work. I outputted phpinfo() and lo and behold - against what the sysadmin had told me - both configs are different:

test site:
include_path = /web/php/

production site:
include_path = /web/php

I fixed my include dilemma by using absolute paths but now my sessions don't work correctly.

Rather than bog you down with more woes, I want to have my own config file. I DO NOT have access to the apache or MySQL configurations and the sysasmin IS ON VACATION.

So I downloaded the recommended php.ini from php.net , set the include_path to /web/docs/stuff/morestuff/mysitedir/ and put it on mysitedir/

but still doesn't work!

What I'm doing wrong??

Posted: Fri Sep 17, 2004 12:27 pm
by feyd
having a php.ini doesn't always make the server load it.. apache has to be restarted to load any new php.ini.. and it'll only load a new one, if it's found prior to the default one already in use.

if you are using a CGI version, then the php.ini is loaded for each call, however, it still needs to be found before the default one.

Posted: Fri Sep 17, 2004 2:19 pm
by timvw
if you're lucky, you can use .htaccess to set your include path.

another option is to use [php_man]ini_set[/php_man]