LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-18-2009, 06:50 AM   #1
meczo
LQ Newbie
 
Registered: Aug 2008
Location: Poland
Posts: 4

Rep: Reputation: 0
apache + php: undefined symbol: zend_parse_parameters


Hi

I'm trying to install php 5.3.0 with apache 1.3.41 (old version because it's for ssl mod) on slax 6.1.1

Here is my problem:
Code:
root@slax:/usr/local/apache/bin# ./apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: /usr/local/apache/libexec/libphp5.so: undefined symbol: zend_parse_parameters
./apachectl start: httpd could not be started
My php installation process was:
Code:
./configure --with-apxs=../apache/bin/apxs --without-mysql
make...
My httpd.conf file HAS these lines:
Code:
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php .php .php5
AddHandler php5-script .php
Please help
 
Old 11-18-2009, 08:54 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by meczo View Post
Hi

I'm trying to install php 5.3.0 with apache 1.3.41 (old version because it's for ssl mod) on slax 6.1.1

Here is my problem:
Code:
root@slax:/usr/local/apache/bin# ./apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: /usr/local/apache/libexec/libphp5.so: undefined symbol: zend_parse_parameters
./apachectl start: httpd could not be started
Hmm this seems to indicate that the Apache binary you have is missing a symbol that PHP expects (the error message is quite self-evident).

This can mean one of four things

1. Either the Apache version, or the PHP version is simply too old / too new to be compatible with the other.

2. Apache might be missing PHP support. (I. e. "libphp5.so: undefined symbol: zend_parse_parameters" I think means libphp5.so refers to an external symbol that is not defined in Apache's scope). Not sure how this can happen, at least for Apache 2.0.54 I don't know of any special compilation parameters you need to pass to it to make it "PHP capable".

3. Your GCC / AR binary might not be producing valid library / object files. I've heard of this happen only with very -NEW- GCCs trying to compile very old code - which you might have here? This espcially applies to C++ code - not sure if PHP contains any.

4. The ABI (binary compatibility) of your GCC (which produced your php.so) is incompatible with the ABI of the compiler that compiled your Apache. This might only be applicable if you got your apache binary from an .rpm of .deb - i. e. the guy who compiled the package might have used a very old or very new GCC, and its object files / executables it produces are incompatible with object files / executables your local GCC produces.

Quote:
My php installation process was:
Code:
./configure --with-apxs=../apache/bin/apxs --without-mysql
make...
Did you compile Apache yourself?

I compile apache and PHP myself using these configure lines:

Apache:
Code:
./configure --enable-so --enable-mods-shared=/usr/local/apache2/modules/libphp5.so
PHP:
Code:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-apache2 --with-config-file-path=/usr/local/lib --with-gd --with-zlib --with-zlib-dir=/home/monitor/cvs-1.11.5/zlib/ --with-jpeg-dir=/home/stefan/jpeglib --with-png-dir=/home/stefan/pnglib --with-tiff-dir=/home/stefan/tiff --with-freetype-dir=/home/stefan/freetype-2.1.10 --with-libxml-dir=/home/stefan/libxml2-2.6.19 --with-java=/usr/java/j2sdk1.4.2_05/ --with-pear=/usr/local/lib/php --with-dom --enable-sockets --enable-ftp --enable-gd-native-ttf --enable-dbx --enable-shmop --enable-filepro --enable-bcmath --enable-calendar --enable-dio --enable-exif --with-fam --enable-mbstring --enable-soap --enable-wddf --enable-yp --enable-zend-multibyte --enable-force-cgi-redirect --enable-safe-mode --enable-versioning --enable-url-includes --enable-trans-sid --with-ldap --enable-discard-path --with-mcal --with-mod-dav --with-kerberos --enable-gd-imgstrttf --with-gdbm --with-gettext --enable-fastcgi --with-openssl --with-zip --enable-memory-limit
I'm using Apache 2.0.54 though, with PHP 5.0.4. and MySQL 4.1.12 Standard. My GCC is

Code:
[rylan@development fwf_sme_pension]$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)
[rylan@development fwf_sme_pension]$
on a 2.6.18.1 kernel on Fedora Core 6. I've compiled successfully in exactly the same way on my home system which is running Fedora Core 11.

What GCC version are you trying to use to compile PHP?

Quote:
My httpd.conf file HAS these lines:
Code:
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php .php .php5
AddHandler php5-script .php
The above looks more or less correct, though an error here won't cause the type of error message you are receiving above, I think.

Please help[/QUOTE]

The first thing you might try is to make sure you are compiling Apache and PHP with the same compiler.

If you got Apache from a package, rather try compiling it yourself, or if you prefer to use packages, get both Apache and PHP as packages, not one as a package and one as self-compiled source.

You must realize that very old versions of PHP / Apache and very new versions of Apache / PHP may be incompatible.

Last edited by rylan76; 11-18-2009 at 08:57 AM.
 
Old 03-26-2010, 04:43 AM   #3
omegas
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
About php5 and apache on arm linux



Hi all,

I am very frustrated these few days since I can not get php5 working on my arm board and after I saw the above articles, you guys may help me a bit......The following are my questions....

1. From the above, is there a problem to use both apache-1.3.39 and php5.2.9 together in terms of versions? Actually I can try httpd-2.2.29 with php5.2.9 or php5.3.0 but they all seemed to provide the similiar results which are producing errors during the "make" process. Is there any good suggestion for the combination of apache and php5 versions working fine for "arm linux"???

2. I am actually working on arm linux as mentioned in question one and I need to do the cross compilation for both apache and php5. I am not sure there are people who can successfully work out this but for me I encountered many problems and hopefully guys can give me some directions?

Regards,
omegas
 
Old 01-28-2011, 10:43 PM   #4
witkacy26
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
Solution

You need to compile PHP from 5.2.X branch - 5.3.X versions doesn't work with older Apache's.
It solved the problem for Apache v.2.0.63, possibly you may need even older PHP for Apache 1.3.41.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache does not start: .../mod_webapp.so: undefined symbol: ap_ctx_get linareja Linux - Software 2 11-06-2008 10:44 AM
PHP+Apache2: undefined symbol error on linux box vkaur Linux - General 4 06-15-2007 08:46 AM
Apache / FC4 undefined symbol error krazygaz Linux - Software 1 04-02-2006 05:53 PM
PHP+apache undefined symbol:unixd_config error Emist Linux - Newbie 13 03-15-2005 11:49 AM
Error when starting Apache undefined symbol: __db_ndbm_fetch_4002 SimonT Debian 2 10-03-2004 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration