Martynas | 17 Jul 2007 23:23

suPHP 0.6.2 released

Are you planning to add this patch to 0.6.3? http://bugs.gentoo.org/show_bug.cgi?id=111081 And - is there any release date set for 0.6.3? :)

_______________________________________________
suPHP mailing list
suPHP@...
http://lists.marsching.biz/mailman/listinfo/suphp
Blogujeme.com | 19 Jul 2007 22:53

suPHP problem - empty page

Hello
 
I have a problem with a suPHP installation on my Gentoo Linux server with Apache 2.2. I wanted to set up suPHP in owner mode, with the support of php4 and php5 cgi executables...
 
However, I am a newbie to suPHP, everything seems to be okay, but the whole thing doesnt work. I enabled the suPHP module instead of PHP5 module and everytime I call a php script throug my browser, I get just blank page, without anything in the source code..
 
I know I didnt provide any information, but I dont even know what information do you need.. So I would appreciate if you told me what to do to solve the problem...
 
Thank you
 
Tomas
_______________________________________________
suPHP mailing list
suPHP@...
http://lists.marsching.biz/mailman/listinfo/suphp
Andreas Thienemann | 19 Jul 2007 23:02
Favicon

Re: suPHP problem - empty page

Hi,

On Thu, 19 Jul 2007, Blogujeme.com wrote:

> However, I am a newbie to suPHP, everything seems to be okay, but the
> whole thing doesnt work. I enabled the suPHP module instead of PHP5
> module and everytime I call a php script throug my browser, I get just
> blank page, without anything in the source code..

Chances are your php script is failing and your webserver is configured to 
just output problems into the log.

Check /var/log/httpd/error_log or similar.

Regards,
 andreas
Blogujeme.com | 19 Jul 2007 23:32

Re: suPHP problem - empty page

Thank you for quick reply,

Here is what my error_log says:
[Thu Jul 19 23:08:41 2007] [notice] child pid 30873 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:08:43 2007] [notice] child pid 30874 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:08:58 2007] [notice] child pid 30875 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:08:59 2007] [notice] child pid 30871 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:09:00 2007] [notice] child pid 30872 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:09:00 2007] [notice] child pid 30878 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:09:05 2007] [notice] child pid 30879 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:09:09 2007] [notice] child pid 30882 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:12:46 2007] [notice] child pid 30883 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:21:29 2007] [notice] child pid 30884 exit signal Segmentation 
fault (11)
[Thu Jul 19 23:24:21 2007] [notice] child pid 30885 exit signal Segmentation 
fault (11)

Any idea what it is?

----- Original Message ----- 
From: "Andreas Thienemann" <andreas@...>
To: "Blogujeme.com" <tomas@...>
Cc: <suphp@...>
Sent: Thursday, July 19, 2007 11:02 PM
Subject: Re: [suPHP] suPHP problem - empty page

> Hi,
>
> On Thu, 19 Jul 2007, Blogujeme.com wrote:
>
>> However, I am a newbie to suPHP, everything seems to be okay, but the
>> whole thing doesnt work. I enabled the suPHP module instead of PHP5
>> module and everytime I call a php script throug my browser, I get just
>> blank page, without anything in the source code..
>
> Chances are your php script is failing and your webserver is configured to
> just output problems into the log.
>
> Check /var/log/httpd/error_log or similar.
>
> Regards,
> andreas
> 
Claus Reinke | 19 Jul 2007 23:44
Picon

Re: suPHP problem - empty page

Blogujeme.com schrieb:
> Thank you for quick reply,
>
> Here is what my error_log says:
> [Thu Jul 19 23:08:41 2007] [notice] child pid 30873 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:08:43 2007] [notice] child pid 30874 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:08:58 2007] [notice] child pid 30875 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:08:59 2007] [notice] child pid 30871 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:09:00 2007] [notice] child pid 30872 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:09:00 2007] [notice] child pid 30878 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:09:05 2007] [notice] child pid 30879 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:09:09 2007] [notice] child pid 30882 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:12:46 2007] [notice] child pid 30883 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:21:29 2007] [notice] child pid 30884 exit signal Segmentation 
> fault (11)
> [Thu Jul 19 23:24:21 2007] [notice] child pid 30885 exit signal Segmentation 
> fault (11)
>
> Any idea what it is?
>   
Hi,

did you php5 binary, if you call'd your script directly in command line,
any output?

--

-- 
With kind regards

Claus Reinke
Blogujeme.com | 19 Jul 2007 23:53

Re: suPHP problem - empty page

