coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: dshield on June 12, 2006, 04:27:34 PM

Title: Help. Getting "Index of /cpg148" instead of index.php
Post by: dshield on June 12, 2006, 04:27:34 PM
When I first installed  1.4.8 and pointed my browser to mydomain.com/cpg148 index.php would automatically execute and I'd get the login screen.  Then, after making further changes for the purpose of completing the install and configuration (nothing particularly having to do with this type of thing), I noticed that I no longer got the login screen but rather a page titled "Index of /cpg148" with a listing of all of the files in that folder.  I've noticed in previous projects using apache that I have had to specify "index.html" following mydomain.com/ in order to actually get that page to display.  Now, I'm experienceing the same result with index.php in the cpg148 folder.

index.php was coming up by default and now it must be explicitly specified.  What makes this happen and how can I fix it?


Thanks.

Dave.
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: Nibbler on June 12, 2006, 04:47:59 PM
Upload a file named .htaccess containing the following code

DirectoryIndex index.php
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: Joachim Müller on June 12, 2006, 04:49:03 PM
If you're on Apache: edit/create .htaccess in your webroot and enable the DirectoryIndex Directive (http://httpd.apache.org/docs/2.0/mod/mod_dir.html#directoryindex) and/or the Options Indexes (http://httpd.apache.org/docs/2.0/mod/core.html#options) directive. There are similar settings on IIS.
This is not related to your coppermine setup though, but to your webserver setup.

[edit]
Nibbler beat me to it while I still typed, with a more effective answer. Posting anyway.
[/edit]
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: dshield on June 12, 2006, 05:25:09 PM
OK guys...I've taken your advise and created a file called htaccess and placed in c:\apache\docs.  Since I'm running XP it doesn't let me name the file with the preceeding '.'  so it's just called htaccess.  I placed in htdocs as well as htdocs/cpg148 (with the code "DirectoryIndex  index.php") and I get no change in my problem.  I appreciate your help.  What should I do next?
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: Tranz on June 12, 2006, 05:28:35 PM
Are you self-hosting? If you are, you need to change the server settings. The .htaccess suggestion applies to people who are on shared webhost servers and don't have access to change server settings.

If your site will be available to the public, self-hosting is highly not recommended.
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: Nibbler on June 12, 2006, 05:30:51 PM
It won't work without the dot. Try searching the web for a workaround for windows users.
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: dshield on June 12, 2006, 05:37:50 PM
Yes, self-hosting.  But, I fixed it.  The cpg148 folder was read-only.  I changed that and I works.

Thanks.
Title: Re: Help. Getting "Index of /cpg148" instead of index.php
Post by: Joachim Müller on June 12, 2006, 10:42:51 PM
On Windows+Apache, try
Quote_.htaccess