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.
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.
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.
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?
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.
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).
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.
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.
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