General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 17th, 2003, 11:29 AM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
Auto Listing of Folders and Files on Server

I want to be able to create a automatic list of all the folders and files in a certain directory on an apache server. I know how to do this with ASP and IIS, but don't have the foggiest for apache.

In terms of configuring apache, I have enabled AddModule mod_autoindex.c and have

<Directory data>
Options +Indexes FollowSymLinks
</Directory>

Are there any further configurations that are required? Do I have to write an index.php to retrieve the folder and file info? If so, can anyone direct me to a source/tutorial. I'm totally new to php and didn't see any articles on this point on the site. Thanks a lot

Reply With Quote
  #2  
Old June 17th, 2003, 12:04 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Re: Auto Listing of Folders and Files on Server

Quote:
<Directory data>
Options +Indexes FollowSymLinks
</Directory>

Try this My friend... let me know how it goes.

<Directory /data/>
Options +Indexes FollowSymLinks
</Directory>
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #3  
Old June 17th, 2003, 12:34 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
Hi Wil,

Right now it seems to be pulling up an index.html page, so maybe there is something else I have to disable?

Should the listing automatically appear or do I have to write a script in php to get that info to appear?

Reply With Quote
  #4  
Old June 17th, 2003, 01:47 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Quote:
Right now it seems to be pulling up an index.html page, so maybe there is something else I have to disable?


Well, the problem is that you have an index.html page which overrides the directory index.

What you can do is add this to your <directory> directive:

DirectoryIndex

now it won't show index.html by default.

Reply With Quote
  #5  
Old June 18th, 2003, 06:22 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
I tried that and it still seems to be looking for an index.html file. Very annoying. I have know idea what the prob is because from what I've read and from what you've told me this should work. I've searched the conf file and there isn't even a reference to the html file (having removed it from the <directory> line of code), so I can't figure out where the instructions are coming from to find that file! Ugh.

Reply With Quote
  #6  
Old June 18th, 2003, 09:02 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
I put this in an .htaccess file and it worked. I don't know how syntactically correct it is, but I don't see why it would not work.

PHP Code:
 Options Indexes Multiviews
DirectoryIndex 0 

Reply With Quote
  #7  
Old June 18th, 2003, 09:08 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
thanks I will try that - before I was just modifying the conf file.

Reply With Quote
  #8  
Old June 18th, 2003, 11:13 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Well, honestly it should be working from the conf file, but there may be something hindering you from getting it to work.

For now I'd like to see if you can get it working in .htaccess, then we can go forward from there.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Auto Listing of Folders and Files on Server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway