Attached is a step by step procedure that I have used to 
build php 4.03 and up on hpux 11.0 machines with
Apache 1.3.14 and 1.3.19

A free binary version is available at 
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo
.pl?productNumber=B9415AAPA1319

It is part of the "HP-Apache based Web Server"

Regards,
Jim Fitz

> -----Original Message-----
> From: Mark Newnham [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 09, 2001 7:44 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-INST] Make fails on HP-UX.
> 
> 
> please post your configure options. I have compiled php 
> successfully on HPUX
> 10.20 and HPUX11.00 on all versions 4.0 upwards
> 
> Regards
> 
> Mark
> 
> > -----Original Message-----
> > From: Tse Wai Kan [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 07, 2001 9:54 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-INST] Make fails on HP-UX.
> > 
> > 
> > Has anyone seen this and know how I can fix this?
> > I get the following message whn I run a make and a similar 
> > one with gmake.
> > 
> > php_pcre.c: In function `pcre_get_compiled_regex':
> > php_pcre.c:158: warning: implicit declaration of function 
> `setlocale'
> > php_pcre.c:158: `LC_CTYPE' undeclared (first use in this function)
> > php_pcre.c:158: (Each undeclared identifier is reported only once
> > php_pcre.c:158: for each function it appears in.)
> > php_pcre.c:158: warning: initialization makes pointer from 
> > integer without a
> > cas
> > t
> > *** Error exit code 1                   
> > 
> > I am trying to configure PHP 4.0.6  on a HP L2000 running 
> > with HP-UX 11 and
> > with the latest apache server 1.3.20.
> > bison and flex (lex) have also been installed.
> > 
> > I have spent almost 2 months trying to install PHP4 on a HP 
> > server, both in
> > a HP-UX 10.20 and HP-UX 11 environments but without any success.
> > If I cannot get PHP installed on a HP server, then I will 
> > have to recommend
> > to my management to ditch HP as web servers since PHP support 
> > for HP-UX is
> > pretty much non-existant.
> > 
> > Regards, 
> > Tse-Wai Kan. 
> > RSL COM Deutschland GmbH. 
> > Tel     :       +49 (0)611 9888820 
> > Fax     :       +49 (0)611 9888821 / +49 (0)611 9888878 
> > GSM     :       +49 (0)172 9420888 / +44 (0)705 0028870 
> > E-mail  :       [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > 
> > 
> > -- 
> > PHP Install Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

INSTALL_php_on_HP_apache.txt

-----------------------------------------------------------------------
Installation Instructions for PHP 4.0

Note: At some points you will need to use sudo if you are not root.
The following instructions are relevant only for the official HP
distribution of Apache (1.3.12), the version of gcc on the Open
Source Developer's Toolkit CD-ROM (X.Y.Z), and php-4.0.2.
Apache and gcc must be installed on your system before attempting
to compile PHP and mod_php.

QUICK INSTALL (DSO)

For this to work your Apache httpd must have mod_so enabled.
Check using httpd -l.  

  $ /opt/apache/bin/httpd -l

You should see something like:

Compiled-in modules:
  http_core.c
  mod_so.c

Chances are you will see a lot more modules than these two. That's ok, 
as long as mod_so.c shows up you can proceed with the following steps:

-----------------------------------------------------------------------
1. Unpack your distribution file.  

You can get the latest version from "http://www.php.net/";

  $ cd /opt
  $ mkdir php
  $ mv <wherever it is>/php-4.0.<?>.tar.gz /opt/php
  $ cd /opt/php

  $ gunzip -c php-4.0.x.tar.gz | tar xf -
  $ cd php-4.0.x

-----------------------------------------------------------------------
2. Configure PHP

When running configure, you should use at least the following
command line:

  $ ./configure --enable-libgcc --with-apxs=/opt/apache/bin/apxs

You can add other options if you like.  You can use the --help
option to configure to get a complete list.

After configure runs, you must edit the file libtool.  

  $ vi ./libtool

At line 184, you should change the line from:

  deplibs_check_method="unknown"
to
  deplibs_check_method="pass_all"

so that PHP and mod_php are properly compiled.

-----------------------------------------------------------------------
3. Compile and install the files.

Run make.  This should complete normally.

  $ make

Run make install.  This will fail when it attempts to call apxs.

  $ make install

Program will crash after apxs call.
Copy the call to apxs along with all its arguments.

Rename the file "libs/libphp4.sl" to "libs/libphp4.so".
  
  $ mv lib/libphp4.sl lib/libphp4.so

Re-run the command that you copied earlier but change the reference
of "lib/libphp4.sl" to "lib/php4.so":

  $ /opt/apache/bin/apxs -i -a -n php4 libs/libphp4.so

-----------------------------------------------------------------------
4. Setup the server

Next you must copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit it as necessary to set PHP options.

  $ sudo cp php.ini-dist /usr/local/lib/php.ini

The only thing left to do is to edit your httpd.conf file:

Look for the string "php4" and make sure that the "LoadModule"
and "AddModule" directives are outside any "IfDefine SSL" directives.

  $ vi /opt/apache/conf/httpd.conf 

  LoadModule php4_module        libexec/libphp4.so

  AddModule mod_php4.c

Also make sure the PHP 4 mime type is there and uncommented.  
You need a line that looks like this:

   AddType application/x-httpd-php .php

-----------------------------------------------------------------------
5. Testing it all worked

Restart your server. 

  $ sudo /opt/apache/bin/apachectl restart

You should be able to serve up PHP files now.  Make a test file called "test.php" and 
put some PHP tags in it such as <?phpinfo()?>.

  $ vi /opt/apache/htdocs/test.php

add

  <html> <head> </head> <body> <p> <?phpinfo()?> </p> </body> </html>

Enter following URL in your browser.

  http://<your server>/test.php



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to