PHP5 CGI & CLI with an existing PHP4 Modules installation

I put back your 5.2 and this is the ls output:

[root@www-d01 php5]# ls -l /usr/lib/php5/
total 2400
drwxr-xr-x 2 root root 4096 Feb 15 21:40 build
-rwxr-xr-x 1 root root 104884 Feb 7 18:39 imap.so
-rwxr-xr-x 1 root root 47458 Feb 7 18:39 ldap.so
-rwxr-xr-x 1 root root 1763329 Feb 7 18:39 mbstring.so
-rwxr-xr-x 1 root root 38219 Feb 7 18:39 mcrypt.so
-rwxr-xr-x 1 root root 9976 Feb 7 18:39 mhash.so
-rwxr-xr-x 1 root root 54186 Feb 7 18:39 mysql.so
-rwxr-xr-x 1 root root 83754 Feb 7 18:39 ncurses.so
-rwxr-xr-x 1 root root 68391 Feb 7 18:39 odbc.so
-rwxr-xr-x 1 root root 110485 Feb 7 18:39 pgsql.so
-rwxr-xr-x 1 root root 28254 Feb 7 18:39 snmp.so
-rwxr-xr-x 1 root root 94534 Feb 7 18:39 xmlrpc.so
[root@www-d01 php5]#

Why do you install all these modules ? do you really need all of them ?

Ok so what is the content of the line "extension_dir= " in the file /etc/php5/php.ini ?
You must have this

extension_dir = “/usr/lib/php5”

Also could you please paste here the contents of this directory /etc/php5/php.d/

ls -l /etc/php5/php.d/

You must have an entry for all modules used, like for example

ls -l /etc/php5/php.d/

total 12
-rw-r–r-- 1 root root 57 f?v 5 11:11 mbstring.ini
-rw-r–r-- 1 root root 51 f?v 5 11:11 mysql.ini
-rw-r–r-- 1 root root 43 d?c 11 04:39 pdflib.ini

Could you please also show me the symlinks of /usr/bin/php5 ?
Please provide the result of

ls -l /usr/bin/php5

Pascal

All working, it was the reference in /etc/php5/php.ini that was needed…

As to modules, apart from the normal, we need mbstring (china), mcrypt and mhash for some users, pgsql as it is the normal db that we use for real transactional applications cause at the end of the day mysql is just plain too lightweight, and snmp for a monitoring package we are testing the integration of with openmanage and Ubersmith…

Well happy to know we have found and resolved your problems.

I was sure sure it should work :-p

So there is a definate issue with this approach to use PHP5.x.x with iworx…

And for the records, iworx doesn’t have something to do with an installation of phpx/mysqlx/httpdx etc…
Interworx use his own php/mysql/httpd server, and so until you don’t touch the interworx ones, you can install/hack/tweak what you want on your system

Pascal

Can you put the downloads online again, i wanna install php5, suphp nad php4.4.4 but i can’t downloads are offline

Sure.

http://clust01-carat01.carat-hosting.com/srpm/ is ok now

Pascal

would be nice if somebody creates working RPMs and provide a download location :wink:

Yes but the RPM are OS specific, so you have to recreate the RPM from the SRPM depending of your OS

It’s why I didn’t put here the RPMS. Ours are CENTOS 4

Pascal

OK, that’s true :wink:
We only use Centos 4.x, I forgot that InterWorx also runs on other OSes.

This would be a very cool add-on for Iworx.
It would be nice to have a Package Option with PHP 4/PHP5/PHP 4 & 5 when you create a new siteworx account or edit it.

We’ve succesfully installed this on FC3, FC4 & CentOS 4 servers, and it it’s performing very well.

Pascal’s links dont seem to be functioning at the moment, but we do have the SRPM’s on our boxes, so if anyone does need them, I’m sure there wouldn’t be objections for us to supply you a link.

Same goes for the suPHP SRPM :slight_smile:

i am looking to run both php4 and php5 on my centos server is this the best way to go and does it work ok.
all the links for srpms appear to be down though.
thank you

Please drop me a PM, and I’ll let you have a link to them from our servers :slight_smile:

message sent
thank you

Few build dependencies missing which i have sorted

the only problem i have is when going to install command

error: Failed dependencies:
php5-pear is needed by php5-5.2.0-CLI_CGI.rhe4x.1.0.2.i386

thank you

When you created the RPM’s, didn’t it create
php5-pear-5.2.0-CLI_CGI.rhe4x.1.0.2.i386.rpm
too?

The above RPM was built on a CentOS4.6 box.

yes it did sorted now thank you

it does not create the /usr/lib/php5 directory so i am missing the content of the folder.
tried 3 times now still the same.
any ideas how to fix this problem

Change the owner of this file to allow suexec

what do i change the owner to

thank you

Hello

For your info we have used these SRPM (from iworx/carathosting) on our centos5 box and everythng was fine

PHP 4.4.4

PHP 5.2.0

suPHP 0.6.2

Pascal gave us these SRPMS

Then in /etc/httpd/conf.d/domain.conf we’ve added these lines

suPHP_Engine on
suPHP_UserGroup account account
suPHP_AddHandler x-httpd-php5 .php
suPHP_AddHandler x-httpd-php .php
suPHP_ConfigPath /etc/php5 (or cpy php.ini in /home/account/domain.com/ and define this path to allow the client to have his own php.ini)
SetEnv PHPRC /etc/php5/ (idem)
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php5 .phtml
AcceptPathInfo On

here by default the php process will be done with PHP5 (it could be with php4)

Then we just have to create a .htaccess file in the directory we want php4 or php5 (it so allow to have a directory with php5 and an other with php4 under the same domain) and add these lines

AddHandler x-httpd-php .php .php4 .php3
or
AddHandler x-httpd-php5 .php .php5

Paul

[quote=netipro;15185]Hello

For your info we have used these SRPM (from iworx/carathosting) on our centos5 box and everythng was fine

PHP 4.4.4
http://www.netipro.com/downloads/php-4.4.4-100.rhe4x.iworx.src.rpm

PHP 5.2.0
http://www.netipro.com/downloads/php5-5.2.0-CLI_CGI.rhe4x.1.0.2.src.rpm

suPHP 0.6.2
http://www.netipro.com/downloads/suphp-0.6.2-100.cos5x.iworx.src.rpm

Pascal gave us these SRPMS

Then in /etc/httpd/conf.d/domain.conf we’ve added these lines

here by default the php process will be done with PHP5 (it could be with php4)

Then we just have to create a .htaccess file in the directory we want php4 or php5 (it so allow to have a directory with php5 and an other with php4 under the same domain) and add these lines

Paul[/quote]

Thank you

my main problem is that the /usr/lib/php5 and contents is not created for some reason every thing else seems to be there.
not sure why at present.

[quote=bear;15189]Thank you

my main problem is that the /usr/lib/php5 and contents is not created for some reason every thing else seems to be there.
not sure why at present.[/quote]

Did you try wth our SRPM ?

What is your OS ? 32 or 64 bits ?

Did you use the “with xxx” option when rebuilding the rpm ?

Did you have some errors when recreating the rpm ?

What rpms did you install (rpm -qa | grep php ) ? and how ?

If you give the SRPM I could check it to see where the pbm is

paul