Forum Moderators: phranque
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: php_stream_context_get_option Here's line 53:
LoadModule php5_module modules/libphp5.so I'm running ubuntu 6.10x86 and my mysql was installed by apt-get mysql-server-5.0.
Here's my apache configure:
./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-cgi \
--enable-ingo \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-deflate \
--enable-ssl \
--enable-mime-magic
./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/var/lib/mysql \
--with-mysqli-dir=/usr/bin/mysql_config \
--prefix=/usr/local/apache/php \
--with-config-file-path=/usr/local/apache/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--with-gdbm \
--with-openssl \
--with-xml \
--with-dom
=======================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #37514 (strtotime doesn't assume year correctly). [ext/date/tests/bug37514.phpt]
date OO cloning [ext/date/tests/oo_002.phpt]
Bug #16069 [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
mysql_fetch_array [ext/mysql/tests/002.phpt]
mysql_fetch_object [ext/mysql/tests/003.phpt]
=======================================
sudo apt-get install mysql-server-5.0 apache2 php5
And here's the result of make test for php (which was built and installed anyway):
From what you say here, it sounds like you already have php installed (possibly from the distribution) and you are compiling the apache module against the headers from the source of a different version of PHP. This is unlikely to work. If you really want to build it all yourself then you'll have to remove any existing php installations and install the one you built from source.
Good luck.
sudo apt-get install mysql-server-5.0 apache2 php5
which was built and installed anyway
To clarify the current situation, mysql works fine, apache and php both appeared to compile without errors, but they seem to have problems. The issue at hand is that apachectl start returns an error - the first error in this journey that google hasn't been able to answer.
Actually, that's the first thing I did, but I couldn't get any php pages to work - they'd always try to download and never display.
Trust me, there are no problems with the ubuntu mysql, apache or php5 packages.
It sounds like you tried to view a php page in your browser without having php installed & since the server didnt process it and send a mime-type header your browser got it as plaintext. Now, the annoying thing about many browsers (Always IE, though I have seen it happen in firefox) is that the browser will cache the file, so when you finally do get php working you attempt to access the php page and the browser just gives you an "open file or download" type dialog box as before and gives you the cached text version of the file... though if you access a differnt PHP page or clear your cache it will work fine. I have seen more than one sysadmin banging his head off his desk with this problem.
So, if I were you I'd re-install everything with APT and I bet you an ice cream it'll work if you clear your browsers cache.
However, if you really want to compile everything, the problem really is down to headers when you are compiling your app - probably you are compiling apache with the wrong PHP header files. Apache is trying to call a function php_stream_context_get_option which doesn't exist in the version you have installed... clear all traces of your old versions of apache and php, then clear all traces of the versions you built and installed manually (which will be a pain if you just did "make install") then start again.
When removing packages from debian / ubuntu apt-get remove doesn't do what you think it might. You will also need to do a dpkg --purge packagename. This will remove all config files and the like which are not removed by apt-get-remove.
Good luck :-) Please let me know how you get on.
Now it's all good. Thanks for your help!