WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8757 closed defect (bug) (fixed)

Upgrade or install 2.7 clean urls defect with magic quotes

Reported by: matthijs Owned by: ryan
Milestone: 2.7.1 Priority: normal
Severity: normal Version: 2.7
Component: Permalinks Keywords: rewrite, clean urls
Focuses: Cc:

Description

When

a) in the PHP settings both magic_quotes_runtime and magic_quotes_sybase are set to ON,
b) upgrading from a previous (working) 2.6.5 version or installing a new version

The clean urls functionality is lost.

The bug is that in the wp_options the field rewrite_rules will then contain a wrong value: for example:
a:304:{s:12:"robots.txt$"; etc etc

changing this manually in the database to

a:304:{s:11:"robots.txt$";

will temporarily solve the bug, until a save is done in the permalinks. Then again this value gets the wrong value.

Setting magic_quotes_runtime and magic_quotes_sybase to Off also solves the issue. But my guess is that most people encountering this problem will not know that or might even not be able to change this setting (shared hosts). It might be better to check in the wordpress code to see how these PHP settings are and code accordingly

Change History (6)

comment:2 ryan5 years ago

Looks like [9650] triggered this.

comment:3 ryan5 years ago

When magic_quotes_sybase is On, addslashes() does not escape backslashes.

comment:4 ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10286]) Turn off magic_quotes_sybase. It prevents addslashes from escaping backslashes. fixes #8757 for trunk

comment:5 ryan5 years ago

(In [10287]) Remove debug. see #8757

comment:6 ryan5 years ago

(In [10288]) Turn off magic_quotes_sybase. It prevents addslashes from escaping backslashes. fixes #8757 for 2.7

Note: See TracTickets for help on using tickets.