Installing PHP5.3 on Ubuntu 12.04 does not work

rjd22

Verified User
Joined
Jul 10, 2008
Messages
80
Installing PHP 5.3 onto the directadmin seems to have a bug in it. While I would love to upgrade to PHP 5.4 this is at the moment not an option for me. I search this error and the only solution I found was compiling it manually. Can someone help me how so do this?

It is on the bottom on the thread here: http://forum.directadmin.com/showthread.php?t=48336

Or can a staff member of directadmin fix the problem in the repo's?

This is the error:

//usr/bin/ld: ext/intlusr/msgformat/bin//ldmsgformat_helpers.o:: undefinedext/ referenceintl/ tomsgformat/ symbolmsgformat_helpers.o: 'undefined __gxx_personality_v0@reference @CXXABI_1.3to '
symbol /usr'/__gxx_personality_v0@bin/@CXXABI_1.3ld:' note:
/'__gxx_personality_v0@usr/@CXXABI_1.3bin/' ldis: note : defined 'in__gxx_personality_v0 DSO@@ /CXXABI_1.3usr/'lib/ isx86_64- linuxdefined-gnu /libstdcin ++DSO .so.6/usr so/lib try/x86_64 adding-linux it- tognu/ thelibstdc+ linker+. commandso.6 so line
try /usradding /libit /x86_64to -the linux-linker gnucommand /libstdcline
++/usr.so.6/lib: /could x86_64-notlinux- readgnu/ symbolslibstdc+: +.Invalid so.6operation
: could not read symbols:collect2: Invalid operation
ld returned 1 exit status
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
make: *** [sapi/cgi/php-cgi] Error 1
 
For the people also having this problem I fixed this by editing the build file and adding the following code to line 7331:

if [ "${INT_RELEASE}" = "5.3" ]; then
echo "Patching the make file for ubuntu";
sed -i '/^BUILD_/ s/\$(CC)/\$(CXX)/g' Makefile
sleep 5
fi

Can some directadmin staff please respond if they might include an edited version of it in the repo's?
 
Last edited:
Hello,

Thanks for the report.

Can you paste us the output of this command:
Code:
cat /etc/debian_version
I just tested php 5.3 with php-fpm and mod_cli, on both our 7.4 32-bit and 64-bit boxes (they're Debian, and not Ubuntu), but didn't run into the compile issues.
We can consider adding the code, but would prefer to have checks to only add it to those OS's that need it, rather than all Debian 7 systems (unles it's a more common issue than I'm realizing).. hence some info about your OS would help for those checks.

Note, as a temporary workaround, you can add the sed command into the configure.php53 file.. which can be copied to the custom folder, so it doesn't get lost, eg (assuming mod_php):
Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -p configure/ap2/configure.ph53 custom/ap2
cd custom/ap2
nano configure.php53
then after the very bottom of the configure file, add a new line (no \ characters), basically a new command, and add the sed command there.. which would alter the Makefile right after the configure is done. (The configure.php53 is a script, you can run whatever you want in there.. not the the "./configure" call is all one line, the \ characters just link them together to make it clearner looking. Add the sed on a new line)

Just a general comment though, installing end-of-life software (php 5.3: July 2013 was the last regular release) on a newer OS can often have issues.. as php won't be updated to fix changes/updates to newer systems.
Merging the old with the new can often have issues, although we do try to make them work together, but it's not always possible in some cases.

John
 
My debian system is: "wheezy/sid". With is Ubuntu 12.04 LTS.

As far as I read the forums only people installing ubuntu have problems with installing PHP 5.3. Because of the big changes in PHP 5.4 my users are sadly not yet ready to change to 5.4+.

I'm thinking of installing PHP 5.3 with the "./build php_expert php_release php_mode" command. But is it possible to set in the apache or htaccess to use that one for those users? What would be the recommended way? Since in that case I can just use PHP5.4 and 5.5 as default directadmin install and won't have any further problems.
 
Last edited:
I have an idea :) Please check if the following fixes it for you:
Code:
mkdir /root/zlib_backup
[COLOR=#333333]mv /usr/local/lib/libz* [/COLOR]/root/zlib_backup/
[COLOR=#333333]mv /usr/local/include/zlib.h [/COLOR]/root/zlib_backup/
ldconfig
cd /usr/local/directadmin/custombuild
./build update
./build php n
 
Back
Top