krose05
asked on
php problems!!! apxs compile
I'm attempting a reinstall of PHP. I'm running this line for the initial configure:
./configure --with-gd --with-apxs=/usr/local/apa che/bin/ap xs --with-xml --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-zlib --with-jpeg-dir=/usr/inclu de --with-zlib-dir=/usr/inclu de --prefix=/usr/local/ --enable-shared --includedir=/usr/local/ --libdir=/usr/local/
The ./configure runs just fine, but when I attempt the Make, it gets about halfway and then I get a long list of errors that look basically like this:
/usr/lib/gcc/i386-redhat-l inux/3.4.6 /../../../ crt1.o(.te xt+0x18): In function `_st
art':
: undefined reference to `main'
ext/standard/info.lo(.text +0x19): In function `php_info_write_wrapper':
/home/installd/buildapache /php-4.4.4 /ext/stand ard/info.c :69: undefined reference t
o `php_escape_html_entities'
ext/standard/info.lo(.text +0x27):/ho me/install d/buildapa che/php-4. 4.4/ext/st andard
/info.c:71: undefined reference to `php_body_write'
ext/standard/info.lo(.text +0x31):/ho me/install d/buildapa che/php-4. 4.4/ext/st andard
/info.c:73: undefined reference to `_efree'
It a whole bunch of undefined references. One other thing to note, is that if I change the ./configure line to use "--with-a
pache=/home/installd/build apache/apa che_1.3.36 " instead of "--with-apxs=/usr/local/ap ache/bin/a pxs", it compiles successfully. Unfortunately, I need to use the apxs compile to work with the forum software, so I have to be able to get it to work this way.
I can't see why the compiler is not seeing those function names. All of the undefined references come from included header files, which I've attempted to point to with the "includedir=" option, but it still continues to fail. Please help. What generally causes the undefined reference errors, and how can I get a successful apxs compile?
Probably won't hurt to mention that the OS is CentOS 4.4, the version of PHP being installed is 4.4.4.
./configure --with-gd --with-apxs=/usr/local/apa
The ./configure runs just fine, but when I attempt the Make, it gets about halfway and then I get a long list of errors that look basically like this:
/usr/lib/gcc/i386-redhat-l
art':
: undefined reference to `main'
ext/standard/info.lo(.text
/home/installd/buildapache
o `php_escape_html_entities'
ext/standard/info.lo(.text
/info.c:71: undefined reference to `php_body_write'
ext/standard/info.lo(.text
/info.c:73: undefined reference to `_efree'
It a whole bunch of undefined references. One other thing to note, is that if I change the ./configure line to use "--with-a
pache=/home/installd/build
I can't see why the compiler is not seeing those function names. All of the undefined references come from included header files, which I've attempted to point to with the "includedir=" option, but it still continues to fail. Please help. What generally causes the undefined reference errors, and how can I get a successful apxs compile?
Probably won't hurt to mention that the OS is CentOS 4.4, the version of PHP being installed is 4.4.4.
The difference of building with --with-apxs=/usr/local/apa che/bin/ap xs and --with-apache=/home/instal ld/buildap ache/apach e_1.3.36 is the the last one makes a static apache module and apxs creates an dynamic loadable extension for apache. If you the run a make install in your apache-directory again (after configureing --with-apache, make install in php) you should have a apache which has build in php-support. This sould also work with you forum software.
ASKER
Maybe I'm unclear on the order. I tried what I believe you said, but it didn't work.
First I used the ./configure line, using the --with-apache=/home/instal ld/buildap ache/apach e_1.3.36 option. I also did make and make install which was successful.
I then subsequently went into the /home/installd/buildapache /apache_1. 3.36 folder and ran make, then make install to reinstall apache.
When I look in my Forum program, it shows phpinfo, and one part of the php info is the configure command, which appears as follows:
'./configure'
'--with-apxs=/usr/local/ap ache/bin/a pxs'
'--prefix=/usr/local'
'--with-xml'
'--enable-bcmath'
'--enable-calendar'
'--enable-ftp'
'--enable-magic-quotes'
'--with-mysqli'
'--with-mysql=/usr'
'--enable-discard-path'
'--with-pear'
'--enable-sockets'
'--enable-track-vars'
'--with-zlib'
So it looks like the server still sees the install of php with the --with-apxs setting (even though I did a reinstall with the --with-apache setting). More importantly, it does not have the --with-gd option, which is the whole point of this exercise. If I can get the --with-gd option to be recognized, I don't care if PHP is used as a static module or a dynamic extension. But whatever I do, the forum doesn't seem to see it.
If it helps, I'm running Invision 2.1.7, which is where I'm viewing the php info.
First I used the ./configure line, using the --with-apache=/home/instal
I then subsequently went into the /home/installd/buildapache
When I look in my Forum program, it shows phpinfo, and one part of the php info is the configure command, which appears as follows:
'./configure'
'--with-apxs=/usr/local/ap
'--prefix=/usr/local'
'--with-xml'
'--enable-bcmath'
'--enable-calendar'
'--enable-ftp'
'--enable-magic-quotes'
'--with-mysqli'
'--with-mysql=/usr'
'--enable-discard-path'
'--with-pear'
'--enable-sockets'
'--enable-track-vars'
'--with-zlib'
So it looks like the server still sees the install of php with the --with-apxs setting (even though I did a reinstall with the --with-apache setting). More importantly, it does not have the --with-gd option, which is the whole point of this exercise. If I can get the --with-gd option to be recognized, I don't care if PHP is used as a static module or a dynamic extension. But whatever I do, the forum doesn't seem to see it.
If it helps, I'm running Invision 2.1.7, which is where I'm viewing the php info.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you, it took sometime, but your advice set us on the right path!
ASKER