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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: omikorn at yahoo dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 16:01:28 2024 UTC