Operating System - HP-UX
1836579 Members
1688 Online
110102 Solutions
New Discussion

Apache and PHP - startup problem

 
Yogeeraj_1
Honored Contributor

Apache and PHP - startup problem

Dear experts,

we have just downloaded and installed Apache+Php from:
http://hpux.cs.utah.edu/hppd/hpux/Networking/WWW/apache+php-1327.430/

We have also downloaded and installed all the required Run-time dependencies, namely:
db expat freetype gd gettext jpeg libiconv libpng mysql ncurses openssl perl xpm zlib
(as well as other underlying Run-time and Build-time dependencies)

Now, when starting the HTTP server processes, we are getting the following errors:
i was trying to start the http server on port 8080 using the root user.

I now switched to another user and am getting the following error messages:
=============================================
usr/local/apache+php/bin > ./apachectl start
/usr/lib/dld.sl: Unresolved symbol: jpeg_resync_to_restart (code) from /usr/local/apache+php/bin/httpd
./apachectl[71]: 684 Abort
./apachectl start: httpd could not be started
=============================================

The last lines from my swlist:
=============================================
apache+php 1327.430 apache+php
autoconf 2.57 autoconf
bison 1.875 bison
bzip2 1.0.2 bzip2
db 4.2.52 db
expat 1.95.7 expat
flex 2.5.4a flex
freetype 2.1.4 freetype
gawk 3.1.3 gawk
gettext 0.14.1 gettext
jpeg 6b jpeg
libiconv 1.9.2 libiconv
libpng 1.2.5 libpng
lsof 4.70 lsof
m4 1.4 m4
make 3.80 make
mysql 4.0.15a mysql
ncurses 5.3 ncurses
openssl 0.9.7c openssl
pdftohtml 0.34 pdftohtml
perl 5.8.3 perl
tar 1.13.25 tar
texinfo 4.5 texinfo
xpm 3.4k xpm
zlib 1.1.4 zlib
=============================================



NB. This thread is linked to my previous one at: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=422488

how do i troubleshoot this problem?

thank you for your replies.
best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
12 REPLIES 12
Vijaya Kumar_3
Respected Contributor

Re: Apache and PHP - startup problem

Hi Yogee:

Some thoughts for troubleshooting

1. Did you check proper settings for LD_LIBRARY_PATH and SHLIB_PATH?

2. I think before the build the files were used UID -2. OR what are following Directive values in httpd.conf

User
Group

3. Any errors logged in error.log?

-Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Yogeeraj_1
Honored Contributor

Re: Apache and PHP - startup problem

Hi,

replies to Vijay's questions!
===============================

=================================
1. LD_LIBRARY_PATH and SHLIB_PATH
=================================
what should they be?

==============================
2. Settings for User and Group
==============================
root-L1000 #grep User /usr/local/apac*/etc/httpd.conf
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
User nobody
# UserDir: The name of the directory which is appended onto a user's home
UserDir public_html
# Control access to UserDir directories. The following is an example
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
d
LogFormat "%{User-agent}i" agent
root-L1000 #grep Group /usr/local/apac*/etc/httpd.conf
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group www on these systems!
Group www
root-L1000 #



================
3. The error_log
================

#more /usr/local/apa*/adm/error_log
[Thu Feb 5 12:58:42 2004] [crit] (226)Address already in use: make_sock: could not bind to port 80
[Thu Feb 5 13:01:49 2004] [alert] (22)Invalid argument: setuid: unable to change to uid: -2
[Thu Feb 5 13:01:49 2004] [alert] (22)Invalid argument: setuid: unable to change to uid: -2
[Thu Feb 5 13:01:49 2004] [alert] (22)Invalid argument: setuid: unable to change to uid: -2
[Thu Feb 5 13:01:49 2004] [alert] (22)Invalid argument: setuid: unable to change to uid: -2
[Thu Feb 5 13:01:49 2004] [alert] (22)Invalid argument: setuid: unable to change to uid: -2
[Thu Feb 5 13:01:49 2004] [notice] Apache/1.3.27 (Unix) PHP/4.3.0 configured -- resuming normal operations
[Thu Feb 5 13:01:49 2004] [notice] Accept mutex: fcntl (Default: fcntl)
[Thu Feb 5 13:01:49 2004] [alert] Child 419 returned a Fatal error...
Apache is exiting!


Further guidances will be most welcomed.

best regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven E. Protter
Exalted Contributor

Re: Apache and PHP - startup problem

LD_LIBARAY_PATH is a Sun parameter.

