-   Slackware (
-   -   Garbled (

Thanotos 12-10-2005 07:13 PM

'ello all.

I am still having issues with setting up Apache and PHP.

After many,many,many,many attempts at trying to get created and placed into the right dir I am still not able to load/startup apache after compiling php.

I keep getting the error:

root@stealth:/usr/local/src/php-5.1.1# /usr/local/apache2/bin/apachectl start
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf:
API module structure `php5_module' in file /usr/local/apache2/modules/ is garbled -
perhaps this is not an Apache module DSO?

now line 54 reads:

LoadModule php5_module modules/
I am running the current release of Apache 2 and PHP 5.1 on Slackware 10. There are NO errors with the compile nor at any other time.

I am that much closer to my goal, and have looked every where that I could to see if there is anything else I can do to no success.

Some assistance pls.

mdarby 12-10-2005 10:41 PM

I have:

LoadModule php5_module        modules/
listed in my httpd.conf. The module is located in /usr/local/apache2/modules.

Are you compiling php with apxs? (--with-apxs=DIR)

Thanotos 12-10-2005 10:45 PM

Yes, well with apxs2.

I configured with

./configure --with-apxs2=/usr/local/apache2/bin/apxs

mdarby 12-10-2005 10:56 PM

Are you starting with clean source? Here are my *exact* configure strings -- php/apachessl is working perfectly on my Slackware -current box:

Apache 2.0.54:

./configure --enable-ssl --with-ssl --with-dav --enable-cgi --enable-http --enable-vhost-alias --enable-dav-fs
PHP 5.1.0:

./configure --with-zlib=/usr/ --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --with-pdflib=/usr/local/include --with-gd --with-jpeg-dir=/usr/lib --with-bz2 --with-id3 --with-freetype-dir=/usr/X11R6/lib/X11/fonts/local/ --enable-gd-native-ttf

Thanotos 12-10-2005 11:07 PM

again, yes. :)

I followed these steps when installing ....

make clean
make clean_dis
./configure --enable-so
make install
./configure --prefix=/usr/local/php \
>--with-mysql \
make all
make install

I did the enable-so seperatley because I was having troubles originally with creating the file and AFTER reading the INSTALL help file it directs to do so first and then configure everything else after.

I was able to get Apache running with No error prior to the second configure.

My thought is that it is related to the httpd.conf. (not fully sure - but that is the only link I make)

mdarby 12-11-2005 12:03 AM

Could you post relevant parts of your httpd.conf?

Thanotos 12-11-2005 11:32 AM

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
ServerRoot "/usr/local/apache2"

# Dynamic Shared Object (DSO) Support
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
# Example:
# LoadModule foo_module modules/
LoadModule php5_module modules/

<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
# If your host doesn't have a registered DNS name, enter its IP address here.
#ServerName ******:80

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "/usr/local/apache2/htdocs"

mdarby 12-11-2005 01:14 PM

The only difference I can see in our compiling methods is --enable-so seperately, and you've done "make all", whereas I "make". Have you successfully compiled PHP in the past, meaning an earlier version? I've not messed with 5.1.1, maybe there is something wrong with the source?

Thanotos 12-11-2005 07:22 PM

Thanks for all the help mdarby.

I cleaned out the dir and tried to compile a later version. It is interesting I went to 4.4.1 and had no issues with the same error. Now however :) I am getting a symbol error when starting apache:

root@stealth:/usr/local/src/php-4.4.1/libs# /usr/local/apache2/bin/apachectl start
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/ into server: /usr/local/apache2/modules/ undefined symbol: _emalloc

now I am confident that it is my httpd.conf. However I have no idea what is wrong with line 54. I mean, you have seen the line and the only update made is changing from libphp5 to libphp4, nothing other than that.

Maybe now I might stand a better chance of starting right from scratch, removing Apache, MYSQL and PHP making sure everything is clean and try fresh compiles?

Any other ideas?

All times are GMT -5. The time now is 04:48 AM.