Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alanaasmaa's avatar

PHP 5.4 Next to PHP 7

Hello, i have vagrant homestead setted up.

I need very old version of PHP to upgrade one site. I have tried to install php 5.4 with phpbrew with no sucess. I think im pretty sure that i have installed everything that phpbrew needs.

Here is my output..

vagrant@homestead:~$ phpbrew install php-5.4.10 +default+fpm+mysql
===> phpbrew will now build 5.4.10
===> Loading and resolving variants...
Downloading http://museum.php.net/php5/php-5.4.10.tar.bz2 via curl extension
[==================================================================] 10.63/10.63MB 100%
===> Extracting /home/vagrant/.phpbrew/distfiles/php-5.4.10.tar.bz2 to /home/vagrant/.phpbrew/build/tmp.1471325715/php-5.4.10
===> Moving /home/vagrant/.phpbrew/build/tmp.1471325715/php-5.4.10 to /home/vagrant/.phpbrew/build/php-5.4.10
===> Checking patches...
Checking patch for replace apache php module name with custom version name
===> Configuring 5.4.10...


Use tail command to see what's going on:
   $ tail -F /home/vagrant/.phpbrew/build/php-5.4.10/build.log


===> Checking patches...
Checking patch for php5.3.29 multi-sapi patch.
Checking patch for php5.3.x on 64bit machine when intl is enabled.
Checking patch for openssl dso linking patch
===> Building...
Error: Make failed:
The last 5 lines in the log file:
/usr/bin/ld: ext/openssl/xp_ssl.o: undefined reference to symbol 'SSLv3_server_method@@OPENSSL_1.0.0'

//lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status

Makefile:252: recipe for target 'sapi/cli/php' failed

make: *** [sapi/cli/php] Error 1

Please checkout the build log file for more details:
         tail /home/vagrant/.phpbrew/build/php-5.4.10/build.log
vagrant@homestead:~$

Here are my warnings from log

/usr/bin/ld: warning: libssl.so.1.0.0, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.0.2
/usr/bin/ld: ext/openssl/xp_ssl.o: undefined reference to symbol 'SSLv3_server_method@@OPENSSL_1.0.0'
//lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:252: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1

Google is not helping me with this case, thanks !

I Got it wokring somehow... i didnt use +default.. Everythime when i ask help i figure it out myself.. :D

Problem was with openssl version.

0 likes
1 reply
hmvdbeek@gmail.com's avatar
Level 2

PhpBrew can't find your openssl module. You can use this option--with-openssl-dir=/usr/include/openssl

Please or to participate in this conversation.