php iworx rpm : cli ?

Hello,

When I install interworx it install by default the php 4.3.11 rpm.

It installs the cgi version of php and add the module to apache.

But is there the cli version of php ? I didn’t find the sapi directory.

The strange part is I have a php-cli.ini file, so I should have the cli version of php somewhere ?

I need the cli version to perform some server scripts. Also I think that there will be no major difference running a CRON job using a CLI php version or a CGI version (I think about the impacts that might have for our customers using a php script in a cron job)

I thought by default it was the cli version which was copied in /usr/bin when you use the APXS sapi

If a module SAPI is chosen during configure, such as apxs, or the --disable-cgi option is used, the CLI is copied to {PREFIX}/bin/php during make install otherwise the CGI is placed there. So, for example, if --with–apxs is in your configure line then the CLI is copied to {PREFIX}/bin/php during make install.

Thanks

Pascal

Is it possible to change the RPM to install the 3 versions :

  • The apache module
  • The CGI version in /usr/bin/php-cgi
  • the CLI version in /usr/bin/php

Or could give me direction to update the .spec file to perform this ?

Thanks

Pascal

I’ve actually done this mod on a recent PHP5 RPM. It’s located here and should be pretty easy to backport the changes to php4 if you wanted too Pascal. I’ll do it as well at some point for PHP4.

http://updates.interworx.com/iworx/SRPMS/experimental/php-5.1.2-100.iworx.src.rpm

Chris

Thanks a ton

I didn’t have look but I suppose you do a make install-cli ?

Anyway I’ll have a look at this spec file. and one more time thank yu

Pascal

No install-cli, the CLI is built when the CGI is so it’s just a matter of copying.

Chris

Hi,

When I try to rebuild this src.rpm (with any mod in it) I have an error with the patch p0

[root@obiwan SRPMS]# rpmbuild --rebuild --with rhe4x php-5.1.2-100.iworx.src.rpm
Installing php-5.1.2-100.iworx.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.59957

  • umask 022
  • cd /usr/src/redhat/BUILD
  • cd /usr/src/redhat/BUILD
  • rm -rf php-5.1.2
  • /bin/gzip -dc /usr/src/redhat/SOURCES/php-5.1.2.tar.gz
  • tar -xf -
  • STATUS=0
  • ‘[’ 0 -ne 0 ‘]’
  • cd php-5.1.2
  • echo ‘Patch #0 (php-5.0.5-configure.patch):’
    Patch #0 (php-5.0.5-configure.patch):
  • patch -p0 -s
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    misordered hunks! output would be garbled
    129 out of 286 hunks FAILED – saving rejects to file configure.rej
    error: Bad exit status from /var/tmp/rpm-tmp.59957 (%prep)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.59957 (%prep)

This patch update the php configure ? for arch 64 bits ?

Any idea ?

Pascal

I’d comment out that patch Pascal. I’ve only tested this RPM on 32 bit boxes.

Chris