Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Use Markdown for this comment
Set severity, which reflects how much the issue affects the use of the product
Change issue status back to 'Assigned'
Pending code changes (auto-populated)
[ID: 82937]
Primary programming language affected, if applicable [ID: 82936]
[ID: 82935]
[ID: 82940]
[ID: 82941]
Set the version(s) of the product affected by this issue (comma-separated list)
Set the version(s) of the product in which the issue should be fixed (comma-separated list)
Set the version(s) of the product in which the issue fix was verified (comma-separated list)
Set if this issue occurs in production
Set Reporter
Set Type
Set priority, which reflects how soon the issue should be fixed
Set Status
Set Assignee
Set Verifier
View or edit staffing
View issue level access limits(Press Alt + Right arrow for more information)
Description
For example a script named foo.php contains the following.
<?php
var_dump($_SERVER['SCRIPT_NAME']);
?>
When executed from command line here are the results.
$ php foo.php
string(7) "foo.php"
$ php ./foo.php
string(9) "./foo.php"
When invoked through Apache like
string(8) "/foo.php"
The documentation does not talk about this behavior (although many comments demonstrated the expected Apache behavior [matching style of HTTP request]), but it is definitely depended on.
On app engine the when called like
string(8) "foo.php"
additionally when redirected to a subfolder using routers in app.yaml the SCRIPT_NAME contains the path even though that is not present in the external request.
On app engine the when called like
string(8) "mydir/foo.php"
The difference causes Drupal to format invalid URLs.
example.com.foo.css (instead of ...com/foo.css)
example.comsubdir/foo.css (instead of ...com/subdir/foo.css)
Drupal derives the URL from <?php dirname() ?> of <?php $_SERVER['SCRIPT_NAME'] ?> which will return . if no slashes or just / for something like /index.php.
Obviously this is something that can be handled within PHP applications, but seems like the value should be altered to match the HTTP spec as is generally expected by PHP applications.