Fork me on GitHub
Subscribe 3

Ticket #1075 (fixed bug)

Empty PHP_SELF somewhere

  • Created: 2016-01-08 19:59:40
  • Reported by: artoodetoo
  • Assigned to: Franz
  • Milestone: 1.5.10
  • Component: templates
  • Priority: normal

When php-fpm is configured with cgi.fix_pathinfo=0 (wich is recommended), $_SERVER['PHP_SELF'] is become empty.

PHP_SELF is used in header.php to substitute <pun_page>,
for ex. it is the word "index" here:

   <div id="punindex" class="pun">

I advice to use SCRIPT_NAME instead of PHP_SELF in any context.

History

artoodetoo 2016-01-08 20:00:47

  • Description changed. (Diff)

artoodetoo 2016-01-09 18:34:58

How can we see the problem:
CdJKOQW.png?1
- some styles stopped working
- because #pun<pun_page> not found
- because PHP_SELF is broken
- because php-fcgi is configured with fix_pathinfo=off
- because fix_pathinfo=on can cause security issues

Franz 2016-01-09 20:13:15

  • Milestone set to 1.5.10.

Thanks for the report!

quy 2016-01-15 15:22:17

  • Owner set to quy.

Franz 2016-06-16 06:41:09

  • Owner changed from quy to Franz.
  • Status changed from open to fixed.

Commit 88a3d9b to fluxbb 1.5-next

Avoid using PHP_SELF for detecting current script name

It can be empty in some rare cases (php-fpm with cgi.fix_pathinfo=0).

Fixes #1075.

Franz 2016-06-16 06:44:03

Okay, I fixed this now. Thanks for the report!

@artoodetoo: Did you ever encounter problems with admin_loader.php (i.e. admin plugins) on your setup?

Franz 2016-06-16 07:58:18

Commit 2c8cc09 to fluxbb master

Avoid using PHP_SELF for detecting current script name

It can be empty in some rare cases (php-fpm with cgi.fix_pathinfo=0).

Fixes #1075.

Franz 2016-06-16 09:03:13

Commit 5a9a5f4 to fluxbb fluxbb-1.5.10

Use SCRIPT_NAME instead of WordPress hack

This properly fixes #1075.