Updating PHP Troubles

hci

Verified User
Joined
Jun 15, 2004
Messages
372
I wanted to update PHP so I followed this.

http://help.directadmin.com/item.php?id=26
cd /usr/local/directadmin/custombuild
./build update
./build all d

After wards I received this.
[root@server custombuild]# service httpd start
Starting httpd: httpd: Syntax error on line 18 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/mod_ruid2.so into server: /usr/lib/apache/mod_ruid2.so: cannot open shared object file: No such file or directory

I edited /etc/httpd/conf/extra/httpd-phpmodules.conf and commented the top 3 lines to get httpd to start:

#LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
#Mutex posixsem
#LoadModule mpm_prefork_module /usr/lib/apache/mod_mpm_prefork.so
LoadModule php5_module /usr/lib/apache/libphp5.so

Anyone know what caused this etc? Is it safe to just comment these items out? I have Directadmin running on CentOS 5.x 64.
 
Please try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build mod_ruid2

If you get any errors while running that, please post them here.
 
That fixed this error with:
#LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so

I can uncomment it now. I still must leave the other two commented in order for httpd to start. Also, Squirrelmail no longer works. When logging in I get:

ERROR
Preference file, /var/www/html/squirrelmail/data/XXXXXXXXXXXXXXXXX.pref.tmp, could not be opened. Contact your system administrator to resolve this issue.

The server was running fine before this. I simply wanted to update PHP so I could try Afterlogic Webmail. AfterLogic does work now but SquirrelMail does not and many have there address books etc saved there. Plus I really want to know what is going wrong.

Any ideas? Thanks.
 
I think it is better not to run ./build all d, but to build them one by one, then it is easyer to locate whats going wrong. If you only wanted to upgrade php, you could have run: ./build php n

Try this to see if the problems is solved:

cd /usr/local/directadmin/custombuild
./build update (always run this before anything else)
./build versions (to check if there is error on any app that is installed, or if there is a new version)
./build rewrite_confs (this will overwrite files in /etc/httpd/conf/ )
./build php n
./build apache
 
Last edited:
When I get too.

./build versions

I get:

Latest version of Apache: 2.4.4
Installed version of Apache: 2.2.17
Apache 2.2.17 to 2.4.4 update is available.

PHP Deprecated: Comments starting with '#' are deprecated in /usr/local/lib/php.ini on line 322 in Unknown on line 0
Latest version of PHP (mod_php): 5.4.17
Installed version of PHP (mod_php): 5.4.17

Have not gone farther. What does that mean?
 
That fixed this error with:
#LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so

I can uncomment it now. I still must leave the other two commented in order for httpd to start. Also, Squirrelmail no longer works. When logging in I get:

ERROR
Preference file, /var/www/html/squirrelmail/data/XXXXXXXXXXXXXXXXX.pref.tmp, could not be opened. Contact your system administrator to resolve this issue.

The server was running fine before this. I simply wanted to update PHP so I could try Afterlogic Webmail. AfterLogic does work now but SquirrelMail does not and many have there address books etc saved there. Plus I really want to know what is going wrong.

Any ideas? Thanks.

That is a permissions problem. It could be solved by either running "./build squirrelmail" or:
Code:
chown -R webapps:webapps /var/www/html
 
When I get too.

./build versions

I get:

Latest version of Apache: 2.4.4
Installed version of Apache: 2.2.17
Apache 2.2.17 to 2.4.4 update is available.

PHP Deprecated: Comments starting with '#' are deprecated in /usr/local/lib/php.ini on line 322 in Unknown on line 0
Latest version of PHP (mod_php): 5.4.17
Installed version of PHP (mod_php): 5.4.17

Have not gone farther. What does that mean?

It means that you have added # on line 322 (at the beginning of it) in file /usr/local/lib/php.ini. You should comment lines out using ";", not the "#" character. Also, it doesn't look like you are running CustomBuild 2.0, because it supports Apache 2.4 only. Please run upgrade commands from http://forum.directadmin.com/showthread.php?t=44743.
 
>>chown -R webapps:webapps /var/www/html

Does not fix the SquirrelMail issue.
 
I think I am on custombuild 2:

[root@server directadmin]# ls -la
total 19652
drwxr-xr-x 7 diradmin diradmin 4096 Jul 16 15:55 .
drwxr-xr-x 17 root root 4096 Jul 16 13:56 ..
drwx------ 2 diradmin diradmin 4096 Jul 16 15:00 conf
drwxr-xr-x 4 root root 4096 Dec 20 2011 custombuild
drwxr-xr-x 3 root root 4096 Apr 11 2011 custombuild_1.x
-rw-r--r-- 1 root root 102809 Jul 16 02:47 custombuild.tar.gz
-rwx------ 1 diradmin diradmin 255613 Jun 28 10:51 da-popb4smtp
drwx--x--x 8 diradmin diradmin 4096 Jul 16 16:00 data
-rwx------ 1 diradmin diradmin 6803260 Jun 28 10:51 dataskq
-rwx------ 1 diradmin diradmin 6786916 Jun 28 10:51 directadmin
drwx--x--x 4 diradmin diradmin 4096 Jun 28 10:51 scripts
-rw------- 1 diradmin diradmin 6059826 Jun 28 10:51 update.tar.gz
 
