Rewrite Module Turns Off Spontaenously

stephen

Joined: 2002-11-20
Posts: 17
Posted: Tue, 2008-01-15 19:49

Is there any reason why the setting for the WPG2 rewrite module would turn itself off without my input? When it's turned on everything works fine, but I'll come back sometime later it's turned off. Would it turn itself off if some error is encountered in the mean time? If so, how would I track that down?

Thanks!

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Tue, 2008-01-15 19:58

Hi stephen,

which versions are you using?
Seems that I have similar symptoms. Perhaps we talk about the same problem. Does the post http://gallery.menalto.com/node/73428 describes your problem or are there differences?

Ciao,
Jens

__________________
http://jekophoto.de

 
stephen

Joined: 2002-11-20
Posts: 17
Posted: Tue, 2008-01-15 21:13

Yes, sometimes the permalinks/rewrite plugin in gallery will turn off spontaneously, like what you have happening. Perhaps we have the same root cause, then. Does your problem happen right away? Or does it happen when you're not looking (i.e. you have no idea when), like me?

Wordpress 2.3.2
WPG 3.0.2
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.1 cgi
Webserver = Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a mod_fastcgi/2.4.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysql 4.1.22-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, ImageMagick, Gd, Ffmpeg, NetPBM, LinkItemToolkit, Thumbnail
Acceleration = none/43200, none/3600
Operating system = Linux iaso.site5.com 2.6.9-67.0.1.ELsmp #1 SMP Wed Dec 19 16:01:12 EST 2007 i686
Default theme = wordpressembedded
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.7) Gecko/20070919 Firefox/2.0.0.7
Rows in GalleryAccessMap table = 78
Rows in GalleryAccessSubscriberMap table = 4962
Rows in GalleryUser table = 3
Rows in GalleryItem table = 4959
Rows in GalleryAlbumItem table = 149
Rows in GalleryCacheMap table = 0

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-01-15 21:39

WPG2 plugin will only "turn" off rewrites in the case of a

A) WP Permalink change
B) WPG2 Post Slug Change.

After the change, WPG2 will then automatically revalidate the status of the G2 Rewrites and reactive them.

In your case, when you visit the WPG2 rewrite tab what exactly does the status say..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Tue, 2008-01-15 22:03

Hi ozgreg,

here is the wpg2 status of my site:

Wordpress Permalinks Active? Yes
Does Gallery2 Rewrite Plugin Exists? Yes
Can Gallery2 Rewrite Plugin be Activated? No
Is Gallery2 Rewrite using Apache Mod_Rewrite? Skipped Due to Previous Failure
Wordpress .htaccess can be updated? Skipped Due to Previous Failure

Error: Gallery2 Rewrite Plugin cannot be activated
WPG2 cannot remotely activate the Gallery2 Rewrite Plugin. Please manually configure the Gallery2 Rewrite Plugin from the Gallery2 Site Admin Plugin Panel.

As proposed, I manually reactivated the gallery rewrite module and the gallery permalink module.

[EDIT:]After this the screen looks like that:

Wordpress Permalinks Active? Yes
Does Gallery2 Rewrite Plugin Exists? Yes
Can Gallery2 Rewrite Plugin be Activated? Yes
Is Gallery2 Rewrite using Apache Mod_Rewrite? Yes
Wordpress .htaccess can be updated? Yes

Both modules in the Gallery are disabled again...

Thanks for your support,
Jens
__________________
http://jekophoto.de

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-01-15 22:14

which is to be expected, until you select Gallery2 Rewrite Plugin: On :)

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jens_k

Joined: 2007-01-28
Posts: 244
Posted: Tue, 2008-01-15 22:42

Yes, you are right,

the error was sitting in front of my pc ;-)
I have had only to reactivate the g2 permalink module once - now all works really fine.

Up to the last tests the permissions for the .htaccess file located at the WP root were too low. I have had edited it manually via ftp. So I did not see the option to turn on or off the g2 rewrite before. Would it make sense (in a further version of wpg2) to turn off the automated deactivation of the g2 rewrite module?
As I experienced I am expecting a disable of the g2 url rewrite module (and the depending ones) again as soon as I would "write protect" the .htaccess file in the WP root.

If this will not be an advantage for this great plugin forget my proposal.

Thanks again,
Jens

__________________
http://jekophoto.de

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-01-15 23:21

G2 rewrites are problematic, incorrect server configuration, bad file permissions, greedy rewrite rules will break links, returning broken images. Before the latest 3.x release the WPG2 plugin did not have the additional step of G2 rewrite activation and as a result we had many postings with broken links / images. The basic aim is to make WPG2 work straight out of the box, and I cannot trust the G2 rewrite module to support this basic aim.

FYI on WPG2 initial validation it does warn that the G2 rewrite module has been deactivated..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
stephen

Joined: 2002-11-20
Posts: 17
Posted: Fri, 2008-01-18 04:41

After waiting a few days to ensure the problem had gone away, it seems that wp-super-cache <http://ocaoimh.ie/wp-super-cache/> and WPG2 don't like to play together. I turned off wp-super-cache for the last few days and WPG2 rewrites haven't broken yet. It would have typically broken by now. I figure it's probable that wp-super-cache conflicts with WPG2 on "A) WP Permalink change," above.

I'm going to investigate further and see if I can figure out what exactly wp-super-cache is doing to confuse WPG2.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Fri, 2008-01-18 05:25

I wonder if it does not like the change we schedule through the cron job whenever Permalinks get changed..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
stephen

Joined: 2002-11-20
Posts: 17
Posted: Fri, 2008-01-18 05:36

The early results are hinting in a different direction: memory limits. I 'tail -f'ed my apache error_log and I was getting a php fatal error saying that I was hitting the memory limit. I increased the memory limit in my php.ini file and it seems to be working (better) now. I'm not going to declare victory yet - I'll wait a few days and play with it a bit more. It still doesn't make sense to why the WPG2 rewrites was turning itself off, even with a memory limit problem.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Fri, 2008-01-18 11:03

at a guess Cron Job fails to reactivate, on Permalink save, WPG2 puts G2 rewrites into SAFE mode which basically turns them off until the cron job runs to revalidate the settings..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
Torvon

Joined: 2007-12-26
Posts: 70
Posted: Sun, 2008-01-20 19:12

Heyho,

I'm having a similar problem. I've configured my G2 properly, rewrite module on. Now I installed the WPG2 plugin, and some parts of it work.
Here's the problems:
(1)

Quote:
Is Gallery2 Rewrite using Apache Mod_Rewrite? No

I mean, that's simply a lie. It gets disabled all the time I hit F5 in the menu, then I enable it again in G2, and the next time I check the plugin in WP, it disables the rewrite module again.
Why?

(2)

Quote:
Wordpress .htaccess can be updated? Skipped Due to Previous Failure

I read 2 hours about that stupid file ... I even changed the permissions to 777, but still I get this error message

Please help me
Thanks

---------------
In case you need the link to my gallery in order to answer my help requests:
revelation-of-silence DOT com SLASH gallery

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-01-22 23:47

When you have configured your Gallery2 rewrite you have it configured to use PHP pathinfo rather than the Apache rewrite module. You will need to deactivate the Gallery2 rewrite module and reactive it and reconfigure the module to instead use the Apache rewrite module.

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
stephen

Joined: 2002-11-20
Posts: 17
Posted: Wed, 2008-01-23 04:09

ozgreg,

I've waited a few days and I've had no more error_log messages about memory limits, but my rewrites turned off again. So I'm back to trying to figure this out. In your post above, you say that a "WP Permalink change" will cause WPG2 rewrites to flip. What exactly does this mean? Does it mean a change in the content of .htaccess? Or does it look at the update time of .htaccess?

Thanks!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Wed, 2008-01-23 04:42

If you click save in options -> permalinks that will flip the G2 rewrite module into safe mode. Other than initial WPG2 validation that is the only time WPG2 will change the G2 Rewrite module status..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
Torvon

Joined: 2007-12-26
Posts: 70
Posted: Fri, 2008-01-25 01:03

Hello Ozgreg,

thank you for your reply. Unfortunately, some other issues came up, and I'm pretty sure it was "caused" by installing the WPG2 plugin. Now I'm not sure how to fix this issue, and I'd very hapoy if you could give me a hand.

(1) I had the G2 standalone (newest version) running, URL rewrites were working (e.g. http://www.revelation-of-silence.com/gallery/main.php/updates)
(2) I tried to get WPG2 for WP (newest version), had some issues with that rewrite thing.
(3) I disabled and deinstalled WPG2 (don't need it for my Blog anyway, I just wanted to check it).
(4) URL rewrites don't work anymore for my G2standalone, although I re-enabled them. Check the link, if you click it, the page simply stays white blank, no error messages or anything.

Now, you wrote:

Quote:
When you have configured your Gallery2 rewrite you have it configured to use PHP pathinfo rather than the Apache rewrite module. You will need to deactivate the Gallery2 rewrite module and reactive it and reconfigure the module to instead use the Apache rewrite module.

Unfortunately, in my G2 plugin "URL rewrites", in the "setup" part there is written:

Quote:
Approved referers / The parser you have selected does not support a referer check.

In "test" it says:

Quote:
Test the rewrite Parser Configuration: PHP Path Info Support - SUCCESS. Testing if the server supports PHP Path Info.

Testing if the server supports PHP Path Info.

I have no clue what that means - and I don't know what you mean with the PHP pathinfo ...

Could you please help me out with this? My main goal is to get my G2 working, I don't really care about the WPG2 module that much as long as my G2 standalone works again ...

Thank you very much

Torvon
---

Quote:
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.5 cgi
Webserver = Apache/2.0.61 (FreeBSD)
Database = mysqli 5.0.45, lock.system=flock
Toolkits = ImageMagick, SquareThumb, Thumbnail, Gd
Acceleration = none, none

---------------
In case you need the link to my gallery in order to answer my help requests:
revelation-of-silence DOT com SLASH gallery

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Fri, 2008-01-25 01:20

WPG2 does not interact with Gallery rewrite module when you are directly accessing Gallery2 (standalone mode) thus the issue you are having is more a pure Gallery2 issue. I think the simple solution would be to deactivate the Gallery2 module, delete the .htaccess in your Gallery2 directory, check your Gallery2 installation and reactive the Gallery2 module which should restore the rewrite module back to defaults, hopefully returning it back to a working state again for you..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
Torvon

Joined: 2007-12-26
Posts: 70
Posted: Fri, 2008-01-25 01:32

Thanks for your fast answer, Ozgreg!

The URL rewrite worked before I installed the WPG2 Wordpress plugin and disabled my URL rewrite module, so there was an interaction for sure (it also deactivated my G2 permalink addon). I tried to configure the WPG2 a bit, but decided I don't need it for my Blog. Deinstalled it, re-activated my 2 addons in G2 (URL rewrite and permalinks), and found out they don't work anymore.

I have my wordpress in /wordpress, and my gallery standalone in /wordpress/gallery. Now, I did the deactivate plugin/delete htaccess/upload again a few hours ago, in the /wordpress directory though.

I just checked, there isn't a file like that in /wordpress/gallery. I deactivated plugins, created file, but the URL rewrite still doesn't work.

Do you have any other idea what might be the problem?

Thanks again

---------------
In case you need the link to my gallery in order to answer my help requests:
revelation-of-silence DOT com SLASH gallery

 
www dimo spb ru

Joined: 2005-11-10
Posts: 25
Posted: Fri, 2009-11-20 20:22
stephen wrote:
After waiting a few days to ensure the problem had gone away, it seems that wp-super-cache <http://ocaoimh.ie/wp-super-cache/> and WPG2 don't like to play together. I turned off wp-super-cache for the last few days and WPG2 rewrites haven't broken yet. It would have typically broken by now. I figure it's probable that wp-super-cache conflicts with WPG2 on "A) WP Permalink change," above.

I'm going to investigate further and see if I can figure out what exactly wp-super-cache is doing to confuse WPG2.

Hey dude!!!
Yeah, i did it right now.
Just turn off acceleration (for guests) in G2, and set wp-super-cache on (both options) - that works!!!
As a result, it saves generated pages on a disk in cache, not in DB. Pictures, besides, are taken every time from a server...
Maybe try partial acceleration ... Hmm
Will try.
But now it all works!

wp 2.3.2
wp-supercache 0.5.4
shorturls in G2 and permalinks on.
Gallery 2.2.2
WPG 3.0
You can see it here http://www.dimo.spb.ru/gallery2