• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Multiple PHP - Help with install problems

bigblue

Basic Pleskian
I have Plesk 11.5 running Ubuntu 10.04 and PHP 5.3 and I am having problems trying to install PHP 5.4 following the instructions HERE - this is my first time attempting this so please appreciate that I am not so tech savvy as most of you ! If anyone can help me do this with easy to follow step by step instructions then that would be really appreciated.

Firstly, I'm trying to source PHP 5.4 - following instructions, I have copied the link from php.net to a mirror - I use wget <copied link> to get the file.. so: 'wget http://uk1.php.net/get/php-5.4.27.tar.gz/from/this/mirror' - this appears to download and then shows:

Code:
Length 15333755 (15M) [application x/gzip]
Saving to: 'mirror'

Saving to mirror ? Is that correct, as trying to follow the next instructions to unpack the file with 'gunzip php-5.4.27.tar.gz' shows no such file or directory ?

..and this is before I get to the configure stage !

Any help welcomed please.. thx
 
Thanks Marko, that appeared to work as no errors were received.

But.. now in step 3 as per instructions when I run:
cd ../php-5.4.27
I receive 'no such file or directory' ??

Exploring the directory shows this, so the file seems to be there ?
# ls
PLSK.01532854.0000.xml php-5.4.27 php-5.4.27.tar.gz
parallels php-5.4.27.tar plesk-503973.lic

Am I missing something ?
 
Last edited:
Step 3 of the instructions are:
cd ../php-NN
./configure --prefix /usr/local/phpNN
make
make install
So.. using <cd../php-5.4.27> throws up a 'no such file or directory' error (see my previous post) - why is this happening ?

Also, if I use <./configure --prefix /usr/local/php-5.4.27> - is that enough for php5.4 to work - or do I need to add more elements to configure ?

I'm using Ubuntu10.04 with PHP5.3 at the moment, so how do I set up the <./configure> to reflect what my current PHP5.3 is using ? Like I said, I'm a total newbie at this, so I feel like I'm working in the dark with no light switch !

Can anyone kindly help me get through this so that I have PHP5.4 also available ?
 
I'm still struggling with trying to do this..

I've now started from scratch after removing php-5.4.27 - retrying again with 5.4.28

So far I have got this to run ok after following instructions in THIS thread:

# wget http://uk1.php.net/distributions/php-5.4.28.tar.gz
# tar zxf php-5.4.28.tar.gz
# cd php-5.4.28

Next, after running this:

./configure --prefix=/usr/local/php5.4.28

.. I receive an error as follows:

checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for cc... no
checking for gcc... no
configure: error: in `/root/php-5.4.28':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

'no acceptable C compiler found in $PATH' ?? Any ideas why this error is showing?
 
Thx Igor - after installing and then running './configure again', I now get this:

configure: error: xml2-config not found. Please check your libxml2 installation.

What do I run to install this - I'm using Ubuntu10.04 ?
 
Thx Igor

I used this, which worked (for Ubuntu):

# apt-get install libxml2-dev

Also, on running that, I received this within the install output:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously deselected package zlib1g-dev.

For anyone else who maybe has this, I successfully set my locale with this command (but you will need to set for your own locale):

# locale-gen en_GB.UTF-8

..then run this to see if it worked:

 
Last edited:
Now that those errors are fixed, I tried compiling again:

# ./configure --prefix=/usr/local/php5.4.28

This went ok, so then I run:

# make && make install

This went ok, but at the end I see this:

cc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

Any ideas ?
 
Thx for the link, but there is nothing there referring to my problem in my previous post - so far I have got this far thanks to some help from here and also Google.

I have searched Google and found that this current problem may be related to not enough RAM or that I could bypass that by using:

# ./configure --prefix=/usr/local/php5.4.28 --disable-fileinfo

I have tried that, but then I obviously don't see any file info, so can't see what is going on.

As I said, please appreciate that I'm a complete newcomer to this - something that for most people here is a simple and everyday thing to do, but for myself it isn't - it's difficult to understand without proper training and experience.

Seriously, if anyone can help me out here, then it would be appreciated.. as I'm now stuck with this error message and what I need to do to fix it. Is it really this difficult to install another version of PHP ?


Thx
 
Last edited:
My VPS host at Webfusion suggested that I upgrade to a higher package with more memory.

Here is my current memory status - I have tried again to make install, but keep receiving the same error..

memoryusage.png

Is there any way that I can do this without having to upgrade my VPS from 1GB to 2GB memory ??

Also, what is this workaround using '--disable-fileinfo' ? I tried this but then couldn't see anything, which stopped me from completing everything..

Can anyone help me out with this please ?
 
Shutdown every daemon/service (mysql, apache, nginx etc). I had a server with 1 GB RAM and i had no problems with compiling and installing multiple php versions.

I'm using

./configure '--cache-file=../config.cache' '--prefix=/usr/local/php5512-cgi' '--with-config-file-path=/usr/local/php5512-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php5512-cgi' '--with-png-dir=/usr/local/php5512-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php5512-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--with-sqlite3' '--with-libxml-dir=/usr/local/php5512-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-mysql' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php5512-cgi/pear' '--with-mcrypt' '--enable-intl' '--with-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php5512-cgi/php.d' '--enable-zip' '--with-mhash' '--enable-opcache' '--with-ldap' '--with-ldap-sasl'

- then "make" and after success "make install"
-> /usr/local/psa/bin/php_handler --add -displayname PHP-5.5.12 -path /usr/local/php5512-cgi/bin/php-cgi -phpini /usr/local/lib/php5512/php.ini -type fastcgi
 
Thx Redhell.. apologies for the delay replying to your last post.. I got sidelined in hospital :(

Ok.. I need to complete this now, but looking at all your ./configures that you're using, I really don't have a clue what they all do. I guess I'm asking if it's really necessary to include all of those - or are there a basic set of things to include on configure, so that everything should work ok ?

Cheers
 
Hey,

good to see you back then! :)

There propably some switches that you can remove but most of them are usefull (mysql, ftp, zip, opcache etc.). If you don't use ldap for example you can remove with-ldap and with-ldap-sasl.
 
Starting from scratch installing PHP5.4.29 and following THIS document instructions exactly.

1. During configure I receive:

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

This appears to be related to IMAP and installing 'libc-client-devel' should fix this, but this is what I get:

# apt-get install libc-client-devel
E: Couldn't find package libc-client-devel

Any ideas why it can't be found ?

2. I have '--enable-fastcgi' added to my config but on running I get this on the first line:

configure: WARNING: unrecognized options: --enable-fastcgi

Why is it unrecognized ?
 
Last edited:
1. Use libc-client-dev instead of libc-client-devel
2. From php-5.4.29/INSTALL file:

Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
automagically enabled in php-cgi in PHP 5.3, but for older versions
configure PHP with --enable-fastcgi. To confirm that PHP has fastcgi
enabled, php -v should contain PHP 5.2.5 (cgi-fcgi) Before PHP 5.2.3,
fastcgi was enabled on the php binary (there was no php-cgi).
 
Thx Igor.. that worked :)

Configured again and after a number of errors and apt-gets to fix them, it finally completed ok.

Then I ran:

# make
# make test

Now I received the following Failed Test Summary:

FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #64802: openssl_x509_parse fails to parse subject properly in some cases [ext/openssl/tests/bug64802.phpt]
Bug #64124 IPv6 malformed [ext/snmp/tests/bug64124.phpt]
Bug #64159: Truncated snmpget [ext/snmp/tests/bug64159.phpt]
IPv6 support [ext/snmp/tests/ipv6.phpt]
OO API: getErrno & getError methods [ext/snmp/tests/snmp-object-errno-errstr.phpt]
OO API [ext/snmp/tests/snmp-object.phpt]
Function snmp2_get [ext/snmp/tests/snmp2_get.phpt]
Function snmp2_getnext [ext/snmp/tests/snmp2_getnext.phpt]
Function snmp2_real_walk [ext/snmp/tests/snmp2_real_walk.phpt]
Function snmp2_set (without MIBs loading) [ext/snmp/tests/snmp2_set-nomib.phpt]
Function snmp2_set [ext/snmp/tests/snmp2_set.phpt]
Function snmp2_walk [ext/snmp/tests/snmp2_walk.phpt]
SNMPv3 Support (errors) [ext/snmp/tests/snmp3-error.phpt]
SNMPv3 Support [ext/snmp/tests/snmp3.phpt]
Function snmp_getvalue [ext/snmp/tests/snmp_getvalue.phpt]
Function snmpget [ext/snmp/tests/snmpget.phpt]
Function snmpgetnext [ext/snmp/tests/snmpgetnext.phpt]
Function snmprealwalk [ext/snmp/tests/snmprealwalk.phpt]
Function snmpset (without MIBs loading) [ext/snmp/tests/snmpset-nomib.phpt]
Function snmpset [ext/snmp/tests/snmpset.phpt]
Function snmpwalk [ext/snmp/tests/snmpwalk.phpt]
chmod() basic functionality [ext/standard/tests/file/chmod_basic.phpt]
Test filetype() function: Check character type [ext/standard/tests/file/filetype_variation2.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to [email protected] later.


Appreciate any ideas what to do next so that I can go ahead and make install ?
 
Back
Top