PHP will auf als cgi kompilieren

Apache, Lighttpd, nginx, Cherokee
Post Reply
offline
Posts: 5
Joined: 2005-03-16 17:11
 

PHP will auf als cgi kompilieren

Post by offline »

Hallo,
Ich versuch gerade auf meinem RootServer PHP5 zu installieren. Da es ja keine gescheiten fertige Pakete gibt muss ich den Quellcode wohl oder übel selber komplieren.

Die .configure sieht so aus:

Code: Select all

./configure --program-prefix= --prefix=/usr/local/php5 --datadir=/usr/share/php5 --mandir=/usr/share/man/php5 --bindir=/usr/local/php5/bin --exec-prefix=/usr/local/php5 --includedir=/usr/include/php5 --sysconfdir=/etc/php5 --localstatedir=/var --with-config-file-path=/etc/php5 --with-exec-dir=/usr/lib/php5/bin --disable-debug --enable-inline-optimization --enable-memory-limit --enable-magic-quotes --enable-safe-mode --enable-sigchild --enable-session --with-mysql=/usr --enable-cli --with-pear=/usr/share/pear --without-mysql --with-config-file=/etc/php5/php.ini
+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You will be compiling the CGI version of PHP without any |
| redirection checking. By putting this cgi binary somewhere in |
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser. See |
| http://www.php.net/manual/security.php for more details. |
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+

Ich möchte aber das Apache Modul erstellen! Was kann ich tun? Vielleicht liegt das Problem auch daran, das php4 noch läuft.

MfG BenArt
offline
Posts: 5
Joined: 2005-03-16 17:11
 

Re: PHP will auf als cgi kompilieren

Post by offline »

Hab ihn gefunden den Fehler ;-)

Ich habe --with-apxs2 vergessen.

MfG BenArt
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: PHP will auf als cgi kompilieren

Post by Joe User »

Ã?h, es gibt mitlerweile für (fast) alle Distributionen PHP5-Packete... Welche Distribution nutzt Du?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
offline
Posts: 5
Joined: 2005-03-16 17:11
 

Re: PHP will auf als cgi kompilieren

Post by offline »

ehrlich? Ich hab hier debian, jedoch für apt-get hab ich keine Packte gefunden. Wenns welche gibt, dann bitte nen Link ;-)

Außerdem macht mir nun make Problem. Es treten folgende Fehlermeldungen auf:

Code: Select all

In file included from /root/php-5.0.3/sapi/apache2handler/mod_php5.c:26:
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: error: parse error before "php5_module"
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: warning: data definition has no type or storage class
/root/php-5.0.3/sapi/apache2handler/php_apache.h:38: error: parse error before "apr_bucket_brigade"
/root/php-5.0.3/sapi/apache2handler/php_apache.h:38: warning: no semicolon at end of struct or union
/root/php-5.0.3/sapi/apache2handler/php_apache.h:47: error: parse error before '}' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:47: warning: data definition has no type or storage class
/root/php-5.0.3/sapi/apache2handler/php_apache.h:49: error: parse error before '*' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:50: error: parse error before '*' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:54: error: parse error before '*' token
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:28: error: syntax error before "module"
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:28: error: conflicting types for `php5_module'
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: error: previous declaration of `php5_module'
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: `STANDARD20_MODULE_STUFF' undeclared here (not in a function)
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: initializer element is not constant
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: (near initialization for `php5_module.version')
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:30: warning: initialization makes integer from pointer without a cast
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:31: warning: initialization makes integer from pointer without a cast
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:34: warning: initialization from incompatible pointer type
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:36: warning: initialization makes integer from pointer without a cast
make: *** [sapi/apache2handler/mod_php5.lo] Error 1
Woran liegt das?

MfG BenArt
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: PHP will auf als cgi kompilieren

Post by Joe User »

Poste bitte Dein exaktes Vorgehen step-by-step (vom tar xjf bis zum make install)...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
offline
Posts: 5
Joined: 2005-03-16 17:11
 

Re: PHP will auf als cgi kompilieren

Post by offline »

1.

Code: Select all

wget http://de.php.net/get/php-5.0.3.tar.gz/from/this/mirror
2.

Code: Select all

tar xfvz php-5.0.3.tar.gz
3.

Code: Select all

cd php-5.0.3
4.

Code: Select all

