Member
Member
txzen   2008-02-01, 03:56
#1

Hi,
Whenever I go to http://localhost/zenphoto/index.php and navigate into my album and pictures, there is a breadcrumb links that are created at the top of the page.

Gallery-Album Name-Picture Name

When I click on Gallery, it displays the structure/director showing the folders and files.

What file and what do I need to modify to prevent the viewer clicking on Gallery and seeing my directory structure? Zp-config.php or .htaccess file? Thanks in advance.

Member
Member
sbillard   2008-02-01, 05:14
#2

You probably have copied your theme index.php file into the zenphoto folder. There should be no breadcrumbs on the gallery index. I suggest you remove all the zenphoto files and reload from the original. Run setup and start again.

If this does not work, post the real link to your album so we can investigate.

Member
Member
txzen   2008-02-01, 06:05
#3

The index.php file is located in c:...\htdocs\zenphoto. This is where the setup program put it. Should I move the index.php file one level up and put it in c:...\htdocs? I am afraid that running the setup again will result in the same issue.

Member
Member
sbillard   2008-02-01, 17:13
#4

There should be an index.php file in htdocs\zenphoto. But from your report it seems it might not be the correct one. Again, without the ability to view your site the only advice I can give you is to remove and reinstall the zenphoto files to be sure that the correct ones are in the right place.

Member
Member
txzen   2008-02-02, 07:25
#5

Whenever the user goes to http://localhost/zenphoto/

They see:

Index of /zenphoto
Parent Directory
License.txt
README.html
albums/
cache/
example_robots.txt
index.php
lighttpd-rewrite.txt
rss-comments.php
rss.php
themes/
zp-core/

How do I prevent the user from seeing this?

Administrator
Administrator
acrylian   2008-02-02, 11:52
#6

Please do a complete reinstall of zenphoto, there is apparently something missing.

Member
Member
txzen   2008-02-02, 18:19
#7

I did re-install. Even on another computer. I am still getting the same issue.

Member
Member
txzen   2008-02-02, 19:40
#8

Okay,
Try this, go to this link from the ZenPhoto Demo.

http://www.zenphoto.org/zenphoto/impressionists/Monet+-+sunrise.jpg.php

This is what I am trying to have happen

Click on the top left on Demo Gallery (Look on the status bar below and see that it is going to http://www.zenphoto.org/zenphoto/)

This should take you back to the Albums Index

What happens for me is it shows the directory structure instead of displaying the Albums Index.

Member
Member
sbillard   2008-02-02, 19:40
#9

Does your server have PHP scripting enabled? If so, it should load the index.php file and not produce a folder listing.

Can you provide the URL to your gallery? That way we can take a look.

Member
Member
txzen   2008-02-02, 20:27
#10

Yes, I can not give you the URL, because this all running locally on my machine. Do I need to change somethng in the htaccess file by default? It looks like when I am viewing a picture, that it does not know to load index.php when I click on Gallery (Albums Index).

Member
Member
sbillard   2008-02-02, 20:32
#11

You should not have to make any changes--setup should have done anything needed. So, if it has not reported a problem.

Loading index.php is a function of your server. Maybe you do not have the right options set.

Administrator
Administrator
acrylian   2008-02-02, 20:34
#12

txzen: How is your server setup? Do you use anything like WAMP? I never had these problems running MAMP on a Mac.

Member
Member
txzen   2008-02-02, 20:57
#13

No I do not user WAMP. I guess what I need to know is when I click on the Albums Index, it points to http://localhost/zenphoto/. Behind the scene it should load index.php. But when I click on it, it just shows a directory structure. Where in the file can I modify this to point to index.php? This same issue occurs when I just try to go to http://localhost/zenphoto without specifying a filename. Thanks guys for helping me out.

Administrator
Administrator
acrylian   2008-02-02, 21:02
#14

Just to ask without being a server expert, are you sure that you localhost is really setup right?

Member
Member
sbillard   2008-02-02, 21:04
#15

You cannot modify anything in zenphoto to fix this. THIS IS A SERVER PROBLEM. You have to fix your server configuration.

Member
Member
txzen   2008-02-02, 21:58
#16

Okay, I figured it out. Thanks for your help guys. This is how I resolved this issue.

Create a file called index.html (This is the file that Apache looks for (This is set up in http.conf))
Wrote a javascript redirect code to point to the index.php file

Works like a charm. Thanks again guys.

Developer
Developer
trisweb   2008-02-04, 02:52
#17

Okay okay okay, sorry I didn't see this sooner. You guys were on a wild goose chase...

Clearly the problem is that index.php isn't set as a default file for directories under Apache (or whichever server you're using).

If it's Apache, you need to edit your apache.conf or httpd.conf (main Apache config file) and find the DirectoryIndex line. It should read:

DirectoryIndex index.html index.htm default.html or something similar.

Change it to:

DirectoryIndex index.html index.htm default.html index.php and whichever other directory default files you want, but definitely add the index.php to that line That should do it.

Read more here...
http://httpd.apache.org/docs/2.0/mod/mod_dir.html

Administrator
Administrator
acrylian   2008-02-04, 13:20
#18

Not all ISPs allow that. I add this as a FAQ to our user guide.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.