PDA

View Full Version : can't find php.ini, need to turn global_variables on


ferrit
01-13-2003, 05:15 PM
Hi,

I've installed entropy.ch 's php module and I'm going through everything I can find on the net. Only to find that although my scripts are talking to the database, register_globals is off, so I need to declare every variable at the begining, all real pain.

I;ve checked around and the file I need to edit is called 'php.ini' and according to my phpinfo.php file, this file is located here '/usr/local/lib' but when I try this in the terminal I get a file not found. I've tried usr/mysql/lib, usr/mysql/ all sorts but I'm allways getting the same answer. Anyone know what I should do ?

Thanks in advance,

Jon

Alex281
01-13-2003, 05:19 PM
If you dont have php.ini in /usr/local/lib then create it there, thats where it goes. all i have in mine is register_globals = on so you're not missing anything.

Alex

ferrit
01-13-2003, 05:23 PM
don't worry everyone (yeah right) a quick check on entropy.ch revealed the link to the answer, surprisingly on the php.net site ;-)

No point in getting used to doing things the wrong way, guess I'll have to declare all my vars at the begining, bit of a pain though :-(

Thanks for all who read the post.

Jon

ferrit
01-13-2003, 05:25 PM
problem is, terminal says I don't have usr/local/lib so what am I missing ?

Should I get used to having it on ? I only use my mac for developement I don't serve any pages so wouldn't it be best to used the reccomended way ??

Thanks Alex,

Jon

tamenti
01-14-2003, 01:55 AM
There is nothing bad in having register globasl on. The php code run on your server will be a little less secure, but some scripts, as Im sure yove foudn out ;), need register globals.

If its is your won scripts I recommend you to learn how to deal with register global being off. Your scripts will be more secure.

armin
01-14-2003, 08:11 AM
you can also put

php_value register_globals 1

somewhere in your httpd.conf.


works for me. hope this helps.