Skip to:
Content

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1825 closed defect (bug) (fixed)

Error when installing bbPress through BuddyPress setup

Reported by: Darfuria Owned by:
Milestone: 1.2 Priority: major
Severity: Version:
Component: Keywords: bbpress
Cc:

Description

I've just done a fresh install of WordPress and BuddyPress, and upon installing bbPress through the BuddyPress interface, I get the following error when trying to access the forums:

Parse error: syntax error, unexpected T_LNUMBER in .../wptest/bb-config.php on line 41

Change History (19)

#1 follow-up: @cnorris23
9 years ago

  • Keywords reporter-feedback added; bbpress error removed

Was your bb-config.php file automatically created, or did you have to create it yourself from information displayed on-screen?

#2 @cnorris23
9 years ago

  • Keywords bbpress error added

#3 in reply to: ↑ 1 @Darfuria
9 years ago

Replying to cnorris23:

Was your bb-config.php file automatically created, or did you have to create it yourself from information displayed on-screen?

It was automatically created

#4 @Darfuria
9 years ago

  • Cc Darfuria added

#5 follow-up: @DJPaul
9 years ago

What is on line 41 of bb-config.php? This error usually relates to a PHP variable starting with a number (which you can't do).

#6 follow-up: @cnorris23
9 years ago

It seems to be related to [1797], as it's an almost identical situation and error. Assuming this to be true, it's an issue with the BB_AUTH_KEY, and likely the other auth_keys, that are not copied over correctly from the WordPress wp-config.php. My guess, from looking at [1797], is that for some reason, during the bb-config.php creation process, backticks are being converted to apostrophes. I haven't looked at the bb-config.php creation code, nor have I run into that problem myself during auto-installs, but that looks to be the problem.

#7 in reply to: ↑ 5 @Darfuria
9 years ago

Replying to DJPaul:

What is on line 41 of bb-config.php? This error usually relates to a PHP variable starting with a number (which you can't do).

Pastebin here: http://pastebin.com/m58b48675

bb-config.php was automatically created.

#8 in reply to: ↑ 6 @Darfuria
9 years ago

Replying to cnorris23:

It seems to be related to [1797], as it's an almost identical situation and error. Assuming this to be true, it's an issue with the BB_AUTH_KEY, and likely the other auth_keys, that are not copied over correctly from the WordPress wp-config.php. My guess, from looking at [1797], is that for some reason, during the bb-config.php creation process, backticks are being converted to apostrophes. I haven't looked at the bb-config.php creation code, nor have I run into that problem myself during auto-installs, but that looks to be the problem.

Indeed that does appear to be the issue

#9 follow-up: @DJPaul
9 years ago

  • Keywords reporter-feedback error removed

Good job tracking down the issue. But we've only had a couple of reports with this problem. Darfuria, what version of PHP are you using - do you know if you have magic_quotes enabled in your PHP install?

#10 in reply to: ↑ 9 @Darfuria
9 years ago

Replying to DJPaul:

Good job tracking down the issue. But we've only had a couple of reports with this problem. Darfuria, what version of PHP are you using - do you know if you have magic_quotes enabled in your PHP install?

PHP version 5.2.12, magic_quotes are indeed enabled.

#11 @apeatling
9 years ago

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

Please disable magic quotes, this is a security vulnerability and has been deprecated in PHP 5.3+

http://en.wikipedia.org/wiki/Magic_quotes

#12 @Darfuria
9 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I disabled Magic Quotes, removed all of the files in the filesystem, reinstalled WordPress 2.9.1 in a new database, downloaded and installed BuddyPress 1.2RC2, installed the forums through the BuddyPress Forums Setup page, and exactly the same error was generated.

#13 follow-up: @windhamdavid
9 years ago

if it's exactly the same error than it's likely that you did not disable them.
if you set this in the php.ini, did you restart apache and have you tested to be sure that they're off?
if(get_magic_quotes_gpc()){ echo "on"; } else{ echo "off"; }

#14 in reply to: ↑ 13 @Darfuria
9 years ago

Replying to windhamdavid:

if it's exactly the same error than it's likely that you did not disable them.
if you set this in the php.ini, did you restart apache and have you tested to be sure that they're off?
if(get_magic_quotes_gpc()){ echo "on"; } else{ echo "off"; }

Yup, I set it in the php.ini and I restarted apache. Showing as disabled in phpinfo, and I added that snippet of code, and it returns 'off'.

#15 @apeatling
9 years ago

The problem is that it's putting a single quote in the key, which means the rest of the string is not encapsulated, causing the error. I think that if I wrap the keys in double quotes, that should fix it.

#16 @apeatling
9 years ago

I can't do the above because then values are not overwritten using bp_forums_bbpress_write(). A simple addslashes() call on the keys seemed to fix things without any issues.

#17 @apeatling
9 years ago

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

(In [2665]) Fixes #1797, fixes #1825

#18 @apeatling
9 years ago

Darfuria: can you please confirm this fix? Thanks.

#19 @Darfuria
9 years ago

  • Cc Darfuria removed

Sorry - I wasn't receiving e-mail notification of updates to this ticket.

As of RC3, this is indeed fixed. Thanks.

Note: See TracTickets for help on using tickets.