p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: I need someone running PHP on OSX (probably)


Message #1 by "Lee Noble" <sendmestuff@m...> on Wed, 13 Feb 2002 17:08:48
I'm doing the tutorial on traversing directories (ch10 p361) but it doesn't

work. I get the following error.



Traversing ./....

.DS_Store

001.txt

002.txt

1common.inc

administer.php

/BegPHP

Traversing .//BegPHP....



Warning: OpenDir: No such file or directory (errno 2) in

/Users/lee/Sites/_Php_experiments/nav_dir.php on line 7

Can't open .//BegPHP.



I *think* its a permissions issue, or at least a platform specific one. I

have the permissions of all subfolders, including BegPHP set to 777 but it

won't traverse outside the directory the PHP script is in. The script will

work in any folder but will not traverse into any subfolders.



The bit that bugs me is that extra slash (can't open .//BegPHP). If I set

the default dir to ./ it lists that directory but none beneath. If I set it

to BegPHP or ./BegPHP I get....



Traversing /BegPHP....



Warning: ChDir: No such file or directory (errno 2) in

/Users/lee/Sites/_Php_experiments/nav_dir.php on line 6



Warning: OpenDir: No such file or directory (errno 2) in

/Users/lee/Sites/_Php_experiments/nav_dir.php on line 7

Can't open /BegPHP.



I can only get it to list the directory the script is in but then the extra

slash (from ./) seems to botch it up, but if I adjust the script elsewhere

to stop the 'other' slash being printed it still says unable to open file.



You can download this script from this location



http://homepage.mac.com/leenoble/phpprobs.html



where there is also a snapshot of my file system to prove the files are

where they should be.



This is really scuppering my plans for an easy to maintain file

browsing/downloading system.

  Return to Index