RE: [PHP] Can't link image directory?

2007-05-18 Thread Haig Dedeyan
 shows me the subdirectories that exist in the directory I
configure the script for, but no further levels of subdirectories as it
stands.  That could be modified *very* easily, but that's a different
matter. 

On my system, it shows /images without a problem, which more or less
adds to my initial suspicion --- check your httpd.conf file for Apache
and make sure that directories matching a regexp'ed "images" (or
similar) are not blocked from serving. 


-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107 

 

Tijnema !

 

...At last, why are you using file:// in your link? You're using a
webserver to display the contents, but file:// links to files on the 
local hard drive. Unless the server is running on the same machine
you're visiting the site with, it will fail to point to the right
file.

 

 

 

Thanks guys.

 

Httpd.conf was blocking it from serving.

 

I do only want to link the subdirectories and not the files within each
directory, which is why I'm using that script.

 

If I remove the "! character from the is_dir() command", I get a link
for "." And ".." if a workstations ever switches to a flavour of linux.

 

@ Tijnema !

 You're correct, I didn't need to use "file:"

 

 



Re: [PHP] Can't link image directory?

2007-05-18 Thread Haig Dedeyan
Sorry for the lack of information.
 
I also was wrong about the subdirectory name. It's "Images" and not
"Image"
 
The workstation is running WinXP Pro while PHP 5 & Apache 2 are on Suse
10.1.
I also installed apache2 & php5 on a WinXP Pro system and the same
problem occurs.
 
I have tried 7 workstations and they are all giving the same problem.
 
Whether the subdirectory is "Images" or "images", it makes no
difference, the problem is still there.
 
Once I rename that "images" or "Images" directory, all is fine.
 
Here's the code:
 
 
';
$x="0";
foreach ($paths as $link) {
 
$show = substr($link,strrpos($link, '/')+1);
echo "$show\n";
$x++;
}
echo '';
 
?>
 
 
 
 
 
On 5/18/07, Tijnema ! <[EMAIL PROTECTED]
 > wrote:
> 
> On 5/18/07, Haig (Home) <[EMAIL PROTECTED]
 >
wrote:
> > Hi everyone,
> >
> > I have a simple script that scans a directory and will output a 
list of
> sub
> > directories as a hyperlink.
> >
> > Script is working fine. Only problem I have is that if there is a
> > subdirectory called "Image", my script won't see it. If I rename 
that
> > subdirectory to anything else, it will see it.
> >
> > If I use a standard href line to link that "image" subdirectory, 
that's
> fine
> > but then it won't show up alphabetically when the other folders are
> linked.
> >
> > Any ideas?
> >
> > Haig
> 
> 
> We can't guess what you did wrong, show us relevant parts of your 
code.
> 
> Tijnema
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
I'm guessing that it's just a typo, but are "Image" (first mention) 
and
"image" (all lower-case, second mention) actually the exact same 
directory?
Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all
cAsE-sEnSiTiVe.
 
Also, in addition to Tijnema's request, please supply your basic 
server
configuration (WIMP, LAMP, et cetera).  For example:
 
Linux (Redhat 7.1)
Apache 1.3.37
MySQL 3.23
PHP 3.4.4
 
Just *please* don't tell me you have that configuration!  ;-P
 
-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

 



Re: [PHP] Can't link image directory?

2007-05-18 Thread Daniel Brown


At last, why are you using file:// in your link? You're using a
webserver to display the contents, but file:// links to files on the
local hard drive. Unless the server is running on the same machine
you're visiting the site with, it will fail to point to the right
file.



   I'm not positive, but I'm guessing that's why he mentioned the various
workstations sounds like he's creating a Desktop-style script, not a web
site script.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


Re: [PHP] Can't link image directory?

2007-05-18 Thread Tijnema !

On 5/18/07, Haig Dedeyan <[EMAIL PROTECTED]> wrote:


Sorry for the lack of information.

I also was wrong about the subdirectory name. It's "Images" and not "Image"

The workstation is running WinXP Pro while PHP 5 & Apache 2 are on Suse
10.1.
I also installed apache2 & php5 on a WinXP Pro system and the same problem
occurs.

I have tried 7 workstations and they are all giving the same problem.

Whether the subdirectory is "Images" or "images", it makes no difference,
the problem is still there.

Once I rename that "images" or "Images" directory, all is fine.


