./build update_versions replaces my PHP 5.3 by PHP 5.4

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
I have got the following setup:
Code:
php1_release=5.3
php2_release=5.4
php1_mode=mod_php
php2_mode=php-fpm
php_ini=no
#Possible values - production or development
php_ini_type=production
I ran ./build update to see if DA already had put PHP 5.3.21 and 5.4.11 in the custombuild setup. Yes, both new sources were downloaded. So far, so good.

Bur when running ./build update_versions today to install 5.3.21 and 5.4.11, the build started with compiling PHP 5.4, quote: (mod_php). I found the mod_php a little strange, but let it running. At the end there was this message:
Code:
Build complete.
Don't forget to run 'make test'.

Make Complete
Installing php...
Installing PHP SAPI module:       apache2handler
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' libphp5.la /usr/lib/apache
/var/www/build/libtool --mode=install install libphp5.la /usr/lib/apache/
libtool: install: install .libs/libphp5.so /usr/lib/apache/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/lib/apache/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/directadmin/custombuild/php-5.4.11/libs'
chmod 755 /usr/lib/apache/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
make[1]: *** [install-pear-installer] Error 1
make: *** [install-pear] Error 2

*** The install has failed, would you like to try to install it again? (y,n):
It really had installed PHP 5.4.11 where 5.3.21 should have been:
Code:
bash-3.2# /usr/local/bin/php -n -v
PHP 5.4.11 (cli) (built: Jan 18 2013 17:41:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
I answered 'n' to the question to retry the install and ./build started compiling PHP 5.4.11 once again, this time as PHP-FPM:
Code:
Make Complete
Installing php...
Installing PHP CLI binary:        /usr/local/php54/bin/
Installing PHP CLI man page:      /usr/local/php54/php/man/man1/
Installing PHP FPM binary:        /usr/local/php54/sbin/
Installing PHP FPM config:        /usr/local/php54/etc/
Installing PHP FPM man page:      /usr/local/php54/php/man/man8/
Installing PHP FPM status page:      /usr/local/php54/php/fpm/
Installing PHP CGI binary:        /usr/local/php54/bin/
Installing build environment:     /usr/local/php54/lib/php/build/
Installing header files:          /usr/local/php54/include/php/
Installing helper programs:       /usr/local/php54/bin/
  program: phpize54
  program: php-config54
Installing man pages:             /usr/local/php54/php/man/man1/
  page: phpize54.1
  page: php-config54.1
Installing PEAR environment:      /usr/local/php54/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.3.0
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
[PEAR] PEAR           - already installed: 1.9.4
Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /usr/local/php54/etc/pear.conf
You may want to add: /usr/local/php54/lib/php to your php.ini include_path
/usr/local/directadmin/custombuild/php-5.4.11/build/shtool install -c ext/phar/phar.phar /usr/local/php54/bin
ln -s -f /usr/local/php54/bin/phar.phar /usr/local/php54/bin/phar
Installing PDO headers:          /usr/local/php54/include/php/ext/pdo/
Copying php.ini..
/usr/local/php54/lib/php.ini already exists, skipping.
Usage: /etc/init.d/php-fpm54 {start|stop|restart|force-quit|reload|graceful}PHP 5.4.11 Installed.
Interesting setup, both PHP's the same version. But not what I wanted. How do I correct this?
 
Last edited:

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
./build php d did the trick. In the mean time my server was down, because the extensions were built for PHP 5.3 and not 5.4. And there was a 'allow_call_time_pass_reference = On' directive in the PHP 5.3 php.ini, which threw a fatal error under PHP 5.4. allow_call_time_pass_reference was already deprecated in PHP 5.3, so I wonder why it ever was activated in the 5.3 php.ini.

Luckily enough, I ran ./build update_versions on my dev-server, so now real users were noticing downtime.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,330
Location
LT, EU
I moved PHP 5.4 compatibility check (for php.ini) before "make install" in CB 2.0 development version (it should be uploaded to DA servers in a few days). Thank you for the report.
 

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
This looks like a solution for the 'allow_call_time_pass_reference' problem, but I may be mistaken. Does it also solve the problem that ./build update_versions replaces PHP 5.3 by PHP 5.4?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,330
Location
LT, EU
If you switch major PHP versions in options.conf file, you should always run "./build php n" afterwards. "./build update_versions" is a command for updating current software. For example, if you set ftpd=pureftpd in the options.conf file and you have proftpd installed on the server, "./build update_versions" will do nothing regarding to pureftpd, because it's not installed on the server. So, if you change php1_release from 5.4 (or if 5.4 is currently installed on the system) to 5.3, run "./build php n" for the first time.
 

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
I did not switch PHP versions. This was the setup with PHP 5.3.20 as mod_php and PHP 5.4.10 as PHP-FPM. I merely wanted to upgrade those running versions to 5.3.21 and 5.4.11.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,330
Location
LT, EU
I found a place in the code which could have caused this behavior. A fix is now included to the dev version of CB 2.0 too. Thank you for making CB 2.0 better.
 

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
I can try the upgrade once again. My provider has a way to clone the production server to the development server. How do I get the dev version of CB 2.0?
 

Jan_E

Verified User
Joined
Apr 29, 2011
Messages
121
Location
Amsterdam, NL, EU
I made a fresh clone from my productionserver to my dev server, so I am back at PHP 5.3.20 as mod_php and PHP 5.4.10 ad php-fpm. When and how can I test ./build update_versions once again?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,330
Location
LT, EU
Code:
cd /usr/local/directadmin/custombuild
wget -O build http://www.custombuild.eu/build
chattr +i build
# execute your commands here now
chattr -i build
I do "chattr +i", because if you run "./build update", that would overwrite the build script. It was tested for the problem you mentioned.
 
Top