httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Iliffe <john.ili...@iliffe.ca>
Subject Re: [users@httpd] PHP doesn't process pages
Date Mon, 23 Apr 2012 01:00:36 GMT
On Sunday 22 April 2012 03:34:35 Noel Butler wrote:
> On Sun, 2012-04-22 at 00:41 -0400, John Iliffe wrote:
> > > AddType application/x-httpd-php .php
> > 
> > I did this and get the same result as before.
> > 
> > The complete PHP configuration is:
> >   LoadModule php5_module        modules/libphp5.so
> > 
> > <Filesmatch \.php$>
> > 
> >         SetHandler application/x-httpd-php
> > 
> > </FilesMatch>
> > 
> > AddType application/x-httpd-php .php
> 
> What's with the filesmatch, you don't need it here, simply
> 
>     LoadModule php5_module        modules/libphp5.so
>     AddType application/x-httpd-php .php
> 
> .... should get it working.
> 
> 
> You need to tell us the exact command you used to configure and build,
> both httpd and php, I have a standard way of configuring for my dev
> stuff, which works, it has to,  because its also what I use in
> production.
> 
> ./configure --prefix=/usr/local/apache --enable-so --enable-modules=all
> --enable-mods-static=all --disable-dav --enable-suexec
> --with-suexec-docroot=/var/www --with-suexec-caller=apache
> --with-suexec-logfile=/var/log/apache/suexec_log --with-included-apr
> --disable-option-checking --with-mysql --disable-util-dso --enable-ssl
> 
> and for php...
> 
> ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-ftp
> --enable-calendar --enable-bcmath --with-open
> ssl --enable-magic-quotes --with-gd --with-zlib
> --with-zlib-dir=/usr/include --with-gettext --with-mysql --wit
> h-mysqli --with-mysql-sock --with-jpeg-dir=/usr --with-png-dir=/usr
> --with-mcrypt --enable-mbstring
> 
> 
> I note your using php 5.4.0 - all my testing has been with 5.3.10 and is
> done on Slackware, but I do have one RHEL 5.2
> I'll throw 5.4 on the dev box if I get a chance later (almost dinner
> time here) and see what blows up :)
> 
> > The only other odd point I noticed is the first line about slotmem but
> > I really have no idea what this is or means.
> 
> That's nothing to worry about, its a module thats been loaded, but
> likely not used
> 
> Cheers

Noel:

To answer your questions and comments:

- the <FilesMatch> bit came from the PHP installation on the default Apache 
config file.  I don't think I coded it, but at this point I can't be sure.

- AddType probably worked as that is what lead to the PHP segfaults

- re PCRE I installed it to support PHP-8.4.0 because it is listed as 
required there.  When I compile PHP 5.3.10 with the same as your note, but 
skipping the things I don't need (don't use MySQL and don't need the 
graphics) I get one of two errors:

   if I config using --with-pcre-regex=/usr/pcre-8.30 then I get an error 

tmp/php-5.3.10/ext/pcre/php_pcre.c:258: undefined reference to `pcre_info'
collect2: ld returned 1 exit status 
make: *** [sapi/cli/php] Error 1

   if I leave it out I get the following error:

ext/pcre/.libs/php_pcre.o: In function `zm_info_pcre':
/tmp/php-5.3.10/ext/pcre/php_pcre.c:128: undefined reference to 
`pcre_version'
ext/pcre/.libs/php_pcre.o: In function `zm_startup_pcre':
/tmp/php-5.3.10/ext/pcre/php_pcre.c:154: undefined reference to 
`pcre_version'
ext/pcre/.libs/php_pcre.o: In function `make_subpats_table':
/tmp/php-5.3.10/ext/pcre/php_pcre.c:193: undefined reference to 
`pcre_fullinfo'
/tmp/php-5.3.10/ext/pcre/php_pcre.c:202: undefined reference to 
`pcre_fullinfo'
/tmp/php-5.3.10/ext/pcre/php_pcre.c:203: undefined reference to 
`pcre_fullinfo'

and about 30 more lines in the same vein.  Obviously a different version of 
PCRE is a requirement!


FYI,  here is the full configuration I used:

./configure --prefix=/usr/php-5.3.10 --with-apxs2=/usr/apache-2.4.2/bin/apxs 
--with-openssl --with-zlib --with-ldap --with-pgsql=/usr/postgres-8.4.2 --
with-bz2 --enable-sockets --enable-zip --with-pear --enable-ftp --with-
config-file-path=/usr/php-5.3.0/lib

plus, of course, the --with-pcre-regex=...  bit.

I hope that I haven't made any obvious mistakes.  I've been working on this 
for over a week and because we don't have a test server I have to test in 
the middle of the night when nobody is on and I can take down the 
production server.  So, a bit bleary eyed.

Regards, and thanks for the help to date.

John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message