You are missing either config.php or .htaccess

Charlie

Joined: 2003-05-09
Posts: 106
Posted: Mon, 2003-09-01 14:32

I have installed Gallery before with success. I downloaded the latest version today and when I try ti set it up, I get:

You are missing either config.php or .htaccess

Those files are in there and I set the permissions properly (even tried 777), and I can't figure it out. They were uploaded in ASCII. I even tried downloading those files from an older working version of Gallery and uploading to the temporary directory.

I even went so far as to try the whole thing a second time to see if it was the same and it was.

Any ideas? I know these files are there, uploaded in ASCII, and the permissions set on the files.

Thanks!

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-09-01 14:56

Are they in your base Gallery directory, not in setup/, right?

Read over the appropriate installation guide here --> http://gallery.sf.net/docs.php

 
Charlie

Joined: 2003-05-09
Posts: 106
Posted: Tue, 2003-09-02 10:01

Thanks Andrew. I did read the installation guide before starting and the files are in the right spot. I am wondering if I have found a bug or if the problem is just with my site or something.

 
Charlie

Joined: 2003-05-09
Posts: 106
Posted: Thu, 2003-09-04 11:35

No ideas?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Thu, 2003-09-04 11:39

URL?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-09-04 12:15

What else does it say on that page? It's helpful to give all the data.

 
sambo

Joined: 2003-09-06
Posts: 1
Posted: Sat, 2003-09-06 10:35

I've got exactly the same problem at http://209.15.131.40/societies/group10/canoe/gallery/config.php
As the link shows, the file is there and i've tried all kinds of CHMOD (777, 666, 755...)

I still get
"
Unable to write to /config.php.
You are missing either config.php or .htaccess.
"

I've read all the documentation.
I've uploaded (ascii) two empty files called .htaccess and config.php to the gallery root filder and given them both 666 CHMOD access

Is this right, cos I'm still getting the error message above?

Sambo

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sat, 2003-09-06 12:38

sambo,

You've got config.php, but where's gallery? http://liverpoolguild.org.uk/societies/group10/canoe/gallery returns a not found and http://liverpoolguild.org.uk/societies/group10/canoe/gallery/albums.php returns a strange, missing headers error.

 
rozic2

Joined: 2003-02-09
Posts: 1
Posted: Sat, 2003-09-06 15:41

I have the exact same problem with the:

"
Unable to write to /config.php.
You are missing either config.php or .htaccess.
"
Error message the the two above are talking about. Is there any idea why it's saying it is unable to write to config.php (when it does exist and it is in the gallery directory)? Any help would be appreciated. Thanks!

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sat, 2003-09-06 15:51

Seeing you've read the other two, you might have supplied the URL for investigation.

Without it, I can just say: have you set the permissions correctly?

 
nsxfreddy

Joined: 2003-09-07
Posts: 1
Posted: Sun, 2003-09-07 20:23

I'm also getting this error. The .htaccess file and config.php are both present with ample permissions for the apache process to write to, but it is not able to.

URL:

http://staff.csl.uiuc.edu/~jrmartn1/gallery/

Thanks for any help.

 
fireman
fireman's picture

Joined: 2003-08-26
Posts: 12
Posted: Mon, 2003-09-08 00:56

I had something similar happen to me while setting up 1.4 RC3. When I started the config wizard, I got a warning saying that Apache could not access .htaccess even though it was there and chmod properly.

Jean-Pierre

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Mon, 2003-09-08 07:15

nsxfreddy, all fixed? Congratulations on the wedding!

fireman, that's a completely different problem. Under some circumstances, that check fails, but it doesn't stop you completing the installation.

 
pwohlers

Joined: 2003-09-09
Posts: 5
Posted: Tue, 2003-09-09 22:18

Hey-

I've just tried installing 1.4rc3 on solaris/apache 1.27 and see the same error:

Unable to write to /config.php.

You are missing either config.php or .htaccess.

perms on the files are as such:

uranus:/home/pedro/public_html/gallery> ll | egrep "config.ph|htaccess"
-rwxrwxrwx 1 pedro whack 0 Sep 8 22:11 .htaccess
-rwxrwxrwx 1 pedro whack 0 Sep 8 22:11 config.php
uranus:/home/pedro/public_html/gallery>

However, I ignored these errors and ran the secure.sh script to lock it down and find the following output:

Gallery needs Reconfiguration

Your Gallery configuration was created using the config wizard from an older version of Gallery. It is out of date. Please re-run the configuration wizard!In a shell do this:

Unix with shell access
% cd /path/to/your/gallery
% sh ./configure.sh
[...snip...snip]

So, it sounds as if Gallery 1.4RC3 isn't compatible with the install config utility that ships with it.

Thoughts?

--Peter

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2003-09-09 23:32

Try posting your Version.php & config.php files here...

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Wed, 2003-09-10 00:27

pwohlers,

What happens is gallery tries to write to config.php. If it fails, you get that message. It's not rocket science. Can you talk to your administrator, and see if she knows why apache can't write to that file?

 
pwohlers

Joined: 2003-09-09
Posts: 5
Posted: Wed, 2003-09-10 01:11
pwohlers wrote:

[...]
uranus:/home/pedro/public_html/gallery> ll | egrep "config.ph|htaccess"
-rwxrwxrwx 1 pedro whack 0 Sep 8 22:11 .htaccess
-rwxrwxrwx 1 pedro whack 0 Sep 8 22:11 config.php
uranus:/home/pedro/public_html/gallery>
[...]

well, as above, the config.php doesn't get written so, it's still the zero-length file that I touched. I can post what the configure script generates, if that would help. The configuration doesn't give any errors, but only a yellow warning for a single locale (last item).

