Hector- I am including below, detailed instructions (from HP) on how to compile Apache and PHP dso on HPUX. Note the libtool hack BEFORE running make. I recommend removing your current PHP source directories and starting over with these instructions:
###################################### 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 ##################################### Good luck, Jim >>> "Hector Jose Montalvo Herrera" <[EMAIL PROTECTED]> 02/20/02 06:11PM >>> Hello, I have problems installing PHP 4.1.1 and a apache server 1.3.23 with chroot. My S.O. is HPUX 11.0 I compiled apache with the module mod_so and php with the directory tree /usr/local/apache My chroot is /usr/www , after of compiling apache with php I make a tar of usr/local/apache and a tar xvf in my chroot eje. /usr/www/usr/local/apache after run my http server with the next command: chroot /usr/www /usr/local/apache/bin/apachectl start and I have the follow messages /usr/lib/dld.sl: Unresolved symbol: dlsym (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlerror (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlopen (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlclose (code) from /usr/local/apache/libexec/libphp4.so Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: No such file or directory /usr/local/apache/bin/apachectl start: httpd could not be started I have th libexec/libphp4.so in my /usr/www/usr/local/apache/libexec. What can I do? In the line 205 I have LoadModule php4_module libexec/libphp4.so I put LoadModule php4_module /usr/www/usr/local/apache/libexec/libphp4.so and not working too!! Help me! Thanks! __________________________________ Ing. Hector Jose Montalvo Herrera Triara Operaciones Libramiento Santa Rosa #111 Col. Futuro Apodaca Apodaca, Nuevo Leon. http://www.triara.com |unix/linux is most powerful..;-)| -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php >>> "Hector Jose Montalvo Herrera" <[EMAIL PROTECTED]> 02/20/02 06:11PM >>> Hello, I have problems installing PHP 4.1.1 and a apache server 1.3.23 with chroot. My S.O. is HPUX 11.0 I compiled apache with the module mod_so and php with the directory tree /usr/local/apache My chroot is /usr/www , after of compiling apache with php I make a tar of usr/local/apache and a tar xvf in my chroot eje. /usr/www/usr/local/apache after run my http server with the next command: chroot /usr/www /usr/local/apache/bin/apachectl start and I have the follow messages /usr/lib/dld.sl: Unresolved symbol: dlsym (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlerror (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlopen (code) from /usr/local/apache/libexec/libphp4.so /usr/lib/dld.sl: Unresolved symbol: dlclose (code) from /usr/local/apache/libexec/libphp4.so Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: No such file or directory /usr/local/apache/bin/apachectl start: httpd could not be started I have th libexec/libphp4.so in my /usr/www/usr/local/apache/libexec. What can I do? In the line 205 I have LoadModule php4_module libexec/libphp4.so I put LoadModule php4_module /usr/www/usr/local/apache/libexec/libphp4.so and not working too!! Help me! Thanks! __________________________________ Ing. Hector Jose Montalvo Herrera Triara Operaciones Libramiento Santa Rosa #111 Col. Futuro Apodaca Apodaca, Nuevo Leon. http://www.triara.com |unix/linux is most powerful..;-)| -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php