today all websites woke up offline: php_admin_value takes two arguments

Marks

Verified User
Joined
Jul 13, 2019
Messages
131
Today all sites woke up offline, Apache is stopped and the http status shows:

I've already tried removing the lines, but it seems to be an error in all httpd.conf for all sites.


service httpd status:
Sep 14 10:32:38 HOSTNAME.COM systemd[1]: Starting The Apache HTTP Server...
Sep 14 10:32:38 HOSTNAME.COM httpd[3293756]: AH00526: Syntax error on line 40 of /usr/local/directadmin/data/users/adbportu/httpd.conf:
Sep 14 10:32:38 HOSTNAME.COM httpd[3293756]: php_admin_value takes two arguments, PHP Admin Value
Sep 14 10:32:38 HOSTNAME.COM systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 10:32:38 HOSTNAME.COM systemd[1]: httpd.service: Failed with result 'exit-code'.
Sep 14 10:32:38 HOSTNAME.COM systemd[1]: Failed to start The Apache HTTP Server.
 
Have you checked in the admin settings under HTTPD Conf? Then check the custom conf files for the domain in question?
 
A few thoughts here as well...

Looking at the above logs as well, shows the error to be in /usr/local/directadmin/data/users/adbportu/httpd.conf

If all sites are down, the httpd.conf files for your sites may be also corrupt and need rebuilding. They inherit the values from the virtualhost template files in /usr/local/directadmin/data/templates/

1757873893300.png


Also, as per advice above, check in the admin panel for any additions for each domain located here:

1757874024408.png
1757874383353.png

Once done,
Bash:
#da build clean  # Clear cache and download fresh versions of files
#da build apache  # Optional; to rebuild apache
#da build rewrite_confs

Regarding PHP

The php_admin_value[........] is taken from the template file /usr/local/directadmin/data/templates/php-fpm.conf and also your custom settings in the Custom HTTPD Configurations here:
with the php_admin_value error, you may have a custom setting, but also applied it to every PHP version (as shown ticked) or globally (here's one of mine) meaning all sites could have same error.
1757874555065.png


All php-fpmXX.conf config files for each user are contained here:

1757874753557.png


Again,
Once done, here's some optional commands you could use depending on what you've done and need to reset:

Bash:
#da build clean  # Clear cache and download fresh versions of files
#da build php X.X # Optional to rebuild a specific PHP Version X.X 
#da build php # Will rebuild every PHP version in your options.conf file
#da build apache  #Optional to rebuild Apache
#da build rewrite_confs

Hope this info helps. Sorry for length!
 
f all sites are down, the httpd.conf files for your sites may be also corrupt
Or maybe not, might be httpd won't start because it can't load a httpd.conf and in this case the specific user's which also the error says.
Otherwise more errors would be shown most likely.

I would check that specific httpd.conf because that php admin value does not belong in there by default. This means this must have been customized by admin or reseller, probably the wrong way.

Chances are very big that removing that line and restarting httpd will restart everything again.

However we did not yet hear back from @Marks so who knows, he might have fixed it already.
 
I would check that specific httpd.conf because that php admin value does not belong in there by default. This means this must have been customized by admin or reseller, probably the wrong way.
Cheers Richard. agreed. Thought i'd add in the php-fpmXX.conf.custom bits for OP to check as that's where php_admin_value[] should correctly live if a reseller or user has in fact made an error and edited the wrong file. DA should inform the user when they click the submit button that there is a syntax error if the custom file being edited is in fact wrong. I've encountered that once with my custom PHP settings. Hope he's sorted it 😁
 
Back
Top