Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP safe mode compile question

Status
Not open for further replies.

paladin256

Technical User
Apr 16, 2002
189
US
I am trying to compile php 4.2.2 as follows
./configure --enable-safe-mode --with-apache=/apache_1.3.26 --with-openssl=/usr/local/openssl-0.9.6b
The config runs fine as well as make and make install. I then compile apache and it installs fine and php work but when I run php info it show safe mode as off. Is there some other option I need to enable to run php in safe mode?
 
Is "safe_mode" set to off in php.ini? ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
Even though this is a Solaris box? Do I turn it on before or after I compile PHP?
 
After compilation -- php.ini is a runtime configuration file common to all platforms.

Every time PHP starts, the first thing it does is read that file. ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
Could you give me the proper sytax to put in the ini file?
 
You already have a php.ini file -- it comes with the source code and was installed when you executed "make install".

Find that file and look for a line in it that reads "safe_mode = Off". Change that file to "safe_mode = On".

I don't know where the default installation location for php.ini would be on your box -- on Linux it's classically in /etc.

If PHP is running, create a script which reads:

<?php
phpinfo();
?>

then point to it in your web browser. Near the top of that display, there is a table which reads &quot;Configuration File (php.ini) Path&quot;. That's where php.ini is. ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
the config file path is /usr/local/lib and the php.ini file was not there so I copied it to that location made the edit to the ini file restarted apache but it still says safe mode is off.
 
Disreguard previous post IE was caching the page even though I have it set not to. Copying the file and making the edit work perfectly.

Thanks for the help
 
Good thing. I was fresh out of ideas. ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top