New build system (BETA)

Martynas,

I had some time today, so I decided to give a try to the script. I noticed a little bug. To avoid the common bug :



you should, as soon as a user wants to compile suPHP delete the previous one, to avoid this mess. I have noticed with time that mod_suphp.so isn't overwritten all the time.

Thank you for this script.

I'll add a check for it into 1.0.0, if you want to apply the patch now:

Find:
Code:
doSuPhp() {
	cd $CWD;
	FILE=${CWD}/suphp-${SUPHP_VER}.tar.gz
	checkFile ${FILE}
	echo "Extracting ...";
	tar xzf ${FILE}
	echo "Done.";

Add above:
Code:
if [ -e /usr/lib/apache/mod_suphp.so ]; then
	rm -f /usr/lib/apache/mod_suphp.so
fi

Thank you for the report.
 
2. To read a personal file such as "custom.sh"

This file can exist, but don't have to. It would be a script called just before to launch the massive compilation. This file would allow anybody of us (which will assume entire responsability) to run a script before to compile.

The goal of this file, is, for example to download an overwrite a configuration file before each compilation. Or to make some symlinks before to compile. I am sure this can be helpful to a lot of people. If the file does not exist, the system just don't care about.

Thank you !

I don't think that it's really needed, because in this way you still couldn't rewrite the compilation process, because it will be included only at the beginning of the file. Furthermore, it could damage the custombuild file, and in this way users will write emails to the DirectAdmin support etc., if you want some new features on the script - you can require them and maybe they will be included into the next releases of the custombuild script.
 
Yet another little bug (if I am right). I made changes inside the file configure.php4 and configure.php5 (directory : configure/suphp) and tryed to run the following command :

# ./build php5-cgi y

I restarted apache, but the changes were not applyed. Do I need to rebuild everything or is it a bug ?

Thank you.
 
Hi,

now almoust work ok, not clean install, i test later again:

default_php=4
php4_cli=no
php4_cgi=yes
php5_cli=no
php5_cgi=yes
apache_ver=1.3
dovecot=no

Then one error:
Starting httpd: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-suphp.conf:
Cannot add module via name 'mod_suphp.c': not in list of loaded modules

FIX:
/etc/httpd/conf/extra/httpd-suphp.conf
#AddModule mod_suphp.c <- this need comment out !!!
LoadModule suphp_module /usr/lib/apache/mod_suphp.so
<IfModule mod_suphp.c>
AddHandler x-httpd-php5 5
AddHandler x-httpd-php4 .inc .php .php3 .php4 .phtml
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php5
suPHP_AddHandler x-httpd-php4
</Location>
</IfModule>

Also in suphp.conf should umask littlebit different:

umask=0122

if it 0077 and php create files, or upload or anything, apache wont have any rights to read file (other that .php)
 
Last edited:
Yet another little bug (if I am right). I made changes inside the file configure.php4 and configure.php5 (directory : configure/suphp) and tryed to run the following command :

# ./build php5-cgi y

I restarted apache, but the changes were not applyed. Do I need to rebuild everything or is it a bug ?

Thank you.

No, it's not a bug. If you want to see if the changes were applied:
Code:
/usr/local/php5/bin/php --info
 
No, it's not a bug. If you want to see if the changes were applied:
Code:
/usr/local/php5/bin/php --info

Of course PHP is recompiled, but my thought are that your system is not using the right configure.php4 file for php4-cgi/php5-cgi, it should use the one in suphp directory and use the one from ap2.

Isn't ?
 
Starting httpd: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-suphp.conf:
Cannot add module via name 'mod_suphp.c': not in list of loaded modules

Code:
AddModule mod_suphp.c
It is only written when apache_ver 1.3 is set into options.conf and it's needed by apache 1.3.

if it 0077 and php create files, or upload or anything, apache wont have any rights to read file (other that .php)

It will be changed to umask=0022.
 
Hello,
And what about SSL support with Apache 2.2 (the most stable version of Apache, from Apache words) ?

It's included by default ;) Apache 1.3, 2.0 and 2.2 are with SSL support, you don't need to change anything.
 
Of course PHP is recompiled, but my thought are that your system is not using the right configure.php4 file for php4-cgi/php5-cgi, it should use the one in suphp directory and use the one from ap2.

Isn't ?

No, it's set:
Code:
CONF_FILE=${CWD}/${PHP5_CONFIGURE_SUPHP};

PHP5_CONFIGURE_SUPHP=configure/suphp/configure.php5

P.S. it couldn't compile PHP as CGI with another config, because APXS is set.
 
P.S. it couldn't compile PHP as CGI with another config, because APXS is set.

You are right, but...I just recompiled PHP4-cgi now, and...

Where is PHP4 ?

# cat /usr/local/suphp/etc/suphp.conf

Result :

[handlers]
;Handler for php-scripts
x-httpd-php4=php:/usr/local/php4/bin/php
x-httpd-php5=php:/usr/local/php5/bin/php

What version do I run ?

# /usr/local/php4/bin/php -v

Result :

PHP 4.4.6 (cgi-fcgi) (built: Apr 26 2007 10:26:33)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

What is the time ?

Thu Apr 26 13:25:43 CEST 2007

Let's say, the php build by the command ./build php4-cgi y is really compiling PHP4 as CGI, but the target is wrong (it should be /usr/local/php4/bin/php and it is not...)
 
Code:
AddModule mod_suphp.c
It is only written when apache_ver 1.3 is set into options.conf and it's needed by apache 1.3.



It will be changed to umask=0022.

So if needed only apache 1.3 so why i need uncommet it off or take away to get start apache ! ?

LoadModule suphp_module /usr/lib/apache/mod_suphp.so
#AddModule mod_suphp.c
<IfModule mod_suphp.c>
AddHandler x-httpd-php5 5
AddHandler x-httpd-php4 .inc .php .php3 .php4 .phtml
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php5
suPHP_AddHandler x-httpd-php4
</Location>
</IfModule>

Is in httpd-suphp.conf conf, but hen apache wont start, if remove that line, then it start working!

Also why AddHandler x-httpd-php5 5 is only .5 ? why not php5 ?

(try tomorrow install again to clean system and i report errors what get ...)
 
Last edited:
Code:
AddHandler x-httpd-php5 .php5

Is because you've chosen PHP4 as a default in options.conf.
 
I am doing right now. We will see, but I guess yes, I had the following mistake


Quote:
"--with-config-file-path=/usr/local/php4/bin/cgi" \
instead of :


Quote:
"--with-config-file-path=/usr/local/php4/bin/php" \
I will update this post when all will be working fine, for those that wish to make sure all works fine.

I don't think that it could be a problem :) This setting is for setting up php.ini location, e.g. if it's set /usr/local/php4/bin/cgi then php.ini will be located in /usr/local/php4/bin/cgi.
 
Code:
AddHandler x-httpd-php5 .php5

Is because you've chosen PHP4 as a default in options.conf.

Yeah should be

AddHandler x-httpd-php5 .php5

But in .conf it:

AddHandler x-httpd-php5 5

SO it's typo ?
 
Back
Top