[HowTo] PHP5 installieren

  • Thread starter Thread starter server4downs
  • Start date Start date
Ich habe da auch mal eine Frage, ich will Lighttpd und PHP mit FastCGI betreiben. Habe Lighttpd und PHP auch installiert, allesdings zwei probleme:

1.) wenn ich Lighttpd starten will: (server.c918) unknown config-key: fastcgi.server (ignored)

2.) Und wenn ich die phpinfo.php aufrufen will (alles ist installiert und gestartet bekomme ich nur ein 403 - Forbidden.

Das komische:
Habe php mit with-config-file-path=/etc/php/php.ini kompliert, trotzdem fehlt diese datei später und muss manuell anlegt werden.

Kann da das problem liegen?
 
Hallo.

Du müsstest schon posten, wie bei dir die Konfiguration aussieht, weil wir haben alle unsere Glaskugeln verloren ;)
Ansonsten gilt: die Angabe des Pfads für die php.ini bedeutet nicht gleich, dass die php.in i dort dann auch gleich abgelegt wird. Einfach entweder eine alte php.ini benutzen (und anpassen) oder die aus dem source-dir.
Was sagen die Logs?
 
Hallo,

ich habe mir einen Root-Server gemietet und möchte nun auf PHP5 installieren.

Da ich schon einigemale bei der Installation gescheitert bin habe ich einen Dienstleister damit beauftragt.

Von diesem kam dann die Antwort:
leider konnte die Installation von PHP5 auf Ihrem Server nicht durchgeführt werden.
Grund hierzu: SuSe 9.2 wird nicht mehr unterstützt.
Es wird für Yast eine funktionierende Installationsquelle benötigt, um abhängige devel-Pakete für PHP5 einspielen zu können.

Im mom ist folgendes auf dem Server installiert:
Betriebssystem suse-9.2

Installierte Applikationen

confixx-pro-suse92 / 20050511 (Laut SSH-Abfrage Version 3.3.0)
mysql-suse92 / 20050338
php-suse92 / 20060712
phpmyadmin-suse92 / 20050318
proftpd-suse92 / 20050812
webalizer-suse92 / 20050322

