Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16394 - PHP related: relative paths do not seem to work at all with path related functions...
Summary: PHP related: relative paths do not seem to work at all with path related func...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-26 02:24 UTC by James Addison
Modified: 2003-04-25 18:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Addison 2003-02-26 02:24:23 UTC
relative paths do not seem to work at all with path related functions...  such as 
file_exists, imagejpeg, etc. 
 
I've been told that using absolute paths will work fine, but that's not a solution, 
it's a hack. 

Reproducible: Always
Steps to Reproduce:
1.  use a path related function (file_exists) 
2. it won't work.  gives a php error that file doesn't exist or something 
3. 
Actual Results:  
php error was output to http stream 

Expected Results:  
should have returned true for file_exists(), instead of false
Comment 1 James Addison 2003-02-26 02:39:20 UTC
sorry, forgot the php version... 4.2.3 is this issue 
 
 
4.3.0 and 4.3.1 have a different issue - session_start() causes apache 
2.0.44 to segfault. 
Comment 2 James Addison 2003-02-26 02:45:33 UTC
That's 4.2.3-r2, i mean. 
Comment 3 SpanKY gentoo-dev 2003-02-26 03:07:21 UTC
relative paths work fine for me ... but i use apache-1.3.x ...

you're having these problems with apache-2.0.44 and php-4.2.x and php-4.3.x ?
Comment 4 SpanKY gentoo-dev 2003-02-26 03:07:46 UTC
also, did you try './file' ?
Comment 5 James Addison 2003-02-26 04:03:07 UTC
Apache 2.0.44 with mod_php 4.2.3-r2, specifically.   
 
mod_php 4.3.0 and mod_php 4.3.1 have session issues for me, which is 
why i'm using 4.2.3-r2 (or attempting to) 
 
no, I didn't try ./file - i'll do that now. 
Comment 6 James Addison 2003-02-26 04:07:33 UTC
./file did not work...  
 
This same php code used to work with whatever I had installed before - 
then, I decided to upgrade to 4.3.0 to get libgd 2.0 support - that had 
session issues, so I tried 4.3.1 - same thing.   
 
I then decided the best thing to do would be to revert back to the last 
'stable' release which was 4.2.3-r2.  NO LUCK. 
 
Weird. 
Comment 7 Donny Davies (RETIRED) gentoo-dev 2003-03-01 01:28:45 UTC
i dunno why this was passed to me anyways.
Comment 8 SpanKY gentoo-dev 2003-03-03 04:41:51 UTC
what do you see if you whip up a small directory browsing script ?
also, does the cli version suffer from same issues ?

<?
echo "<pre>";
$d = dir("./");
while ($entry=$d->read()) {
    echo "$entry\n";
}
$d->close();
echo "</pre>";
?>
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-04-25 18:09:17 UTC
1. Upgrade to PHP4.3, there were lots of bugs in PHP4.2 with Apache2
2. do read the php manual, and check their bugs.

I believe bugs 19323, 19503, 18920, 19827, 20710, 22845 in their system describe the issue very well.

I also believe part of their code system changed how paths were used somewhere for security reasons. look it up in the release announcements.

I'm closing this since it was an upstream bug that is now fixed.