1
ghettonet
Language PHP compatablility problems
  • 2006/5/12 3:39

  • ghettonet

  • Not too shy to talk

  • Posts: 176

  • Since: 2005/12/4


Ok this drove me nuts for about 5 days, and I'll post this here because it is probably going to snowball. The problem so far only shows up with CBB 3.04 (that I know of). Since PHP 5.1.0 the letters 'e' and 'o' are reserved words (e is the time zone, o is the year). In language/english/global.php (i would think it would show up in any language that uses the letters o and e in their words for "yesterday" and "today") there is this code:

Quote:
// !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A","B","
c","d","D","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","
t","T","U","w","W","Y","y","z","Z"
// insert double '\' before 't', 'r', 'n'
define("_TODAY", "\To\d\a\y G:i:s");
define("_YESTERDAY", "\Ye\s\\te\\r\d\a\y G:i:s");


If there isn't a slash infront of the o in today and the e in yesterday, you end up with funky date strings like this:

Quote:
YEurope/LondonstEurope/Londonrday 10:17:43


I know from experience it's tough to troubleshoot this, I'm posting this in the hope that nobody has to.

2
Dave_L
Re: Language PHP compatablility problems
  • 2006/5/12 11:07

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


It's probably a good idea to escape any characters in the date() function format string that are intended to be interpreted literally.

3
ghettonet
Re: Language PHP compatablility problems
  • 2006/5/12 19:54

  • ghettonet

  • Not too shy to talk

  • Posts: 176

  • Since: 2005/12/4


Yeah, it is. But in XOOPS 2.2.3 (I don't know about 2.0) in the language/english/global.php they aren't, which causes a wicked little error that can be difficult to trace unless you are proficiant in PHP.

4
stuie200
Re: Language PHP compatablility problems
  • 2006/5/31 11:07

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Thanks for the feedback on this guys, I have just started to get these errors since my host has upgraded to PHP ver 5.1.4

I'm using XOOPS version 2.0.13.2 and NewBB ver 1.13

The fix below can be found in /modules/newbb/language/english/main.php

define("_MD_TODAY""Today G:i:s");
define("_MD_YESTERDAY""Yes\te\rday G:i:s");


Hope this is some help to somebody out there
"I'm as confused as a baby in a topless bar."

Login

Who's Online

188 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 188


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits