Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: ergozd on September 29, 2004, 10:54:10 AM

Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on September 29, 2004, 10:54:10 AM
Hi there!

Laurent Dinclaux has relased PHP v4.3.9 RPMS
http://lists.contribs.org/mailman/public/devinfo/msg06962.html

I have now updated script for Laurent's RPMS and tested on couple of machines without any problem.

Good luck. Upgrade at your own risk. ;-)
http://ergin.dyndns.org/download/php4.3.9-upgrade.sh

Best rgds, Ergin
Title: Awesome job
Post by: navir on September 30, 2004, 12:10:56 PM
PHP upgrade 4.3.9 works on my 6.0.1 server
Thanks  a lot

Nav
visit me at http://compco.info
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on September 30, 2004, 09:20:41 PM
Glad to be able to help.  8-)

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: dmac on October 10, 2004, 06:46:59 AM
The link indicated

http://ergin.dyndns.org/download/php4.3.9-upgrade.sh

appears to be invalid.  I have tried several times and receive a Proxy 502 error.

 :-(
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on October 10, 2004, 08:52:55 AM
Thank you dmac...

I was "re-furnishing" my server room yesterday and it looks like I was not all that careful I thought I was. :oops:

Now it's up n running.

Best rgds, Ergin
Title: UPDATED PHP upgrade script (based on ldinclaux RPMS)
Post by: ergozd on October 17, 2004, 09:02:25 AM
Hi there!

Update of PHP-upgrade script
 - path now on ibiblio.org
 - new php-modules php-curl, php-mcrypt

http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/php4.3.9-upgrade.sh

OR

http://www.ibiblio.org/pub/linux/distributions/smeserver/contribs/ergozd/scripts/php4.3.9-upgrade.sh

As usual upgrade at your own risk... ;-)
You will have to modify script if you want to install modules php-curl, php-mcrypt, php-pgsql

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: Henk on October 17, 2004, 11:38:42 AM
In this part of the script you've set an option to uncomment twice the same rpm. Are you sure that's right?

# Uncomment next line if you are using mcrypt
# wget http://www.ibiblio.org/pub/linux/distributions/smeserver/contribs/ldinclaux/SME6.x/Contribs/RPMS/php-mcrypt-4.3.9-3ld.i386.rpm

# Uncomment next line if you are using curl
# wget http://www.ibiblio.org/pub/linux/distributions/smeserver/contribs/ldinclaux/SME6.x/Contribs/RPMS/php-mcrypt-4.3.9-3ld.i386.rpm
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on October 17, 2004, 11:41:59 AM
Hello Henk!

As you pointed out the later one should be php-curl*... I'll update it whenever I find the time.

Thanx. ;-)
Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: netspirit on October 17, 2004, 05:43:01 PM
Hi all!
It does not work for me on an 6.0.1-1 box running php 4.1.2
When the script finish, I'm getting twice this message:
php4.3.9-upgrade.sh: pear: command not found

Then httpd restart but the php version is still the same. Do I need to reboot? Or may I have to do something else before running the Laurent script?
Regards,
Olivier
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on October 17, 2004, 08:40:06 PM
Looks like php-4.3.9-3ld.i386.rpm has some problem

Code: [Select]
Preparing...                ########################################### [100%]
   1:php                    error: unpacking of archive failed: cpio: read


Will have to check with Laurent L who is the contributor of php RPMS. Stand-by. :-)

Until then try using the original script for v4.3.9.
http://ergin.dyndns.org/download/php4.3.9-upgrade.sh

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: grand-pa on November 14, 2004, 11:33:45 PM
Hi all,

Thanks a lot for this amazing job ! Everything works fine on my own server. 8-)

But would it be possible, for a next release, to add the option --enable-exif : it is more and more used by image galleries and, of course, the one i've chosen needs it. ;-)

Thanks in advance. :pint:
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on November 15, 2004, 08:14:01 PM
Laurent has offered his help compiling "other flags"... Pls drop him a few lines.

Glad to be able to help.  8-)

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: grand-pa on November 16, 2004, 02:14:27 AM
While i was looking for Laurent's email address in the devinfo ML, i found one of his lasts messages (unfortunatly, i didn't remembered it yesterday) in which he says he added the exif support in its last version.

I modified the script php4.3.9-upgrade.sh and replaced all calls to php-xxx-4.3.9-1ld.i386.rpm with php-xxx-4.3.9-3ld.i386.rpm.
Of course, it works perfectly ! 8-)

Once again thank you very much, you two, for this good work. :pint:
Title: Upgrade to 4.3.9 breaks my ibay php pages
Post by: jahlewis on November 16, 2004, 05:37:15 PM
after running the above upgrade script, no php pages work in any of my ibays, yet php works fine in my primary site.

