[ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Max O Bowsher
I now have a PHP package which builds in a manner I think is adequate
for release. I still haven't addressed the matter of loadable
extensions, so it is mandatory to install postgresql to install PHP at
all, but given the regular interest in PHP shown on the cygwin ML, I
think people are going to willingly put up with that, to avoid having to
 build PHP itself.

I have, on the other hand, managed to wrangle PHP into using a shared
corelib, so that the bulk of the code isn't duplicated three times, in
the cli, cgi-fcgi, and apache2 versions.

I think the presence of PHP in Linux distributions is sufficiently well
known that I don't need to quote proof of that :-) - so here goes with
the rest of the ITP related stuff:


setup.hint-s:

# php
category: Web
requires: cygwin crypt postgresql minires libxml2
sdesc: "PHP: Hypertext Preprocessor"
ldesc: "PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML."

# php-apache2
category: Web
requires: php apache2
external-source: php
sdesc: "PHP: Hypertext Preprocessor (Apache 2 module)"
ldesc: "PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML."

# php-devel
category: Web
requires: php
external-source: php
sdesc: "PHP: Hypertext Preprocessor (development files)"
ldesc: "PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML."


Setup package URL:
http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/

Direct package URLs:
http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-5.1.4-0.3-src.tar.bz2
http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-5.1.4-0.3.tar.bz2
http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-apache2/php-apache2-5.1.4-0.3.tar.bz2
http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-devel/php-devel-5.1.4-0.3.tar.bz2


Obviously, I'll bump the 0.3 release number up to 1 once GTG is achieved.

Max.


signature.asc (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Yaakov (Cygwin/X)
Max Bowsher wrote:
> # php-apache2
> category: Web
> requires: php apache2
> external-source: php
> sdesc: "PHP: Hypertext Preprocessor (Apache 2 module)"
> ldesc: "PHP is a widely-used general-purpose scripting language that is
> especially suited for Web development and can be embedded into HTML."

May I suggest that this package be named apache2-php instead?  Since it
is a apache2 module, it would seemingly be easier to find together with
everything else apache2-*.

Of course, surely someone will come up with a good reason why
php-apache2 makes more sense, and more certainly, either way will be
bound to lead to questions by those expecting the opposite. :-)


Yaakov

Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Max O Bowsher
Yaakov S (Cygwin Ports) wrote:

> Max Bowsher wrote:
>> # php-apache2
>> category: Web
>> requires: php apache2
>> external-source: php
>> sdesc: "PHP: Hypertext Preprocessor (Apache 2 module)"
>> ldesc: "PHP is a widely-used general-purpose scripting language that is
>> especially suited for Web development and can be embedded into HTML."
>
> May I suggest that this package be named apache2-php instead?  Since it
> is a apache2 module, it would seemingly be easier to find together with
> everything else apache2-*.
>
> Of course, surely someone will come up with a good reason why
> php-apache2 makes more sense, and more certainly, either way will be
> bound to lead to questions by those expecting the opposite. :-)
Well, the only precedent we have for this is one which I myself set a
while ago with the subversion-apache2 package.

Personally, I think of it as a package which _is_ PHP, and happens to
interface with apache2, so I placed the bit which seemed more
significant to me first.

My guess is that naming it php-something is better than something-php,
because it will help people who go looking for just "php" to find it.

Max.


