php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52542 Alternative PHP Cache Bug /mv cmd
Submitted: 2010-08-05 14:07 UTC Modified: 2010-08-05 15:58 UTC
From: asimbaki at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.14 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: asimbaki at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-05 14:07 UTC] asimbaki at gmail dot com
Description:
------------
# I have the following directories structure
# document root: /home/mysite/web
# lib directory /home/mysite/lib/vendor/

# I have the following line of code in 'index.php' to include the 'mytest.class.php'. It works well in browser, lynx and on CLI.

require_once(dirname(__FILE__)."/../lib/vendor/mytest.class.php");

# index.php in web directory
# mytest.class.php is in lib/vendor directory

# I performed the following linux commands:
# $ mkdir -p /home/mysite/libtest
# $ mv /home/mysite/lib/* /home/mysite/libtest

# Then I changed the above php code (index.php) as follows:
require_once(dirname(__FILE__)."/../libtest/vendor/mytest.class.php");

# When I run the script from browser, it shows error that fail to find the file 'mytest.class.php' in /home/mysite/vendor. I cleared the cache, used other fresh browser, but same results, lynx showing the same results, CLI works though

# I am using APC
# os: Linux www.wackylab.com 2.6.18-028stab059.6 #1 SMP Fri Nov 14 14:01:22 MSK 2008 i686 i686 i386 GNU/Linux



Test script:
---------------
# change this line of code in index.php
require_once(dirname(__FILE__)."/../lib/vendor/mytest.class.php");
echo "This is a test";

# to:
require_once(dirname(__FILE__)."/../libtest/vendor/mytest.class.php");
echo "This is a test";

Expected result:
----------------
This is a test

Actual result:
--------------
....failed to open stream: No such file or directory in /home/mysite/....
This is a test

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-05 14:26 UTC] asimbaki at gmail dot com
Even, if the path is hard-coded the same results. Also, the path in the error message was unexpected. The problem is not with dirname. Might be some file stat problem.
 [2010-08-05 15:58 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-08-05 15:58 UTC] johannes@php.net
Please report APC bugs on http://pecl.php.net/apc

While what oyu are seeing might be, depending on your APC configuration, expected as APC works on the inodes and tries to reduce the amount of file system lookups ...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 12:00:03 2025 UTC