How to configure your local php.ini??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
joeRaven
Forum Newbie
Posts: 2
Joined: Thu Aug 26, 2004 2:01 am

How to configure your local php.ini??

Post 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??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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]
Post Reply