Well, I got everything set up correctly to install Indexu v5.4. I created the database, assigned ownership to the appropriate user, uploaded all the files, set all the permissions as requested, and started and ran the install.php script exactly as described.
Everything ran smoothly through the first few steps. No errors. Nothing out of the ordinary at all. All files were found. The directory and file permissions were all correct, etc. etc. When it finally arrived at the screen where it said it was ready to create the database, I figured I was home free. But as soon as that process started, I got the following error:
After that happened, the script just stopped and that was the end of things.Code:Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/www/myhome/indexu54/lib/link.class.php on line 1209 Parse error: syntax error, unexpected T_STRING in /home/www/myhome/indexu54/lib/link.class.php on line 1209
So, next I logged in with my telnet client, fired up 'vi', went into the indexu54/lib directory and opened up link.class.php to look at it. What I found was that lines 1209 and 1210 in the component read as follows:
It's those two slashes highlighted in red that my version of php (4.4.4) is objecting to. So, next I copied the front portion of that error message and went to google to search for:Code:$tpl->assign("$fields[$i]_upload", "<%\$$fields[$i]_upload%>"); $tpl->assign("$fields[$i]_remove", "<%\$$fields[$i]_remove%>");
I soon discovered that there are dozens (if not hundreds) of references to this error on the web; but although dozens of users and programmers encountered and complained about this issue (which seems to have appeared suddenly in PHP somewhere around version 4.0.3 and continued through roughly version 4.5), I only found one guy who ever claimed to have found a way around the problem and he never did say exactly how he solved it in his code. It appears the issue is that the appearance of the "\" before the dollar sign isn't being treated the expected way by PHP. But you can't leave it out or PHP assumes the $ that follows it is the beginning of a string field name.Code:Warning: Unexpected character in input: '\' (ASCII=92) state=1
Next, I went to the php.net site to see if THEY had anything to say about this error. I found that the error was reported 20 times over 3 years as a bug in PHP and 20 times out of 20 the PHP folks insisted that it was NOT a bug. But not ONCE did anyone ever suggest a way to work around it either.
I'm really NOT a php programmer, but realizing the issue was the appearance of the un-escaped slash in the code and in an effort to fix the problem, I tried removing the slashes. That didn't work because then I got a syntax error on the pair of $$ that followed the slash. Next, I tried "escaping" the slashes in both lines by bracketing them in single quotes so that the lines read like this:
But when I tried running the code that way, I got rid of the first error in line 1209 only to get a repeat of the same error in line 1210 even though the slash in both lines had been escaped the exact same way! In addition, I also got a brand new error in line 1216:Code:$tpl->assign("$fields[$i]_upload", "<%'\'$$fields[$i]_upload%>"); $tpl->assign("$fields[$i]_remove", "<%'\'$$fields[$i]_remove%>");
In a final effort to work around the problem I left the escaped slash in for line 1209 but removed the escaping quotes from line 1210 so that the lines now read like this:Code:Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/www/sissyland/indexu54/lib/link.class.php on line 1210 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/sissyland/indexu54/lib/link.class.php on line 1216
but that just gave me a new error on line 1224:Code:$tpl->assign("$fields[$i]_upload", "<%'\'$$fields[$i]_upload%>"); $tpl->assign("$fields[$i]_remove", "<%\$$fields[$i]_remove%>");
So I threw up my hands and restored the original code and decided to appeal to you guys on Mount Olympus as the "higher authority" on how to fix this problem so that PHP 4.4.4 handles it correctly.Code:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/sissyland/indexu54/lib/link.class.php on line 1216
Oh, for the record, I also did a search with one of my tools here for every occurrence of the \$$ string anywhere in the index54 release and found it occurs 14 times in 8 distinct modules including:
add.php
become_editor.php
blocks\blocks.alphabar.php
lib\link.class.php
lib\nusoap\nusoap.php
lib\smarty\internals\core.write_compiled.php
soap\nusoap.php
soap\test\nusoap.php
Okay, Gurus, the ball is in your court now. I've told you what I know, what I learned in my research, and what I did to try to fix the error. Exactly What should I DO to work around this problem?
I humbly await the wise words of the Olympian Gods with bated breath... (Bruce: Please tell the Almighty Zeus/Dody it's time to strike his anvil with his hammer and make lightning happen!)
Thanks!
sissy





Thanks for making an "old fart" laugh, Bruce. I REALLY needed that! I've spent the whole afternoon digging through vBulletin's latest code trying to figure out how I made the integration between vBulletin 3.08 and Indexu 3.1 work as well as I did 4 years ago. So far I've made little progress. Sigh...