Hi
I have tried to execute directly the binary with the php file and it worked 
as expected.. the php code was evaluated and correct output given.

Regards,
Tomas

----- Original Message ----- 
From: "Claus Reinke" <reinke@...>
To: <suPHP@...>
Sent: Thursday, July 19, 2007 11:44 PM
Subject: Re: [suPHP] suPHP problem - empty page

> Blogujeme.com schrieb:
>> Thank you for quick reply,
>>
>> Here is what my error_log says:
>> [Thu Jul 19 23:08:41 2007] [notice] child pid 30873 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:08:43 2007] [notice] child pid 30874 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:08:58 2007] [notice] child pid 30875 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:08:59 2007] [notice] child pid 30871 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:09:00 2007] [notice] child pid 30872 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:09:00 2007] [notice] child pid 30878 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:09:05 2007] [notice] child pid 30879 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:09:09 2007] [notice] child pid 30882 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:12:46 2007] [notice] child pid 30883 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:21:29 2007] [notice] child pid 30884 exit signal 
>> Segmentation
>> fault (11)
>> [Thu Jul 19 23:24:21 2007] [notice] child pid 30885 exit signal 
>> Segmentation
>> fault (11)
>>
>> Any idea what it is?
>>
> Hi,
>
> did you php5 binary, if you call'd your script directly in command line,
> any output?
>
> -- 
> With kind regards
>
> Claus Reinke
>
>
> _______________________________________________
> suPHP mailing list
> suPHP@...
> http://lists.marsching.biz/mailman/listinfo/suphp
> 
Blogujeme.com | 20 Jul 2007 00:46

Re: suPHP problem - empty page

----- Original Message ----- 
From: "Claus Reinke" <reinke@...>
To: "Blogujeme.com" <tomas@...>
Sent: Friday, July 20, 2007 12:05 AM
Subject: Re: [suPHP] suPHP problem - empty page

> Blogujeme.com schrieb:
>> Hi
>> I have tried to execute directly the binary with the php file and it
>> worked as expected.. the php code was evaluated and correct output given.
>>
>> Regards,
>> Tomas
> Hi Tomas,
>
> please send me your suphp.conf and tell me, do you had compile your php5
> binary with fast-cgi and force-fastcgi?
>
> -- 
> With kind regards
>
> Claus Reinke
>
>

I didnt compile the php, it was installed with emerge on Gentoo.

The suphp.conf is like this:
[global]
;Path to logfile
logfile=/var/log/apache2/suphp_log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=hosting

;Path all scripts have to be in
docroot=/var/www/hosting/

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=true
allow_directory_group_writeable=true
allow_directory_others_writeable=true

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=true

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0077

; Minimum UID
min_uid=3000

; Minimum GID
min_gid=3000

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

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Claus Reinke | 20 Jul 2007 00:56
Picon

Re: suPHP problem - empty page

Blogujeme.com schrieb:
> ----- Original Message ----- From: "Claus Reinke"
> <reinke@...>
> To: "Blogujeme.com" <tomas@...>
> Sent: Friday, July 20, 2007 12:05 AM
> Subject: Re: [suPHP] suPHP problem - empty page
>
>
>> Blogujeme.com schrieb:
>>> Hi
>>> I have tried to execute directly the binary with the php file and it
>>> worked as expected.. the php code was evaluated and correct output
>>> given.
>>>
>>> Regards,
>>> Tomas
>> Hi Tomas,
>>
>> please send me your suphp.conf and tell me, do you had compile your php5
>> binary with fast-cgi and force-fastcgi?
>>
>> -- 
>> With kind regards
>>
>> Claus Reinke
>>
>>
>
> I didnt compile the php, it was installed with emerge on Gentoo.
>
> The suphp.conf is like this:
> [global]
> ;Path to logfile
> logfile=/var/log/apache2/suphp_log
>
> ;Loglevel
> loglevel=info
>
> ;User Apache is running as
> webserver_user=hosting
>
> ;Path all scripts have to be in
> docroot=/var/www/hosting/
>
> ; Security options
> allow_file_group_writeable=true
> allow_file_others_writeable=true
> allow_directory_group_writeable=true
> allow_directory_others_writeable=true
>
> ;Check wheter script is within DOCUMENT_ROOT
> check_vhost_docroot=false
>
> ;Send minor error messages to browser
> errors_to_browser=true
>
> ;PATH environment variable
> env_path=/bin:/usr/bin
>
> ;Umask to set, specify in octal notation
> umask=0077
>
> ; Minimum UID
> min_uid=3000
>
> ; Minimum GID
> min_gid=3000
>
>
> [handlers]
> ;Handler for php-scripts
> x-httpd-php=php:/usr/lib/php5/bin/php-cgi
> x-httpd-php5=php:/usr/lib/php5/bin/php-cgi
> x-httpd-php4=php:/usr/lib/php4/bin/php-cgi
> x-httpd-phtml=php:/usr/lib/php5/bin/php-cgi
>
> ;Handler for CGI-scripts
> x-suphp-cgi=execute:!self
>
>
>
hmm okay, please check your modules, ähm, if you use the same php.ini
for php4 and php5, that don't work any time!!!