signature.asc (195 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Dr. Volker Zell
In reply to this post by Max O Bowsher
>>>>> Max Bowsher writes:

    > Setup package URL:
    > http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/

    > Direct package URLs:
    > http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-5.1.4-0.3-src.tar.bz2
    > http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-5.1.4-0.3.tar.bz2
    > http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-apache2/php-apache2-5.1.4-0.3.tar.bz2
    > http://jabberwock.vm.bytemark.co.uk/~maxb/cygphp/release/php/php-devel/php-devel-5.1.4-0.3.tar.bz2


    > Obviously, I'll bump the 0.3 release number up to 1 once GTG is achieved.

Trying to build from source:

./php-5.1.4-0.3.sh conf
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... re2c
checking for re2c version... 0.9.11.rc1 (ok)
checking for gawk... gawk
checking for bison... bison -y
checking for bison version... 2.1 (ok)
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for an ANSI C-conforming const... yes
checking for flex version... 2.5.4 (ok)
checking whether to force non-PIC code in shared modules... no
checking for pthreads_cflags...
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking for mod_charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... configure: error: You have enabled Apache 2 support while your server is Apache 1.3.  Please use the appropiate switch --with-apxs (without the 2)

    > Max.

Ciao
  Volker

Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Dr. Volker Zell
>>>>> Volker Zell writes:

    > Configuring SAPI modules
    > checking for AOLserver support... no
    > checking for Apache 1.x module support via DSO through APXS... no
    > checking for Apache 1.x module support... no
    > checking for mod_charset compatibility option... no
    > checking for Apache 2.0 filter-module support via DSO through APXS... no
    > checking for Apache 2.0 handler-module support via DSO through APXS... configure: error: You have enabled Apache 2 support while your server is Apache 1.3.  Please use the appropiate switch --with-apxs (without the 2)


+ echo 'configure:7293: checking for Apache 2.0 handler-module support via DSO through APXS'
+ echo -n 'checking for Apache 2.0 handler-module support via DSO through APXS... '
checking for Apache 2.0 handler-module support via DSO through APXS... + test set = set
+ withval=/usr/sbin/apxs2
+ test /usr/sbin/apxs2 = yes
+ test -z /usr/sbin/apxs2
+ echo /usr/sbin/apxs2
+ grep '^/'
+ APXS=/usr/sbin/apxs2
+ /usr/sbin/apxs2 -q CFLAGS
+ test 0 '!=' 0
++ /usr/sbin/apxs2 -q INCLUDEDIR
+ APXS_INCLUDEDIR=/usr/include/apache2
++ /usr/sbin/apxs2 -q BINDIR
+ APXS_BINDIR=/usr/bin
++ /usr/sbin/apxs2 -q SBINDIR
++ /usr/sbin/apxs2 -q TARGET
+ APXS_HTTPD=/usr/sbin/httpd                <====== Here's the culprit
++ /usr/sbin/apxs2 -q CFLAGS
+ APXS_CFLAGS=-O2
++ /usr/sbin/apxs2 -q MPM_NAME
+ APXS_MPM=prefork
++ /usr/sbin/apxs2 -q APU_BINDIR
+ APU_BINDIR=/usr/bin
++ /usr/sbin/apxs2 -q APR_BINDIR
+ APR_BINDIR=/usr/bin
++ /usr/sbin/apxs2 -q APR_CONFIG
+ APR_CONFIG=/usr/bin/apr-1-config
++ /usr/sbin/apxs2 -q APU_CONFIG
+ APU_CONFIG=/usr/bin/apu-1-config
++ /usr/bin/apr-1-config --cppflags --includes
+ APR_CFLAGS=' -DCYGWIN -I/usr/include/apr-1 '
++ /usr/bin/apu-1-config --includes
+ APU_CFLAGS=' -I/usr/include/apr-1 '
+ for flag in '$APXS_CFLAGS'
+ case $flag in
+ APACHE_CFLAGS=' -I/usr/include/apache2  -DCYGWIN -I/usr/include/apr-1   -I/usr/include/apr-1 '
++ /usr/sbin/httpd -v
++ grep version
+ ac_output='Server version: Apache/1.3.24 (Cygwin)'
+ ac_IFS='
'
+ IFS='- /.
'
+ set Server version: Apache 1 3 24 '(Cygwin)'


/usr/sbin/apxs2 -q TARGET seems to pick up the apache progname from

 o /usr/share/apache2/build/config_vars.mk

and there it's set as httpd.

Ciao
  Volker

Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Dr. Volker Zell
>>>>> Volker Zell writes:

    > /usr/sbin/apxs2 -q TARGET seems to pick up the apache progname from

    >  o /usr/share/apache2/build/config_vars.mk

    > and there it's set as httpd.

OK, I changed this now to httpd2 and the configure and make steps went
smooth, but install gives the following:

Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1-build/libtool' libphp5.la /usr/src/php-5.1.4/.inst/usr/lib/apache2
/usr/share/apr-1-build/libtool --mode=install cp libphp5.la /usr/src/php-5.1.4/.inst/usr/lib/apache2/
libtool: install: error: cannot install `libphp5.la' to a directory not ending in /usr/src/php-5.1.4/.build/libs
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1


Ciao
  Volker

Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

John Morrison-10
In reply to this post by Max O Bowsher
On Sun, June 4, 2006 1:42 pm, Max Bowsher wrote:
> I now have a PHP package which builds in a manner I think is adequate
> for release. I still haven't addressed the matter of loadable
> extensions, so it is mandatory to install postgresql to install PHP at
> all, but given the regular interest in PHP shown on the cygwin ML, I
> think people are going to willingly put up with that, to avoid having to
> build PHP itself.

Hi Max,

Sorry this reply took so long, I was away last week and busy with work
yesterday.

The installation of PHP went cleanly, and adding the appropriate lines to
the apache config was OK (although either changing the default so they are
there but commented out or adding them to the php-apache.README would be
useful).

This appeared to be all that was necessary for php in Apache to work -
thanks.

As you pointed out, postgresql is a prereq, but I have to say it isn't the
easiest thing in the world to configure!  (It could do with a -config
script ala sshd-host-config).  But that shouldn't stand in the way of you
releasing this package esp since the meer presence of postgresql is enough
to run php.

Thanks again,

J.

Reply | Threaded
Open this post in threaded view
|

Re: [ITP] PHP 5.1.4 (cli, cgi-fcgi, apache2)

Max O Bowsher
In reply to this post by Dr. Volker Zell
Dr. Volker Zell wrote:
>>>>>> Volker Zell writes:
>
>     > /usr/sbin/apxs2 -q TARGET seems to pick up the apache progname from
>
>     >  o /usr/share/apache2/build/config_vars.mk
>
>     > and there it's set as httpd.

Thankyou for your report, I have released an updated apache2 package
fixing this.

> OK, I changed this now to httpd2 and the configure and make steps went
> smooth, but install gives the following:
>
> Installing PHP SAPI module:       apache2handler
> /usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1-build/libtool' libphp5.la /usr/src/php-5.1.4/.inst/usr/lib/apache2
> /usr/share/apr-1-build/libtool --mode=install cp libphp5.la /usr/src/php-5.1.4/.inst/usr/lib/apache2/
> libtool: install: error: cannot install `libphp5.la' to a directory not ending in /usr/src/php-5.1.4/.build/libs
> apxs:Error: Command failed with rc=65536
> .
> make: *** [install-sapi] Error 1
I am at a loss to understand this failure, my build runs the exact same
commands, and succeeds.

Max.


signature.asc (195 bytes) Download Attachment