Seekbrain.com

Brain Seeking at it’s Best

PHP4, PHP5 & MySQL RPMs Released

Filed under: Software — Perlboy at 7:03 am on Friday, January 20, 2006

Heya,

I’ve released RPMs for the following package sets:

  • PHP 4.4.2 Standard Build
  • PHP 5.1.2 CGI Build (ie. for side by side operation between PHP4 & PHP5)
  • MySQL 4.1.16 Standard Build

I’ve only compiled & tested these for the following distributions:

  • Redhat Enterprise 3 (CentOS3)
  • Redhat Enterprise 4 (CentOS4)

Compiled RPMs & Source RPM packages are available from:

http://www.seekbrain.com/downloads/psa/

These should also be yum’able. :)

If you have problems with a package, post a comment and I’ll see what I can do.

Enjoy,

Stuart

P.S. If you want to use PHP5 without needing a shebang line on your .php5 scripts add the following to your rc.local:

# Allow PHP5 to run without shebang
modprobe binfmt_misc
echo ':PHP5:E::php5::/usr/bin/php5/php:' > /proc/sys/fs/binfmt_misc/register

29 Comments »

21

Comment by Jake

January 26, 2006 @ 4:39 am

Hey stuart,

I am starting fresh with these rpms, on RHEL3(Plesk with php 4.3.2)… When I try to install the php5-cgi package I get a dependency for php5-cgi-pear. When I try to install php5-cgi-pear from your site I get a dependency on php5-cgi.

Catch 22.

Thanks for any help.

Jake

22

Comment by Perlboy

January 26, 2006 @ 8:13 am

Heya,

Download both then rpm -Uvh both RPMs at the same time rather than seperately. I’d also recommend using the yum archive. up2date supports yum archive natively and it’d mean you don’t have to worry about dependency resolution.

Stuart

23

Comment by Jake

January 27, 2006 @ 4:00 am

Hey Thanks,

I am on a Virtuozzo VPS also I forgot to mention. Got it all installed.

How do I make this work with apache?

When I run a “Hello World” script from the command line I get the following error:

/usr/bin/php5/php: relocation error: /usr/bin/php5/php: undefined symbol: xmlParserInputBufferCreateFilenameDefault

Also I guess Virtuozzo doesnt give you the /proc file system so I cannot remove the #!.

24

Comment by Jake

January 27, 2006 @ 4:03 am

cancel the /proc comment, I just dont have binfmt_misc installed

25

Comment by Jake

January 27, 2006 @ 4:29 am

Also, I have libxml2-2.5.10-7

26

Comment by Perlboy

January 27, 2006 @ 5:22 am

Hmm,

Are you still having this problem? I can’t recreate it which makes me think our libxml2 packages are mismatched. Worst case scenario, download the SRC.RPM (under SRPMS) then run:

rpmbuild –rebuild php….src.rpm –define ‘dist rhel3′

Assuming your VPS template is RHEL3 of course (RHEL4 use ‘dist rhel4′).

Stuart

27

Comment by Jake

January 27, 2006 @ 7:14 am

Ok so I found the problem.. Just to document for others.

When building the RPM I get:

configure: error: libxml2 version 2.6.11 or greater required.

Picked up prebuilt libxml2-2.6.16-1.1 from
http://apt.sw.be/redhat/el3/en/i386/RPMS.dag/

got the src rpm from your site and build with

rpmbuild –rebuild –define ‘dist rhel3′ php5-cgi-5.1.2-1.sp.src.rpm

cd /usr/src/redhat/RPMS/i386/

rpm -Uvh php5-cgi*

voila..

Perlboy any tips on getting the php5 suffixed files to run through the web server? Right now I just get a 403 forbidden.

Thanks for the help.

28

Comment by Perlboy

January 27, 2006 @ 7:43 am

Hey Jake,

Well, you’re on a VPS so you can’t use binfmt. Consequently, at this point you’ll need to use the #! component. In addition to this requirement ALL users (ie. those with & without binfmt) will need to make sure they chmod 755 their php5 files.

When you install the PHP5 RPMs it should place the PHP5.conf file in httpd/conf. Ie.

[root@atlas root]# cat /etc/httpd/conf.d/php5.conf
#Alias /php5-cgi /usr/bin/php5

#AddHandler php5-script .php5
#Action php5-script /php5-cgi/php
AddHandler cgi-script .php5
[root@atlas root]#

If it doesn’t work you may need to restart Apache (ie. service httpd restart).

Hope that helps,

Stuart

29

Comment by Jake

January 27, 2006 @ 8:02 am

Stuart maybe it is a permissions issue? I have all the stuff setup just like this.

helloworld.php is chmodded 755

apache has been restarted

php5.conf is in place

Jake

30

Comment by Jake

January 27, 2006 @ 8:03 am

excuse me helloworld.php5 with the shabang in top just so you know…

31

Comment by Jake

January 27, 2006 @ 8:30 am

wow… finally I got it.

I have PSA 7.5.4 installed, this may be different for other version.

You will need to turn this on for each domain by editing the /var/www/vhosts/mydomain.com/conf/http.include file

Change instances of Options -Includes -ExecCGI to Options -Includes +ExecCGI

On to more important things now.

Thanks again Stuart.

Jake

32

Comment by Perlboy

January 27, 2006 @ 9:00 am

Hi Jake,

