php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45049 spawn-fcgi sometimes cannot resolve symlinks
Submitted: 2008-05-20 09:37 UTC Modified: 2008-08-20 01:00 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: szoftos at freemail dot hu Assigned: fb-req-jani (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5.2.6 OS: FreeBSD
Private report: No CVE-ID: None
 [2008-05-20 09:37 UTC] szoftos at freemail dot hu
Description:
------------
Hello,

recently i changed my operating system from linux to freebsd, which has its default documentroot in /usr/local/www, and linux had it in /var/www. i moved my files to /usr/local/www, but i made a symlink into /var:

'cd /var'

'ln -s ../usr/local/www www'

lighttpd has its old configs, locating files in /var/www, but this shouldn't be a problem with the symlink.

php got its settings locating files in /usr/local/www, and i got sometimes a mystical response from the fcgi-php: 'No input file specified.'

i lowered the spawned processes to 2 (sadly i couldn't lower it to 1), and traced one of the two processes. one of them was the faulty, and i had luck: i have seen that lighttpd passed /var/www (normally) to php-fcgi, and somehow php-fcgi couldn't really resolve the symlink.

the problem solved when i changed /var/www to /usr/local/www in lighty's configuration.

this looks like a problem to me, and it is not unique. i had this situation with one of my other virtualhosts too. the spawned processes are resolving that symlink good in most of the time, but then one process stops resolving it right, and produces the message, as i have written.

this should be a problem. 

i have gone to lighttpd developers, and they told me its a php problem. the original bugreport is here:
http://trac.lighttpd.net/trac/ticket/1668

Reproduce code:
---------------
You can reproduce if you use the same settings as i mentioned above.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-22 08:42 UTC] jani@php.net
Please provide the actual fastcgi.server part of your lighttpd.conf.
Also, how did you compile/configure PHP itself? (OTOH, *bsd has lot of problems dealing with symlinks, just search this bug db..:)
 [2008-05-22 14:10 UTC] szoftos at freemail dot hu
Hello,

original configuration snippet follows:

$HTTP["host"] =~ "^crxforum\.flix\.hu$|^crxforum\.localhost$" {
    server.document-root = "/var/www/crxforum.flix.hu/crxforum.flix.hu"
        fastcgi.server    = ( ".php" =>
                ((
                  "socket" => "/tmp/crxforum.flix.hu.php.sock",
                  "broken-scriptfilename" => "enable",
                 ))
                )
    accesslog.filename = "/var/log/lighttpd/crxforum.flix.hu-access.log"
    server.errorlog = "/var/log/lighttpd/crxforum.flix.hu-error.log"
    server.error-handler-404 = "/404.php"
    $HTTP["url"] =~ "^(/images/|/skins/|/js/)" {
        expire.url = ( "" => "access 1 years" )
    }
}
 [2008-08-12 08:59 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz

There are some fixes done in PHP_5_3 which most likely fix this problem. Note: Those fixes will NOT be backported to 5.2 branch!
 [2008-08-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC