Apache 2.2 / PHP 5.3 CLI --> Apache 2.4 / PHP 5.6 FPM + PHP 5.3 FPM Transfer

open4biz

Verified User
Joined
Mar 22, 2009
Messages
124
I recently moved a single account from one DA server running CentOS 6, Apache 2.2, and PHP 5.3 CLI to a new server running CentOS 7, Apache 2.4, PHP 5.6 FPM & PHP 5.3 FPM. While the first account worked for whatever reason, as soon as I tried the rest of the sites Apache would no longer load. Here's the error:

Code:
AH00526: Syntax error on line 24 of /usr/local/directadmin/data/users/sitename/httpd.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration

From /usr/local/directadmin/data/users/sitename/httpd.conf, line 24:

Code:
php_admin_value open_basedir /home/sitename/:/tmp:/usr/local/lib/php/:/usr/bin/

After a bit of digging it looks like there's a problem translating the old httpd.conf in 5.6/5.3 FPM? What is the suggested course of action to update httpd.conf for compatibility with FPM?

Thank you in advance for any help!

Ansel Taft
 
Hello Ansel,

How did you move your user account? Did you use directadmin to create a backup on old server and to restore it on a new one?

In case your configs are outdated or messed, you can use this:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build apache
./build rewrite_confs

to bring them in order (unless you've got custom outdated versions in /usr/local/directadmin/custombuild/custom/).
 
Regarding the transfer, yes, I used the Admin Backup/Restore feature to move accounts between boxes.

I do not have a /usr/local/directadmin/custombuild/custom/ folder.

In that case would the prescription stay the same?

Code:
cd /usr/local/directadmin/custombuild
./build update
./build apache
./build rewrite_confs

Question: do I run the commands above on the old or new box?

Thank you for your help!
 
Yes, the same. You should run this on the new server. Another place where custom templates might be placed is /usr/local/directadmin/data/templates/custom/. You need to check it as well.
 
Another place where custom templates might be placed is /usr/local/directadmin/data/templates/custom/. You need to check it as well.

It's empty.

I checked DirectAdmin Panel -> Admin Settings -> Customize Httpd Configurations. There are no custom configurations for the first account (which is why it's working). I'll work through the others.

Regarding this line:

Code:
./build apache

It just occurred to me to ask if it would make any difference that I'm using nginx as a front end proxy? Just making sure. :)

Thanks again for your help zEitEr!
 
Even if you use nginx+apache (webserver=nginx_apache), you can use

Code:
./build nginx
to re-build or upgrade nginx only
Code:
./build apache
to re-build or upgrade apache only
Code:
./build nginx_apache
to re-build or upgrade both nginx and apache
 
Back
Top