The ExecCGI option should be enabled for a domain when the “CGI Support” option is selected under Hosting setup.

Stuart

34

Comment by Ayalon

January 29, 2006 @ 9:51 am

Hi Stuart,

Great this repository, i run Redhat 3AS. Ofcourse i can use your rpm’s with my server (the 3ES ones). Do you also have updates for the apache server? Is the only thing i’m missing…

Keep up the good work!

35

Comment by Perlboy

January 29, 2006 @ 10:24 am

Hi there,

Apache updates are supplied as part of the up2date service. You simply need to setup a RHN subscription for your Redhat 3AS machine then layer my updates on top of up2date.

Stuart

36

Comment by Ayalon

January 29, 2006 @ 10:49 am

Wow thats a fast reply.. I’m on a rented box without rhn up2date installed because they have it centrally.. Which is the last version and could you do me a favor and put it in there ;)

37

Comment by Perlboy

January 29, 2006 @ 11:26 am

Hi there,

No I can’t. I don’t have a Redhat AS/ES subscription nor would I supply the RPM if I did. That’s not to mention that by placing the Apache RPM into the repository I could potentially stuff a large of servers using both RHN up2date & the Seekbrain repository.

Stuart

90

Comment by Jürgen

February 12, 2006 @ 8:13 pm

Hi there,
i appreciate very much that you post these rpms !

RHEL 3 caused me lots of headaches since it was
shipped without MySQL Server, and the php 4.3.2-8
has been compiled against MySQL 3.23.

At least i succeeded in installing MySQL 4.1.18 and it works fine with the correspoding client on the commandline. But PHP kept complaining of missing “libmysqlclient.so.10″ until i manually moved this
file back, which is not a clean solution i guess…

I assume i should go for your PHP 4.4.2 Standard Build. Are there any compatibility issues between
CentOS 3 and RHEL 3 ? Do i have to configure anything
before installing ? I’m sort of a newbie.
Thanks a ton !
Jürgen

91

Comment by Perlboy

February 12, 2006 @ 8:26 pm

Hi Jurgen,

CentOS3 IS RHEL3 so there shouldn’t be any compatibility issues. As far as I’m aware RHEL3 came with MySQL so I’m not sure why you’re having issues installing it.

Anyway, you SHOULD be able to download all the mysql-* & php-* files and install them together. You may instead with to have a look at adding the repository to up2date as a yum archive (check /etc/sysconfig/rhn/sources for information).

Stuart

92

Comment by Jürgen

February 12, 2006 @ 8:40 pm

oops that was quick.. thanx !!
There was just mysql 3.23.58 client, which is a
bad joke for a ’server’ from DELL. I’ll keep
my hands off these RedHat OEM products in the future…

Thanks for you hint, i’d rather keep MySQL 4.1.18
installed and just update php. Do you think this
could work ?

Jürgen

93

Comment by Perlboy

February 12, 2006 @ 9:14 pm

Yes, it SHOULD “just work”. I’d strongly recommend using -Uvh as it’ll upgrade things “in place”.

Cheers,

Stuart

94

Comment by Jürgen

February 12, 2006 @ 9:58 pm

Stuart,

my plan now is to upgrade these two packages

1) php-4.4.2-1.sp.i386.rpm
2) php-mysql-4.4.2-1.sp.i386.rpm

with the options you specified.

what is mysql-compat ? is it mandatory ?

all the best,
Jürgen

95

Comment by Jürgen

February 12, 2006 @ 10:48 pm

ok, i’ll get back to yr. blog as soon as i have
results…
thanks, jürgen

104

Comment by Phil

February 15, 2006 @ 6:27 am

This is great just what I need.
How do I install the php5 cgi through YUM?

105

Comment by Perlboy

February 15, 2006 @ 7:36 am

Hi there,

Add the Seekbrain yum repository to your yum config then run:

yum install php5-cgi

Cheers,

Stuart

111

Comment by v

February 16, 2006 @ 7:36 pm

Just wanted to say thanks for making these available! Was having the same problem trying to find a repository and remember what a pain in the a$$ it is to compile … cheers.

151

Comment by Mark B

March 3, 2006 @ 8:31 pm

Nice to see these packages and that they include an updated php with mysql. :-)

I have one small problem however, the phpize app in the php-devel package doesn’t work, I get the following error when building eAccelerator:

# phpize
Cannot find build files at ‘/usr/lib/build’. Please check your PHP installation.

The original RHEL3 php-devel contains a directory called /usr/lib/php/build that contains a load of automake macros.

Cheers

Comment by John Thomas

July 7, 2006 @ 11:58 am

Could you advise on my troubles.

A script I have wants me to add this so that this cpr.php script executes with php5:

Order allow,deny
Allow from all
AddHandler php5-script .php
Action php5-script /cgi-bin/php5

I installed your rpm, but I cannot figure out how to change the php5.conf file to make it work for the above. Any thouhgts or ideas are appreciated.

Comment by John Thomas

July 7, 2006 @ 12:02 pm

Ah, my previous comment had info removed. The before the Order allow,deny line was:
(Location /example/cpr.php)
and after Action . . . was:
(/Location)
excepting the parens were brackets like

Comment by mark

October 14, 2006 @ 12:58 am

The RHEL4 binary rpm - is it built –with-java? RHEL4’s is not….

mark

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>