Fresh install fails with building suphp

gazkin

Verified User
Joined
Jun 13, 2007
Messages
14
Hi,

I`m trying to install custombuild on a fresh installed xen vps with the default settings.
When the installer comes to the part where it should compile suphp, it gives me errors.

Please see the log:
Code:
checking for dynamic Apache module support (via APXS)... ./configure: line 20370: /usr/sbin/apxs: No such file or directory
./configure: line 20370: /usr/sbin/apxs: No such file or directory
./configure: line 20370: /: is a directory
./configure: line 20382: /usr/sbin/apxs: No such file or directory
./configure: line 20383: /usr/sbin/apxs: No such file or directory
./configure: line 20388: /usr/sbin/apxs: No such file or directory
found at /usr/sbin/apxs (version )
checking for set-UID/set-GID mode... ok - using paranoid
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/apache/Makefile
config.status: creating src/apache2/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
Done Configuration.
Trying to make suPHP...
Making all in src
make[1]: Entering directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src'
make  all-recursive
make[2]: Entering directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src'
Making all in apache
make[3]: Entering directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src/apache'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src    -I -DSUPHP_PATH_TO_SUPHP=\"/usr/local/suphp/sbin/suphp\" -DSUPHP_USE_USERGROUP -g -O2 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c -o mod_suphp.lo mod_suphp.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I../../src -I -DSUPHP_PATH_TO_SUPHP=\"/usr/local/suphp/sbin/suphp\" -DSUPHP_USE_USERGROUP -g -O2 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c mod_suphp.c  -fPIC -DPIC -o .libs/mod_suphp.o
mod_suphp.c:24:19: error: httpd.h: No such file or directory
mod_suphp.c:25:25: error: http_config.h: No such file or directory
mod_suphp.c:26:26: error: http_request.h: No such file or directory
mod_suphp.c:27:23: error: http_core.h: No such file or directory
mod_suphp.c:28:27: error: http_protocol.h: No such file or directory
mod_suphp.c:29:23: error: http_main.h: No such file or directory
mod_suphp.c:30:22: error: http_log.h: No such file or directory
mod_suphp.c:31:25: error: util_script.h: No such file or directory
mod_suphp.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MODULE_VAR_EXPORT'
mod_suphp.c:59: error: expected specifier-qualifier-list before 'table'
mod_suphp.c:66: error: expected ')' before '*' token
mod_suphp.c:84: error: expected ')' before '*' token
mod_suphp.c:125: error: expected ')' before '*' token
mod_suphp.c:145: error: expected ')' before '*' token
mod_suphp.c:184: error: expected ')' before '*' token
mod_suphp.c:203: error: expected ')' before '*' token
mod_suphp.c:214: error: expected ')' before '*' token
mod_suphp.c:232: error: expected ')' before '*' token
mod_suphp.c:246: error: expected ')' before '*' token
mod_suphp.c:262: error: expected ')' before '*' token
mod_suphp.c:276: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'suphp_cmds'
mod_suphp.c:296: error: expected declaration specifiers or '...' before 'child_info'
mod_suphp.c: In function 'suphp_source_child':
mod_suphp.c:297: error: 'request_rec' undeclared (first use in this function)
mod_suphp.c:297: error: (Each undeclared identifier is reported only once
mod_suphp.c:297: error: for each function it appears in.)
mod_suphp.c:297: error: 'r' undeclared (first use in this function)
mod_suphp.c:297: error: expected expression before ')' token
mod_suphp.c:299: error: 'pool' undeclared (first use in this function)
mod_suphp.c:299: error: 'p' undeclared (first use in this function)
mod_suphp.c:302: error: 'suphp_module' undeclared (first use in this function)
mod_suphp.c:302: warning: assignment makes pointer from integer without a cast
mod_suphp.c:309: warning: assignment makes pointer from integer without a cast
mod_suphp.c:310: error: 'suphp_conf' has no member named 'php_path'
mod_suphp.c:310: warning: assignment makes pointer from integer without a cast
mod_suphp.c:312: warning: assignment makes pointer from integer without a cast
mod_suphp.c:313: error: 'NULL' undeclared (first use in this function)
mod_suphp.c:317: warning: assignment makes pointer from integer without a cast
mod_suphp.c:325: error: 'suphp_conf' has no member named 'php_path'
mod_suphp.c:328: error: 'APLOG_MARK' undeclared (first use in this function)
mod_suphp.c:328: error: 'APLOG_ERR' undeclared (first use in this function)
mod_suphp.c:329: error: 'suphp_conf' has no member named 'php_path'
mod_suphp.c:330: warning: incompatible implicit declaration of built-in function 'exit'
mod_suphp.c: At top level:
mod_suphp.c:336: error: expected declaration specifiers or '...' before 'child_info'
mod_suphp.c: In function 'suphp_child':
mod_suphp.c:337: error: 'request_rec' undeclared (first use in this function)
mod_suphp.c:337: error: 'r' undeclared (first use in this function)
mod_suphp.c:337: error: expected expression before ')' token
mod_suphp.c:338: error: 'core_dir_config' undeclared (first use in this function)
mod_suphp.c:338: error: 'core_conf' undeclared (first use in this function)
mod_suphp.c:339: error: 'pool' undeclared (first use in this function)
mod_suphp.c:339: error: 'p' undeclared (first use in this function)
mod_suphp.c:343: error: expected expression before ')' token
mod_suphp.c:351: warning: assignment makes pointer from integer without a cast
mod_suphp.c:353: error: 'NULL' undeclared (first use in this function)
mod_suphp.c:357: warning: assignment makes pointer from integer without a cast
mod_suphp.c:411: error: 'APLOG_MARK' undeclared (first use in this function)
mod_suphp.c:411: error: 'APLOG_ERR' undeclared (first use in this function)
mod_suphp.c:413: warning: incompatible implicit declaration of built-in function 'exit'
mod_suphp.c: At top level:
mod_suphp.c:421: error: expected ')' before '*' token
mod_suphp.c:505: error: expected ')' before '*' token
mod_suphp.c:789: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'suphp_handlers'
mod_suphp.c:798: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MODULE_VAR_EXPORT'
make[3]: *** [mod_suphp.lo] Error 1
make[3]: Leaving directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src/apache'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/directadmin/custombuild/suphp-0.7.1/src'
make: *** [all-recursive] Error 1
*******************************************
*******************************************

Cannot find /usr/local/bin/php
Please recompile php with custombuild, eg:
cd /usr/local/directadmin/custombuild
./build all d

This appears to be a 64-bit system.
a common cause of http/php compile failures is mentioned here:
http://help.directadmin.com/item.php?id=213

If you're running CentOS (not freebsd or debian) and applies to you, then type:

ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
ln -sf /usr/lib64/libm.so /usr/lib/libm.so
ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so
cd /usr/local/directadmin/custombuild
./build all d

*******************************************
*******************************************

I tried the suggested solution but that doenst fix the problem.
Google didnt return much on the error messages.

Any thought?

Thnx! :)
 
Try:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build suphp d

If not you might want to try:

./build apache d
./build php d

before you do

./build suphp d
 
Hi,

Thank you for your help!

I forgot to mention that I already tried to install Apache by using the ./build apache d command.
It sadly fails with this error message:
Code:
Installing configuration files
[PRESERVING EXISTING HTDOCS SUBDIR: /var/www/htdocs]
[PRESERVING EXISTING ERROR SUBDIR: /var/www/error]
[PRESERVING EXISTING ICONS SUBDIR: /var/www/icons]
[PRESERVING EXISTING CGI SUBDIR: /var/www/cgi-bin]
Installing header files
Installing build system files
Installing man pages and online manual
make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.4.1'
Restoring certificate and key, and turning on httpd for DirectAdmins's check.
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
./build: line 7180: [: : integer expression expected
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
./build: line 7184: [: : integer expression expected
Unable to read config file. Check the file permissionsUnable to read config file                                                                                                 . Check to make sure that /usr/local/directadmin/conf/directadmin.conf.lock does                                                                                                 n't exist
Using 123.456.789.123 for your server IP
ls: /usr/local/directadmin/data/users/*/httpd.conf: No such file or directory
Restarting apache.
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 108 of /etc/httpd/conf/httpd.conf: S                                                                                                 yntax error on line 21 of /etc/httpd/conf/extra/httpd-vhosts.conf: Could not ope                                                                                                 n configuration file /etc/httpd/conf/ips.conf: No such file or directory

Any thoughts?

Edit: I masked the ip adress
 
Hello,

1) I'd recommend doing a default install first, eg:
Code:
cd /usr/local/directadmin/custombuild
rm -f options.conf
./build all d
as apache 2.4 is still very new and in testing, so stick with Apache 2.2 for now.

2) To complete the DA portion, see this guide:
http://help.directadmin.com/item.php?id=321

John
 
Thnx, this seemed to fix the problem, however SuPHP doenst seem to work right.
I still can access other users dirs from within a phpshell.

I double checked this article, but the right setting are already there: http://help.directadmin.com/item.php?id=254
I ran the command "./bluild suphp" as well.

What am I doing wrong?
 
I still can access other users dirs from within a phpshell.
1) create an info.php with
Code:
<?phpinfo();?>
to make sure you see:
Code:
Server API:	CGI/FastCGI
to make sure that suPhp is working correctly.

2) Check:
Code:
ls -la /home
to make sure that all User directories are chgrp to "access" and set to 750. Note that Admins' and Resellers' homes will be 755, but their /home/reseller/domains is what's set to access/750.

John
 
Hi!

phpinfo gives me: Server API: Apache 2.0 Handler
What do you suggest?
 
Hello,

Just an update. Apache 2.4 seems to be saving apxs into:
/usr/bin/apxs

while Apache 2.2 saves it into:
/usr/sbin/apxs

Adjusting the configure/suphp/configure.suphp file to change it to
Code:
--with-apxs=/usr/bin/apxs
instead of sbin, seems to do the trick. I'll check to see if we can change apache 2.4 to save to the old location.

John

EDIT: I've instead set custombuild to create a link if the sbin version isn't present. It will link to the bin version, so that all configure scripts can find it.
 
Back
Top