What are you trying to say here?
It doesn't work with Images and images, but when you change it from
images to Images it works? Clarify yourself please.



Here's the code:


';
$x="0";
foreach ($paths as $link) {

$show = substr($link,strrpos($link, '/')+1);
echo "$show\n";
$x++;
}
echo '';

?>



Just did a quick look at your code, and it's quite strange what you have.
First, you said you're script lists subdirectory's, but you're
checking for everything that isn't a dir. So it's normal that your
images subdirectory isn't listed.
Second, why does your path start with // ? one is enough :)
At last, why are you using file:// in your link? You're using a
webserver to display the contents, but file:// links to files on the
local hard drive. Unless the server is running on the same machine
you're visiting the site with, it will fail to point to the right
file.

Tijnema

ps. Please don't top post.





On 5/18/07, Tijnema ! <[EMAIL PROTECTED]> wrote:
>
> On 5/18/07, Haig (Home) <[EMAIL PROTECTED]> wrote:
> > Hi everyone,
> >
> > I have a simple script that scans a directory and will output a
list of
> sub
> > directories as a hyperlink.
> >
> > Script is working fine. Only problem I have is that if there is a
> > subdirectory called "Image", my script won't see it. If I rename
that
> > subdirectory to anything else, it will see it.
> >
> > If I use a standard href line to link that "image" subdirectory,
that's
> fine
> > but then it won't show up alphabetically when the other folders are
> linked.
> >
> > Any ideas?
> >
> > Haig
>
>
> We can't guess what you did wrong, show us relevant parts of your
code.
>
> Tijnema
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I'm guessing that it's just a typo, but are "Image" (first mention)
and
"image" (all lower-case, second mention) actually the exact same
directory?
Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all
cAsE-sEnSiTiVe.

Also, in addition to Tijnema's request, please supply your basic
server
configuration (WIMP, LAMP, et cetera).  For example:

Linux (Redhat 7.1)
Apache 1.3.37
MySQL 3.23
PHP 3.4.4

Just *please* don't tell me you have that configuration!  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can't link image directory?

2007-05-18 Thread Daniel Brown

On 5/18/07, Tijnema ! <[EMAIL PROTECTED]> wrote:


On 5/18/07, Haig (Home) <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I have a simple script that scans a directory and will output a list of
sub
> directories as a hyperlink.
>
> Script is working fine. Only problem I have is that if there is a
> subdirectory called "Image", my script won't see it. If I rename that
> subdirectory to anything else, it will see it.
>
> If I use a standard href line to link that "image" subdirectory, that's
fine
> but then it won't show up alphabetically when the other folders are
linked.
>
> Any ideas?
>
> Haig


We can't guess what you did wrong, show us relevant parts of your code.

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



   I'm guessing that it's just a typo, but are "Image" (first mention) and
"image" (all lower-case, second mention) actually the exact same directory?
Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all
cAsE-sEnSiTiVe.

   Also, in addition to Tijnema's request, please supply your basic server
configuration (WIMP, LAMP, et cetera).  For example:

   Linux (Redhat 7.1)
   Apache 1.3.37
   MySQL 3.23
   PHP 3.4.4

   Just *please* don't tell me you have that configuration!  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


Re: [PHP] Can't link image directory?

2007-05-18 Thread Tijnema !

On 5/18/07, Haig (Home) <[EMAIL PROTECTED]> wrote:

Hi everyone,

I have a simple script that scans a directory and will output a list of sub
directories as a hyperlink.

Script is working fine. Only problem I have is that if there is a
subdirectory called "Image", my script won't see it. If I rename that
subdirectory to anything else, it will see it.

If I use a standard href line to link that "image" subdirectory, that's fine
but then it won't show up alphabetically when the other folders are linked.

Any ideas?

Haig



We can't guess what you did wrong, show us relevant parts of your code.

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Can't link image directory?

2007-05-17 Thread Haig (Home)
Hi everyone,

I have a simple script that scans a directory and will output a list of sub
directories as a hyperlink.

Script is working fine. Only problem I have is that if there is a
subdirectory called "Image", my script won't see it. If I rename that
subdirectory to anything else, it will see it.

If I use a standard href line to link that "image" subdirectory, that's fine
but then it won't show up alphabetically when the other folders are linked.

Any ideas?

Haig

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php