Operating System - HP-UX
1831447 Members
3006 Online
110025 Solutions
New Discussion

Re: Error installing PHP...

 
SOLVED
Go to solution
Jeddel Yeras
Advisor

Error installing PHP...

Hi All,

I installed depots for Bison, Make, and GCC before attempting to compile PHP, yet I receive the following error:

# cd php-4.3.2
# ./configure
loading cache ./config.cache
checking host system type... hppa2.0w-hp-hpux11.11
checking for gcc... no
checking for cc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cc accepts -g... no
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... no
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parsers.
checking for flex... lex
checking for yywrap in -ll... yes
checking lex output file root... ./configure[2356]: lex: not found.
configure: error: cannot find output from lex; giving up


What am I doing wrong??

J.
14 REPLIES 14
Massimo Bianchi
Honored Contributor

Re: Error installing PHP...

configure: warning: You will need bison if you want to regenerate the PHP parsers.
checking for flex... lex
checking for yywrap in -ll... yes
checking lex output file root... ./configure[2356]: lex: not found.
configure: error: cannot find output from lex; giving up




from this output looks like bison and lex are not installed, or, at least, their path is not in the PATH of the user issuing the instruction.


Check where are the executables and add their path to PATH and retry.

Massimo

RolandH
Honored Contributor

Re: Error installing PHP...

See this installation page

-->http://info.ccone.at/INFO/PHP4/install.hpux.html


HTH
Roland
Sometimes you lose and sometimes the others win
Jeddel Yeras
Advisor

Re: Error installing PHP...

I thought I already added these to my PATH. Both gcc and bison install to /usr/local/bin and this is listed in my PATH statement... is there a specific order on how this should appear? beginning of the path, etc?
Jeddel Yeras
Advisor

Re: Error installing PHP...

Okay... I'm sorry for being such a goof. I had added these to the global PATH instead of my own... I figured it would've taken precedence but evidently it didn't. It's working now.
Gus Larsson
Advisor

Re: Error installing PHP...