If you use the false DSO modules, then you get an "Segmentation fault (11)".

please check this.

--

-- 
With kind regards

MWHS Solutions
Claus Reinke
RAUTUREAU Jérôme | 26 Jul 2007 14:37
Picon

suPHP_UserGroup dynamic ? is it possible ?

Hi everyone !

I have a very tricky thing to do.

I want to catch the username of the visitor from my intranet from an LDAP/AD authentification and use suPHP
with this user to execute PHP scripts with the permission of this user.

Here my configuration: 

NameVirtualHost mesfichiers
<VirtualHost xxxxxxx>
        ServerName mesfichiers
        ServerAdmin webmater@...
        DocumentRoot "/var/www/gestionnaire/"
        LogLevel info
        <Directory "/var/www/gestionnaire/">
                AuthLDAPEnabled on
                AuthLDAPAuthoritative on
                AuthName "Connexion serveur de fichiers"
                AuthType Basic
                AuthLDAPURL ldap://xxxxxxxxx:3268/ou=CDA,dc=agglo-larochelle,dc=fr?sAMAccountName?sub?(objectClass=user)
                AuthLDAPBindDN "CN=xxxxx,CN=Users,DC=agglo-larochelle,DC=fr"
                AuthLDAPBindPassword xxxx
                require valid-user

                allow from all
                Options +Indexes

        </Directory>

	RewriteEngine On
      RewriteCond %{LA-U:REMOTE_USER} (.+)
      RewriteRule . - [E=USER:%1]

	#now in my $_SERVER table I have $_SERVER['USER'] = 'myUser'

      suPHP_UserGroup CDA+%{USER} staff
      Header add X-Forwarded-User %{USER}e
</VirtualHost>

All works fine (ldap autentification ok, le USER apache variable is set correctly) but I can't use it in my
suPHP_UserGroup definition ?

I cause a 

[Thu Jul 26 13:09:14 2007] [error] [client xxxxxxx] Premature end of script headers: index.php
[Thu Jul 26 13:09:14 2007] [error] [client xxxxxxx] Premature end of script headers: index.php

If I switch suPHP_UserGroup CDA+%{USER} staff

in suPHP_UserGroup CDA+j.rautureau staff 

There is no problem. The script is correctly executed by CDA+j.rautureau.

All I would like is to make in dynamic...you see ?

My server: debian sarge, PHP5 CGI, Apache2 (mod_ldap, mod_suphp0.6.2 compiled, mod_rewrite, mod_headers)

Here's my configuration
./configure --prefix=/usr --with-min-uid=1000 --with-min-gid=50 --sysconfdir=/etc
--with-apache-user=www-data --with-setid-mode=force --disable-checkuid
--with-apxs=/usr/bin/apxs2 --disable-checkpath --with-logfile=/var/log/suphp.log

Thanks for your help!

Jérôme Rautureau
Développeur Systèmes
Communauté d'agglomération de La Rochelle
Tel : 05 46 30 34 25 / Fax : 05 46 30 34 29
olli | 26 Jul 2007 14:52

Re: suPHP_UserGroup dynamic ? is it possible ?

Hi,

> If I switch suPHP_UserGroup CDA+%{USER} staff
> 
> in suPHP_UserGroup CDA+j.rautureau staff
> 
> There is no problem. The script is correctly executed by
> CDA+j.rautureau.
>  
> All I would like is to make in dynamic...you see ?

That causes a hell lot of trouble. Y
our configuration file is parsed when the apache server process starts.
SuPHP is then readily configured and knows the user ids it has to switch to.
But you are trying to make this depend on the request itself. So to serve
the request you first would have to know the contents of that request.
Obviously that can't work right away. You'd have to serve the request as a
privileged user account and then drop privileges and switch to the desired
user id in the process of serving that request. As far as I know that isn't
supported by suPHP.

Olli

Gmane