./configure --program-prefix= --prefix=/usr/local/php5 --datadir=/usr/share/php5 --mandir=/usr/share/man/php5 --bindir=/usr/local/php5/bin --exec-prefix=/usr/local/php5 --includedir=/usr/include/php5 --sysconfdir=/etc/php5 --localstatedir=/var --with-config-file-path=/etc/php5 --with-exec-dir=/usr/lib/php5/bin --disable-debug --enable-inline-optimization --enable-memory-limit --enable-magic-quotes --enable-safe-mode --enable-sigchild --enable-session --with-mysql=/usr --enable-cli --with-pear=/usr/share/pear --with-config-file=/etc/php5/php.ini --with-apxs2
Die configure ist ein paar mal stehen geblieben weil mir manche dev Packete gefehlt haben. Die hab ich jedoch mit apt-get install installiert. Danach ist die configure durchgelaufen.
5.

Code: Select all

make
So und dann läuft die make ne weile und ab der Stelle wo es zu "mod_php5" kommt gibts folgende Fehler: Auschnitt:

Code: Select all

/bin/sh /root/php-5.0.3/libtool --silent --preserve-dup-deps --mode=compile /roo
t/php-5.0.3/meta_ccld  -IZend/ -I/root/php-5.0.3/Zend/ -DPHP_ATOM_INC -I/root/ph
p-5.0.3/include -I/root/php-5.0.3/main -I/root/php-5.0.3 -I/root/php-5.0.3/Zend
-I/usr/include/libxml2  -D_REENTRANT -I/root/php-5.0.3/TSRM  -g -O2 -pthread -DZ
TS  -prefer-pic -c /root/php-5.0.3/Zend/zend_execute.c -o Zend/zend_execute.lo
/bin/sh /root/php-5.0.3/libtool --silent --preserve-dup-deps --mode=compile /roo
t/php-5.0.3/meta_ccld  -DLINUX=22 -DEAPI -DTARGET="apache" -DHAVE_SET_DUMPABLE -
DDB_DBM_HSEARCH=1 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -D_LARGEFILE_SOURCE -D_
FILE_OFFSET_BITS=64 -I/usr/include/apache-1.3   -Isapi/apache2handler/ -I/root/p
hp-5.0.3/sapi/apache2handler/ -DPHP_ATOM_INC -I/root/php-5.0.3/include -I/root/p
hp-5.0.3/main -I/root/php-5.0.3 -I/root/php-5.0.3/Zend -I/usr/include/libxml2  -
D_REENTRANT -I/root/php-5.0.3/TSRM  -g -O2 -pthread -DZTS  -prefer-pic -c /root/
php-5.0.3/sapi/apache2handler/mod_php5.c -o sapi/apache2handler/mod_php5.lo
In file included from /root/php-5.0.3/sapi/apache2handler/mod_php5.c:26:
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: error: parse error before "
php5_module"
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: warning: data definition ha
s no type or storage class
/root/php-5.0.3/sapi/apache2handler/php_apache.h:38: error: parse error before "
apr_bucket_brigade"
/root/php-5.0.3/sapi/apache2handler/php_apache.h:38: warning: no semicolon at en
d of struct or union
/root/php-5.0.3/sapi/apache2handler/php_apache.h:47: error: parse error before '
}' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:47: warning: data definition ha
s no type or storage class
/root/php-5.0.3/sapi/apache2handler/php_apache.h:49: error: parse error before '
*' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:50: error: parse error before '
*' token
/root/php-5.0.3/sapi/apache2handler/php_apache.h:54: error: parse error before '
*' token
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:28: error: syntax error before "m
odule"
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:28: error: conflicting types for
`php5_module'
/root/php-5.0.3/sapi/apache2handler/php_apache.h:29: error: previous declaration
 of `php5_module'
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: `STANDARD20_MODULE_STU
FF' undeclared here (not in a function)
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: initializer element is
 not constant
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:29: error: (near initialization f
or `php5_module.version')
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:30: warning: initialization makes
 integer from pointer without a cast
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:31: warning: initialization makes
 integer from pointer without a cast
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:34: warning: initialization from
incompatible pointer type
/root/php-5.0.3/sapi/apache2handler/mod_php5.c:36: warning: initialization makes
 integer from pointer without a cast
make: *** [sapi/apache2handler/mod_php5.lo] Error 1
Woran kann das liegen? Daran, dass gerade noch PHP4 läuft, oder dass ich voher PHP5 schon mal als CGI-Modul erstellt habe?

MfG BenArt

EDTI: Ich hab noch was gefunden. In der Fehlermeldung steht apache1.3, welchen ich jedoch nichtmehr am laufen habe und die ganzen libs runtergeworfen. Ist da was falsch in der apxs2?
Post Reply