SH_LIBRARY_PATH needs to include the shared libraries used to build the apache distribution.

I'm assuming you used the Utah Depot because you wanted php and that functionality seems absent from the HP releases.

Still Apache 1.3.x is a product in wide use being gradually replaced by 2.0.x

I still have the old one on one last server and its days are numbered.

I went with the latest HP Apache distribution for 2.0.x because the very same release you used gave me problems. I cut my losses and went to 2.0.X

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: Apache and PHP - startup problem

Dear SEP,

thank you for your reply.

If fact, does not really matter which version of Apache we are using. Most important is the PHP. This is becoming a real nightmare base on all the runtime and build time dependencies that need to be configured before building the PHP from the source.

I already have HPWS on my production server, i guess i will have to download the PHP Source and spend some tough time rebuilding that....

further guidances will be most appreciated.

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Rajeev  Shukla
Honored Contributor

Re: Apache and PHP - startup problem

Hi,
Here is what versions i have used for building my own PHP+apache+informix+ldap+ftp..

binutils 2.11.2 binutils
bison 1.875 bison
flex 2.5.4a flex
freetype 2.1.4 freetype
gcc 3.2.3 gcc
gd 1.8.4 gd
jpeg 6b jpeg
libpng 1.2.5 libpng
openldap 2.0.11 openldap
perl 5.6.1 perl
xpm 3.4k xpm
zlib 1.1.4 zlib

If you need more regarding downloading them or compiling syntax let me know..by the way apache is 1.3.26 and php version i am using is 4.3.2

Cheers
Rajeev
Yogeeraj_1
Honored Contributor

Re: Apache and PHP - startup problem

hi Rajeev,

I would be grateful if you can help me through.

if i have:
hpuxwsApache A.1.0.10.01 HP-UX Apache-based Web Server
hpuxwsTomcat A.1.0.10.01 HP-UX Tomcat-based Servlet Engine
hpuxwsWebmin A.1.0.05.02 HP-UX Webmin-based Admin

How should i go along integrating PHP 4.3.2 with this setup?

thank you in advance.

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Rajeev  Shukla
Honored Contributor

Re: Apache and PHP - startup problem

Hi Yogeeraj,

To integrate PHP with the existing setup, you would require their source code, which i am affraid because HP gives them as Depot files. So the easiest way to get going would be to download the apache's source code from the HP-UX porting center, configure php with apache and them make and install, this setup will definately work.
Vijaya Kumar_3
Respected Contributor

Re: Apache and PHP - startup problem

Hi Yogee,

I think your main aim is to install Apache with PHP. Why dont you download apache and PHP source and do a build from the scratch.

Option1:

From the post you typed above, seems to be some build issue with HP-UX. I am sure you have already required tools installed. Why dont you you build your own? I know it is little bit tedious process... anyway follow this procedure and see how it goes.

1. Download Apache source from http://httpd.apache.org

When you build apache, there are some specific options to be enabled when you do a ./configure. You may require DSO support, i hope.

2. Download PHP source from
http://www.php.net/releases.php and build it with Apache

Option 2:

Use the apache delivered with HP and enable the PHP module support

Thanks
Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Yogeeraj_1
Honored Contributor

Re: Apache and PHP - startup problem

hi Rajeev, Vijay,

Will this work?

1. Download PHP 4.3.2 source
2. Rebuild it
3. enable the PHP module support in my hpws

If yes, how?

thank you again for your replies

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Vijaya Kumar_3
Respected Contributor

Re: Apache and PHP - startup problem

I think It should if it is enabled with apxs ( apache extension script support )

Just check your apache distribution, having "apxs"? I am not sure about hpws.

Thanks
Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Vijaya Kumar_3
Respected Contributor

Re: Apache and PHP - startup problem

Just found an URL for you.


http://www.onlamp.com/pub/a/php/2001/03/15/php_admin.html

Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Rajeev  Shukla
Honored Contributor

Re: Apache and PHP - startup problem

Hi Yogeeraj,

Follow this procedure to build your own apache with php.
1. Download all the dependencies for php and apache like gcc, bison, binutils etc..i posted before.
2. untar the source code of apache and php
3. cd to apache source directory then
4. configure --prefix=/opt/apache
5. cd to php source directory and
6. configure --with-informix --with-apache=../apache.1.3.x
7. make and then make install
8. go to apache directory again and configure --perfix=/opt/apache --activate-module=src/modules/php4/libphp4.a
9. make and then make install

this will install your apache in /opt/apache with php