Can't see anything in the logs indicating what the error is.

Any ideas?
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: jahlewis on November 16, 2004, 09:24:00 PM
Solved.

In prior releases, I needed to run the following to force / for PHPBaseDir

Quote
/sbin/e-smith/db accounts setprop arachnerd PHPBaseDir /


After this 4.3.9 upgrade, I was getting the following errors in var/log/messages

Quote
Nov 16 14:56:59 gluon httpd: PHP Warning:  Unknown(): open_basedir restriction in effect. File(/home/e-smith/files/ibays/prospace-tst/html/test.php) is not within the allowed path(s): (/:/usr/share/pear) in Unknown on line 0


So I removed the previous settings with

Quote
/sbin/e-smith/db accounts delprop arachnerd PHPBaseDir /
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
service http-e-smith restart


And php is now working as expected in the ibays...[/quote]
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: adolfas on November 17, 2004, 11:26:34 AM
I got error:

/tmp/mcexthQ6Jec: ./php4.3.9-upgrade.sh: /bin/sh: bad interpreter: Permission denied
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: stefan24 on November 18, 2004, 09:27:02 PM
Hi!

I just installed it on my Test-SME 6.01 without any problem.

You did

Code: [Select]
wget -nc --tries=0 http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/php4.3.9-3upgrade.sh
sh php4.3.9-3upgrade.sh


?

Stefan
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: cydonia on December 21, 2004, 03:49:28 AM
A tiny litte mod to the script:

if [ $IS_ODBC -eq 0 ]
then
    wget ftp://ftp.rediris.es/sites/ftp.redhat.com/pub/redhat/linux/7.3/en/os/i386/RedHat/RPMS/unixODBC-2.2.0-5.i386.rpm
else
echo "unixODBC installed skipping download"
fi


I just added the "else" statement.  I'm not sure how to edit the actual script that is hosted so i'll just leave it at that...:-)


Tristan
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on December 21, 2004, 09:44:18 AM
script updated with "else"...

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: wellsi on December 21, 2004, 02:01:16 PM
And now 4.3.10 is out, see http://forums.contribs.org/index.php?topic=25275.0

From php.net
"These are maintenance releases that in addition to non-critical bug fixes address several very serious security issues. All Users of PHP are strongly encouraged to upgrade to one of these releases as soon as possible."
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: splunk on January 24, 2005, 08:27:56 PM
Ergin,  I used your php4.3.9 upgrade script that includes php-curl.  I was upgrading from php 4.1.2 where curl was working properly.  Now curl doesn't work, I'm getting the error msg

PHP Fatal error:  Call to undefined function:  curl_init()

I uncommented the line in the sh install and it showed that curl installed 100%.  Is there some other setting I need to change?
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on January 24, 2005, 08:50:25 PM
Well, I am not really sure what might be the problem, I have ONE guess instead. ;-)

http://zend.com/pecl/tutorials/curl.php#Heading6
Code: [Select]
From PHP version 4.2.3 on, you need a cURL version of at least 7.9.0. From PHP version 4.3.0 on, you need a cURL version of at least 7.9.8.

I think SMEServer has curl-7.9.5-2 is installed and to my knowledge there is NO RH update for curl. If am not totally wrong NORLUG has an updated version for curl for RH73, pls check http://norlug.org

Best rgds, Ergin
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 24, 2005, 08:57:57 PM
Try the new search function at www.contribs.org/contribs - it is cool :)

http://mirror.contribs.org/smeserver/contribs/cgenner/RPMS/i386/curl-7.9.8-6.i386.rpm

you may also need to add a template that adds 'extension=curl.so' to php.ini
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: splunk on January 24, 2005, 09:25:01 PM
Thank you guys very much for the quick replies.  That rpm worked perfect gregswallow.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 07:24:15 AM
I'm having problems with getting the "mcrypt" module working in my ibay. I get the following error in the message log:

httpd: PHP Warning: Unknown(): open_basedir restriction in effect.

I can access normal PHP pages just fine but the encrypted pages are not working. Any ideas as to what I might try to resolve the issue?

Thank in advance

Ed
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 27, 2005, 06:28:30 PM
Quote from: "edb"
I'm having problems with getting the "mcrypt" module working in my ibay. I get the following error in the message log:

httpd: PHP Warning: Unknown(): open_basedir restriction in effect.

I can access normal PHP pages just fine but the encrypted pages are not working. Any ideas as to what I might try to resolve the issue?

Thank in advance