version.php ?
dunno where that is :(

php version is 4.3.1 though:
uranus:/home/pedro> cat /usr/local/include/php/php_version.h
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 4
#define PHP_MINOR_VERSION 3
#define PHP_RELEASE_VERSION 1
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "4.3.1"

Does this help?

 
pwohlers

Joined: 2003-09-09
Posts: 5
Posted: Wed, 2003-09-10 03:33
joan wrote:
pwohlers,

What happens is gallery tries to write to config.php. If it fails, you get that message. It's not rocket science. Can you talk to your administrator, and see if she knows why apache can't write to that file?

Well, I blew away 1.4RC3 and installed 1.3.4 and everything seems hunky dory.

So, the rocket science you're talking about seems to have to do with the new install script's incompatability with the new version, not apache's inability to write to gallery/config.php.

Maybe it's trying to write to some location other than gallery/config.php. I imagine that would also give the same type of error message, now wouldn't it?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Wed, 2003-09-10 10:12
pwohlers wrote:
joan wrote:
pwohlers,
Maybe it's trying to write to some location other than gallery/config.php. I imagine that would also give the same type of error message, now wouldn't it?

Yes, but then it wouldn't work at all, because the error you reported was where it does the actual write, and if that was to the wrong place, no one's gallery would work.

I'm guessing this is some peculiar interaction between gallery and solaris. If you have the time, ability and inclination to do so, could you set up a test gallery and give me ftp or ssh access to it? Then we could try to sort it out finally.

There are a lot of nice features coming in 1.4.x, so it would be a pity to miss out on them.

 
htodd

Joined: 2003-10-01
Posts: 5
Posted: Wed, 2003-10-01 00:49

I'm guessing this is a problem lots of people are having. I'm trying to install with NetBSD-current, PHP 4.3.3, and I put config.php and .htaccess all throughout the directory chain, chmod'ed them to 777 and still the same error.

The only workaround seems to be using 1.3.4?

Thanks!

 
htodd

Joined: 2003-10-01
Posts: 5
Posted: Wed, 2003-10-01 01:04

AHA! I see an error in my error_log that has no timestamp and is repeated many times:

pwd: Permission denied

I think there's a bug.

 
DonCorso

Joined: 2003-05-09
Posts: 11
Posted: Mon, 2003-10-06 21:30

I got the same error. I'm using an older gallery-version since a few months and i'm now trying to set up the newer one downloaded as: gallery-1.4-pl1.tar.gz - and after setting up everything the way i ever did, he warns me that there is no config.php and .htaccess, then i touch them, then he warns me, that it is not writable 777, then i chmod them, then gallery-configuration-tool tells me, everythings alright, then i want gallery to save everything and it returns an error called: config.php is not writable - config.php or .htaccess is missing ... -

I think, that's the same error described a few threads earlier, so: WHATS THE SOLUTION ??

thanx doncorso
:cry:

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-10-07 10:41
htodd wrote:
AHA! I see an error in my error_log that has no timestamp and is repeated many times:

pwd: Permission denied

I think there's a bug.

Gallery doesn't actual use pwd. It is called during config, but that's just testing to see how the system is behaving.

This error message does not indicate a bug.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-10-07 10:43

There is a problem with netBSD/FreeBSD systems.

If someone is prepared to give me ftp/ssh access, I'll see if I can debug it.

PM me.

 
mikelin_tw

Joined: 2003-10-10
Posts: 11
Posted: Fri, 2003-10-10 05:35

Hi Andrew,

I install Gallery v 1.4pll released 09/13/03 on 2 different servers. One works perfectly, but the other one says "You are missing either config.php or .htaccess".

The one that works is UNIX with OS Redhat 7.2 and PHP 4.3.0 installed.

The one that fails is UNIX with OS Redhat 5.2 and PHP 4.0.6 installed.

I certainly have followed the manual and install the Gallery using the same package of files. But one works, one doesn't.

Does the OS and versions of PHP matter in this issue?

--Mike

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-10-10 09:08

Gallery should work in both these environments.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-10-10 13:02

But 4.0.6 is quite old and may be causing some problems. It's a likely possibility. I would upgrade..

 
dilligaf
dilligaf's picture

Joined: 2003-02-20
Posts: 9
Posted: Mon, 2003-10-13 07:32
joyoflinux wrote:
But 4.0.6 is quite old and may be causing some problems. It's a likely possibility. I would upgrade..

I am running PHP 4.0.6 on apache 1.3.26 and had the same error

"You are missing either config.php or .htaccess"

Searching through the files I've found a solution that works for my setup.
Open up write.inc under the Setup directory and look for these two lines (they are within the first 30 lines)

$outfile = "$GALLERY_DIR/config.php";

and

$outfile = "$GALLERY_DIR/.htaccess";

Now all I did was change them to this

$outfile = "../config.php";

and

$outfile = "../.htaccess";

After that everything works fine for me. It looks like the $GALLERY_DIR string isn't being created in 4.0.6 for some reason so I manually set the directory location.

I should state that this was for the installation of Gallery v1.4-pl2

I hope this helps a few of people

 
htodd

Joined: 2003-10-01
Posts: 5
Posted: Tue, 2003-10-14 06:37

Perfect. What was weird is that I could get gallery working on one acct but not another, so I used the /$GALLERY_DIR/../ and it worked!

Thanks!

 
roxics

Joined: 2003-10-15
Posts: 6
Posted: Wed, 2003-10-15 08:45

I'm having the exact same problem. It's driving me nuts. I've tried 1.4 and now 1.3.4 and it says the same thing. both .htaccess and config.php both exist and are 777. What am I doing wrong?

 
paddy
paddy's picture

Joined: 2003-10-17
Posts: 13
Posted: Fri, 2003-10-17 02:40

I'm having a similar problem.. when i chmod the .htaccess i can no longer access any pages in the gallery. i deleted the .htaccess in the /setup but no change... am i still missing something.. I know its slightly different to whats being said here but i was gett ing the same error message
cheers
PAddy