Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] GID of a php script is smaller..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
etouche
n00b
n00b


Joined: 27 Feb 2010
Posts: 18

PostPosted: Sun Mar 21, 2010 12:25 pm    Post subject: [SOLVED] GID of a php script is smaller.. Reply with quote

Hi all,

I have a little stupid issue ... but i begin in server config, it is for my personal and local use.
I have Apache 2 and php4, php5 (last version) managed by suPHP 0.7.1.

I search since a couple a days a how to about suphp settings, i cannot find it.
The solutions on the web don't help me :(

Someone know how to fix this :

Internal Server Error

GID of script "/var/www/localhost/htdocs/phpinfo.php" is smaller than min_gid
suPHP 0.7.1


nano /etc/suphp.conf

Code:

[global]
;Path to logfile
logfile=/var/log/apache2/suphp_log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

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

; 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=true

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

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

; Minimum UID
min_uid=1000

; Minimum GID
min_gid=100

[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"


Code:

myGentoo ~ # ls -l /var/www/localhost/htdocs/
total 16
-rw-r--r-- 1 root  root 45 Mar 18 20:37 index.html
-rw-r--r-- 1 root root 20 Jan  7  1980 phpinfo.php
-rw-r--r-- 1 root  root 20 Jan  7  1980 phpinfo.php4
-rw-r--r-- 1 root  root 20 Jan  7  1980 phpinfo.php5


If you need more info feel free to ask is a beta server version ;)

Thanks for your help and your time.
_________________
Feel free to open your mind and see behind the things.


Last edited by etouche on Sat Mar 27, 2010 11:39 am; edited 1 time in total
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sun Mar 21, 2010 2:53 pm    Post subject: Reply with quote

GID of group 'root' is 0, usually. min_gid in your safety config is 100. That's your problem. You may not want to elevate to root privileges when executing that script.
Back to top
View user's profile Send private message
etouche
n00b
n00b


Joined: 27 Feb 2010
Posts: 18

PostPosted: Sun Mar 21, 2010 3:14 pm    Post subject: Reply with quote

Ok i agree with you.
And i make change ...

After this command :
Code:
 chown gen13:users /var/www/localhost/htdocs/phpinfo.php


Result :
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Where can i find a good tuto about how to set a server ? :roll:
_________________
Feel free to open your mind and see behind the things.
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sun Mar 21, 2010 4:02 pm    Post subject: Reply with quote

etouche wrote:

More information about this error may be available in the server error log.

So, did you have a look? Gentoo has a Apache troubleshooting guide in which you may find clues.
Back to top
View user's profile Send private message
etouche
n00b
n00b


Joined: 27 Feb 2010
Posts: 18

PostPosted: Sun Mar 21, 2010 4:53 pm    Post subject: Reply with quote

I join the error log :

Code:
[Sun Mar 21 17:38:06 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 17:38:06 2010] [error] [client 192.168.1.7] Premature end of script headers: phpinfo.php
[Sun Mar 21 17:38:06 2010] [error] [client 192.168.1.7] File does not exist: /var/www/localhost/htdocs/favicon.ico
[Sun Mar 21 17:38:54 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 17:38:54 2010] [error] [client 192.168.1.7] Premature end of script headers: phpinfo.php
[Sun Mar 21 17:38:54 2010] [error] [client 192.168.1.7] File does not exist: /var/www/localhost/htdocs/favicon.ico
[Sun Mar 21 17:38:58 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 17:38:58 2010] [error] [client 192.168.1.7] Premature end of script headers: phpinfo.php
[Sun Mar 21 17:39:39 2010] [error] [client 192.168.1.7] File does not exist: /var/www/localhost/htdocs/favicon.ico
[Sun Mar 21 17:39:42 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 17:39:42 2010] [error] [client 192.168.1.7] Premature end of script headers: phpinfo.php



With the net2ftp tool uploaded on the server :
Code:

[Sun Mar 21 18:01:34 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 18:01:34 2010] [error] [client 192.168.1.7] Premature end of script headers: index.php


Here the error message :

[Sun Mar 21 18:13:25 2010] [error] [client 192.168.1.7] terminate called after throwing an instance of 'suPHP::LookupException'
[Sun Mar 21 18:13:25 2010] [error] [client 192.168.1.7] Premature end of script headers: phpinfo.php


Thanks
_________________
Feel free to open your mind and see behind the things.
Back to top
View user's profile Send private message
etouche
n00b
n00b


Joined: 27 Feb 2010
Posts: 18

PostPosted: Sun Mar 21, 2010 6:17 pm    Post subject: Reply with quote

About

Code:
[Tue May 20 02:14:18 2008] [error] [client x.x.x.x] terminate called after throwing an instance of 'suPHP::LookupException'
[Tue May 20 02:14:18 2008] [error] [client x.x.x.x] Premature end of script headers: info.php


it was a mistake into this file " /etc/apache2/modules.d/70_mod_suphp.conf" user and group was not both apache but an error on the name.
_________________
Feel free to open your mind and see behind the things.


Last edited by etouche on Sun Mar 21, 2010 7:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
etouche
n00b
n00b


Joined: 27 Feb 2010
Posts: 18

PostPosted: Sun Mar 21, 2010 7:40 pm    Post subject: Reply with quote

The issue is fixed about the error :
"GID of script "/var/www/localhost/htdocs/phpinfo.php" is smaller than min_gid "

It is because the "/var/www/localhost/htdocs/" must be root:root and the content to a user:group.

NO SOLUTION ERASE INSTALL AND TEST WITHOUT SUPHP
_________________
Feel free to open your mind and see behind the things.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum