.htaccess not updating

Paultrik

Joined: 2005-02-12
Posts: 3
Posted: Mon, 2005-02-14 15:56

I have installed Gallery, set permissions to 777 for both .htaccess and config.php. I run the setup utility but nothing ever gets added to my .htaccess file. I have copied the contents of the .htaccess file below.

# BEGIN Gallery section 
# (Automatically generated. Do not edit this section) 
# Note: still under development, so format may change. 
# If you edit this file, make a backup before runnng the Config. Wizard. 

# END Gallery section. Add User changes below this line

Here are the error messages I am getting in the setup utility:

Quote:
Either mod_rewrite is not installed or your .htaccess file is not enabled (see above). Either way, we'll have to use longer URLs in the Gallery. If you want to turn it on, first make sure that your .htaccess file is being obeyed. If it still doesn't work, you may need to reconfigure and rebuild Apache with this flag:

Quote:
Apache is not obeying the 'php_value' lines in your .htaccess file. Try entering the following into your web server's httpd.conf file

Should my .htaccess have more configuration information in it? I have seen more information contained in other .htaccess files from other sites. My .htaccess file has never had anything in it except what is listed above.

Please help!

----
The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version: 1.4.4-pl6
Apache version: Linux 1.3.2.9
PHP version (don't just say PHP 4, please): 4.3.10
Graphics Toolkit:
Operating system: OSX
Web browser/version (if applicable): Safari 1.2.4[/code]

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2005-02-14 20:18

Well, as long as your Apache install doesn't obey .htaccess, there is no point in putting anything in it, is there? :)

 
Paultrik

Joined: 2005-02-12
Posts: 3
Posted: Tue, 2005-02-15 04:08

Actually, h0bbel, my Apache installation does obey .htaccess files. I have them installed into different areas of the site. That is precisely why I posted this message. I know for a fact that my .htaccess files are being obeyed.

Am I to assume that the Gallery code can actually determine if a .htaccess file will be obeyed or not obeyed and make a decision whether or not to update the .htaccess file based on that determination? I assume it cannot truely discern between an obeyed and not obeyed .htaccess but it is making an assumption on the setup page when it states "Apache is not obeying the 'php_value' lines in your .htaccess file. Try entering the following into your web server's httpd.conf file". In fact, if it "knew" the .htaccess file was not going to be obeyed, it would not have updated the file to show the information in my first post.

It (Gallery) cannot even tell that I do not even have the PHP values in the file to begin with! Setup is supposed to add those but it cannot. Or did not for some reason. That is why I have posted to this forum. I cannot determine what the problem is.

Any ideas, anyone?

 
rpvb3

Joined: 2005-04-09
Posts: 1
Posted: Sat, 2005-04-09 13:56

I'm curious if anyone has ever solved this problem as mine is identical.

The error messages given by Gallery v 1.5 RC3 are not true:

I have Apache mod_rewrite installed and WordPress uses it all the time.
I have .htaccess enabled, again, WordPress's permalink rewrite service uses it with every url.

And, of course my Gallery can't 'obey the php_value in the .htaccess file' because there ARE NO php_values in the file as written - mine has just the commented lines as this gentleman's does with no code to evaluate at all.

Oh and I am NOT running it in cgi mode. I've installed several times with the same result - gave total hacker heaven access to Apache seeing if it would make a difference and it doesn't.

Anyone ever figured out why Gallery is NOT writing a usable .htaccess file? How does it test for the presence of mod-rewrite? (Obviously there must be a better way :)

Info another message about this asked for.

Gallery 1.5RC3
Apache/1.3.33 (Darwin)
PHP/5.0.3
Graphic Toolkit: ImageMagick
OS: Mac OS X 10.3.8
Browser: Safari 1.2.4

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sat, 2005-04-09 21:54

Check in the gallery/setup/.htaccess, it runs a test from there. Maybe something is screwey. It used to be that the tests were inside an "if php4" which would of course fail on php5... but I think this was changed sometime before 1.4.4-pl6.

Maybe try uncommenting the #php value lines and seeing if they work?

 
kweeve

Joined: 2005-06-30
Posts: 1
Posted: Thu, 2005-06-30 03:04

I had the same problem (v. 1.5).

After reading the above post, I checked and found that I did not have a .htaccess file in my setup directory. I grabbed a setup directory .htaccess file from another working Gallery installation and uploaded it into the problem install setup directory. After chmoding it 644 and re-running the configuration wizard, everything worked - no more errors or long URLs.

The contents of the setup .htaccess file is as follows:

<IfModule sapi_apache2.c>
php_value auto_prepend_file ./php_value_ok.php
php_value magic_quotes_gpc off
</IfModule>

<IfModule mod_php4.c>
php_value auto_prepend_file ./php_value_ok.php
php_value magic_quotes_gpc off
</IfModule>

Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(index.php)$ index.php?init_mod_rewrite=1&ampersandbroken= [QSA]
</IfModule>