Help - Search - Members - Calendar
Full Version: Upgrading PHP
The Planet Forums > Control Panels > Plesk
HostCrest
Hi, folks.

PHP 4.1.0 was recently released, and it includes "Highly improved performance" and "Lots of fixes and new functions"...so I figured it was worth installing. icon_smile.gif Here are the steps for the benefit of others that would like to upgrade.

1. Backup httpd.conf and libphp4.so in case anything goes wrong.
CODE
cd /usr/local/psa/apache

cp conf/httpd.conf conf/httpd.conf.mybackup

cp libexec/libphp4.so libexec/libphp4.so.mybackup

2. Get current PHP info. Create a PHP file (phpinfo.php, for example) in the httpdocs folder of one of your domains. This file should contain:
CODE
<? phpinfo(); ?>
When you view this file through your browser (ie., http://www.yourdomain.com/phpinfo.php ), it'll show you lots of information about the PHP installation on your server. Save the output to a local file so you can compare it to similar output after the upgrade.

3. Download and compile IMAP. This is used by Webmail, so it's required by PHP...
CODE
cd /usr/local/src

wget [url]ftp://ftp.cac.washington.edu/imap/imap.tar.Z[/url]

uncompress imap.tar.Z

tar xvf imap.tar

cd imap-2001a

make slx


Also, copy the IMAP client header and lib files to appropriate places, as described at http://www.php.net/manual/en/ref.imap.php:
CODE
cp /usr/local/src/imap-2001a/c-client/c-client.a /usr/lib/libc-client.a

cp /usr/local/src/imap-2001a/src/c-client/mail.h /usr/include

cp /usr/local/src/imap-2001a/src/c-client/rfc822.h /usr/include

cp /usr/local/src/imap-2001a/c-client/linkage.h /usr/include

export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"

4. Install libiodbc, another component required by PHP.
CODE
rpm -U [url]http://www.iodbc.org/dist/libiodbc-3.0.5-1.i386-glibc21.rpm[/url]

rpm -U [url]http://www.iodbc.org/dist/libiodbc-devel-3.0.5-1.i386-glibc21.rpm[/url]

5. Download and compile PHP.
CODE
cd /usr/local/src

wget [url]http://download.php.net/distributions/php-4.1.0.tar.gz[/url]

tar xvfz php-4.1.0.tar.gz

cd php-4.1.0

./configure --with-apxs=/usr/local/psa/apache/bin/apxs  

 --prefix=/usr/local/psa/apache --with-system-regex

 --with-config-file-path=/usr/local/psa/apache/conf

 --disable-debug --disable-pear --enable-sockets

 --enable-track-vars --without-gd

 --with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib

 --with-imap=/usr/local/src/imap-2001a

make

make install
The configuration options here are based on what was displayed in the phpinfo before the upgrade. Feel free to add other options as you feel necessary.

6. Replace the PHP module used by Apache.
CODE
/usr/local/psa/apache/bin/apachectl stop

cp -f /usr/local/src/php-4.1.0/.libs/libphp4.so /usr/local/psa/apache/libexec/

/usr/local/psa/apache/bin/apachectl start

7. View phpinfo again by visiting http://www.yourdomain.com/phpinfo.php ... It should now display the new version and other info for PHP.

8. Clean up any unnecessary files in /usr/local/src



If you come across any errors in this procedure, please let me know. There may be better ways to do some of the things I've listed...just mention it and I'll update the procedure. icon_smile.gif
Kaiser_Sose
I have a question about step 1. As you will probaby tell this is new so stupid questions might happen

Backup to

cp conf/httpd.conf conf/httpd.conf.mybackup
cp libexec/libphp4.so libexec/libphp4.so.mybackup

for the word mybackup we can use any word we want, cant we
HostCrest
Yes, you can use anything instead of "mybackup"... That was just a suggestion. icon_smile.gif
mmoncur
HostCrest, thanks for the detailed instructions! It's much easier than thinking. Here are a couple of corrections for the places where I was forced to resort to thinking:

- In step 3, after `tar' and before `make', add this:
CODE
cd imap-2001a
- In step 5, replace `cd php-4.1.0.tar.gz' with `cd php-4.1.0'

- The copying that you mentioned does appear to be necessary to get configure to work. Add this between steps 4 and 5:
CODE
cp /usr/local/src/imap-2001a/c-client/c-client.a /usr/lib/libc-client.a

cp /usr/local/src/imap-2001a/src/c-client/mail.h /usr/include

cp /usr/local/src/imap-2001a/src/c-client/rfc822.h /usr/include

cp /usr/local/src/imap-2001a/c-client/linkage.h /usr/include

export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"
I'm not sure if the `export' command is really necessary, but the rest is. After that configure should work fine.

Thanks again!
HostCrest
Thanks for the feedback, Michael... I've updated my original post with the changes.
Kaiser_Sose
I am a confused newbie.

Why do you say you will update the corrections. How can they be corrections if what you described in the first post works as you said it did
HostCrest
QUOTE
Originally posted by Kaiser_Sose
I am a confused newbie.

Why do you say you will update the corrections.  How can they be corrections if what you described in the first post works as you said it did
I wrote the list of steps after I went through the process myself, so I missed a couple of small things when listing the steps... I don't have a second server at RackShack to verify the listing of the steps, so that's why I said "If you come across any errors in this procedure, please let me know." in my original message.
SkyNet
I must congratulate you on a well documented upgrade procedure. There were only two small things I had to do to get the above instructions to work on my server:

1. The APXS didn't work because perl was located at /usr/bin/perl instead of /usr/local/bin/perl5 to which APXS refered to icon_smile.gif

2. Since I have the Zend Optimizer for PHP installed, I had to download a new version for 4.1.0 from Zend and install it all again (minor problem).
Kaiser_Sose
Doesnt the Plesk standard install come with PHP 4.06 and the Zend optimizer
HostCrest
QUOTE
Originally posted by Kaiser_Sose
Doesnt the Plesk standard install come with PHP 4.06 and the Zend optimizer
Zend Optimizer v1.2.0 is now available, and the one included with PHP 4.1.0 is only v1.1.0.
noti
when i run this command in step 3 :

make slx

it hangs my server ... and this is the 2nd time! for the 1st time, reboot didnt bring my server up and i have to restore my server ... this is the second time ... what should i do??? anyone elses having the same problem?
spectre013
Great Instructions, had a couple problems but they were due to my own silly mistakes.

Thanks
Spectre013
KyleKL
I just upgraded today following your instructions step by step. 100% perfect.

You might want to change it from 4.1.0 to 4.1.1, as that is the current version.

I used your steps above, only changed the 4.1.0 to 4.1.1.

Thanks!!
Mike Henderson
In this code:

CODE
./configure --with-apxs=/usr/local/psa/apache/bin/apxs  

 --prefix=/usr/local/psa/apache --with-system-regex

 --with-config-file-path=/usr/local/psa/apache/conf

 --disable-debug --disable-pear --enable-sockets

 --enable-track-vars --without-gd

 --with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib

 --with-imap=/usr/local/src/imap-2001a


If you put in the does that actually show up as a , or is it the same as continuing the line?
KyleKL
QUOTE
Originally posted by Mike Henderson
If you put in the does that actually show up as a , or is it the same as continuing the line? [/B]


It allows you to continue typing the command on the next line. icon_smile.gif
Mike Henderson
QUOTE
Originally posted by Kyle


It allows you to continue typing the command on the next line. icon_smile.gif


Perfect, thanks for the quick reply Kyle icon_smile.gif
jslivko
QUOTE
Originally posted by HostCrest
Hi, folks.

PHP 4.1.0 was recently released, and it includes "Highly improved performance" and "[b]Lots
of fixes and new functions"...so I figured it was worth installing. icon_smile.gif  Here are the steps for the benefit of others that would like to upgrade.

1. Backup httpd.conf and libphp4.so in case anything goes wrong.
CODE
cd /usr/local/psa/apache

cp conf/httpd.conf conf/httpd.conf.mybackup

cp libexec/libphp4.so libexec/libphp4.so.mybackup

2. Get current PHP info.  Create a PHP file (phpinfo.php, for example) in the httpdocs folder of one of your domains.  This file should contain:
CODE
<? phpinfo(); ?>
When you view this file through your browser (ie., http://www.yourdomain.com/phpinfo.php ), it'll show you lots of information about the PHP installation on your server.  Save the output to a local file so you can compare it to similar output after the upgrade.

3. Download and compile IMAP.  This is used by Webmail, so it's required by PHP...
CODE
cd /usr/local/src

wget [url]ftp://ftp.cac.washington.edu/imap/imap.tar.Z[/url]

uncompress imap.tar.Z

tar xvf imap.tar

cd imap-2001a

make slx


Also, copy the IMAP client header and lib files to appropriate places, as described at http://www.php.net/manual/en/ref.imap.php:
CODE
cp /usr/local/src/imap-2001a/c-client/c-client.a /usr/lib/libc-client.a

cp /usr/local/src/imap-2001a/src/c-client/mail.h /usr/include

cp /usr/local/src/imap-2001a/src/c-client/rfc822.h /usr/include

cp /usr/local/src/imap-2001a/c-client/linkage.h /usr/include

export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"

4. Install libiodbc, another component required by PHP.
CODE
rpm -U [url]http://www.iodbc.org/dist/libiodbc-3.0.5-1.i386-glibc21.rpm[/url]

rpm -U [url]http://www.iodbc.org/dist/libiodbc-devel-3.0.5-1.i386-glibc21.rpm[/url]

5. Download and compile PHP.
CODE
cd /usr/local/src

wget [url]http://download.php.net/distributions/php-4.1.0.tar.gz[/url]

tar xvfz php-4.1.0.tar.gz

cd php-4.1.0

./configure --with-apxs=/usr/local/psa/apache/bin/apxs  

 --prefix=/usr/local/psa/apache --with-system-regex

 --with-config-file-path=/usr/local/psa/apache/conf

 --disable-debug --disable-pear --enable-sockets

 --enable-track-vars --without-gd

 --with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib

 --with-imap=/usr/local/src/imap-2001a

make

make install
The configuration options here are based on what was displayed in the phpinfo before the upgrade.  Feel free to add other options as you feel necessary.

6. Replace the PHP module used by Apache.
CODE
/usr/local/psa/apache/bin/apachectl stop

cp -f /usr/local/src/php-4.1.0/.libs/libphp4.so /usr/local/psa/apache/libexec/

/usr/local/psa/apache/bin/apachectl start

7. View phpinfo again by visiting http://www.yourdomain.com/phpinfo.php ... It should now display the new version and other info for PHP.

8. Clean up any unnecessary files in /usr/local/src



If you come across any errors in this procedure, please let me know.  There may be better ways to do some of the things I've listed...just mention it and I'll update the procedure. icon_smile.gif [/B]


The only problem I have is that one of my clients sites had an issue with the new version of PHP. I'm thinking it may have been just the script acting up or what have you and not because of PHP 4.1.1, any comments on the issue?
HostCrest
QUOTE
Originally posted by jslivko
The only problem I have is that one of my clients sites had an issue with the new version of PHP. I'm thinking it may have been just the script acting up or what have you and not because of PHP 4.1.1, any comments on the issue?
It depends on the problem. Do you have more details?
jslivko
QUOTE
Originally posted by HostCrest
Hi, folks.

PHP 4.1.0 was recently released, and it includes "Highly improved performance" and "[b]Lots
of fixes and new functions"...so I figured it was worth installing. icon_smile.gif  Here are the steps for the benefit of others that would like to upgrade.

1. Backup httpd.conf and libphp4.so in case anything goes wrong.
CODE
cd /usr/local/psa/apache

cp conf/httpd.conf conf/httpd.conf.mybackup

cp libexec/libphp4.so libexec/libphp4.so.mybackup

2. Get current PHP info.  Create a PHP file (phpinfo.php, for example) in the httpdocs folder of one of your domains.  This file should contain:
CODE
<? phpinfo(); ?>
When you view this file through your browser (ie., http://www.yourdomain.com/phpinfo.php ), it'll show you lots of information about the PHP installation on your server.  Save the output to a local file so you can compare it to similar output after the upgrade.

3. Download and compile IMAP.  This is used by Webmail, so it's required by PHP...
CODE
cd /usr/local/src

wget [url]ftp://ftp.cac.washington.edu/imap/imap.tar.Z[/url]

uncompress imap.tar.Z

tar xvf imap.tar

cd imap-2001a

make slx


Also, copy the IMAP client header and lib files to appropriate places, as described at http://www.php.net/manual/en/ref.imap.php:
CODE
cp /usr/local/src/imap-2001a/c-client/c-client.a /usr/lib/libc-client.a

cp /usr/local/src/imap-2001a/src/c-client/mail.h /usr/include

cp /usr/local/src/imap-2001a/src/c-client/rfc822.h /usr/include

cp /usr/local/src/imap-2001a/c-client/linkage.h /usr/include

export LDFLAGS="-L/usr/kerberos/lib -lkrb5 -lgssapi_krb5 -lpam"

4. Install libiodbc, another component required by PHP.
CODE
rpm -U [url]http://www.iodbc.org/dist/libiodbc-3.0.5-1.i386-glibc21.rpm[/url]

rpm -U [url]http://www.iodbc.org/dist/libiodbc-devel-3.0.5-1.i386-glibc21.rpm[/url]

5. Download and compile PHP.
CODE
cd /usr/local/src

wget [url]http://download.php.net/distributions/php-4.1.0.tar.gz[/url]

tar xvfz php-4.1.0.tar.gz

cd php-4.1.0

./configure --with-apxs=/usr/local/psa/apache/bin/apxs  

 --prefix=/usr/local/psa/apache --with-system-regex

 --with-config-file-path=/usr/local/psa/apache/conf

 --disable-debug --disable-pear --enable-sockets

 --enable-track-vars --without-gd

 --with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib

 --with-imap=/usr/local/src/imap-2001a

make

make install
The configuration options here are based on what was displayed in the phpinfo before the upgrade.  Feel free to add other options as you feel necessary.

6. Replace the PHP module used by Apache.
CODE
/usr/local/psa/apache/bin/apachectl stop

cp -f /usr/local/src/php-4.1.0/.libs/libphp4.so /usr/local/psa/apache/libexec/

/usr/local/psa/apache/bin/apachectl start

7. View phpinfo again by visiting http://www.yourdomain.com/phpinfo.php ... It should now display the new version and other info for PHP.

8. Clean up any unnecessary files in /usr/local/src



If you come across any errors in this procedure, please let me know.  There may be better ways to do some of the things I've listed...just mention it and I'll update the procedure. icon_smile.gif [/B]


That might work for a standard PSA install, but what about via an RPM install, what to do then?
-- Jonathan
Mike343
Im having a small problem here, see the --with-apxs=/usr/local/psa/apache/apxs line is whats giving me trouble saying apxs couldnt be run, and i think it might be becuse its looking for perl int he wrong directory is there a way to make it look for perl in the correct directory which is usr/bin/perl? and how thanks, Mike

NEVERMIND I FIGURED IT OUT. You just (cd /usr/local/psa/apache/bin ) then you ( pico apxs ) and at the first line should be usr/bin/perl. or set the path to the path that perl is on your server.
ThomasP
Problem during step 5
+after configure I get this as an output:

checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock

I understand this error, but I am new to dedicated servers - so I dont't know how to continue icon_sad.gif

Tom
Mike343
You have to set the correct time in either shell or plesk for your server.
ThomasP
QUOTE
Originally posted by Mike343
You have to set the correct time in either shell or plesk for your server.


thank you - already figured it out icon_wink.gif
brutka
Help me, please!
I tried to install nwe PHP version.
On step 5 I got the descibed above problem with apxs. With pico apxs I corrected the apxs file to "/usr/bin/perl"
Now when I do ./configure --with-apxs=/usr/local/psa/apache/bin/apxs it just stops(!) executing on line
--with-apxs=/usr/local/psa/apache/bin/apxs

when I Ctrl-C - it return the standard shell invitation.
Help me, please to correct it.
Denys
Arie
Thanks HostCrest: Worked like a charm!
Rich2k
this also works for php 4.1.2 (except they have changed the php download location to http://www.php.net/distributions/php-4.1.2.tar.gz) that location is a bit busy now as it's a security upgrade so a mirror might be faster.

However if you already have php 4.1.0 or php 4.1.1 you don't need to do the imap and libiodbc installs as you've already done that bit.
justinmacleod
Which files in /usr/local/src can I clean up after? All of the ones that were downloaded and untarred? I presently have imap-2001a, imap.tar, php-4.1.2, php-4.1.2.tar.gz.

Also by the way, this worked PERFECT and I upgraded to the new more secure PHP 4.1.2. Thanks so much for the detailed instructions!

Justin
icon_smile.gif icon_smile.gif icon_biggrin.gif
morehtml
I have 2 RS servers. On 1 the upgrade went great. On the 2nd using the exact same install procedure (2 time) I get this when running 'make'

ext/standard/.libs/libstandard.al: object ext/standard/.libs/libstandard.al(datetime.lo) in archive is not object
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.1.2'
make: *** [all-recursive] Error 1


So what do i do now??
EricFL
ok.... this might seem like a silly question, but if I already have a previous version of imap-cclient & libiodbc installed, do I need to upgrade then in order to upgrade to PHP 4.1.2?

Thanks!
4web-space
Hello,
Im thinking of upgrading the PHP version to keep my server nice and secure but i heard a rumour that PHPMyAdmin will not function using PHP 4.1.2 ?

Is this true? If it is then is there a way round this?

Thanks

Robbie
Keo
It works for me..


-keo


also works on my test sever
rh7.2 psa2.5 php-4.1.2

icon_biggrin.gif
HAZ
Thankyou HostCrest!

Anybody hesitating might find comfort in knowing it took a weeny like myself under ten minutes to upgrade to 4.1.2 with HostCrest's presise instructions.

I wasn't sure if I was suppose to cd between steps 3 & 4. I can't remember what I did but it worked!

phpMyAdmin continues to work as always
4web-space
Hello,
Ive upgraded to plesk 2.5 today all went well. So now im at PHP 4.1.0. Now my problem is how many of the tasks described do i complete? I cannot find IMAP2001a as described but only courier_IMAP. Neither can i find libiodbc.

Any suggestions? Should i just start from task 1 through to task 8?

Or task 1 then 5 to 8? (Task 5 would obviously then change as i dont have the two above files) (that i can see)

Thanks

Robbie
Realist
Im getting these errors on make install of php (using php 4.1.2)

Making install in Zend
make[1]: Entering directory `/usr/local/src/php-4.1.2/Zend'
make[2]: Entering directory `/usr/local/src/php-4.1.2/Zend'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/src/php-4.1.2/Zend'
make[1]: Leaving directory `/usr/local/src/php-4.1.2/Zend'
Making install in main
make[1]: Entering directory `/usr/local/src/php-4.1.2/main'
make[2]: Entering directory `/usr/local/src/php-4.1.2/main'
/bin/sh /usr/local/src/php-4.1.2/libtool --silent --mode=compile gcc -I. -I/usr/local/src/php-4.1.2/main -I/usr/local/src/php-4.1.2/main -I/usr/local/src/php-4.1.2 -I/usr/lib/include -I/usr/local/psa/apache/include -I/usr/local/src/php-4.1.2/Zend -I/usr/local/src/imap-2001a/c-client -I/usr/local/psa/mysql/include/mysql -I/usr/lib/include -I/usr/local/src/php-4.1.2/ext/xml/expat -DHARD_SERVER_LIMIT=2048 -DDEFAULT_PATH="/usr/local/psa/apache/bin:/bin:/usr/bin" -DLINUX=22 -DMOD_SSL=208103 -DMOD_PERL -DUSE_PERL_SSI -DUSE_HSREGEX -DEAPI -DEAPI_MM -DUSE_EXPAT -I/usr/local/src/php-4.1.2/TSRM -g -O2 -prefer-pic -c internal_functions.c
In file included from internal_functions.c:34:
/usr/local/src/php-4.1.2/ext/odbc/php_odbc.h:96:18: isql.h: No such file or directory
/usr/local/src/php-4.1.2/ext/odbc/php_odbc.h:97:21: isqlext.h: No such file or directory
make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.1.2/main'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.1.2/main'
make: *** [install-recursive] Error 1


Any ideas?

Brian
serverboy
the server always crashes when I do 'make' !!!!! :eek: :confused: mad.gif :eek: :confused:
Sampei
Hi,
I have followed all the instruction and I haven't received any error during configure and make.
The problem is that when I restart apache I receive this error :

[root@earth php-4.1.2]# /usr/local/psa/apache/bin/apachectl start
Syntax error on line 247 of /usr/local/psa/apache/conf/httpd.conf: Cannot load /usr/local/psa/apache/libexec/libphp4.so into server: undefined symbol: mkstemp64
/usr/local/psa/apache/bin/apachectl start: httpd could not be started
[root@earth php-4.1.2]#

What have I to do in your opinion ?

Thank you
pinkopanter
After upgrade and restart I got all php scripts running mysql just blank white screen.

Here is the error I received after restart:

[root@srv01 lib]# /etc/rc.d/init.d/httpd restart
Shutting down http: [ OK ]
Starting httpd: Processing config directory: /etc/appliance/apacheconf
Processing config file: /etc/appliance/apacheconf/apache
PHP Warning: (null): Unable to initialize module
Module compiled with debug=0, thread-safety=0 module API=1082701568
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0
PHP Warning: (null): Unable to initialize module
Module compiled with debug=128, thread-safety=171 module API=1083467264
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0
PHP Warning: U1]É': Unable to initialize module
Module compiled with debug=160, thread-safety=183 module API=1082729228
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_create_db in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_drop_db in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_query in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_unbuffered_query in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_db_query in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_list_dbs in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_list_tables in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_list_fields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_error in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_errno in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_affected_rows in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_insert_id in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_result in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_num_rows in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_num_fields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_row in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_array in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_assoc in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_object in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_data_seek in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_lengths in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fetch_field in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_seek in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_free_result in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_name in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_table in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_len in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_type in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_field_flags in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_escape_string in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_get_client_info in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_get_host_info in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_get_proto_info in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_get_server_info in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fieldname in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fieldtable in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fieldlen in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fieldtype in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_fieldflags in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_selectdb in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_createdb in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_dropdb in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_freeresult in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_numfields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_numrows in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listdbs in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listtables in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listfields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_db_name in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_dbname in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_tablename in Unknown on line 0
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
PHP Warning: USè`: Unable to initialize module
Module compiled with debug=80, thread-safety=204 module API=1082993408
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0

Help please! I did two system restores and if dont fix this will go for the third one. Please help!
Albo
Pinko, your problem is that you have not updated your /etc/php.ini file and you don't like to read instructions. Read the README file that comes with PHP 4.1.2 and you will find that you need to overwrite your existing file, /etc/php.ini file with php.ini.dist that is under your php directory (the folder you ran ./configure from).

Overwrite the file and then run
/etc/rc.d/init.d/mysqld stop
/etc/rc.d/init.d/mysqld start
/etc/rc.d/init.d/httpd restart

and you should be OK, no need for restore. Even though the installation will go fine, PHP 4.1.2 will break ENSIM dependencies that may cause memory leaks (php is famous for segmentation errors). I got it to install fine, but I switched back to 4.06 with patch cause i was having memory leaks a lot of segmentations errors. If you check the ENSIM forums, you will find the same thing.
Seeker
Will these steps work on an Ensim box.. or does one need to do something different to avoid messing up Ensim? icon_smile.gif
cfh
For an ensim box use.
http://forum.rackshack.net/showthread.php?...9&highlight=php
micxz
QUOTE
Originally posted by noti
when i run this command in step 3 :

make slx

it hangs my server ... and this is the 2nd time! for the 1st time, reboot didnt bring my server up and i have to restore my server ... this is the second time ... what should i do??? anyone elses having the same problem?



Read the top of the "Makefile" there is a list of codes for vaious OS's, I used "make lrh" lrh being L-inux R-ed H-at

Micxz
tornado
After following the tutorial and everything worked out fine. I now have php4.3.2 installed fine.

Now my webmail does not work on my plesk server. Its the imp HORDE one. spits out this error

Fatal error: Cannot redeclare gc() in /usr/local/psa/home/vhosts/webmail/horde/phplib/session.inc on line 460

I then looked at line 460 and this is the function...

// Destroy all session data older than this
//
function gc() {
srand(time());
if ((rand()%100) < $this->gc_probability) {
$this->that->ac_gc($this->gc_time, $this->name);
}
}


//

I thought this might be same kind of time thing where i would just have to wait a few hours and it would fix itself. But no luck so far.

Any suggestions on how i can fix this?

(Retriving email the regular way using Eudora or outlook works fine)

- Mark.
micxz
what version of plesk are you on?

what version of imap did you compile php with?
tornado
Version: psa v2.5.0_build020301.14 os_RedHat 7.2
OS: Linux 2.4.9-31

and used IMAP from here:
ftp://ftp.cac.washington.edu/imap/old/imap-2001a.tar.Z
tornado
Now I am unable to access my sites. When i try and access them they just show a directory with apache information..

Any ideas whats gone wrong?
How do i restore the libphp4.so file?

- Mark
micxz
That's the right IMAP version alright. It should work I'm told But, I was unable to do it myself;

As for reverting back you need to replace your "libphp4.so" with the backup copy you made before overwritting this file with the new compile. I hope you have done this? Other wise you'll have to live and learn, I may have a backup from 2.5.5 but I'm running plesk 5.0.5 now; Let me know if you really did lose you original php4.so plug?
tornado
Got my sites back up. RS fixed it... here is what happened incase anyone has had problems after the php upgrade....

---------------start
For some reason plesk was locking the ability to update its httpd.include file. I removed the lock and added a test site (rstest.com) at which point httpd.include was regenerated.
-----------------end

But my webmail still does not work. When i revert back to php4.1.0 it works fine. But I do need to have the latest php on my server.

Definatly a php thing.

Ok, just found my answer: anyone interested can go here:
'http://forum.plesk.com/showthread.php?threadid=6722&highlight=Cannot+redeclare'

Aprently plesk 2.5 with horde has problems with php versions 4.1.2 onwards (it works with4.1.2). That wrecked horde. To fix the problem is to delete a couple of lines of code and it will be fixed.

That's the end of my problems.

- Mark.
strannik
i've used the how-to on Plesk 5 and PHP 4.3.2

i've used the configure which was displayed through my phpinfo
( ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr --with-config-file-path=/etc --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db3 --with-dom=/usr --with-exec-dir=/usr/bin --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-mm --with-openssl --with-png --with-pspell --with-regex=system --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-debugger --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --without-oci8 --with-imap=shared --with-imap-ssl --with-kerberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared --enable-memory-limit --enable-bcmath --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mbstring --enable-mbstr-enc-trans --with-apxs=/usr/local/psa/admin/bin/apxs --with-imap=/usr/local/src/imap-2002d)

and i am getting this error:
" configure: error: Cannot find header files under /usr"

and thank you for the guide even though it didn't work out for me that well icon_smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.