SUPHP and httpd.conf issues

future assassin

Verified User
Joined
Feb 15, 2007
Messages
15
I switched to SUPHP about a month ago. Everything works fine except when making any changes to user/reseller accounts in directadmin, adding new domains, domain pointers or making any changes where DA writes to a users httpd.conf file.

When apache is restarted I get this

Stopping httpd: [FAILED] Starting httpd: Syntax error on line 31 of /usr/local/directadmin/data/users/****/httpd.conf: Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration [FAILED]

I then have to manually go and rem out the php_admin_flag lines for what ever domain the changes were made for. After restarting apache everything works again.

I'm running on
Cent OS
Apache 1.3.37
DirectAdmin 1.29.0
SUPHP 4.4.5

Any ideas on how to solve this.
Thanks
 
Update your DirectAdmin version to 1.297 and run this:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

It will solve your problem. Good luck!
 
Update your DirectAdmin version to 1.297 and run this:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

It will solve your problem. Good luck!

One question though, do I have to run this
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

after everytime DA writes to the httpd.conf file or just the one time after the upgrade?

Thanks
 
I just updated DA and ran the above command and I'm still getting php_admin_flag errors and Apache wont restart untill I rem out all the php+admin_flag instances.

****ty part was I had to then manually go in and rem out those line to every domain as they were are resetafter the update - good times.

<Directory /home/****/domains/****.com/public_html>
Options +Includes -Indexes
#php_admin_flag engine ON
#php_admin_flag safe_mode OFF
#php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f ****@****.com'
#php_admin_value open_basedir /home/****/:/tmp:/usr/local/lib/php/

</Directory>
 
Are you loading the php module into apache through the main httpd.conf? If you aren't, those commands wont work as apache is not recognizing PHP as part of it. That is one of the downfalls to using PHP as CGI because you cannot set each person open_basedir and sendmail_path per virtualhost, it either has to be in the global php.ini or each user has to have an individual php.ini.
 
I tested this by putting in a php.ini file into a users directory and putting in the php flags in there but sill no go when I tested by creating sub domain and domain pointers. When apache is restarted it throws out errors.

Cant I just edit virtual_host.conf template and rem out the php_admin_flags there?
 
One question though, do I have to run this
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

after everytime DA writes to the httpd.conf file or just the one time after the upgrade?

Thanks

Just one time to rewrite the templates :) Make sure you don't have any custom templates of apache (/usr/local/directadmin/data/templates/custom).
 
Just one time to rewrite the templates :) Make sure you don't have any custom templates of apache (/usr/local/directadmin/data/templates/custom).

Hi

I had my admin do the upgrade and run the command but same thing was happening after the DA upgrade. I also didn't have any custom templates at that time (there were templates in the custom folder but they were all empty).

I'll keep on using the custom template solution for now till a better? solution is found.
 
Just realized you have to changed all the templates for this to work. Other wise when you add domains/pointers/sub domains that have ssl apache wont restart.
 
Back
Top