View Full Version : [fixed] backward incompatibility? / Cannot open old threads
bira
Tue 15th May '01, 8:38am
Hi,
There seems to be some 'backward incompatibility' as I cannot open certain threads that are older / were not updated after the upgrade to vB2x.
Here's an example: http://www.atlasf1.com/bb/showthread.php?s=&threadid=15631
I get the error:
Parse error: parse error in /usr/www/atlasf1/htdocs/www.atlasf1.com/bb/admin/functions.php(469) : regexp code on line 13
Fatal error: Failed evaluating code: stripbrsfromcode('1950 Grand Prix of France 02.07. Reims (7.815 km) 64 laps 3x2 grid
FL: no. 6 time-2:35.6 on lap 52
2 Giuseppe \\\'Nino\\\' Farina Alfa Romeo SpA Alfa Romeo 158 N/A 2 2:32.5 DNF-Oil Pump 63
4 Luigi Fagioli Alfa Romeo SpA Alfa Romeo 158 N/A 3 2:34.7 2 -25.7s
.
.
no. DRIVER TEAM CAR Grid. Qual. Classification Time
. Pos. Time.
.
42 Johhny Claes Ecurie Belge Lago-Talbot T26C-DA \\\'110-011\\\' 14(17) N/A DNF-Overheating 12
44 Robert Manzon Equipe Gordini Simca-Gordini 15 \\\'T015-0022 GC\\\' 12(13) N/A 4 -3 laps
practiced: Luigi Villoresi Scuderia Ferrari in /usr/www/atlasf1/htdocs/www.atlasf1.com/bb/admin/functions.php on line 469
I looked in the database, and there's nothing in that post that would give me even a clue why I am getting this error.
Ideas?
Thanks,
Bira
bira
Tue 15th May '01, 8:42am
one other thing: since my functions.php is hacked, I'll post line 469 here just in case :)
$bbcode=preg_replace($searcharray, $replacearray, $bbcode);
bira
Tue 15th May '01, 8:51am
and one more thing :)
Attached is the "problem" post copied from phpMyAdmin. Maybe it will help.
p.s.
I'm on PHP 4.0.5 -- if that helps.
eva2000
Tue 15th May '01, 1:22pm
turn magic_quotes_gpc = On in your php.ini file and restart apache :D
bira
Tue 15th May '01, 1:30pm
Eva I doubt it.
First of all, it's always been vBulletin's recommendation to turn it OFF.
Second, it's an evil evil thing and I hate it, not to mention the amount of work I'd have to put in to clean after it.
Third, if that was the culprit then it would affect other posts and threads.
Fourth, if you look at http://vbulletin.com/forum/phpinfo.php you'll note that it's OFF even here. And, I was able to post this code here when I tested!
So no, that cannot be the solution. :(
eva2000
Tue 15th May '01, 1:35pm
could it be related to this problem i have - http://vbulletin.com/forum/showthread.php?s=&threadid=16505 ?
why not try to turn it on and see ?
bira
Tue 15th May '01, 1:41pm
Eva I don't want to turn it on because it will affect many scripts I have running on my website.
bira
Wed 16th May '01, 1:27am
Any ideas?
John
Wed 16th May '01, 10:21am
I know I shouldn't be doing this-you'll laugh... I'll present sample of my data, which I guess nobody will like. :( First two lines contain event description:
year. event name d-base ref., date, track d-base ref. (track, variant), grid d-base ref.
FL setter entry no., FL time, on lap
followed by the body which contains data stored like this:
car no. driver d-base ref., team d-base ref., car d-base ref. (manufact., tipo, telaio, engine), grid position, qual. time, classification (if >100, represents retirements d-base ref.), time (real time for winner, gap behind winner for finishers- in time or laps, laps completed for retirements)
Sample:
1 6 02.07. 6,1 64 2
6 2:35.6 52
2 2 1 1,1,0 2 2:32.5 126 63
4 3 1 1,1,0 3 2:34.7 2 -25.7
.
.
.
42 18 4,1,5 14(17) 0 125 12
44 28 7,1,1 12(13) 0 4 -3
0 31 8,3,2
Which roughly translates into:
1950 Grand Prix of France 02.07. Reims (7.815 km) 64 laps 3x2 grid
FL: no. 6 time-2:35.6 on lap 52
2 Giuseppe 'Nino' Farina Alfa Romeo SpA Alfa Romeo 158 N/A 2 2:32.5 DNF-Oil Pump 63
4 Luigi Fagioli Alfa Romeo SpA Alfa Romeo 158 N/A 3 2:34.7 2 -25.7s
.
.
no. DRIVER TEAM CAR Grid. Qual. Classification Time
. Pos. Time.
.
42 Johhny Claes Ecurie Belge Lago-Talbot T26C-DA '110-011' 14(17) N/A DNF-Overheating 12
44 Robert Manzon Equipe Gordini Simca-Gordini 15 'T015-0022 GC' 12(13) N/A 4 -3 laps
practiced: Luigi Villoresi Scuderia Ferrari Ferrari 275 '16C'
I'm quite certain this will not become widely accepted system, but I think it contains all relevant data, which can be arranged (through various forms) & presented in many formats (in case of Internet presentation through various page templates). For example, sorting by grid positions and applying grid reference- a table representing grid can be made in manner it's represented on Darren's pages. Sorting by classification (with relatively simple method) shall produce standard results format. This system also facilitates searching for telaios, statistical excersizes &c. The data can easily be appended, and contents of d-bases are almost independant (ecxept for races- but it's been a point of this system).
As you can see grid positions for Claes and Manzon differ in different sources- a thing I hope this thread will help resolve. :)
John
Wed 16th May '01, 10:27am
Bira,
Could you get that post out of the database again using the telnet/mysql client, and then email it to me, just to make sure that there are no stray /'s around the place.
Thanks!
John
John
Wed 16th May '01, 10:33am
Also,
Perhaps you could try calling editpost.php directly to see what is wrong.
John
bira
Sun 20th May '01, 7:06pm
Sorry, sorry, sorry :(
I have the most intense few days and I just didn't have time to deal with this. Sorry to have kept you waiting!!!
OK, answers:
1. telnet SELECT pagetext FROM post for this specific post is attached.
2. If I do http://www.atlasf1.com/bb/editpost.php?s=&action=editpost&postid=276128 I get no error - it works fine and I can see the textarea with the post in it just fine.
By the way, I duplicated this thread so the guys won't have to wait till I fix this (they wanted this thread relived). And I just needed to remove the second [ code][/ code] in the post to make this problem go away.
Since I can easily post this on this bulletin board, I thought maybe one of my hacks screwed up functions.php but looking with beyond compare I didn't see that to be possible.
So I'm just left with maybe php4.0.5 being the cause? Is that possible?
Thank you,
Bira
bira
Sun 20th May '01, 10:14pm
Gosh I just read the notice of tomorrow's Gold release.
John I am SO sorry I didn't reply earlier, but please don't let this small problem waste your time!
Chris Schreiber
Sun 20th May '01, 10:18pm
I noticed this post has several single quotes in it (').... try removing all of these and see if it fixes the problem (I ran into a similar problem where a user had many single quote marks in their signature, and it cause parse errors).
bira
Sun 20th May '01, 10:30pm
Chris yeah, when I remove the ' from the code I have no problem posting it on my BB.
bira
Sun 20th May '01, 10:35pm
teehee
I found the threshold :)
It looks like if the piece of code has more than six' I will get an error.
Tried posting
'bira'
and
'john'
and
'freddie'
and
'ed'
on my bb and when I clicked on "preview post" I got:
Parse error: parse error in /usr/www/atlasf1/htdocs/www.atlasf1.com/bb/admin/functions.php(469) : regexp code on line 8
Fatal error: Failed evaluating code: stripbrsfromcode('
\\\'bira\\\'
and
\\\'john\\\'
and
\\\'freddie\\\'
and
\\\'ed\\'
') in /usr/www/atlasf1/htdocs/www.atlasf1.com/bb/admin/functions.php on line 469
then I removed one ' - same error. Removed another, and the post came up fine. So six it is :D
Chris Schreiber
Sun 20th May '01, 10:36pm
I tired to duplicate the problem here: http://www.progresstalk.com/forums/showthread.php?threadid=25632 but I couldn't
bira
Sun 20th May '01, 10:41pm
Chris are you on php 4.0.5?
Chris Schreiber
Sun 20th May '01, 10:47pm
Yes, John asked me to test on my forums since I was running 4.0.5 with MySQL 3.23.37
bira
Sun 20th May '01, 10:56pm
Chris do you want me to send you the functions.php file on my BB?
bira
Sun 20th May '01, 10:57pm
btw it seems very inconsistent. I just tried posting something else with 8x ' and it worked...
Then I tried the above code again and it didn't.
:o
bira
Sun 20th May '01, 10:59pm
oh, one other thing: I have MySQL x38 if that matters, and my phpinfo can be found at http://www.atlasf1.com/php.php
Mike Sullivan
Sun 20th May '01, 11:04pm
You know, when I was playing around with my conditionals in templates hack trying to get it to work, I ran into something similar -- the first quote was escaped correctly, the latter wasn't.
As you can see, that's the case here... Out of curiosity, what happens if you put more text after 'ed'?
bira
Sun 20th May '01, 11:08pm
Ed, then it works fine.
Tried posting
'bira'
and
'john'
and
'freddie'
and
'ed' Sullivan
And had no problems
Mike Sullivan
Sun 20th May '01, 11:28pm
That almost looks like a PHP related bug then...
IIRC, my hack had the same behavior and was designed with 4.0.5.
I haven't confirmed yet though.
bira
Sun 20th May '01, 11:52pm
Makes sense :D
I guess upgrading to the latest release isn't always a good think. I only upgraded because 404pl1 had a memory leak that affected me.
John
Sat 2nd Jun '01, 7:44am
Bira,
Just to let you know, I have confirmed this bug on PHP 4.0.5, and I am still working on it.
John
bira
Sat 2nd Jun '01, 10:45am
ok, thanks :)
John
Sat 2nd Jun '01, 1:24pm
And no doubt this thread will probably die when I move everything onto the new server :)
PHP bug report:
http://www.php.net/bugs.php?id=11236
John
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights