.htaccess??

nmdasa
nmdasa's picture

Joined: 2003-07-11
Posts: 2
Posted: Fri, 2003-07-11 22:45

Ok, here's my problem. I'm not sure if my server is running in safe mode although I am getting that warning.
Secondly, when I try to create the .htaccess file, my FTP seems to create it. However after 'creating' it, it doesn't exist!? It doesn't even show up in the directory I created it into. What can I do about this?

My URL for the gallery is http://www.careforcows.org/gallery

My server is running Linux.

Gallery version is the newest one, I just downloaded it.

Here's server info that I really am quite clueless about:

Apache/1.3.27 (Unix) (Red-Hat/Linux)
mod_fastcgi/2.2.10 mod_jk/1.2.0
mod_perl/1.24_01 PHP/4.2.2
FrontPage/5.0.2 mod_ssl/2.8.12
OpenSSL/0.9.6b
OS is Windows XP Prof.
Web browser is MIE 6.0

Any useful info would be great. Feel free to correct my understanding or use of any terms. Thanks so much!!!

- Neil :o

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2003-07-12 01:10

1) If safe mode is enabled, Gallery won't run. Sorry :(

2) FAQ C.19

 
johnnynieh

Joined: 2003-07-14
Posts: 4
Posted: Mon, 2003-07-14 17:27

how can I make this warning go away?
Warning!
Apache is not obeying your .htaccess file. Try entering the following into your web server's httpd.conf file:

<Directory /usr/local/apache2/htdocs/gallery>
AllowOverride Options FileInfo
</Directory>

I've already add the <Directory> in the httpd.conf, but when I go back to configure gallery, this still shows up.
make it easy and simple, what the .htaccess needs to look like in order to make this warning go away? thanks

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-07-14 18:23

Did you restart apache after editing httpd.conf? You need to do so for it to catch the changes made.

 
johnnynieh

Joined: 2003-07-14
Posts: 4
Posted: Mon, 2003-07-14 18:31

Yes I did restart apache, many times.

I've tried everything I can think of, but maybe I don't know enough.

Can anyone give me a working .htaccess example? including the attributes for the file in linux?

Thank you very much.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-07-14 18:37

<Directory /usr/local/apache2/htdocs/gallery>
AllowOverride Options FileInfo
</Directory>

should be fine, as long as that's the full path to your gallery directory.

 
johnnynieh

Joined: 2003-07-14
Posts: 4
Posted: Mon, 2003-07-14 18:57

well..
that's supposed to be in httpd.conf instead of the .htaccess, correct?

I did modify the httpd.conf and put that in, but the warning just stays there won't go away.

very frustrating.

 
johnnynieh

Joined: 2003-07-14
Posts: 4
Posted: Tue, 2003-07-15 00:09

Who can help me with this .htaccess issue?
Please???

 
romka69

Joined: 2003-07-15
Posts: 3
Posted: Wed, 2003-07-16 00:00

I'm having the same problem..please post the solution when you find it.

 
thowden

Joined: 2003-07-17
Posts: 22
Posted: Thu, 2003-07-17 02:07

Hi

Quote:
Secondly, when I try to create the .htaccess file, my FTP seems to create it. However after 'creating' it, it doesn't exist!? It doesn't even show up in the directory I created it into. What can I do about this?

You are probably missing the point of the '.' at the start of '.htaccess'

Any file that starts with a '.' is a hidden file, try using ls -a instead of just ls for your directory listing. .htaccess will be there.

Quote:
I did modify the httpd.conf and put that in, but the warning just stays there won't go away.

I am guessing that you either have the <Directory ....etc section incorrectly placed within the httpd.conf file or that you have the incorrect directory being entered in the gallery config file.

Check the placement in the httpd.conf file and restart apache if it needs to be moved.

Check that you do actually have the correct directory in the gallery config.

and... check that the user account that the web server runs under has rights to the gallery directory.

Finally, the website http://www.careforcows.org/gallery is currently showing the config page for gallery and needs to have the sh secure.sh command (or similar) to close it.

