[wp-hackers] Where Can I Ask These Questions?

Mark Jaquith mark.wordpress at txfx.net
Fri Dec 15 15:27:04 GMT 2006


On Dec 15, 2006, at 9:46 AM, Andy Staines wrote:

>> Creating a permalink structure in Options > Permalinks (WP 2.0 or  
>> later)
>
> [andy] OK - I suspected that triggered it. I updated permalinks  
> because of a change I made with the UTW path. Just weird that it  
> wasn't there before as my last DB backup shows. Or.. is it just  
> that phpMyAdmin doesn't see it? Certainly the row doesn't show up  
> when I 'browse' from phpMyAdmin so perhaps it doesn't include it in  
> a sql dump either...

1.5 and earlier used a long list of mod_rewrite rules to handling  
fancy permalink structures.  2.0 and later pipes everything though  
the PATHINFO using about 4 lines of mod_rewrite fu and handles the  
individual rules within WP using PHP.  It may be that you still have  
the old mod_rewrite rules in your .htaccess, so your site continued  
to work in that backwards compatible mode.  If you have WP-related  
mod_rewrite rules in .htaccess that look more robust than this:

> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
>
> # END WordPress

... then that is likely what was happening.

> [andy] if you mean pastebin.com then it wont save it - they say  
> they are having problems of some sort. I re-performed the 'update  
> permalinks' to see if that sorted it and now it is truncated at a  
> different spot but still seems to end where it shouldn't. Here are  
> the last two lines broken out:
>
> 	s:45:"(why-bother)/feed/(feed|rdf|rss|rss2|atom)/?$";
> 	s:47:"index.php?pagename=$matches[1]
>
> I assume that at least a double quote should be on the end.  
> (Current row shows 552 semi-colon separated entries)

I meant your pastebin of choice... there are many.  But yes, those  
last two lines don't look right.  How did you get that?  It could be  
that the method you're using to look at your options table is  
truncating the display of the option_value column, so that it's just  
a display issue.  It'd be very strange to have a value like that in  
the database.

You could throw this into your WP root folder and access it to see  
the full value:

> <?php
> require('wp-config.php');
> $rewrite_rules = $wpdb->get_var("SELECT option_value FROM $wpdb- 
> >options WHERE option_name = 'rewrite_rules'");
> var_dump($rewrite_rules);
> ?>

--
Mark Jaquith
http://markjaquith.com/

Covered Web Services
http://covered.be/




More information about the wp-hackers mailing list