Jump to content

Help required 500 error


valks1

Recommended Posts

Hi

I am trying to install Build a niche store onto my site.

The program is all loaded into the database and starts to install.

Then if i choose view site, i get a page with the following error:

The website cannot display the page    HTTP 500 

 

If i take a look at the error log on the server it says the following:

[Thu Mar 25 21:22:27 2010] [error] [client 82.16.209.76] PHP Parse error: syntax error, unexpected T_ELSE in /var/www/vhosts/peppashop.co.uk/httpdocs/index.php on line 1155

 

I can not work out what the issue is, can someone please help ?

 

The script from index.php is attached.

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

This is the code block in question:

 

			if ($cloak == '1'){
						if ($random == '0'){
						$RSSFEEDS = array(
						0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".CJID."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
						);
/* LINE 1155 */							else {
						$RSSFEEDS = array(
						0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".$cjid2."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
						);	
						}
}
		}

 

You have indeed made a slight syntax error.  You're missing the closing curly brace from the initial IF statement before making an ELSE statement. Sometime between the ending semicolon on line 1154 and the else statement on line 1155 you need a closing curly brace (}). Also, it appears as though on line 1160 you have an extra curly brace. Change it to this and you should be fine:

 

			if ($cloak == '1'){
						if ($random == '0'){
						$RSSFEEDS = array(
						0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".CJID."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
						);
						} else {
						$RSSFEEDS = array(
						0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".$cjid2."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
						);	
						}
		}

 

It's not hard to miss. The kind of spell out the problem in the error message, yet you couldn't solve it yourself? You've really got to learn how to read PHP error messages. They're usually very descriptive and helpful.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.