opendir bug? Need help!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SonnyKo
Forum Newbie
Posts: 1
Joined: Tue Dec 05, 2006 1:27 am

opendir bug? Need help!!

Post by SonnyKo »

I recently installed Fedora C5 ( 2.6.18-1.2239.fc5 ) with php (v 5.1.6), mysql and Apache. I am having a problem with this code segment:

.....
.....
$dirval = "/var/www/html/softlink"; // softlink is a soft link to another directory (hard)
if ( !($handle = @opendir ($dirval))) {
......
...... this code always gets executed
...... owner and file permissions are not a problem. I have double and triple checked it
......
}
...
...

In my previous installation - Fedora C5 ( 2.6.17-1.2174_FC5 ) with php (v 5.1.4), mysql and Apache
the exact same code passes through without any problems. Just for info - the directory that softlink links to sits on another hard disk that has to be mounted. This is the same in both installations.

Is this a PHP bug? What I am trying to do is basically to create a mirror of my old system. Please help.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

For debugging purposes remove the @ and set error_reporting(E_ALL); and ini_set('display_errors', true);
Post Reply