You were right that it was a permission issue. I changed the ownership of the file that (your first suggestion) and it runs now. I had specifically picked to run it as root because I thought that root had permission to everything. Obviously not.
Thanks for your help,
Susan
Search found 7 matches
- Thu Feb 04, 2010 1:00 pm
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
- Wed Feb 03, 2010 6:03 pm
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Re: Trouble listing files with blob()
Here's what it does:
-Susan
Code: Select all
echo "Safe_mode:\n";
echo ini_get('safe_mode')."\n";
echo "Open_basedir:\n";
echo ini_get('open_basedir')."\n";
Code: Select all
Safe_mode:
1
Open_basedir:
- Wed Feb 03, 2010 4:57 pm
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Re: Trouble listing files with blob()
Unfortunately, we are back to it not listing anything. $dir = realpath('../pvse/'); print "Directory - $dir\n"; if (is_dir($dir)) print "$dir is a directory\n"; else print "$dir is not a directory\n"; print_r(glob($dir."/*")); Directory - /var/www/vhos...
- Wed Feb 03, 2010 4:22 pm
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Re: Trouble listing files with blob()
OK. I put both of your suggestions in my script and here is what I got. Here is my code: #!/usr/bin/php -q <?php $dir = '../pvse/'; echo realpath($dir)."\n"; print "Directory - $dir\n"; $dir = realpath('../pvse/'); if (is_dir($dir)) print "$dir is a directory\n"; ...
- Wed Feb 03, 2010 3:36 pm
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Re: Trouble listing files with blob()
Thanks for the reply. Here are the permissions, owner and group of the file that I am trying to run (testprog.php) and of the directory that I am trying to list (pvse): -rwxr-xr-x 1 root root 704 Feb 3 09:40 testprog.php drwxr-xr-x 5 pvse psacln 4096 Jan 29 08:38 pvse Do I have a permission problem?...
- Wed Feb 03, 2010 11:41 am
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Re: Trouble listing files with blob()
Thanks for your reply. I tried what you suggested and got the same result.
But if blob will not list the directories too, it won't work for me.
What else can I use. I tried opendir() but my server is running in Safe Mode and won't allow it.
But if blob will not list the directories too, it won't work for me.
What else can I use. I tried opendir() but my server is running in Safe Mode and won't allow it.
- Wed Feb 03, 2010 11:00 am
- Forum: PHP - Code
- Topic: Trouble listing files with blob()
- Replies: 12
- Views: 408
Trouble listing files with blob()
Hello, I am having trouble listing the files in a directory using blob(). It does not list anything even though there is a text file and three directories in the directory. I am running the program at the command line. It should be simple. What am I missing? This is my code: #!/usr/bin/php -q <?ph...