Hi,
ich möchte php5.3.3 über fastcgi laufen lassen und kommen mit suexec nicht so ganz zurecht. es verbietet mir das ausführen des php-wrappers und liefert immer wieder in der suexec.log folgendes aus:
[2010-10-15 23:09:04]: uid: (33/www-data) gid: (33/www-data) cmd: php-fcgi-starter [2010-10-15 23:09:04]: cannot run as forbidden uid (33/php-fcgi-starter)
apache2 wurde über apt mit folgenden module installiert :
Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_worker_module (static) http_module (static) so_module (static) alias_module (shared) auth_basic_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgid_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) fcgid_module (shared) include_module (shared) mime_module (shared) negotiation_module (shared) reqtimeout_module (shared) rewrite_module (shared) setenvif_module (shared) status_module (shared) suexec_module (shared)
php wurde von mir selbst erfolgreich zu Fuß installiert. das verzeichnis /var/www sieht folgendermaßen aus:
├── fcgi-scripts │ └── common │ └── php-fcgi-starter ├── index.html └── test └── info.php
common/php-fcgi-starter gehören dem user und der gruppe www-data mit 0755 rechten. auch test/* gehören dem www-data mit ebenfalls 0755 rechten.
so, kommen wir nun zu dem wesentlichen teil. einmal der wrapper:
#!/bin/sh PHPRC=/usr/local/lib/ export PHPRC export PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_CHILDREN=8 exec /usr/local/bin/php-cgi
und einmal der vhost:
<VirtualHost *:80> ServerName test.local ServerAdmin he-man@universe.net DocumentRoot /var/www/test <IfModule mod_fcgid.c> SuexecUserGroup www-data www-data #PHP_Fix_Pathinfo_Enable 1 <Directory /var/www/test> Options +ExecCGI AllowOverride All AddHandler fcgid-script .php FCGIWrapper /var/www/fcgi-scripts/common/php-fcgi-starter .php Order allow,deny Allow from all </Directory> </IfModule> ServerSignature Off </VirtualHost>
rufe ich nun die seite http://test.local/info.php auf erhalte ich ein 500 status und in der suexec.log steht die besagte nachricht für mich:
[2010-10-15 23:09:04]: uid: (33/www-data) gid: (33/www-data) cmd: php-fcgi-starter [2010-10-15 23:09:04]: cannot run as forbidden uid (33/php-fcgi-starter)
orientiert habe ich mich nach diesem howto http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-etch.
hat jemand einen tipp für mich, warum die rechte für den wrapper nicht stimmen!?