trouble starting httpd

chris10121

Verified User
Joined
Feb 17, 2008
Messages
31
I tried upgrading my apache and php versions from apache 1.3.x to 2.x and php 4.x to 5.x. I upgraded apache fine, but when I tried to upgrade php it got messy and now my httpd service doesn't start.

ATM I get this:
"Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/savehost/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not invluded in the server configuration"

Is there any way to do a complete reinstall of apache and php or to completely rebuild these services and configs?

I tried using this guide: http://help.directadmin.com/item.php?id=135 to update my php, but it ruined my server. :(

Any help would be appreciated. Thanks.
 
Last edited:
Its telling you what the error is;

/usr/local/directadmin/data/users/savehost/httpd.conf

Whats on line 30?
 
the thing is i've never changed anything on line 30 or in the file it's referring to.


It says php_admin_flag engine ON

sorry I previously said php_admin_flag safe_mode ON was on line 30, but "php_admin_flag engine ON" is on line 30, either way i've trie turning them both on and off, no effect.
 
Last edited:
Line 30 should say;

php_admin_flag engine ON

Line 31 should say

php_admin_flag safe_mode OFF

You should try rebuilding php again this time watch for errors.
 
Last edited:
Code:
configure: error: freetype.h not found.

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file



Configure.php5 file:
Code:
#!/bin/sh
./configure \
        --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd \
        --enable-gd-native-ttf \
        --with-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-mysqli=/usr/bin/mysql_config \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --enable-zip \
        --with-iconv=/usr/local \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-mbstring
 
Remove --with-freetype-dir=/usr/local/lib \ for now and try again.
 
Code:
Thank you for using PHP.

/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 12: --with-openssl: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file

before, it said there was a problem with --with-kerbeos and I removed that. I have a feeling it's going to have a problem with a lot of things... suggestions? btw I really appreciate your help so far.
 
Last edited:
Do this and don't edit anything more:
Code:
./build update
./build all d
 
woot, i did a ./build all d and httpd now works, only problem is that php still won't compile.. seems like every time i remove a --with that can't be found, another one cna't be found..


Code:
/usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 13: --with-mcrypt: command not found

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file

configure.php5 file:
Code:
#!/bin/sh
./configure \
        --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd \
        --enable-gd-native-ttf \
        --with-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \


        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-mysqli=/usr/bin/mysql_config \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --enable-zip \
        --with-iconv=/usr/local \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-mbstring
 
Starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/dicky/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration

what can i do now !

thanks
 
I'm not sure if every here having problems is on FreeBSD or not (I am). What eventually worked for me was running

./build rewrite_confs
 
I'm not sure if every here having problems is on FreeBSD or not (I am). What eventually worked for me was running

./build rewrite_confs

Thanks for this. If anyone else just upgraded from 5.2.5 to 5.2.6 and can't get apache to start, run this!
 
Back
Top