I turned on the safe_mode and some users need safe_mode off. In the httpd.conf I put php_admin_flag safe_mode Off or php_admin_flag safe_mode 0. After saved and it failed to restart as I received the error:
[email protected] [~]# service httpd restart
/etc/init.d/httpd restart: configuration broken, ignoring restart
/etc/init.d/httpd restart: (run 'apachectl configtest' for details)
Here is the errors:
Syntax error on line 2595 of /usr/local/apache/conf/httpd.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
php_admin_flag = why is it mis-spelled? I took it off the tutorial.
Are you using cPanel/WHM? If so, you should just stay away from the command line. And if you're going to edit something like httpd.conf, for heaven's sake make a backup first.
Things like PHP safe mode are generally defined in php.ini. You should go into the root WHM and rebuild apache using the formatted screens, checking the options you want as far as safe mode, phpsuexec, and so on. If you use phpsuexec, then PHP will run as a cgi and not be compiled into apache as a module.
If you have broken your httpd to the point where not even WHM works, then you should go to SSH as root and run: