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!
Posts: 8194
Are they in your base Gallery directory, not in setup/, right?
Read over the appropriate installation guide here --> http://gallery.sf.net/docs.php
Posts: 106
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.
Posts: 106
No ideas?
Posts: 8194
URL?
Posts: 3473
What else does it say on that page? It's helpful to give all the data.
Posts: 1
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
Posts: 3473
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.
Posts: 1
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!
Posts: 3473
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?
Posts: 1
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.
Posts: 12
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
Posts: 3473
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.
Posts: 5
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
Posts: 8194
Try posting your Version.php & config.php files here...
Posts: 3473
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?
Posts: 5
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?
Posts: 5
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?
Posts: 3473
Posts: 5
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!
Posts: 5
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.
Posts: 11
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:
Posts: 3473
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.
Posts: 3473
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.
Posts: 11
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
Posts: 3473
Gallery should work in both these environments.
Posts: 8194
But 4.0.6 is quite old and may be causing some problems. It's a likely possibility. I would upgrade..
Posts: 9
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
Posts: 5
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!
Posts: 6
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?
Posts: 13
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