php-install Digest 7 Aug 2001 09:38:52 -0000 Issue 400

Topics (messages 3870 through 3875):

zend_language_parser (make install error)
        3870 by: Craig O'Brien
        3874 by: Craig O'Brien

problems compiling php 4.0.6 into apache 1.3.20
        3871 by: Jon Wagoner

SSL problem
        3872 by: Armando Colpa

*Please* post fix for Solaris/PHP libmysqlclient.so.10 "open failed" buglet.
        3873 by: Jeff Wiegley, Ph.D.

Installation Problem
        3875 by: Arkoudeas Dimosthenis \( ArkoNet \)

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Hello,

Just yesterday I installed Apache-1.3.20 and php-4.0.6 in about 30 minutes 
on a Mandrake 7.2 system.

Today I am trying to do the same on a Mandrake 8.0 system and I am about 5 
hours into it...!!?

At "make install" I am getting the following error:

Making install in Zend
make[1]: Entering directory `/usr/local/src/php-4.0.6/Zend'
byacc -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c
usage: byacc [-dlrtv] [-b file_prefix] [-p symbol_prefix] filename
make[1]: *** [zend_language_parser.c] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.6/Zend'
make: *** [install-recursive] Error 1

I have both yacc and bison installed.  I can use the mandrake supplied rpms 
and everything works, however, I don't like the way the rpms install apache 
so I am making my own.  It looks like the zend script is incorrectly 
calling byacc.....Is there a problem with my c header files or kernel 2.4.4?

Thanks for any help.
Regards,
Craig




Craig O'Brien wrote:

> Hello,
> 
> Just yesterday I installed Apache-1.3.20 and php-4.0.6 in about 30 minutes
> on a Mandrake 7.2 system.
> 
> Today I am trying to do the same on a Mandrake 8.0 system and I am about 5
> hours into it...!!?
> 
> At "make install" I am getting the following error:
> 
> Making install in Zend
> make[1]: Entering directory `/usr/local/src/php-4.0.6/Zend'
> byacc -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c
> usage: byacc [-dlrtv] [-b file_prefix] [-p symbol_prefix] filename
> make[1]: *** [zend_language_parser.c] Error 1
> make[1]: Leaving directory `/usr/local/src/php-4.0.6/Zend'
> make: *** [install-recursive] Error 1
> 
> I have both yacc and bison installed.  I can use the mandrake supplied
> rpms and everything works, however, I don't like the way the rpms install
> apache
> so I am making my own.  It looks like the zend script is incorrectly
> calling byacc.....Is there a problem with my c header files or kernel
> 2.4.4?
> 
> Thanks for any help.
> Regards,
> Craig
> 
I figured this out.  During my configure phase I found that flex was not 
installed.  I installed it, deleted the untar'd php package, and started 
over.  Not good enough!

If you are making > 2nd time:

make clean
make 
make install

duhhhh.

Cheers,
Craig




I am trying to compile php with many of the options, to try different things
out.  So far, I have managed to get PHP to compile.  Apache seems to compile
okay until what seems like the last step, then I start getting errors.  The
last part of the make returns this:

Any help would be appreciated.

Jon

<=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DMOD_SSL=208104
-I/usr/src/php-4.0.6 -I/usr/src/php-4.0.6/main -I/usr/src/php-4.0.6/main
-I/usr/src/php-4.0.6/Zend -I/usr/src/php-4.0.6/Zend
-I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6
-DEAPI -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DMOD_SSL=208104
-I/usr/src/php-4.0.6 -I/usr/src/php-4.0.6/main -I/usr/src/php-4.0.6/main
-I/usr/src/php-4.0.6/Zend -I/usr/src/php-4.0.6/Zend
-I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6
-DEAPI -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` buildmark.c
gcc  -DLINUX=22 -DMOD_SSL=208104 -I/usr/src/php-4.0.6
-I/usr/src/php-4.0.6/main -I/usr/src/php-4.0.6/main
-I/usr/src/php-4.0.6/Zend -I/usr/src/php-4.0.6/Zend
-I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6/TSRM -I/usr/src/php-4.0.6
-DEAPI -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci`
-L/usr/local/ssl/lib   \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/ssl/libssl.a modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a
ap/libap.a  lib/expat-lite/libexpat.a  -Wl,-rpath,/usr/local/lib
-Wl,-rpath,/usr/X11R6/lib -Wl,-rpath,/usr/local/mysql/lib
-Wl,-rpath,/usr/local/pgsql/lib  -rdynamic -L/usr/local/lib -L/usr/X11R6/lib
-L/usr/local/mysql/lib -L/usr/local/pgsql/lib -Lmodules/php4
-L../modules/php4 -L../../modules/php4 -lmodphp4  -L/usr/local/lib -liodbc
-lc-client  -ldl -lexpat -lsablot -lexpat -lswf -lexpat -lsablot -lpspell
-lpq -liodbc -lmysqlclient -lz -lming -lmhash -lmcrypt -lltdl -lgmp -lgd
-lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lz -lxml2 -lcurl -ldl -lcpdf
-lbz2 -lz -lcrypt -lresolv -lm -ldl -lnsl  -lresolv   -lm -lcrypt  -lssl
-lcrypto
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_create':
/usr/src/php-4.0.6/ext/xslt/sablot.c:156: multiple definition of
`php_if_xslt_create'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:566:
first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_create' changed from 208
to 180 in sablot.o
modules/php4/libphp4.a(sablot.o): In function
`php_if_xslt_set_error_handler':
/usr/src/php-4.0.6/ext/xslt/sablot.c:324: multiple definition of
`php_if_xslt_set_error_handler'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:1084
: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_set_error_handler' changed
from 586 to 105 in sablot.o
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_set_base':
/usr/src/php-4.0.6/ext/xslt/sablot.c:342: multiple definition of
`php_if_xslt_set_base'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:968:
first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_set_base' changed from 271
to 260 in sablot.o
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_set_encoding':
/usr/src/php-4.0.6/ext/xslt/sablot.c:362: multiple definition of
`php_if_xslt_set_encoding'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:943:
first defined here
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_process':
/usr/src/php-4.0.6/ext/xslt/sablot.c:417: multiple definition of
`php_if_xslt_process'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:497:
first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_process' changed from 578
to 982 in sablot.o
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_error':
/usr/src/php-4.0.6/ext/xslt/sablot.c:532: multiple definition of
`php_if_xslt_error'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:1017
: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_error' changed from 347 to
138 in sablot.o
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_errno':
/usr/src/php-4.0.6/ext/xslt/sablot.c:515: multiple definition of
`php_if_xslt_errno'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:1060
: first defined here
/usr/bin/ld: Warning: size of symbol `php_if_xslt_errno' changed from 123 to
102 in sablot.o
modules/php4/libphp4.a(sablot.o): In function `php_if_xslt_free':
/usr/src/php-4.0.6/ext/xslt/sablot.c:549: multiple definition of
`php_if_xslt_free'
modules/php4/libphp4.a(sablot.o):/usr/src/php-4.0.6/ext/sablot/sablot.c:808:
first defined here
/usr/local/lib/libswf.a(swfimage.o): In function `swf_definebitmap':
swfimage.o(.text+0x672): the use of `mktemp' is dangerous, better use
`mkstemp'
modules/php4/libphp4.a(ming.o): In function `php_if_swffont_init':
/usr/src/php-4.0.6/ext/ming/ming.c:1135: undefined reference to `V_FOPEN'
modules/php4/libphp4.a(ming.o): In function `php_if_swfmovie_save':
/usr/src/php-4.0.6/ext/ming/ming.c:1567: undefined reference to `V_FOPEN'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/src/apache_1.3.20/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/apache_1.3.20'
make: *** [build] Error 2




Hi

I'm trying to install php 4.0.5 with ssl support. To
make this as quick as possible, I built php with:

o mysql 3.22.32
o rsaref2.0
o I'm using perl version 5.005_03
o openssl 0.9.5
o modssl 2.8.3-1.3.19

Basically, I compiled apache with ssl support and it
asked me to make a certificate and come up with a pass
phrase, which I did. I first started apache with

  ./apachectl start

Just to make sure that apache was working, which it
is. Then, I wrote a test php script to make sure that
php was working (you know, the phpinfo() function
thing?), which it was as well. 

I then stopped the apache server, and restarted it
with 

   ./apachectl startssl

It asked me for the pass phrase that I set when I
created the certificate, which I gave. It then said
that my password was fine and started. I then tried
accessing one of my pages that I first accessed, such
as

  http://myhost/test.php

as

  https://myhost/test.php

and was not able to connect. I also could not connect
with 

  http://myhost:443/test.php

So I checked the apache daemon. For some reason,
although there seems to be no indication of a problem,
the daemon isn't running when I start it with the
startssl option. I'm a little confused because there
don't seem to be any outward appearances of any
trouble. Any ideas would be greatly appreciated.
Thanks.

Armando

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/




I've looked everwhere for the answer to this problem. Lots of people
are having the same problem and nobody has mentioned a correct and
proper fix for it.

namely:

   bash-2.03# Syntax error on line 236 of /etc/httpd/httpd.conf:
   Cannot load /usr/lib/apache/libphp4.so into server: ld.so.1: /usr/sbin/httpd: 
fatal: libmysqlclient.so.10: open failed: No such file or directory

How, exactly, do you compile PHP so that the proper -R, -L, -l flags (or anything else
needed) is done correctly so that php correctly loads 
/usr/lib/mysql/libmysqlclient.so.10
instead of onyl defaulting to /usr/lib/libmysqlclient.so.10??

Possible solutions (and why they aren't correct)
   1) put
        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/mysql
        export LD_LIRBRARY_PATH
      into whatever script you use to launch the httpd that includes mod_php.
      (I use /etc/rc2.d/S99httpd)

   This solution is undesirable for two reasons:
     Most importantly you are forcing to PHP to screw around with a script or
     file that belongs to some other package. Having PHP fiddle with a file it
     doesn't own and isn't directly related to should be a no-no.

     Second if you have to go and put LD_LIBRARY_PATH files all over the place
     then we don't really need a dynamic linker at all really. As I see it the
     whole job of ld is to figure out where libraries are and link to them without
     having to be told all the time how to do its job. This is backed up by the
     fact that I don't have to use LD_LIBRARY_PATH statements for *anything* else
     this implies that PHP is doing something non-standard and should be corrected.

   2) Put a link from /usr/lib/libmysqlclient.so.10 to 
/usr/lib/mysql/libmysqlclient.so.10

   This solution is wrong again for a couple of reasons:
     The same reason as the other solution. PHP is imposing conditions about file
     directory layout for files which it does not own and are not directly related to.
     If there needs to be link such as this then mysql should determine this and
     make and maintain such a link.

     But more importantly: If you need to put all the darn libraries is /usr/lib
     then you're an administration idiot. You're a double idiot if you put files
     in nice subdirectories AND add links for each one in /usr/lib. This would
     imply that you can't put libraries elsewhere and you would wind up with a\
     flat file hiearachy that would resemble your mothers C:\ drive on a Windows
     box... Just full of junk and totally unmaintainables. Certainly not what I
     want to see happen with my /usr/lib. Yes, Yes, a single link to fix a single
     problem... no so bad. But there *must* be a better way since only PHP is
     causing me this headache so on philosophical level this solution should be
     avoided in favor of fixing php.

Now the correct solution (which I cannot figure out how to do correctly)
   3) compile php so that it looks for or otherwise hints to ld as to the absolute path
      that is needed to find the libraries it needs.

      If PHP can find libmysqlclient.so (which I would guess it must in order to
      be built otherwise configure would bomb out.) then it should be able to
      hint to ld during runtime as to where it found the library.

      With this solution PHP only screws with itself and not with the files installed
      by another package. This is good. This is the way it should be. I'ld love
      to hear some cogent arguments that contradict this.

      And the mysql Solaris.html page I found says that you can compile the
      mysql client (in this case I think "mysql client" refers to the PHP client
      being compiled with mysql support and not mysql itself.) with
      -Wl,r /usr/lib/mysql (which isn't correct because -R (not -r) is the
      absolute reference switch for ld according to the man page.

      anyhow...

How, exactly, do you compile PHP so that the proper -R, -L, -l flags (or anything else
needed) is done correctly so that php correctly loads 
/usr/lib/mysql/libmysqlclient.so.10
instead of only defaulting to /usr/lib/libmysqlclient.so.10??

I'm compiling PHP with this:

EXTRA_LDFLAGS="-R /usr/lib/mysql" ./configure  \
                --with-layout=GNU \
                --prefix=/usr \
                --libexecdir=/usr/lib/php \
                --sysconfdir=/etc/php \
                --datadir=/usr/share/php \
                --sharedstatedir=/var/php \
                --localstatedir=/var/php \
                --mandir=/usr/share/man \
                --with-apxs \
                --enable-safe-mode \
                --with-openssl \
                --enable-magic-quotes \
                --with-zlib \
                --enable-dba=shared \
                --with-regexp=php \
                --with-mysql=/usr \
                --enable-sockets \
                --enable-sysvsem \
                --enable-sysvshm \
                --enable-wddx \
                --disable-debug \
                --with-config-file-path=/etc/php \
                --with-exec-dir=/usr/lib/php \
                --enable-pic \
                --with-ttf \
                --enable-inline-optimization

I have also tried:
EXTRA_LDFLAGS="R /usr/lib/mysql/libmysqlclient.so.10" ./configure ...
EXTRA_LDFLAGS="-Wl,r /usr/lib/mysql/libmysqlclient.so.10 ./configure...
EXTRA_LDFLAGS="-Wl,R /usr/lib/mysql/libmysqlclient.so.10 ./configure...
I have also done the same with /usr/lib/mysql substituted for
/usr/lib/mysql/libmysqlclient.so.10 and I have also tried all of the
above with EXTRA_CFLAGS=...
None of these worked.

I'm pretty much at the point of telling my web people to take a hike. I don't
want to install PHP on over a hundred machines where it is going to cause me
more maintenance headaches because it screws with the packages I've already
installed which it shouldn't.

come on, there must be a way of compiling php to get its linking right.
Please, for the second time, help me figure this out.

Thank you,

Jeff Wiegley





This is the debug.log from a Slackware Linux

----------------------------------------------------------------------------
----------------
CONFIGURE:   './configure' '--with-apxs=/usr/sbin/apxs' '--with-ftp'
'--enable-versioning' '--enable-tracking-vars=yes' '--enab
le-url-includes' '--enable-sysvshm=yes' '--enable-sysvsem=yes'
'--with-config-file-path=/etc' '--without-mysql' '--with-sapdb=/
opt/sapdb/interface/odbc' '--with-mssql=/usr/local/freetds'
'--with-sybase=/usr/local/freetds'
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:    -DLINUX=22 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8
CXX:
CXXFLAGS:
INCLUDES:    -I/usr/include/apache  -I$(top_builddir)/Zend -I/opt/sapdb/inte
rface/odbc/incl
LDFLAGS:     -Wl,-rpath,/opt/sapdb/interface/odbc/lib -L/opt/sapdb/interface
/odbc/lib
LIBS:-lsqlrte -lsqlod -lcrypt -lresolv -lm -ldl -lnsl  -lresolv
DLIBS:
SAPI:apache
PHP_RPATHS:  /opt/sapdb/interface/odbc/lib
uname -a:   Linux web 2.4.5 #6 Fri Jun 22 01:38:20 PDT 2001 i686 unknown

gcc -o
conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8 
 -Wl,-rpath,/opt/sapdb/interface/odbc/lib -L
/opt/sapdb/interface/odbc/lib
conftest.c -lsqlrte -lsqlod -lcrypt -lresolv -lm -ldl -lnsl  -lresolv 1>&5
/usr/i386-slackware-linux/bin/ld: cannot find -lsqlrte
collect2: ld returned 1 exit status

----------------------------------------------------------------------------
------------------

Thanks in advance
Arkoudeas Dimosthenis
[EMAIL PROTECTED]



Reply via email to