Log in as user you will be installing as (root?), cd to the php-4.3.2 directory and type "which gcc", "which bison", etc. If these are not found (which, judging from the "checking for... no" responses above, they won't), add their pathname(s) to PATH for that user (at least temporarily). Try "export PATH=$PATH:/usr/local/bin". Make a serious evaluation of the directory, its contents, and who can write to both before adding this to root's path variable.

Hope it helps,
Gus
Jeddel Yeras
Advisor

Re: Error installing PHP...

Okay, bison and gcc are now installed and listed in my path statement. I did the following:

#cd php-4.3.2
#./configure --with-apxs=/opt/hpws/apache/bin/apxs --with-mysql
#make

and received the following errors:

# make
/bin/sh /php-4.3.2/libtool --silent --preserve-dup-deps --mode=compile gcc -I/php-4.3.2/ext/mysql/libmysql -Iext/mysql/ -I/php-4.3.2/ext/mysql/ -DPHP_ATOM_INC -I/php-4.3.2/include -I/php-4.3.2/main -I/php-4.3.2 -I/php-4.3.2/Zend -I/php-4.3.2/ext/xml/expat -I/php-4.3.2/TSRM -g -O2 -prefer-pic -c /php-4.3.2/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.lo
In file included from /usr/include/netdb.h:72,
from /php-4.3.2/ext/mysql/php_mysql.c:52:
/usr/include/sys/socket.h:193: error: conflicting types for `socklen_t'
/php-4.3.2/main/php.h:139: error: previous declaration of `socklen_t'
/usr/include/sys/socket.h:439: error: parse error before "sendfile"
/usr/include/sys/socket.h:440: error: parse error before "bsize_t"
/usr/include/sys/socket.h:441: error: parse error before "sendpath"
/usr/include/sys/socket.h:442: error: parse error before "bsize_t"
*** Error exit code 1

Stop.

I'm just curious... I've been to all the links regarding PHP installations... has anyone been able to successfully install PHP on their system? This is a clean install of HP_UX11i (11.11) so I would have expected to have most of what I needed already bundled... especially something as widely used as PHP... so, am I missing something?

Any suggestions would be greatly appreciated as I am about to put my head through a wall right now...

Thanks!

J.
benoit Bruckert
Honored Contributor

Re: Error installing PHP...

Hi,
I'm running PHP + mysql on HP-UX 11.00 (not 11.11 !) and it's working fine.
First of all which version of Apache are you using (Apache 1.3.. or Apache 2...) ?

if it's 1.3., then the best way is to compile Apache+PHP staticaly ...(Yes, you need Apache sources....). See the INSTALL file from the donnloaded file

if it's 2.0., then you have to build it as a module (DSO), wich is a little more complicated (I did it also with a previous release of PHP).
use with-apxs2 command and not with-apxs...

Search on the forum, i posted the way to build it some times....

hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Jeddel Yeras
Advisor

Re: Error installing PHP...

Hi,

I'm sorry but I'm new to HP_UX... what's a DSO? and how do I build that?

Also, I searched the forums but didnt' find anything that really answered my problem... do you have a particular post you can direct me to?

Thank you very much for your help!

J.
RolandH
Honored Contributor

Re: Error installing PHP...

Hi Jerel,

if you need Apache with PHP you can download this software package. It is ready compiled by HP with mod_php4 module.


HTH
Roland


http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=HPUXWSATW100601
Sometimes you lose and sometimes the others win
Jeddel Yeras
Advisor

Re: Error installing PHP...

Hi Roland,

I have that installed, yet if I create a file with the following:

phpinfo()
?>

and place this in my htdocs folder i get nothing. So this tells me php wasn't installed or not configured properly. I did SWLIST and didn't see it listed among the packages installed on my system. So, if it is embedded with HP's version of Apache... where is it installed and do I need to make any changes to my PATH in order for PHP scripts to work?

Thanks!

J.
benoit Bruckert
Honored Contributor
Solution

Re: Error installing PHP...

Hi,
In your PHP script you forgot the ";" at the end of the command :
phpinfo();
?>

Concerning Compilation with apxs2 (As DSO module) these thread should help you :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x32d6cdec06f1d61190050090279cd0f9,00.html
and
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x531c36e69499d611abdb0090277a778c,00.html
versions concerned are old, I think that the newest should work better (I posted the changes i made in sources at php.net)

Nota : With the built-in php, I think you have also to uncomment in the httpd.conf the php module to make it work :
LoadModule php4_module modules/libphp4.so
and
AddType application/x-httpd-php .php

To check httpd :
# ./httpd -v
Server version: Apache/2.0.44
Server built: Feb 3 2003 14:50:55
# ./httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
These config can change, but you need mostly mod_so.c to run php as DSO (Dynamic Share Object).

And, as ever, read the INSTALL file from php to see all you have to do...

hope that help.
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Jeddel Yeras
Advisor

Re: Error installing PHP...

Benoit,

You "rock" dude,

Your suggestion: "Nota : With the built-in php, I think you have also to uncomment in the httpd.conf the php module to make it work :
LoadModule php4_module modules/libphp4.so"

Fixed my issue.

Thanks a million!

J.
RolandH
Honored Contributor

Re: Error installing PHP...

Hi Jeddel,

we all are happy that your problem is solved.
But could it be that you have somthing forgotten to do after that?!!!

Do not forgett to assign points.
Please, the the forum etiquettes from Patrick Walleck.

Regards
Roland


http://66.34.90.71/ITRCForumsEtiquette/
Sometimes you lose and sometimes the others win
Jeddel Yeras
Advisor

Re: Error installing PHP...

I thought I had... I'm sorry... I'm assigning them on this post... let me know if they don't go through.

Thanks again!

J.