PHP 5.0.4.art installation on x64 RHEL 4 box

Support/Development for PHP
Timon
Forum User
Forum User
Posts: 8
Joined: Mon Jun 12, 2006 8:02 am

PHP 5.0.4.art installation on x64 RHEL 4 box

Unread post by Timon »

Dear members,

I've tried everything to avoid needing to post here, but i'm really stunned, can't figure out why. Back a while ago i've asked if they would support 64-bit packages here, Scott replied he ain't had a x64 machine yet. After that i compiled a php 5.1.4 version myself with everything in it that me and my customers need. That has been running on the production server since then without any problems. The only problem was that the damn plesk updates :lol: did not work. So i always had to manually install them, but now a good while later, i want to sort this once and for all.

So i've tried to install php.5.0.4 from art in the atomic channel on the rhel 4 x64, plesk 8.0.1 TEST BOX. The installation goes fine, all files are configured correct. But when i try to start httpd, i get the following error:
$ service httpd start
Starting httpd: Syntax error on line 6 of /etc/httpd/conf.d/php.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory [FAILED]
Ok, so i check if the libphp5.so is there,
$ locate libphp5.so
/etc/httpd/modules/libphp5.so
Yep it's there, strange lets try to copy it to a few places and try to change the path in php.conf. Also tried to create a symbolic link /opt/httpd/modules on /etc/httpd/modules.
$ locate libphp5.so
/etc/httpd/modules/libphp5.so
/usr/lib64/httpd/modules/libphp5.so
/usr/lib/httpd/modules/libphp5.so
$ cat php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

#Tried them all
LoadModule php5_module modules/libphp5.so
#LoadModule php5_module /opt/httpd/modules/libphp5.so
#LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
#LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
No luck, i've been through all configuration files, no luck, still the same start error.
Does this version of php simply not support x64 and i'm being a dummy to try, or is there a solution to this problem ?

Again, I've tried to avoid posting here, but i can't figure it out myself, so i do appreciate all additions and help a lot.

Thanks in advance,
Merry Christmas
Xploreweb.com
Plesk 8.0
RHEl 4 ES x86_64 U3
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Thats a library issue, you'll get the file-not-found message frequently when you're mixing 32 and 64 bit packages together. The only good solution is to rebuild the package natively at 64-bit, the hack would be to export LD_LIBRARY_PATH to look in your 32-bit compat libraries first inside of the httpd init script.
Timon
Forum User
Forum User
Posts: 8
Joined: Mon Jun 12, 2006 8:02 am

Unread post by Timon »

Sorry, was away for a few days.

Thank you Scott ! I've decided to build the rpms from scratch on php 5.2, i've done this before with 5.1.4 and included all support for the extensions in one rpm, instead of seperating them in php-mysql, php-pgsql, etc. Now i want to seperate them all and make it compatible with plesk updates.

Do you mind to share your buildrpm scripts m8, for php and all it's additions ?
It would be a good reference.
Xploreweb.com
Plesk 8.0
RHEl 4 ES x86_64 U3
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I use a package from Dag Wieer called DAR to handle all my building. Packages are build inside of a custom chroot environment for each platform I support. So for example, if I want to link php against mysql5 client libraries, I modify each chroot accordingly. The result is from a single build command, it produces packages for each platform supported. Another lighter-weight package along these lines is mock, which is what fedora is using now, combined with a client-server package called plague to do distributed building.

Design wise, I'm basing mine off of FC5 currently, with FC6 in the wings. Theres a fair amount of backporting involved for the older OS's, which will involve either conditional build statements in the spec file, or worst case, updates of older support packages, like libxml, curl, etc. Those can have a cascading effect on other packages, so wherever possible I try to avoid that.

Modular vs. non-modular. Go modular, do not try to bundle everything into a single rpm. RPM-wise, you can sort of hack around that with the Provides statement, however depending on the version of RPM that was used by other packages (sun notably, uses rpm 3.0 for the java rpms) may not be able to parse that sucessfully. If you're trying to save yourself the trouble of something like "yum install php php-gd php-imap php-mysql" a better route than a monolithic php package would be to create a php-suite rpm (I call these "mules"), that use Requires: statements to specify all the parts you want to include. Take a look at http://3es.atomicrocketturtle.com/packa ... amera.spec for an example.
Timon
Forum User
Forum User
Posts: 8
Joined: Mon Jun 12, 2006 8:02 am

Unread post by Timon »

Thank you very much for your time and reply scott,

Very useful information, i can go from there and explore the world of custom build environments. I'm looking forward to it.

I have one last question, do you know by coincidence why plesk updates give a curl error on my custom php 5.1.4 installation, it is compiled with and supports curl, bit confusing. No worries though.

Thanks for your help !
Xploreweb.com
Plesk 8.0
RHEl 4 ES x86_64 U3
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

They're not using the RPM dependency resolution system to see whats installed on the box, rather they're doing one-dimentional static checks: is curl 1.2.3 installed. If you have a newer version its going to fail, until they update their code.
Timon
Forum User
Forum User
Posts: 8
Joined: Mon Jun 12, 2006 8:02 am

Unread post by Timon »

scott wrote:They're not using the RPM dependency resolution system to see whats installed on the box, rather they're doing one-dimentional static checks: is curl 1.2.3 installed. If you have a newer version its going to fail, until they update their code.
Thank you,

What do they look for ? if you compile php with curl, it is integrated in the main php RPM. Or better said, how did you make your rpms compatible with their update system, or aren't they ?

Thanks for all the answers.
Xploreweb.com
Plesk 8.0
RHEl 4 ES x86_64 U3
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Well they are looking at the rpms, they're just doing it 1 dimensionally, looking for a specific version. IE, is curl 1.2.3 installed?

Yum is using rpm like this, rpm -q curl. Then it extracts dependencies, conflicts, etc. Compares those against what out there in the yum channel, and then figures it all out automatically. The PSA updater does not, they've created their own dependency tree outside of the rpm db. So its never going to be dynamic in the way it looks at a system.
ClearlyTechnical
Forum User
Forum User
Posts: 37
Joined: Wed Feb 09, 2005 6:27 pm

Timon - Status on your php build

Unread post by ClearlyTechnical »

Timon,

I followed your post after coming up empty.

I have one of the new 1and1 boxes on an AMD 64bit. I have a great need for an update to php due to some bugs my software is having with the current version that Plesk has installed.

If you have made progress, I would be happy to test with you.

Thank you too Scott. I can see you have become much busier.


Regards,


ClearlyTechnical
Timon
Forum User
Forum User
Posts: 8
Joined: Mon Jun 12, 2006 8:02 am

Re: Timon - Status on your php build

Unread post by Timon »

ClearlyTechnical wrote:Timon,

I followed your post after coming up empty.

I have one of the new 1and1 boxes on an AMD 64bit. I have a great need for an update to php due to some bugs my software is having with the current version that Plesk has installed.

If you have made progress, I would be happy to test with you.

Thank you too Scott. I can see you have become much busier.


Regards,


ClearlyTechnical
Hi ClearlyTechnical,

I've made a custom mule of php 5.2.0, with everything in it.
Right now i run a php 5.1.4 package on the production server.
I still need to look into the build environment scott represented me to, as i did not have much time yet, but i look forward to move on with that.

I've noticed redhat released 5.1.2 in their application stack beta server for x86_64 architecture. I will test all soon, but before i kick off ill reply here.

As i did not find any help besides all the good help Scott gave, i would be glad to help you out ! It's nice not to be alone.

Greetings,
Timon
Xploreweb.com
Plesk 8.0
RHEl 4 ES x86_64 U3
Post Reply