Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: splunk on September 11, 2005, 04:40:01 PM
-
I'm running sme 6.x and have recently come across a script that requires PHP5. I've run a few searches and couldn't come up with anything. Is there an upgrade to use PHP5?
-
Hi splunk!
Just for the fun of it I've compiled PHP5 (version 5.0.4), I've installed on a test machine, never used them in production. If you want to give them a try grab them from
http://ergin.dyndns.org/download/RPMS/contribs/php/php504_experimental/
Appriciate any feedback, if they work I can compile to latest version of PHP5 (v5.0.5)
-
I would try installing them but I can't figure out the order in which to install them...and they fail because they need each other heh. I just don't know the command or I'd be trying as I've done a complete backup of my sme box.
-
just make a directory and move the php5 rpms into that directory. Then make certain you are inside that newly created directory and rpm -Uvh *
That should work the order out for you automatically
-
error: failed dependencies:
libmcrypt.so.4 is needed by php-mcrypt-5.0.4-1eo
libmhash.so.2 is needed by php-mhash-5.0.4-1eo
postgresql is needed by php-pgsql-5.0.4-1eo
libpq.so.2 is needed by php-pgsql-5.0.4-1eo
-
splunk
> libmcrypt.so.4 is needed by php-mcrypt-5.0.4-1eo
> libmhash.so.2 is needed by php-mhash-5.0.4-1eo
> postgresql is needed by php-pgsql-5.0.4-1eo
> libpq.so.2 is needed by php-pgsql-5.0.4-1eo
So then you go to
http://www.rpmfind.net/
and search for those rpms, being careful to download the correct version for your OS eg sme 6.x RH7.3, sme 7 CentOS4.1
Then install all those rpms & the php rpms at the same time using rpm -Uvh *.rpm
-
OK, I downloaded the modules for redhat 7.3 and installed them, but now httpd wouldn't restart. It was erroring on the following in the httpd.conf file...
libphp4.so
mod_php4.c
php_value
php_flag
php_admin_value
So now I'm stuck. When the new php rpms installed, they created a php.ini.newrpm...I tried restarting everyting with the php.ini, and then by renaming that and changing the "newrpm" one to php.ini. I'm stuck. ;)
Just for a temp fix I got httpd to restart by commenting out each instance of the above in the httpd.conf file. Now PHP doesn't seem to be on at all as it acts like a download when I go to a page.
-
In order to test modify your httpd.conf and change
LoadModule php4_module /usr/lib/apache/libphp4.so
TO
LoadModule php4_module /usr/lib/apache/libphp5.so
AddModule mod_php4.c
TO
AddModule mod_php5.c
Good luck...
-
ergzod, with those changes I'm now getting
Starting httpd: Syntax error on line 138 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/libphp5.so into server: /usr/lib/apache/libphp5.so: undefined symbol: xmlSchemaFreeValidCtxt
-
I don't know why that happens, my best guess is if you have libxm2 installed...
Check this thread from Zend
http://www.zend.com/lists/php-dev/200310/msg00049.html
-
ergozd, getting so close now ;) Thank you all so much for your help. I installed the rpm for libxml2 for redhat 7.3 and php is up and running now. My only problem is it doesn't seem to be working with mysql...when I try and load my wordpress, instead of the page, I get
Your PHP installation appears to be missing the MySQL which is required for WordPress.
. I wonder if I just need to upgrade mysql?
-
This may help...
PHP5+
MySQL is not enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why. Use the --with-mysql[=DIR] configure option to include MySQL support. You can download headers and libraries from MySQL.
Found Here.
http://www.php.net/mysql
-
Any chance we could get a build of php with mysql enabled ergozd?
-
I think mysql is enabled, check .spec file (line 301)
--with-mysql=shared,/usr \
Make sure you have php-mysql installed and php.ini modified with extension=mysql.so and restart your httpd service to activate changes.
-
good morning,
I follow the above steps for upgrade php.
I tried to reload httpd and I get:
[root@content /]# httpd restart
Syntax error on line 138 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/libphp5.so into server: /usr/lib/apache/libphp5.so: undefined symbol: xmlSchemaFreeValidCtxt
Here is line 138
LoadModule php5_module /usr/lib/apache/libphp5.so
Here were my steps
1. mkdir /installs/php
2. cd /installs/php
3. downloaded all the RPMs from http://ergin.dyndns.org/download/RPMS/contribs/php/php504_experimental/
4. rpm -Uvh *.rpm
5. had to install 4 extra libraries (rpm's listed below)
libmcrypt-2.5.7-1.dag.rh73.i386.rpm postgresql-7.2.4-5.73.i386.rpm
libmhash-0.9.1-1.rh73.dag.i386.rpm postgresql-libs-7.2.1-5.i386.rpm
6. rpm -Uvh *.rpm (everything installed)
7. updated /etc/httpd/conf/httpd.conf
In order to test modify your httpd.conf and change
LoadModule php4_module /usr/lib/apache/libphp4.so
TO
LoadModule php4_module /usr/lib/apache/libphp5.so
AddModule mod_php4.c
TO
AddModule mod_php5.c
8. cd /etc
9. mv php.ini php.ini.old
10. mv php.ini.rpmnew php.ini
11. /sbin/e-smith/signal-event reboot
12. httpd restart, and then I get the same error message listed above.
1 thing I do not understand was this
I don't know why that happens, my best guess is if you have libxm2 installed...
Check this thread from Zend
http://www.zend.com/lists/php-dev/200310/msg00049.html
It would appear to be a patch and it seems like my missing information. Any Ideas?
-
Hi there!
Couple of things before we proceed any further ;-)
1 - as the catalogue name states these RPMS are experimental, I've got them working on a fresh installed SME 6.01-01
2 - Install only RPMS you need, for basic needs you'll have to install php, php-imap, php-mysql and php-ldap. Any other RPMS you install might require a little bit more work for you...
Any way, here's what I did
* I installed
-rw-r--r-- 1 root root 4764171 Jun 15 23:16 php-5.0.4-1eo.i386.rpm
-rw-r--r-- 1 root root 613567 Jun 15 23:17 php-imap-5.0.4-1eo.i386.
rpm
-rw-r--r-- 1 root root 30469 Jun 15 23:17 php-ldap-5.0.4-1eo.i386.
rpm
-rw-r--r-- 1 root root 34007 Jun 15 23:17 php-mysql-5.0.4-1eo.i386
I've also fetched and installed libxml2 RPMS from norlug.org
wget http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/libxml2-2.5.11-1.norlug.i386.rpm
wget http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/libxml2-devel-2.5.11-1.norlug.i386.rpm
# rpm -Uvh libxml2-*
* I have modified following templates
/etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
include_path = ".:/usr/share/php"
doc_root =
user_dir =
extension_dir = /usr/lib/php5
enable_dl = On
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
return "LoadModule php5_module /usr/lib/apache/libphp5.so";
}
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
return "AddModule mod_php5.c";
}
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
$OUT =<<HERE;
<IfModule mod_php5.c>
AddIcon /icons/php4.gif .php3 .php4 .php .phtml
AddIcon /icons/phps.gif .phps
</IfModule>
HERE
}
After that
# /sbin/e-smith/expand-template/etc/php.ini
#/sbin/e-smith/expand-template/etc/httpd/conf/httpd.conf
# /etc/init.d/httpd restart
-
:pint: :pint: :pint: :pint: :pint:
Thank You sooooooooooooooo much. That worked beautifully. Have you done any other packaged updates that aren't widely used?
-
Glad to hear that...
I think I'll go and take a bear IRL... :pint: Cheers...
Have you done any other packaged updates that aren't widely used?
Do you need any package or howto in particilar?
I did some howto's for WebGUI and Metadot CMS systems (not everything might not be up-to-date). I also have compiled RPMS for SquirrelMail, eAccelerator (MMCache), SpeedyCGI/PersistentPerl, fetchmail, php, php-APC, jhead... I also try to maintain upgrade scripts for php, MySQL (4.0.x and 4.1.x)... Hopefully we won't have to upgrade things when SME7 is here...
All these are for SME6.x, when I have some more time I'll try to upgrade those for SME7 (only if/where/when it's needed).
-
I have just about everything I need installed, it just sounded like you had a lot of experience with "breaking" and then "re-aligning" sme
It's hot outside, I could use a :pint:
-
I was gonna say that I couldn't find the custom template to change libphp4 to libphp5 so I was just changing the main config file....which of course ends up being rebuilt with php4 and kills the server.
I'll try the above when I get home. Other than that I've got everything running great now.
-
I was gonna say that I couldn't find the custom template to change libphp4 to libphp5 so I was just changing the main config file....
You're corret. Files under .../templates-custom/ are to modify standard settings. So if you don't have the file create one and that would override files under ./templates/
-
Hi there!
For what it's worth, I've compiled php5 for the latest version (v5.0.5) and also added latest pear modules... BE AWARE that these are EXPERIMENTAL. ;-)
Any feedback is appriciated.
http://mirror.contribs.org/smeserver/contribs/ergozd/contribs/php5_experimental/RPMS/
-
Ever Since I used your instructions to upgrade to php5, I can't add Ibays now?
-
Hi!
Ever Since I used your instructions to upgrade to php5, I can't add Ibays now?
I just tested and I could create and modify an ibay.
-
should I download/install your latest php*.rpm's or should I go back to php4 to see if that helps?
-
Hi there!
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
return "LoadModule php5_module /usr/lib/apache/libphp5.so";
}
Edit the "30AddModule60PHP" file instead of "20LoadModule80PHP"
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/30AddModule60PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
return "AddModule mod_php5.c";
}
Edit the "65AddIcon00PHP" file instead of "20LoadModule80PHP"
#/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/65AddIcon00PHP
{
return "" unless (exists ${php}{status} and ${php}{status} eq "enabled");
$OUT =<<HERE;
<IfModule mod_php5.c>
AddIcon /icons/php4.gif .php3 .php4 .php .phtml
AddIcon /icons/phps.gif .phps
</IfModule>
HERE
}
-
Hi splunk!
Just for the fun of it I've compiled PHP5 (version 5.0.4), I've installed on a test machine, never used them in production. If you want to give them a try grab them from
http://ergin.dyndns.org/download/RPMS/contribs/php/php504_experimental/
Appriciate any feedback, if they work I can compile to latest version of PHP5 (v5.0.5)
This came through recently on the centos-devel list. I would strongly recommend anyone who wants to play with PHP5 use the RPMs from the CentOS project rather than building their own.
Php has been updated once again in the dev.centos.org testing
repository. The current version there is now php 5.1.4, and has a
couple new features including sqlite support, some bug fixes and the
like. Please take some time to test it out and report any issues to
http://bugs.centos.org
If it works well, report that too as it will help us get a more recent
php5 package into centosplus. ]
-
Hi,
I’m trying to install PHP5 on at SME7 testbox running eGroupWare 1.2.104 (current version)
I’ve removed horde as suggested here: http://mirror.centos.org/centos/4/centosplus/Readme.txt
But running:
[root@egroup ~]# yum --enablerepo=centosplus --exclude=php-domxml install php*
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php-imap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-odbc.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-pear.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-ncurses.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-ldap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-mysql.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-bcmath.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-xml.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-xmlrpc.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-snmp.i386 0:5.0.4-5.centos4 set to be updated
---> Package php.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-gd.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-dba.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-devel.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-mbstring.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-soap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-pgsql.i386 0:5.0.4-5.centos4 set to be updated
--> Running transaction check
--> Processing Dependency: libodbcpsql.so.2 for package: php-odbc
--> Processing Dependency: libodbc.so.1 for package: php-odbc
--> Finished Dependency Resolution
Error: Missing Dependency: libodbcpsql.so.2 is needed by package php-odbc
Error: Missing Dependency: libodbc.so.1 is needed by package php-odbc
================================================================
No new rpms were installed. No additional commands are required.
Any suggestions please, I can’t force the install??
I’m working on a Howto and need PHP5 to be able to sync Outlook (and Phones…) via sync4j
-
--> Running transaction check
--> Processing Dependency: libodbcpsql.so.2 for package: php-odbc
--> Processing Dependency: libodbc.so.1 for package: php-odbc
--> Finished Dependency Resolution
Error: Missing Dependency: libodbcpsql.so.2 is needed by package php-odbc
Error: Missing Dependency: libodbc.so.1 is needed by package php-odbc
================================================================
No new rpms were installed. No additional commands are required.
Any suggestions please, I can’t force the install??
Using Google and RPMFind (http://www.rpmfind.net) my guess is that those files are provide by the UnixODBC (http://www.unixodbc.org) package. Take a look here at there sourceforge download site (http://sourceforge.net/project/showfiles.php?group_id=1544) files (even an RPM) can be found.
-
Massive :-)
One day I’ll help someone else with these words of wisdom :-)
[root@egroup Dependencies]# rpm -Uvh unixODBC-2.2.11-1.i386.rpm
Preparing... ########################################### [100%]
1:unixODBC ########################################### [100%]
[root@egroup Dependencies]# yum --enablerepo=centosplus --exclude=php-domxml install php*
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php-imap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-odbc.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-ncurses.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-ldap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-pear.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-bcmath.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-xml.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-xmlrpc.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-snmp.i386 0:5.0.4-5.centos4 set to be updated
---> Package php.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-gd.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-dba.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-devel.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-mysql.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-mbstring.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-soap.i386 0:5.0.4-5.centos4 set to be updated
---> Package php-pgsql.i386 0:5.0.4-5.centos4 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
php-bcmath i386 5.0.4-5.centos4 centosplus 26 k
php-dba i386 5.0.4-5.centos4 centosplus 32 k
php-devel i386 5.0.4-5.centos4 centosplus 392 k
php-ncurses i386 5.0.4-5.centos4 centosplus 32 k
php-odbc i386 5.0.4-5.centos4 centosplus 35 k
php-pgsql i386 5.0.4-5.centos4 centosplus 46 k
php-snmp i386 5.0.4-5.centos4 centosplus 22 k
php-soap i386 5.0.4-5.centos4 centosplus 116 k
php-xml i386 5.0.4-5.centos4 centosplus 64 k
php-xmlrpc i386 5.0.4-5.centos4 centosplus 45 k
Updating:
php i386 5.0.4-5.centos4 centosplus 2.3 M
php-gd i386 5.0.4-5.centos4 centosplus 96 k
php-imap i386 5.0.4-5.centos4 centosplus 44 k
php-ldap i386 5.0.4-5.centos4 centosplus 28 k
php-mbstring i386 5.0.4-5.centos4 centosplus 962 k
php-mysql i386 5.0.4-5.centos4 centosplus 58 k
php-pear i386 5.0.4-5.centos4 centosplus 359 k
Transaction Summary
=============================================================================
Install 10 Package(s)
Update 7 Package(s)
Remove 0 Package(s)
Total download size: 4.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/17): php-imap-5.0.4-5. 100% |=========================| 44 kB 00:00
(2/17): php-odbc-5.0.4-5. 100% |=========================| 35 kB 00:00
(3/17): php-ncurses-5.0.4 100% |=========================| 32 kB 00:00
(4/17): php-ldap-5.0.4-5. 100% |=========================| 28 kB 00:00
(5/17): php-pear-5.0.4-5. 100% |=========================| 359 kB 00:01
(6/17): php-bcmath-5.0.4- 100% |=========================| 26 kB 00:00
(7/17): php-xml-5.0.4-5.c 100% |=========================| 64 kB 00:00
(8/17): php-xmlrpc-5.0.4- 100% |=========================| 45 kB 00:00
(9/17): php-snmp-5.0.4-5. 100% |=========================| 22 kB 00:00
(10/17): php-5.0.4-5.cent 100% |=========================| 2.3 MB 00:10
(11/17): php-gd-5.0.4-5.c 100% |=========================| 96 kB 00:01
(12/17): php-dba-5.0.4-5. 100% |=========================| 32 kB 00:00
(13/17): php-devel-5.0.4- 100% |=========================| 392 kB 00:01
(14/17): php-mysql-5.0.4- 100% |=========================| 58 kB 00:00
(15/17): php-mbstring-5.0 100% |=========================| 962 kB 00:04
(16/17): php-soap-5.0.4-5 100% |=========================| 116 kB 00:00
(17/17): php-pgsql-5.0.4- 100% |=========================| 46 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-mbstring ####################### [ 1/25]
Updating : php-mysql ####################### [ 2/25]
Updating : php-gd ####################### [ 3/25]
Installing: php-xml ####################### [ 4/25]
Updating : php-pear ####################### [ 5/25]
Updating : php-ldap ####################### [ 6/25]
Updating : php-imap ####################### [ 7/25]
Updating : php [ 8/25]warning: /etc/php.ini created as /etc/php.ini.rpmnew
Updating : php ####################### [ 8/25]
Installing: php-odbc ####################### [ 9/25]
Installing: php-ncurses ####################### [10/25]
Installing: php-bcmath ####################### [11/25]
Installing: php-xmlrpc ####################### [12/25]
Installing: php-snmp ####################### [13/25]
Installing: php-dba ####################### [14/25]
Installing: php-devel ####################### [15/25]
Installing: php-soap ####################### [16/25]
Installing: php-pgsql ####################### [17/25]
Cleanup : php-imap ####################### [18/25]
Cleanup : php-ldap ####################### [19/25]
Cleanup : php-pear ####################### [20/25]
Removing : php-domxml ####################### [21/25]
Cleanup : php ####################### [22/25]
Cleanup : php-gd ####################### [23/25]
Cleanup : php-mysql ####################### [24/25]
Cleanup : php-mbstring ####################### [25/25]
Installed: php-bcmath.i386 0:5.0.4-5.centos4 php-dba.i386 0:5.0.4-5.centos4 php-devel.i386 0:5.0.4-5.centos4 php-ncurses.i386 0:5.0.4-5.centos4 php-odbc.i386 0:5.0.4-5.centos4 php-pgsql.i386 0:5.0.4-5.centos4 php-snmp.i386 0:5.0.4-5.centos4 php-soap.i386 0:5.0.4-5.centos4 php-xml.i386 0:5.0.4-5.centos4 php-xmlrpc.i386 0:5.0.4-5.centos4
Updated: php.i386 0:5.0.4-5.centos4 php-gd.i386 0:5.0.4-5.centos4 php-imap.i386 0:5.0.4-5.centos4 php-ldap.i386 0:5.0.4-5.centos4 php-mbstring.i386 0:5.0.4-5.centos4 php-mysql.i386 0:5.0.4-5.centos4 php-pear.i386 0:5.0.4-5.centos4
Complete!
==============================================================
WARNING: You now need to run BOTH of the following commands
to ensure consistent system state:
signal-event post-upgrade; signal-event reboot
You should run these commands unless you are certain that
yum made no changes to your system.
==============================================================
[root@egroup Dependencies]#
I’ll proceed with my work, and hopefully post some more regarding eGroupWare and sync with PIM and Outlook soon.
-
I got php5 and MySQL5 working on CentOS using the CentOS extras yum repositories.
I'm going to try it on SME very soon, will report back
-
yum update mysql seems to work 4.x becomes 5.x
yum update php kills php-mysql
phpmyadmin reports "cannot load mysql extension"
-
yum update mysql seems to work 4.x becomes 5.x
yum update php kills php-mysql
phpmyadmin reports "cannot load mysql extension"
I ran into the same problems. However, see the following link:
http://www.no.longer.valid/phpwiki/index.php/How-To%20upgrade%20to%20MySQL%205%20and%20PHP%205
To fix the php, all I had to do is follow his instructions starting with:
wget http://magicwilly.webhostingpal.com/SME7%20How%20To%20Files/PHP5/50PathsDirectories
hope this helps