Apache & PHP & HP-UX: Bad Mojo?

Apache & PHP & HP-UX: Bad Mojo?

Post by David A. Robins » Tue, 11 Jul 2000 04:00:00



Greetings:

I'm trying to run PHP 4.0 as an Apache module (static) on my HP-UX 11.0
server. I followed the "Quick Installation Instructions (Apache Module
Version" from Chapter 2 of the PHP Manual. Everything seemed to go fine -
a smooth build. My problem is that the server isn't interpreting my .php
files; when I point a browser at my "Hello World" file - test.php - I'm
prompted to save the file. Looks like a classic mime.types problem. The
PHP FAQ says that the PHP module isn't being invoked for some reason, and
to check the output from apache's httpd -l:

        Compiled-in modules:
          http_core.c
          mod_so.c
          mod_php4.c
        suexec: disabled; invalid wrapper /opt/apache/bin/suexec

Not sure if that last line is causing any problems, but it appears that
the PHP module is loaded.

Next, the FAQ says to make sure that

        AddType application/x-httpd-php .php

is in the httpd.conf file. Yes, it's there, although within an <IfModule
mod_mime.c>  bracket. So, I added another instance of the above AddType
line that wasn't within an IfModule. No joy.

Lastly, the FAQ says to make sure the httpd.conf I'm editing is the one
the server is looking at. Check. (Yes, it is).

I also tried adding the .php mime type to mime.types. No joy. Oh, and I
also changed the user/group in httpd.conf (can't use the group "nogroup"
in HP-UX, I gather) as the documentation says.

Nothing in the error_log file. Everything looks good - except it won't
work. Any ideas? I'm stumped.  :-/

TIA,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
David A. Robinson                 |
The Wharton School, Univ. of PA   |                  '''
2314 SH-DH, 3620 Locust Walk      |                 (o o)
Philadelphia, PA   19104          |      -------oOO--(_)--OOo--------

 
 
 

Apache & PHP & HP-UX: Bad Mojo?

Post by Colin McKinnon - No Spam pleas » Wed, 12 Jul 2000 04:00:00




Quote:> Compiled-in modules:
>   http_core.c
>   mod_so.c
>   mod_php4.c
> suexec: disabled; invalid wrapper /opt/apache/bin/suexec

> Not sure if that last line is causing any problems, but it appears that
> the PHP module is loaded.

Shouldn't you put in mod_mime too? I've got the addtype statement in
srm.conf - not access.conf for may Apache+php3 which works OK.

You'd probably be better checking the PHP list archive - I'm sure I've seen
this posted several times. The only thing you haven't mentioned is setting
up the php.ini file. You did copy php.ini.dist to .../conf/php.ini ?

HTH

Colin

 
 
 

Apache & PHP & HP-UX: Bad Mojo?

Post by David A. Robins » Wed, 12 Jul 2000 04:00:00





: > Compiled-in modules:
: >   http_core.c
: >   mod_so.c
: >   mod_php4.c
: > suexec: disabled; invalid wrapper /opt/apache/bin/suexec
: >
: > Not sure if that last line is causing any problems, but it appears that
: > the PHP module is loaded.

: Shouldn't you put in mod_mime too?

I don't know - I just followed the installation instructions for PHP w/
Apache.

: I've got the addtype statement in
: srm.conf - not access.conf for may Apache+php3 which works OK.

The docs say to put everything in httpd.conf, but I tried putting the
AddType in srm.conf - it still didn't work.

: You'd probably be better checking the PHP list archive - I'm sure I've seen
: this posted several times.

I spent a couple of hours searching - no help.

: The only thing you haven't mentioned is setting
: up the php.ini file. You did copy php.ini.dist to .../conf/php.ini ?

Yes, I did that.

This looks like it's very likely something simple, but I feel like I'm
looking for a needle in a haystack. An error message would be nice, but
there are none.

Here's how I built apache & php (note - the installation directories are
different from the build directories):

1.) unpack both distributions; run configure in apache dir:

        ./configure --prefix=/opt/apache

2.) build php:

        ./configure --prefix=/opt/php --with-mysql=/opt/mysql
            --with-apache=../apache-1.3.12 --enable-track-vars
            --with-config-file-path=/opt/php
        make
        make install

3.) build apache:

        ./configure --prefix=/opt/apache
            --activate-module=src/modules/php4/libphp4.a
        make
        make install

4.) I then copied php.ini.dist to /opt/php and made sure
          AddType application/x-httpd-php .php
    was in httpd.conf.

Here's a question I have. The --activate-module option created libphp4.a
in /build-directory/src/modules/php4. It's there, all right - but nowhere
outside the build directories. Normally, I'd delete the build directories
after "make install". Shouldn't libphp4.a have been put in /opt/php/lib or
/opt/apache/lib or maybe /usr/lib? Or was in incorporated into httpd? (But
httpd is only slight larger in size than libphp4.a.)

An observation: Internet Explorer just prompts me to save the file when I
point the browser at my ~username/test.php file (BTW, apache serves up a
generic ~username/index.html file just fine), but Netscape at least gives
some information while prompting to save the file:

        You have started to download a file of type
        application-xhttpd-php

So, it looks like the AddType line in httpd.conf has done it's job? That
is, we're at least reading httpd.conf to discover the mime type, yes? So

<html>
<head>
<title>Test of PHP</title>
</head>
<body>
<h1>Testing, testing</h1>

<?php
$myvar = "Hello World";
echo $myvar;
?>

<?php
phpinfo();
?>

</body>
</html>

The browser returns "Testing, testing" and that's all. That libphp4.a file
is suspicious... don't know where it belongs.

I am completely frustrated at this point. I intended to re-write a hideous
"application" that uses multiple perl scripts, Excel, bubble gum and
beeswax this summer. The plan was to use apache, php and MySQL, but I'm
running out of time. I've been spinning my wheels on this build for so
long that I may have to chuck the whole idea and use the same, * old
kludge scripts instead. :-/

Any help would be greatly appreciated.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
David A. Robinson                 |
The Wharton School, Univ. of PA   |                  '''
2314 SH-DH, 3620 Locust Walk      |                 (o o)
Philadelphia, PA   19104          |      -------oOO--(_)--OOo--------

 
 
 

1. PERL && mod_perl && FreeBSD && Apache

k, I don't know where this falls under or who I should be asking... but
here's my problem.

mod_perl port installed Perl modules in
'/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/Apache/' but didn't


have to rebuild the system perl components? the mod_perl? or is there a conf
file somewhere that I cannot find?



could 'mv' everything as well... but I would like to hear some other
opinions or options.

Thanks

2. Will Exabyte 8505 Tape Drive Work with Linux?

3. Apache & HP-UX 9.04

4. problem installing mklinux

5. apache+oracle+php/fi on HP-UX

6. B&W G3 old monitor and X

7. &&&&----Looking for a unix shell------&&&&&

8. ppp && PPPoE && ADSL && net && buffer(s)

9. &#27809;&#26377;&#20154;&#29992;&#20013;&#25991;&#21527;&#65311;

10. HP-UX with HP OpenView's Network Node Manager & Vantage Point Operations - Security...

11. HP hangs with NCR-SCSI error messages on HP-UX 10.20 & 11.00

12. Apache compile & Php & mysql