Ed
Do you have the mcrypt and mhash rpm's installed, as well as php-mcrypt?  I think you also need to add a custom template to add 'extension=mhash.so' 'extension=mcrypt.so' to php.ini.  But that error might not be about mcrypt - see: http://www.google.ca/search?hl=en&q=Unknown%28%29%3A+open_basedir+restriction+in+effect.+&btnG=Google+Search&meta=
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 07:59:32 PM
Hi Greg

I only have the php-mcrypt loaded. Do you know where I can get the mcrypt & mhash rpms that are SME compatible? That may be my issue.

Ed
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 09:50:42 PM
Apparently, I only need the php-mcrypt module and that I do have installed. I guess it is probably a template fragment thing such as open_basedir or something.
Here is the complete error text:

Jan 25 17:36:58 mail httpd: PHP Fatal error:  Call to undefined function:  mcrypt_module_open() in /home/e-smith/files/ibays/store/include/xxxx.inc on line 174
Jan 26 08:51:00 mail httpd: PHP Warning:  fopen(): open_basedir restriction in effect. File(/home/e-smith/files/ibays/Primary/html/store/css/customer.css) is not within the allowed path(s): (/home/e-smith/files/ibays/store) in /home/e-smith/files/ibays/store/include/xxxx.inc on line 637
Jan 26 08:51:00 mail httpd: PHP Warning:  fopen(/home/e-smith/files/ibays/Primary/html/store/css/customer.css): failed to open stream: Operation not permitted in /home/e-smith/files/ibays/store/include/xxxx.inc on line 637
Jan 26 08:51:00 mail httpd: PHP Warning:  filesize(): open_basedir restriction in effect. File(/home/e-smith/files/ibays/Primary/html/store/css/customer.css) is not within the allowed path(s): (/home/e-smith/files/ibays/store) in /home/e-smith/files/ibays/store/include/xxxx.inc on line 638
Jan 26 08:51:00 mail httpd: PHP Warning:  fread(): supplied argument is not a valid stream resource in /home/e-smith/files/ibays/store/include/xxxx.inc on line 638
Jan 26 08:51:00 mail httpd: PHP Warning:  fclose(): supplied argument is not a valid stream resource in /home/e-smith/files/ibays/store/include/xxxx.inc on line 639
Jan 26 08:55:01 mail last message repeated 8 times
Jan 26 08:56:58 mail httpd: PHP Fatal error:  Call to undefined function:  mcrypt_module_open() in /home/e-smith/files/ibays/store/include/xxxx.inc on line 174
Jan 26 08:58:17 mail httpd: PHP Fatal error:  Call to undefined function:  mcrypt_module_open() in /home/e-smith/files/ibays/store/include/xxxx.inc on line 174
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 27, 2005, 10:12:39 PM
The custom template you need to make goes in a file for example called /etc/e-smith/templates-custom/etc/php.ini/70DynamicExtension75mcrypt with just the text 'extension=mcrypt.so' (without the quotes).

I'm not sure it will work without these being installed:
http://mirror.contribs.org/smeserver/contribs/cgenner/RPMS/i386/mcrypt-2.6.4-1ld.i386.rpm
http://mirror.contribs.org/smeserver/contribs/cgenner/RPMS/i386/mhash-0.8.18-1ld.i386.rpm

You could try just the template first if ytou think that's all you need, but if it doesn't work I'd try installing the 2 rpms and adding 'extension=mhash.so' into the custom template file you just made as well.  Let us know how it goes.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 10:52:37 PM
Thanks again Greg

I created a template file as you suggested and here is the new error:

Jan 27 15:18:07 mail httpd: PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/mcrypt.so [Syslog]' - /usr/lib/php4/mcrypt.so [Syslog]: cannot open shared object file: No such file or directory in Unknown on line 0
Jan 27 15:18:08 mail httpd: httpd startup succeeded
Jan 27 15:18:08 mail httpd: PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/mcrypt.so [Syslog]' - /usr/lib/php4/mcrypt.so [Syslog]: cannot open shared object file: No such file or directory in Unknown on line 0
Jan 27 15:18:15 mail httpd: PHP Fatal error:  Call to undefined function:  mcrypt_module_open() in /home/e-smith/files/ibays/store/include/xxxx.inc on line 174
Jan 27 15:20:00 mail last message repeated 8 times
Jan 27 15:20:26 mail httpd: PHP Fatal error:  Call to undefined function:  mcrypt_module_open() in /home/e-smith/files/ibays/store/include/xxxx.inc on line 174

At least the error message is different. What do you think? I have't installed the rpms because I'm told they are not required only php-mcrypt
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 27, 2005, 11:06:27 PM
...expand the templatw with:

/sbin/e-smith/expand-template /etc/php.ini

...then maybe check the /etc/php.ini has the change you made.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 27, 2005, 11:31:45 PM
I think you are right - I think you need this:
http://mirror.contribs.org/smeserver/contribs/cgenner/RPMS/i386/libmcrypt-2.5.7-1ld.i386.rpm

See some (old) info here php-mcrypt here:
http://rpms.troels.arvin.dk/php/rh72/i686/?describe=php-mcrypt
...that says you need libmcrypt

..and maybe you don't need the custom template then?  

It's weird, I installed these for Horde3/IMP4 (that need mcrypt installed) and I'm pretty sure I installed just mcrypt and mhash and hordes test.php said mcrypt was enabled.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 11:35:30 PM
I did expand the template and checked for the change in php.ini and the mcrypt extention is listed properly.
Basically, the error is telling me that it cannot load the mcrypt.so maybe I'm wrong but that's my take on it.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 27, 2005, 11:48:23 PM
Greg

I just realized that I already had all of the discussed modules installed. I downloaded the rpms you suggested and this is what I got:

[root@mail plus]# rpm -Uvh libmcrypt-2.5.7-1ld.i386.rpm
Preparing...                ########################################### [100%]
package libmcrypt-2.5.7-1ld is already installed
[root@mail plus]# rpm -Uvh mhash-0.8.18-1ld.i386.rpm
Preparing...                ########################################### [100%]
package mhash-0.8.18-1ld is already installed
[root@mail plus]# rpm -Uvh php-mcrypt-4.3.9-3ld.i386.rpm
Preparing...                ########################################### [100%]
package php-mcrypt-4.3.9-3ld is already installed
[root@mail plus]#
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 27, 2005, 11:58:26 PM
and you have mcrypt also?  'rpm -q mcrypt'
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 28, 2005, 12:26:49 AM
[root@mail plus]# rpm -q mcrypt
mcrypt-2.6.4-1ld
[root@mail plus]#
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: gregswallow on January 28, 2005, 12:35:29 AM
Quote from: "edb"
Jan 27 15:18:07 mail httpd: PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/mcrypt.so [Syslog]' - /usr/lib/php4/mcrypt.so [Syslog]: cannot open shared object file: No such file or directory in Unknown on line 0
Does the file exist? - '/usr/lib/php4/mcrypt.so'

I am running out of ideas :-P

I think that comes from php-mcrypt...  If the file isn't there try installing it again with --force.
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 28, 2005, 05:38:26 AM
Yes, I checked and the file is there. This sucks

Thanks for trying Greg
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 30, 2005, 07:00:50 PM
Greg,

After a search on the Internet I found that someone else posted their phpinfo file http://detez.net/phpinfo.php which indicated that mcrypt & mhash were loaded with the supported algorithms and dirs.


mcrypt
mcrypt support enabled
version  >= 2.4.x  
Supported ciphers  cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes  
Supported modes  cbc cfb ctr ecb ncfb nofb ofb stream  

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value


mhash
MHASH support  Enabled  
MHASH API Version  20020524  

My PHPINFO file doesn't show this information which is most likely my whole issue. Does this shed new light on the issue in the sense that you may know why?

Thanks again

Ed
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 30, 2005, 10:45:42 PM
Greg,

After much pain, and relooking at the error log, I found out what my problem with activating mcrypt was due too. Apparently, if I look at my /etc/php.ini file I see the following entries:

extension=imap.so
extension=ldap.so
extension=mysql.so
extension=mcrypt.so [Syslog]
define_syslog_variables   = Off

If I edit the main /etc/php.ini file to read:

extension=imap.so
extension=ldap.so
extension=mysql.so
extension=mcrypt.so
[Syslog]
define_syslog_variables   = Off

save my changes and do a "service httpd restart", then refresh my phpinfo... Bob's your uncle and mcrypt and mhash show up in the info file just the way they should. Also, my encrypted pages work fine.

The last little issue that I have is that when the server reboots the [Syslog] part is again appended to the mcrypt extention line as above. I don't know where this is coming from so I can resolve it. Do you have any ideas on this?

At least I know that I can run mcrypt now.

Thanks for any reply.

Ed
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: edb on January 30, 2005, 11:11:25 PM
Never mind ... I solved the issue.

Thanks for following my thinking outloud.  :pint:

Ed
Title: PHP upgrade v4.3.9 (based on Laurent Dinclaux's RPMS)
Post by: ergozd on February 02, 2005, 10:39:14 PM
Hello edb!

I have tonight re-compiled Dan Browns PHP RPMS with curl and mcrypt. You'll find them at
http://ergin.dyndns.org/download/RPMS/contribs/php/

OBS !!! Use them at you own risk...

PS : Dependencies BEGIN and mkinstallers are bogus so you can install RPMS with

# rpm -Uvh --nodeps .....

Best rgds, Ergin