php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45333 current directory problem
Submitted: 2008-06-23 00:38 UTC Modified: 2008-06-24 02:46 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: omikorn at yahoo dot com Assigned:
Status: Wont fix Package: *Directory/Filesystem functions
PHP Version: 4.4.8 OS: CentOS5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 - 31 = ?
Subscribe to this entry?

 
 [2008-06-23 00:38 UTC] omikorn at yahoo dot com
Description:
------------
I have a cron script that is run on 2 different machines like this:

1st machine has php 4.3.9 installed.
2nd machine has php 4.4.8 installed.

Script is ran from cron on both machines like this:

/usr/bin/php /var/www/vhosts/whatever.com/httpdocs/script.php

script.php contains the following section:

$filename="./mailfile/dailyreport.txt";

$fp=fopen($filename,"r");

if ($fp) {
    echo "file found";
} else {
    echo "file not found"
}

When script is ran from php 4.3.9 box it works fine but from 4.4.8 it returns a file not found error over $fp.


Reproduce code:
---------------
$filename="./mailfile/dailyreport.txt";

$fp=fopen($filename,"r");

if ($fp) {
    echo "file found";
} else {
    echo "file not found"
}

Expected result:
----------------
Script to behave like in php 4.3.9

Actual result:
--------------
$fp returns FALSE and a file not found error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-23 01:14 UTC] omikorn at yahoo dot com
include_path=".:.:" in php.ini
 [2008-06-23 09:05 UTC] derick@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.
 [2008-06-24 02:46 UTC] omikorn at yahoo dot com
Huh? I have over 50 Mb of PHP4 code. Trust me if I could rewrite that in a timely manner I would. So I am stuck running a security bugged php version because the latest version isn't fixable?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC