goodness0001
05-30-2002, 06:14 PM
How do you turn off or regulate safe mode for the php binary?
![]() | View Full Version : PHP binary and safe mode goodness0001 05-30-2002, 06:14 PM How do you turn off or regulate safe mode for the php binary? denisdekat 05-30-2002, 06:40 PM Are yoiu on a linux server? Try this cd / ; find . -name php.ini -print I think you should be able to change things around in here ... I have yet to see it anywhere but in /etc but then again I have yet to see everything ... S2 Web Design 05-30-2002, 08:47 PM Recompile PHP without the "--with-apache" or "--with-apxs", but make sure you don't "make install" or you will overwrite your apache module installation, if you have PHP already installed as an apache module. When you're done, you'll be left with the php binary and just copy it over to "/usr/bin". The following should help: cd /php_source_directory make clean rm -f config.cache ./configure --prefix=/usr (any other options you want) make cp php /usr/bin Hope this helps! goodness0001 05-30-2002, 11:07 PM Here is my config: ./configure \ --with-mysql=/usr/local/psa/mysql \ --enable-discard-path \ --prefix=/usr/local/php \ then make and make install into the preset directory. Where does it read off of for the php.ini? Shyne 05-30-2002, 11:20 PM If you can't find the php.ini file then create a php page with the following text inside: <?phpinfo?> Run that php script in a browser and it will tell you from where it's loading the file. If it's not there then create one. You can get default configuration from another php.ini file(usually found in the source). In the php.ini file there is an option to turn off/on safe_mode. Tim Greer 05-31-2002, 01:29 AM Originally posted by Eric_Echter Recompile PHP without the "--with-apache" or "--with-apxs", but make sure you don't "make install" or you will overwrite your apache module installation, if you have PHP already installed as an apache module. When you're done, you'll be left with the php binary and just copy it over to "/usr/bin". The following should help: cd /php_source_directory make clean rm -f config.cache ./configure --prefix=/usr (any other options you want) make cp php /usr/bin Hope this helps! Why not do a make install? What if the PHP versions are different or have different modules built in? I'd suggest you compile Apache properly with all the relevant modules and configuration(s) (if applicable) and just rebuild all of it properly and install in the proper way, making sure it won't conflict with anything, nor will you postentially have an out-of-date or insecure (or buggy) previous version. The above is also assuming you have apxs, which you hopefully do, or you'll have to do more. :-) |