Könnt ihr mir da weiter helfen? Ich breuchte dringend PHP5 und MySQL5 auf dem Server. Der Provider sagt, dass sei kein Problem, aber er installiert es nicht (ich denke, der weiss warum :().
 
Hallo liebe Leute,

ich versuche seit 2 Tagen Php5 zum laufen zu bringen.

Mein Vserver ist von 1blu und läuft mit SuSe 10.0, Plesk 8.3.0, Apache 2.2, Php5.2.5.

Ich habe Php5 über yast installiert. Soweit klappt auch alles, bis auf die Tatsache das sich Apache nicht mehr starten lässt und folgende Fehlermeldung durch rcapache2 extreme-configtest ausgibt.

Code:
Syntax: NOT OK:
httpd2-prefork: Syntax error on line 180 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: Syntax error on line 45 of /etc/apache2/conf.d/zz010_psa_httpd.conf: Could not open configuration file /srv/www/vhosts/myfl.at/conf/httpd.include: Permission denied

Dann habe ich einfach mal die line 102 der default-server.conf welche
Code:
Include /etc/apache2/conf.d/*.conf
lautet auskommentiert.

Danach konnte ich den Apache starten, allerdings lassen sich so keine Seiten aufrufen. Die Fehlermeldungen der error_log lauten wie folgt:
Code:
[Thu Jan 03 15:12:39 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Thu Jan 03 15:12:39 2008] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Thu Jan 03 15:12:39 2008] [notice] mod_python: using mutex_directory /tmp 
No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n
[Thu Jan 03 15:12:40 2008] [notice] Apache/2.2.6 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch mod_python/3.3.1 Python/2.4.1 configured -- resuming normal operations
[Thu Jan 03 15:13:16 2008] [error] [client 77.191.169.240] File does not exist: /srv/www/htdocs/members
[Thu Jan 03 15:13:32 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:14:09 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:14:29 2008] [error] [client 84.177.80.38] File does not exist: /srv/www/htdocs/pics, referer: http://board.pennergame.de/viewtopic.php?f=9&t=6031&start=0
[Thu Jan 03 15:14:55 2008] [error] [client 88.84.151.221] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:19:33 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:19:34 2008] [error] [client 77.191.169.240] File does not exist: /srv/www/htdocs/favicon.ico
[Thu Jan 03 15:26:44 2008] [error] [client 77.191.169.240] File does not exist: /srv/www/htdocs/members
[Thu Jan 03 15:26:46 2008] [error] [client 87.78.88.175] File does not exist: /srv/www/htdocs/pics, referer: http://board.pennergame.de/viewtopic.php?f=9&t=1937
[Thu Jan 03 15:26:55 2008] [error] [client 87.78.88.175] File does not exist: /srv/www/htdocs/pics, referer: http://board.pennergame.de/viewtopic.php?f=9&t=1937
[Thu Jan 03 15:27:13 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:30:15 2008] [error] [client 66.249.72.18] File does not exist: /srv/www/htdocs/robots.txt
[Thu Jan 03 15:30:15 2008] [error] [client 66.249.72.18] File does not exist: /srv/www/htdocs/images
[Thu Jan 03 15:30:57 2008] [notice] caught SIGTERM, shutting down
No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n
[Thu Jan 03 15:30:58 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Thu Jan 03 15:30:58 2008] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Thu Jan 03 15:30:58 2008] [notice] mod_python: using mutex_directory /tmp 
No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n
[Thu Jan 03 15:30:58 2008] [notice] Apache/2.2.6 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch mod_python/3.3.1 Python/2.4.1 configured -- resuming normal operations
No entry for terminal type "raw";
using dumb terminal settings.
No entry for terminal type "raw";
using dumb terminal settings.
No entry for terminal type "raw";
using dumb terminal settings.
No entry for terminal type "raw";
using dumb terminal settings.
No entry for terminal type "raw";
using dumb terminal settings.
[Thu Jan 03 15:31:16 2008] [notice] caught SIGTERM, shutting down
No entry for terminal type "raw";
using dumb terminal settings.
No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n
[Thu Jan 03 15:31:16 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Thu Jan 03 15:31:17 2008] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Thu Jan 03 15:31:17 2008] [notice] mod_python: using mutex_directory /tmp 
No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n
[Thu Jan 03 15:31:17 2008] [notice] Apache/2.2.6 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch mod_python/3.3.1 Python/2.4.1 configured -- resuming normal operations
[Thu Jan 03 15:31:35 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:31:36 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:31:46 2008] [error] [client 77.191.169.240] Directory index forbidden by Options directive: /srv/www/htdocs/
[Thu Jan 03 15:57:59 2008] [error] [client 74.6.28.28] File does not exist: /srv/www/htdocs/robots.txt
[Thu Jan 03 15:58:00 2008] [error] [client 74.6.19.126] File does not exist: /srv/www/htdocs/robots.txt
[Thu Jan 03 15:58:01 2008] [error] [client 74.6.7.73] Directory index forbidden by Options directive: /srv/www/htdocs/

Meine Frage ist nun wie ich diese Fehler behebn kann.

Über hilfe wäre ich sehr dankbar.

gruss
dyna
 
Bei php kommt es vergleichsweise oft vor, daß es mehrfach installiert ist, dann passieren die komischsten Fehler. Zur Überprüfung eingeben: whereis php . Bei den Ergebnissen überprüfen, ob es sich nur um ein Programm mit diversen links dorthin, oder um mehrere Programme/Versionen an unterschiedlichen Stellen installiert, handelt
 
MOD: Full-Quote entfernt!
Hi, nach eingabe von whereis php kommt folgendes:

Code:
php: /usr/bin/php /etc/php.ini /usr/share/php /usr/share/man/man1/php.1.gz
 
Last edited by a moderator:
Hallo nochmal,

mittlerweile konnte ich das Problem lösen.

Es war an einer erstellten Subdomain gelegen die ein Modul namens MIVA benötigte. Dieses konnte man in Plesk abwählen und siehe da... Php5 läuft endlich.

Trotzdem vielen Dank und weiterhin viel Erfolg :)

gruss
dyna
 
Dear users,

Im afraid i have to write in English as i am from Denmark.

I currently have a server at S4Y with Debian sarge and Confixx.

Current version of PHP: PHP Version 4.3.10-22
New version to install: php-5.2.5

Current configure (Obtained with phpinfo):

'../configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2' '--with-config-file-path=/etc/php4/apache2' '--enable-memory-limit' '--disable-debug' '--with-regex=php' '--disable-rpath' '--disable-static' '--with-pic' '--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr' '--with-zip=/usr' '--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-exec-dir=/usr/lib/php4/libexec' '--without-mm' '--without-mysql' '--without-sybase-ct'

When i run following command:

./configure --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-execdir=/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-openssl --without-pgsql --with-config-file=/etc/php5/php.ini --with-apxs2=/usr/sbin/apxs2

I get:

loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... no
configure: warning: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for bison... no
checking for byacc... no
checking for bison version... invalid
configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 (found: none).
checking for flex... lex
checking for yywrap in -ll... no
checking for working const... yes
configure: warning: flex versions supported for regeneration of the Zend/PHP parsers: 2.5.4 (found: none)
checking whether to force non-PIC code in shared modules... yes
checking whether /dev/urandom exists... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...

Sorry, I cannot run apxs. Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/sbin/apxs2 follows:
./configure: line 6669: /usr/sbin/apxs2: No such file or directory
configure: error: Aborting

Looking forward to hear some suggestions.

Many regards from Denmark.
 
Dear CrunchyCake,

the solution is fairly simple. You are missing the development package from apache.
Code:
apt-cache search apxs
Should give you an answer like:
apache-dev - ...
apache2-prefork-dev - ...
apache2-threaded-dev - ...
So the following command should do the trick:
Code:
apt-get install apache-dev

Cheers,
--marneus
 
Dear marneus,

What bothers me is that i have apxs installed, although this seems like version 1, compared to the apxs2 its being configured for.

# find / -name apxs
/usr/bin/apxs

# apt-cache search apxs
apache-dev - development kit for the Apache webserver

apxs2 has no existense as fare as i can see, which doesnt make any sense as the current php4 is installed with the tool.
 
Last edited by a moderator:
Please check your installed Apache-Version.
If you use the apache2 you should install one of the apache2-devel-package.

huschi.
 
Thanks for your reply, although i cannot find this package.

This is how my sources.list looks like:

Code:
# main sources

deb http://debian.intergenia.de/debian/ sarge main contrib non-free
deb-src http://debian.intergenia.de/debian/ sarge main contrib non-free

# non-us

deb http://debian.intergenia.de/debian-non-US/ sarge/non-US main contrib non-free
deb-src http://debian.intergenia.de/debian-non-US/ sarge/non-US main contrib non-free

# security

deb http://debian.intergenia.de/debian-security/ sarge/updates main contrib non-free
deb-src http://debian.intergenia.de/debian-security/ sarge/updates main contrib non-free

# apt-cache search apache2
apache-utils - utility programs for webservers (transitional package)
apache2 - next generation, scalable, extendable web server
apache2-common - next generation, scalable, extendable web server
apache2-doc - documentation for apache2
apache2-mpm-perchild - experimental high speed perchild threaded model for Apache2
apache2-mpm-prefork - traditional model for Apache2
apache2-mpm-threadpool - experimental high speed model for Apache2 (transitional package)
apache2-mpm-worker - high speed threaded model for Apache2
apache2-prefork-dev - development headers for apache2
apache2-threaded-dev - development headers for apache2
apache2-utils - utility programs for webservers
libapache-mod-auth-mysql - Apache module for MySQL authentication
libapache-mod-dav - A DAV module for Apache
libapache-mod-php4 - server-side, HTML-embedded scripting language (apache 1.3 module)
libapache-ruby1.8 - Ruby libraries for mod_ruby
libapache2-mod-auth-kerb - Apache2 module for Kerberos authentication
libapache2-mod-auth-mysql - Apache 2 module for MySQL authentication
libapache2-mod-auth-pam - module for Apache2 which authenticate using PAM
libapache2-mod-auth-pgsql - Module for Apache2 which provides pgsql authentication
libapache2-mod-auth-plain - Module for Apache2 which provides plaintext authentication
libapache2-mod-auth-sys-group - Module for Apache2 which checks user against system group
libapache2-mod-chroot - run Apache in a secure chroot environment
libapache2-mod-encoding - Apache2 module for non-ascii filename interoperability
libapache2-mod-fcgid - an alternative module compat with mod_fastcgi
libapache2-mod-jk2 - Apache 2.0 connector for the Tomcat Java servlet engine
libapache2-mod-layout - Apache2 web page content wrapper
libapache2-mod-ldap-userdir - Apache2 module that provides UserDir lookups via LDAP
libapache2-mod-macro - Create macros inside apache2 config files
libapache2-mod-musicindex - Browse, stream, download and search through MP3/Ogg files
libapache2-mod-perl2 - Integration of perl with the Apache2 web server
libapache2-mod-perl2-dev - Integration of perl with the Apache2 web server - development files
libapache2-mod-php4 - server-side, HTML-embedded scripting language (apache 2.0 module)
libapache2-mod-proxy-html - Apache2 filter module for HTML links rewriting
libapache2-mod-python - An Apache module that embeds Python within the server
libapache2-mod-python-doc - An Apache module that embeds Python within the server
libapache2-mod-python2.2 - An Apache 2 module that embeds Python 2.2 within the server
libapache2-mod-python2.3 - An Apache 2 module that embeds Python 2.3 within the server
libapache2-mod-rpaf - module for Apache2 which takes the last IP from the 'X-Forwarded-For' header
libapache2-mod-ruby - Embedding Ruby in the Apache2 web server
libapache2-mod-scgi - Apache module implementing the SCGI protocol.
libapache2-mod-security - Tighten web applications security for Apache 2.x
libapache2-mod-suphp - Apache2 module to run php scripts with the owner permissions
libapache2-mod-xmlrpc2 - XMLRPC Server module for Apache2 web server
libapache2-redirtoservname - Apache 2 module to redirect users to the canonical hostname
libapache2-request-perl - generic Apache request library
libapache2-svn - apache modules for Subversion (aka. svn)
libapr0 - the Apache Portable Runtime
libembperl-perl - A system for building dynamic websites with Perl
mod-chroot-common - run Apache in a secure chroot environment
mod-musicindex-common - Common files for mod-musicindex
mod-security-common - Tighten web applications security - common files
php4-cgi - server-side, HTML-embedded scripting language (CGI binary)
libapache2-mod-fastcgi - FastCGI module for Apache2
 
Last edited by a moderator:
Which package do you meen?
I meant one of this:
apache2-prefork-dev - development headers for apache2
apache2-threaded-dev - development headers for apache2
Further you should check your Apache-installation about prefork or multi-threaded. We can't do it.

huschi.
 
That solved our problem! :-)

Now i get following:

Thank you for using PHP.

Notice: Following unknown configure options were used:

--with-execdir=/usr/lib/php5/bin
--enable-memory-limit
--with-config-file=/etc/php5/php.ini

Which package do you meen?
I meant one of this:

Further you should check your Apache-installation about prefork or multi-threaded. We can't do it.

huschi.
 
Last edited by a moderator:
Mistype:
Code:
--with-execdir=/usr/lib/php5/bin

Corrected to:
Code:
--with-exec-dir=/usr/lib/php5/bin

Mistype:
Code:
--with-config-file=/etc/php5/php.ini

Corrected:
REMOVED

PHP-5.2.5
 
Last edited by a moderator:
It seems to work now, i just moved the modules and such and php5 is loaded.
Except it has no php.ini file obviously.

'./configure' '--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/share/mysql' '--enable-cli' '--with-pear=/usr/share/pear' '--with-openssl' '--without-pgsql' '--with-apxs2=/usr/bin/apxs2'

Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5
Loaded Configuration File (none)

:/etc/php5# dir
pear.conf

Where can i find a php.ini file for PHP5?
 
Hey there.
Just copy the one coming with the source package (php.ini-dist) to /etc/php5. Don't forget to rename it to php.ini.
Modify it to your needs. You might want to set the "include_path" to your PEAR path (e.g. /usr/share/php).
Cheers,
s4d
 
Last edited by a moderator:
Thanks!

If i need mbstring, ldap and imap again. Is a reconfigure of PHP5 needed?

Hey there.
Just copy the one coming with the source package (php.ini-dist) to /etc/php5. Don't forget to rename it to php.ini.
You might want to set the "include_path" to your PEAR path (e.g. /usr/share/php).
Cheers,
s4d
 
Is a reconfigure of PHP5 needed?
Not necessarily. It depends on what you need. If you need mbstring, imap etc (which are essential PHP modules) you better recompile PHP. For PECL modules (such as imagick) you might find it easier to use phpize and php-config, which is part of your php installation (e.g. /usr/bin/phpize).
I hope this helped.
 
Back
Top