Apache stoped working after building php

Rezaa

Verified User
Joined
Dec 15, 2010
Messages
75
Hello,

I've added imap into
Code:
/usr/local/directadmin/custombuild/configure/ap2/configure.php5
and then tried building php with the following command:
Code:
# ./build php 5
But after building, httpd has stopped working and getting the following error:

Code:
# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 39 of /usr/local/directadmin/data/users/cidgczuq2/httpd.conf:
Invalid command 'suPHP_Engine', perhaps misspelled or defined by a module not included in the server configuration

My website is down.
Please tell me what shall I do to fix the issue?
 
The server is still building php (No response from server!)
And it seems httpd.conf is deleted. I can not find httpd.conf on my server anymore !!!
What happened to my server?
 
Last edited:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build apache d
./build php d
./build rewrite_confs
 
Because you cannot just edit /usr/local/directadmin/custombuild/configure/ap2/configure.php5

You have to create a new folder called custom and edit it there.

Code:
mkdir -p /usr/local/directadmin/custombuild/custom/ap2/
cp /usr/local/directadmin/custombuild/configure/ap2/configure.php5 /usr/local/directadmin/custombuild/custom/ap2/
./build php n

And since you have suphp you have to edit configure.suphp not configure.php5
 
I've created custom folder before adding imap into that file
and yes I'm using suphp, but I have only configure.php5 in my server and all of my extensions are added into this file and working fine but I'm confused why phpinfo is not showing imap!

Also may you please tell me the difference between following files?
Code:
/usr/local/directadmin/custombuild/configure/suphp/configure.php5
Code:
/usr/local/directadmin/custombuild/custom/ap2/configure.php5
 
Make custom/suphp/configure.php5

put the imap line in it and it should say that you have imap in php info
 
Also may you please tell me the difference between following files?

/usr/local/directadmin/custombuild/custom/ap2/configure.php5 is used for PHP5-CLI (mod_php)
/usr/local/directadmin/custombuild/configure/suphp/configure.php5 is used for PHP5-CGI (mod_suphp)
 
I did the following:
Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/suphp
cp -fp configure/suphp/configure.php5 custom/suphp/configure.php5
nano custom/suphp/configure.php5
#I added "--with-imap" / and "--with-imap-ssl"  in this file
./build php n

but after building, I get the following error:
Code:
/usr/local/directadmin/custombuild/custom/suphp/configure.php5: line 35: --with-imap: command not found

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


Am I missing something?
 
Yes, I guess, you've missed "\" in the end of a last line in original file. Saying it in another words, your file should end something like:

Code:
"--with-iconv=/usr/local" \
"--enable-bcmath" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-magic-quotes" \
"--enable-sockets" \
"--enable-track-vars" \
"--enable-mbstring" \
"--enable-mailparse" \
"--disable-posix" \
"--enable-memory-limit" \
"--enable-soap" \
"--with-openssl-dir=/usr/local/lib" \
"--with-imap=/usr/lib64" \
"--with-imap-ssl"

p.s. this is extract of my configuration file, in your case it might differ. It's here posted to show the idea only.
 
And this is mine
Code:
"--with-pdo-mysql=/usr" \
"--with-pear" \
"--with-png-dir=/usr/local/lib" \
"--with-zlib" \
"--with-zlib-dir=/usr/local/lib" \
"--enable-zip" \
"--enable-gd-native-ttf" \
"--with-iconv=/usr/local" \
"--enable-bcmath" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-magic-quotes" \
"--enable-sockets" \
"--enable-mbstring" \
"--enable-soap"
"--with-imap" \
"--with-imap-ssl"
is it necessary to add the path next to --with-imap ? how do I get that path?
 
Oh! thanks :D
I added the back-slash and then build php
but getting this error:
Code:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

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

But I already installed lib-client with the following command:
Code:
yum install libc-client libc-client-devel

What am I missing this time???
 
Last edited:
After building php, there is no httpd.conf in the path /usr/local/apache/conf/httpd.conf any more !

Any idea?
 
And why should it be there in /usr/local/apache/conf/ ? What does it have to do with Directadmin and Apache installed from custombuild?
 
Sorry, I'm new to DA and don't familiar to it's facilities.
Where could I find Apache installed from custombuild ?
 
Back
Top