Altering your php settings under phpsuexec

Started by Jason, March 24, 2006, 05:51:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jason

We've come across this a few times so I felt it might be helpful to post...

If you have the need to alter the way php works for your site, you could typically do it through your .htaccess file.  In the case of our latest servers which are running phpsuexec, you will have to do this through the use of a php.ini file instead. 


Jason

To turn register_globals on, use this in your php.ini

register_globals = On

They should be off by default.  This is the php standard since version 4.2

Jason

Just an update to this thread... 

You will generally have to have copies of the php.ini file you create in every effected folder.  In other words, if you have a site with all kinds of subdirectories/folders and you need php to run a specific way, you will need to upload your altered php.ini file into each of the impacted folders.

The Librarian

thanks Jason

I found a 'standard' php.ini via google, I hope that works lol

so the php.ini file would need to go into for example the testforum for it to work or would it have to go into every folder in the testforum for it to work. 

I need it specifically for packages to work so it should go in there or putting it in testforum would suffice?

thanks
The Librarian

Jason

Just start with a completely blank php.ini  -- I wouldn't use a standard one.

Just create a blank file and call it php.ini.  Then add just the configuration line(s) you need.  That way it will use the server's settings for everything and just override the particular variable you need changed.

You may have to experiment with the folders question.  I think it will need to be in every folder that has files that need to be parsed as php.  So probably in the forum folder, sources, etc...

The Librarian

:( ok I will have to give this more thought

I wish smf would fix the problem
The Librarian