Hope this helps.

 
fat

Joined: 2003-07-18
Posts: 1
Posted: Fri, 2003-07-18 05:33

I have the same problem about .htaccess

The version of gallery is 1.3.4
The version of apache is 2.0.40
The version of php is 4.2.2

In thte httpd.conf, I follow the warning and add this

<Directory /var/www/html/mainpage/test/gallery>
  AllowOverride FileInfo Options
</Directory>

"/var/www/html/mainpage/test/gallery" is the installation path

after add the code , I also restart the apache

but the warning still show up

but when I use mod_auth in apache

<Directory /var/www/html/mainpage/test/gallery>
  AllowOverride All
</Directory>

and write the apache basic auth in /var/www/html/mainpage/test/gallery/.htaccess
IT IS WORK!!

can somobody help me ?
the upload file size is about 500kB...
It is too small to use :(

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2003-07-18 11:24

First of all, you should upgrade your php version, since there are know issues with PHP4.2.2 and Apache2.

Get that sortet, and you should be on your way.

 
romka69

Joined: 2003-07-15
Posts: 3
Posted: Fri, 2003-07-18 22:24

I have tried many of the things posted here...an none worked.
For some reason my .htaccess is empty now ?? (any way to get a copy)

When I upload pictures it does everything the way it should, but I can't see it..I can see the frame but it's empty..
any clues ?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2003-07-18 22:31

romka69, more details please. An url would be very helpful.

And, if your .htaccess is empty, re-run the config wizard and it should fix that for you.

 
gattaca

Joined: 2003-07-21
Posts: 1
Posted: Mon, 2003-07-21 07:11

Quote from this page:

http://httpd.apache.org/docs/howto/htaccess.html

"Make sure that you don't have a AllowOverride None in effect for the file scope in question."

When I had that line in my httpd.conf file I was experiencing the same problems. Changing it to AllowOverride Options FileInfo did the trick for me. Good luck.

 
romka69

Joined: 2003-07-15
Posts: 3
Posted: Mon, 2003-07-21 23:13

I not only changed the configuration on httpd.conf in the <Directory /../gallery> but I continued and changed other lines with the same settings...

----
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride FileInfo Options
</Directory>

#
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
#
<Directory />
Options FollowSymLinks
AllowOverride FileInfo Options
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html/gallery">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride FileInfo Options

 
pireality

Joined: 2003-05-15
Posts: 13
Posted: Tue, 2003-07-22 16:11

Ok, I finally got everything working except for .htaccess . My mod_rewrite is working after changing httpd.conf to:

<Directory />
Options FollowSymLinks
AllowOverride Options FileInfo
# AllowOverride None
</Directory>

<Directory /var/www/html/gallery>
AllowOverride Options FileInfo
</Directory>

I am running Server version: Apache/2.0.40
Gallery Powered by Gallery v1.3.4-RC1

The wierd thing is apache IS obeying my .htaccess file, as it is working with mod_rewrite. See contents of .htaccess:
[root@hp gallery]# more .htaccess

Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteRule ^([^\.\?/]+)/$ /$1 [R]
RewriteRule ^([^\.\?/]+)$ /view_album.php?set_albumName=$1 [QSA]
</IfModule>

However, I still cannot seem to upload files via add photos/ 2. Use the Browse button to find the photos on your computer . Only small files will upload this way, 493k works, 513k does not!

Lastly, when configuring gallery, I get the Warning that apache is not obeying my .htaccess file and that I should add the follwoing to my httpd.conf:

<Directory /var/www/html/gallery>
AllowOverride Options FileInfo
</Directory>

Which, as you can see above is already added.

Can anyone help?

 
cciborowski

Joined: 2003-07-28
Posts: 3
Posted: Mon, 2003-07-28 00:57

I am having the same problem. I had gallery running just fine prior to a 1.3.4 upgrade, as well as an apache and php upgrade. No errors in apache logs.

Very frustrating indeed. I have all of the FAQs covered and apache config is per the instructions.

-cwc

 
mgeneral
mgeneral's picture

Joined: 2003-07-28
Posts: 4
Posted: Mon, 2003-07-28 23:02

My original installations (I actually blew everything...the whole server, three times) used the base components of RedHat 8.0 and version 1.3.4 of gallery. I could get EVERYTHING to work accept the config wizard always told me that it wasn't accessing my .htaccess file. However, things generally seemed to work, and .htaccess had stuff in it. In frustration of the error message(i'm never satisfied until everything looks perfect), I installed 1.3.5beta to a different directory, and performed all the same configurations for that directory. Low and behold, 1.3.5 worked. I've since blew away my server again, and re-installed everything using 1.3.5, which is working perfectly. Is there possibly some sort of problem with the 1.3.4 code running on base RedHat 8? Anyhow, at this point, 1.3.5 is working well for me.

-Matt

 
cciborowski

Joined: 2003-07-28
Posts: 3
Posted: Tue, 2003-07-29 06:29

Well, finally got around to seeing what the deal with this may be. I got it to work, here's how:

1. re-download gallery 1.3.4
2. diff of .htaccess from 1.3.4 and 1.3.2 in setup directory, noticed that there was an ifmodule statement for a non-dso php module in 1.3.2
3. removed the ifmodule statement from .htaccess, copied to gallery base directory
4. ran configure.sh, check page now reads .htaccess correctly
5. re-configured gallery
6. .htaccess now has php_value.template limits for uploads

It looks like when write.inc gets called, it clears out .htaccess, and if the original .htaccess set "GALLERY_PHP_VALUE_OK" (i.e. "I can read your .htaccess file") on, it copies the entries from php_value.template to .htaccess.

I just can't remember if once the setup was complete and you re-ran configure.sh and looked at the check page if the .htaccess file could be read. Since write.inc clears out .htaccess, any subsequent running of setup/index.php again gives the messages about Apache disobeying the .htaccess file. There could be some more things here that need researching. Maybe a download of 1.3.5 and some diffs are in order.

 
cciborowski

Joined: 2003-07-28
Posts: 3
Posted: Tue, 2003-07-29 06:42

Wish I had checked the bugs first:

http://sourceforge.net/tracker/index.php?func=detail&aid=712380&group_id=7130&atid=107130

Would have found this out right away. When in doubt check the bug reports.

 
ffletch2

Joined: 2002-08-16
Posts: 60
Posted: Tue, 2003-07-29 17:16

So does anyone know if this is "officially" fixed in 1.3.5? If so, is there an easy tweak we can make to 1.3.4 (or possibly below) to make this work?

 
pireality

Joined: 2003-05-15
Posts: 13
Posted: Wed, 2003-08-13 15:15

I second "ffletch2" in that I need my users to be able to upload files >500 k from the web interface.

Thanks,

pireality

 
blub

Joined: 2003-01-31
Posts: 4
Posted: Sat, 2003-08-16 11:01

Hi, same problem here, it occured only with Apache2.

no idea to solve this problem.
I postet the problem on an other board, but no solution there either

http://forums.gentoo.org/viewtopic.php?t=74913&start=0&postdays=0&postorder=asc&highlight=

 
djsting

Joined: 2003-08-18
Posts: 18
Posted: Mon, 2003-08-18 19:49

I am having the same problem and I tried the "fix" that was described in the link that cciborowski posted and that did not help at all. I did restart Apache after making the changes.

PLEASE!! I need some more help on this...

I'm running a standard install of RH9.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-08-18 20:32
 
djsting

Joined: 2003-08-18
Posts: 18
Posted: Mon, 2003-08-18 20:38

Been there h0bbel and am currently working on it (see this post http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=5741&highlight=).

However, will this resolve the problem I'm having? If so then I'll keep working on the PHP upgrade. If not, or if it is questionable please provide any additional info that may help.

THANX!!

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-08-18 21:15

The standard PHP version included in RedHat 9.0 does not work properly on Apache2. How RedHat managed to do that, i don't know.

You will need to upgrade. :)

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-08-18 21:29