Forum Moderators: coopster
I'm trying to install a script that adds an RSS feed from Clickbank to my site. The script seemed to be working fine until I tried to run the page that was supposed to generate the xml for the feed. Instead of a nice php form page I got this:
Parse error: syntax error, unexpected ';' in /home/mindwa/public_html/feed/newadmin/newindex.php on line 703
Line 703 reads:
<!-- javascript:window.open("parser.php?url=<?=// $txturl;?>&key_words=<?// echo $key_words;?>&titlefont=<?=//$titlefont;?>");-->
As I could't see anything wrong, I tried the blunt object approach and removed each ; in turn, then put it back, but no change.
Any suggestions would be very welcome as my brain is starting to hurt!
The PHP blocks are inconsistent (and as far as I can tell, incorrect). // means a comment, so it appears as though all the PHP there is commented out anyway? Either way, I'd start by rewriting the PHP blocks as shown below.
Bad:
<?=// $txturl;?>
<?// echo $key_words;?>
<?=//$titlefont;?>
Good:
<?php echo $txturl;?>
<?php echo $key_words;?>
<?php echo $titlefont;?>
And thanks for the 'fix' info - it worked a treat. Brilliant!
Makes you wonder how some of these commercial scripts get distributed with such errors. In this case the script is sold with 'resale rights' so I guess very few people actually try to install it (rather than just try to sell it on to others). The seller I bought it from didn't even seem to know what a PHP script is!
Once again thanks for taking the time to help.
Just a remark, if you bought this script from someone without PHP knowledge and with such an error in it you may ask yourself what the quality of the rest of the code is?
I saw in your first post that the script is stored in a directory called 'newadmin/' from which I derive that it has something to do with handling administrative tasks.
From my first line I would then ask, if the script has errors like this, how are security and things like that handled by the script? Are you sure it is save to use?
Arjan
The script is called "Clickbank RSS Profit Feeds" and is supposed to add an RSS feed which features Clickbank products selected by site theme, each tagged with a CB ID.
As you rightly suspect, the problem I mentioned was not the only one and I ran into another very quickly (script does not 'remember' the ID). This may be a permissions issue rather than the script itself.
The pages, when they work, are well designed and professional looking, but for some reason the // 'comment' marker that Whoisgregg identified seems to appear randomly in several other include scripts, and may be causing other problems. This may possibly be a development copy, or maybe has been deliberately disabled for some reason - very odd. I can't imagine anyone would sell a script of this type that simply doesn't work?
At my present level of knowledge, I have no idea whether it could constitute a security risk - this had not ocurred to me at all I'm afraid. I'll try the installation once more from scratch then abandon it, if the problems continue.
As it's a 'resell' product I imagine I can give it away, too, so if you would like to take a look, the original zipfile is at <snip>
[edited by: eelixduppy at 11:13 am (utc) on Dec. 13, 2007]
[edit reason] no URLs, please [/edit]