|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-06-17 14:29 UTC] jan0michael at yahoo dot com
[2017-06-17 20:06 UTC] jan0michael at yahoo dot com
-Status: Open
+Status: Closed
[2017-06-17 20:06 UTC] jan0michael at yahoo dot com
[2017-06-18 09:44 UTC] requinix@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ I try to run nextcloud using Tomcat. In the configuration for the CGIServlet I set /usr/bin/php5 as executable. I connect my web browser to 127.0.0.1:8086/nextcloud/index.php. This executes /usr/bin/php5 /var/www/default/nextcloud/index.php. The CGIServlet sets the environment variable SCRIPT_NAME correctly to /nextcloud/index.php, but the php interpreter changes the variable to /var/www/default/nextcloud/index.php, what makes nextcloud throw an exception. I found no way to prevent php from changing SCRIPT_NAME, and using the already set value instead. Test script: --------------- What I think how the CGIServlet should be configured in web.xml: <servlet> <servlet-name>php-cgi</servlet-name> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> <init-param> <param-name>executable</param-name> <param-value>/usr/bin/php5</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>php-cgi</servlet-name> <url-pattern>*.php</url-pattern> </servlet-mapping>