Then it seems you have done a incomplete upgrade to custombuild 2.0. I am sorry to say it, but it seems like a mess then. If you want to stay on custombuild 2.0, you should upgrade everything and be prepared to do a lot of manual migration and fixing. Edit: Please see cb 2.0 faq http://forum.directadmin.com/showthread.php?t=44743 you should follow the upgrade instructions there to complete your upgrade to custombuild 2.0.
 
To check for sure what custombuild version you are running, do:

Code:
cd /usr/local/directadmin/custombuild
./build

Then you will see the custombuild version number at the beginning of the output.
 
[root@server custombuild]# ./build
+--------------------------------------------------------+
| |
| DirectAdmin WebServices Installer |
| Written by Martynas Bendorius and DirectAdmin |
| Version: 2.0.0-RC5 |
| |
+--------------------------------------------------------+
| To build everything run: |
| ./build all |
| |
| NOTE: Command all will compile everything as it is set |
| in the options.conf file, please take a look at |
| "./build options"! |
+--------------------------------------------------------+
| Install/update server components: |
| ./build apache |
| ./build autoconf |
| ./build automake |
| ./build awstats |
| ./build clamav |
| ./build curl |
| ./build dovecot |
| ./build exim |
| ./build freetype |
| ./build iconv |
| ./build icu |
| ./build ioncube |
| ./build libjpeg |
| ./build libpng |
| ./build libtool |
| ./build libxml2 |
| ./build libxslt |
| ./build m4 |
| ./build mcrypt |
| ./build mhash |
| ./build mod_ruid2 |
| ./build mod_fastcgi |
| ./build mod_fcgid |
| ./build mysql |
| ./build nginx |
| ./build pigeonhole |
| ./build pcre |
| ./build php |
| ./build proftpd |
| ./build pureftpd |
| ./build spamassassin |
| ./build suphp |
| ./build webalizer |
| ./build zend |
| ./build zlib |
+--------------------------------------------------------+
| Components configuration options: |
| ./build exim_conf |
| ./build php-ini |
| ./build rewrite_confs |
| ./build secure_php |
+--------------------------------------------------------+
| Install/update web applications: |
| ./build phpmyadmin |
| ./build roundcube |
| ./build squirrelmail |
+--------------------------------------------------------+
| CustomBuild related options/functions: |
| ./build create_options |
| ./build cron |
| ./build options |
| ./build set option_name value |
| ./build set_fastest |
| ./build set_fastest_quiet |
| ./build update_da |
| ./build update_versions |
| ./build update_webapps |
| ./build used_configs |
| ./build versions |
+--------------------------------------------------------+
| Jailed shell (beta): |
| ./build all_jail |
| ./build coreutils |
| ./build shell |
| ./build smtp_mail |
| ./jail/jail_user.sh user |
+--------------------------------------------------------+
| Remove old build data: |
| ./build clean |
| ./build clean_old_webapps |
+--------------------------------------------------------+
| Get latest build script or (and) data: |
| ./build update |
| ./build update_script |
+--------------------------------------------------------+
| Get data for current build script: |
| ./build update_data |
+--------------------------------------------------------+
| Recommended for experienced users only (!): |
| ./build php_expert php_release php_mode |
| ./build todovecot |
| ./build set_service service ON|OFF|delete |
+--------------------------------------------------------+
| You can pass a 2nd argument to automate the input: |
| ./build <option> d : do the default action |
| ./build <option> y : answer yes to all questions |
| ./build <option> n : answer no to all questions |
+--------------------------------------------------------+
 
Ok, so you have done a incomplete upgrade to custombuild 2.0. I would recommend you hire a system admin to complete the upgrade and make sure everything is correct. If you want to try a little more yourself, you could do the following:

Delete or rename your php.ini file at: /usr/local/lib/php.ini (then your php.ini will be created again with correct settings for PHP 5.4.x the next time you recompile php). Then:

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

After that, you should do ./build versions , and then ./build everything that has a new version or has a error/warning. Edit: And please remember to read the cb 2.0 faq also: http://forum.directadmin.com/showthread.php?t=44743
 
Last edited:
>>incomplete upgrade to custombuild 2.0

What exactly is that?
 
Back
Top