Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PHP] php3 & php4 running as CGI under apache-ssl 1.3.14 with suexec

0 views
Skip to first unread message

Valmar Joandi

unread,
Nov 18, 2000, 11:04:46 AM11/18/00
to
Hello.

I have apache-ssl 1.3.14 compiled with --enable-suexec

php3 and php4 both run normally except that if php[34] script creates
some file (fopen()) then it will not be with user (script runned as
http://xxx/~test/test.php3 exmpl.) test gid and uid. It will be with uid
and gid of apache (currently its www:www).

But if i run perl (not mod or embperl) script or ELF binary or bash
script as cgi (http://xxx/~test/test.pl on ~test/test.cgi) and it
creates some file, then this file uid:gid are
test:test.. just the way that suexec should work.

apache --suexec-docroot is /www and php3 and php4 are both installed
under /www ( --prefix=/www/php3/ and --prefix=/www/php4/)
also --suexec-gidmin and --suexec-uidmin are ok.

btw, I also have virutal hosts in machine and there NO User/Group
directirve between <Virtualhost vhost:80> </Virtualhost> then
http://vhost/test.php4 creates file under apache gid/uid and
perl/shell/ELF will do it also under apache uid/gid

but if i put User test2 and Group test2 between <VirtualHost
vhost:80></VirtualHost> then perl/shell/elf work normally, BUT
if i now try to run http://vhost/test.php3 or test.php4 then it will say
to my browser:

Internal Server Error

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

Please contact the server administrator, val...@tkwcy.ee 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.


Apache/1.3.14 Ben-SSL/1.42 Server at kaak.XXXXX.ee Port 80

and in /opt/apache/logs/vhost-error.log says:

[Sat Nov 18 16:03:21 2000] [error] [client 1.2.3.4] Premature end of
script headers: /www/php3
[Sat Nov 18 16:04:22 2000] [error] [client 1.2.3.4] Premature end of
script headers: /www/php

(currentlt /www/php3 is php3 binary and /www/php is php4 binary)

sorry for bad english but I would be happy if anyone could help me.

__
Valmar Joandi.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general...@lists.php.net
For additional commands, e-mail: php-gene...@lists.php.net
To contact the list administrators, e-mail: php-lis...@lists.php.net

0 new messages