Jorge Bastos a écrit :
> Nock Nock anyone? :PP
>
> ---
>
> I belive mine isn't working, and i can't see a way to put it working.
>
>
> cat id.php
> <?php
> system('id');
> ?>
>
> [Fri Jun 22 20:47:54 2007] [error] [client 1.2.3.4] terminate called after
> throwing an instance of 'suPHP::LookupException'
> [Fri Jun 22 20:47:54 2007] [error] [client 1.2.3.4] Premature end of script
> headers: id.php
>
> Any idea?
>
>
>
>
> ----- Original Message -----
> From: "Cian Davis" <[EMAIL PROTECTED]>
> To: "Simón" <[EMAIL PROTECTED]>
> Cc: <[email protected]>
> Sent: Thursday, June 14, 2007 12:40 AM
> Subject: Re: [suPHP] How to test if suphp is working?
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Simon,
> The best and simplest way I have found to test it is to have a PHP
> script executing the "id" command:
>
> <?php
> system('id');
> ?>
>
> Granted, it assumes Linux and that the whoami command is installed but
> it should work. If it doesn't come back with the username of the
> script owner, it isn't working (in the simplest case).
>
> Regards,
> Cian
>
> Simón wrote:
>> Hi there,
>>
>> I installed suphp reading the docs on the tar, and all seems to work
>> fine, but I don´t know how to test if it´s doing it´s job.
>>
>> Is there any way of testing it?
>>
>> Kind regards, Simon.
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGcIB12yUma7R/3b8RAt7qAKC6sIvMT+QgdgBNrMEgiSNAZ0LfIgCglLLz
> q9DWtJbeZvEsIKV+F8p47aA=
> =bsl7
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> suPHP mailing list
> [email protected]
> http://lists.marsching.biz/mailman/listinfo/suphp
>
>
> _______________________________________________
> suPHP mailing list
> [email protected]
> http://lists.marsching.biz/mailman/listinfo/suphp
>
>
> _______________________________________________
> suPHP mailing list
> [email protected]
> http://lists.marsching.biz/mailman/listinfo/suphp
>
>
>
Hello
To answer we should need more info. Can you put parts of your config files ?
Here is mine which work fine :
a vhost apache2 :
<VirtualHost 192.168.0.23:80>
RLimitCPU 60
RLimitMEM 67108864
RLimitNPROC 16
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /web/users/user11/www
ServerName blablabla.dynalias.net
ServerAlias blablabla.net.home
SuexecUserGroup user11 nogroup
suPHP_ConfigPath "/web/users/user11"
suPHP_UserGroup user11 nogroup
CustomLog /web/users/user11/www/logs/access_log combined
Errorlog /web/users/user11/www/logs/error_log
ScriptAlias /cgi-bin/ /web/users/user11/cgi-bin/
Alias /icon/ /web/users/icon/
<Directory /web/users/user11/cgi-bin>
AllowOverride Authconfig
Options +ExecCGI
</Directory>
<Directory /web/users/user11/www>
Options SymLinksIfOwnerMatch
AllowOverride AuthConfig FileInfo Indexes Limit
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Then a script in /web/users/user11/www :
-rw-r--r-- 1 user11 nogroup 278 2006-05-01 12:12 test.php
Now the main part of httpd.conf about suphp :
....
LoadModule suphp_module modules/mod_suphp.so
.....
AddType application/x-httpd-php .php
....
RemoveHandler .php
<FilesMatch "\.php$">
SetHandler x-httpd-php
</FilesMatch>
......
<Directory />
suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php5
</Directory>
....
suPHP_Engine On
.....
And finally content of /usr/local/etc/suphp.conf :
[global]
;Path to logfile
logfile=/var/log/apache/suphp.log
;Loglevel
loglevel=warn
;User Apache is running as
webserver_user=nobody
;Path all scripts have to be in
docroot=/web/users
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0033
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/local/bin/php-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Hope this helps
Patrick
_______________________________________________
suPHP mailing list
[email protected]
http://lists.marsching.biz/mailman/listinfo/suphp