could I install multiple version copy of php ?

Registered User

i did that and when i swith for php5.3 i get internal server error "404" and i cant see my page

when i check the phpinfo in the open_basedir is emty

can u help my with that

thenks
 
You CAN have PHP 5.2 and 5.3 on the system. This trick will work with CustomBuild 1.2 (PHP5.2 as CLI and 5.3 as CGI (suPHP)):
Code:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build update
mkdir -p custom/suphp
cp -pf configure/suphp/configure.php5 custom/suphp/configure.php6
perl -pi -e 's/php53/phprep/' versions.txt
perl -pi -e 's/php6/php53/' versions.txt
perl -pi -e 's/phprep/php6/' versions.txt
./build set php5_ver 5.2
./build set php6_cgi yes
./build set php5_cgi no
./build set php5_cli yes
#set php6-cgi (or cli) to yes in the options.conf
./build php n
mv -f /usr/local/php6 /usr/local/php6_old
ln -s /usr/local/php5 /usr/local/php6
Now PHP 5.3 will be installed as PHP6 in configuration files :)

mmm... to "./build php n" it's all ok, but if I create phpinfo() file the version is "PHP Version 6.0.0-dev"

If I type:

mv -f /usr/local/php6 /usr/local/php6_old
ln -s /usr/local/php5 /usr/local/php6

the version is "PHP Version 5.2.17" :confused::confused:

any solutions?

Thank You

Vito
 
Anyone got 5.2 cgi suphp and 5.3 cli working? Is i can see problem is still unsolved.
 
compiler crash

While trying to build PHP5.3 (or PHP5.4), I receive the following compile error.

Code:
/bin/sh /usr/local/directadmin/custombuild/php-5.3.14/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/mysqli/ -I/usr/local/directadmin/custombuild/php-5.3.14/ext/mysqli/ -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/php-5.3.14/include -I/usr/local/directadmin/custombuild/php-5.3.14/main -I/usr/local/directadmin/custombuild/php-5.3.14 -I/usr/local/directadmin/custombuild/php-5.3.14/ext/date/lib -I/usr/local/directadmin/custombuild/php-5.3.14/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/kerberos/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/directadmin/custombuild/php-5.3.14/ext/mbstring/oniguruma -I/usr/local/directadmin/custombuild/php-5.3.14/ext/mbstring/libmbfl -I/usr/local/directadmin/custombuild/php-5.3.14/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/local/directadmin/custombuild/php-5.3.14/ext/sqlite3/libsqlite -I/usr/local/directadmin/custombuild/php-5.3.14/TSRM -I/usr/local/directadmin/custombuild/php-5.3.14/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden  -c /usr/local/directadmin/custombuild/php-5.3.14/ext/mysqli/mysqli.c -o ext/mysqli/mysqli.lo 
In file included from /usr/local/directadmin/custombuild/php-5.3.14/ext/mysqli/php_mysqli_structs.h:61,
                 from /usr/local/directadmin/custombuild/php-5.3.14/ext/mysqli/mysqli.c:33:
/usr/include/mysql/my_global.h:364:24: error: asm/atomic.h: No such file or directory
make: *** [ext/mysqli/mysqli.lo] Error 1

[root@vms custombuild]# cat /etc/issue
CentOS release 5.8 

[root@vms custombuild]# yum provides \*/atomic.h
...snip...
kernel-devel-2.6.18-308.8.2.el5.x86_64 : Development package for building kernel modules to match the kernel.
Repo        : installed
Matched from:
Filename    : /usr/src/kernels/2.6.18-308.8.2.el5-x86_64/include/asm-generic/atomic.h
Filename    : /usr/src/kernels/2.6.18-308.8.2.el5-x86_64/include/asm-x86_64/atomic.h
Filename    : /usr/src/kernels/2.6.18-308.8.2.el5-x86_64/include/asm-i386/atomic.h
Filename    : /usr/src/kernels/2.6.18-308.8.2.el5-x86_64/include/asm-generic/bitops/atomic.h
 
./build mysql does the following:
Code:
Dumping database x (all databases listed here)
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.0.91-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.0.91-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.0.91-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.0.91-1.glibc23.x86_64.rpm
Stopping mysqld ...
Shutting down MySQL..                                      [  OK  ]
Updating MySQL 5.0.91 to 5.0.91
Preparing...                ########################################### [100%]
        package MySQL-shared-5.0.91-1.glibc23.x86_64 is already installed
        package MySQL-client-5.0.91-1.glibc23.x86_64 is already installed
        package MySQL-devel-5.0.91-1.glibc23.x86_64 is already installed
        file /usr/lib64/libmysqlclient.so.15.0.0 from install of MySQL-shared-5.0.91-1.glibc23.x86_64 conflicts with file from package MySQL-shared-community-5.0.51a-0.rhel4.x86_64
conflicts for what seems to be every file in the package (which seems obvious because it's replacing itself?
Then it goes on with:
Starting MySQL.                                            [  OK  ]
Giving mysqld a few seconds to start up...
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
This installation of MySQL is already upgraded to 5.0.81, use --force if you still need to run mysql_upgrade
/usr/bin/mysqlcheck: unknown option '--fix-db-names'
cp: `/usr/lib/libmysqlclient.so' and `/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
Shutting down MySQL.                                       [  OK  ]
Starting MySQL.                                            [  OK  ]
It is recommended to do "./build php n" after MySQL update.

Looks like it's just trying to swap static built RPMs instead of actually building from source.
 
confirm 5.5 is needed

Thanks, I can confirm that it's possible to compile 5.3 when MySQL 5.5 is present. So I suppose I should first upgrade MySQL on production and then roll out PHP5.3. :)
 
No.

In order to compile PHP 5.3, MySQL 5.5 had to be present (as suggested in #36). If I try to compile on a system that has MySQL 5.0.81, the compile fails.
 
Last edited:
Back
Top