Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

unexpected T_LNUMBER


McShandy

Recommended Posts

Hi, I am new to the whole osCommerce set up and have inherited the management of a site. After exploring a few php files I have now got the following error

 

Parse error: syntax error, unexpected T_LNUMBER in /home/sites/edwinjagger.co.uk/public_html/templates/Original/footer.php on line 28

 

The code for the file is here, line 28 starts after the first line <?php

 

<?php

$sql=tep_db_query('SELECT i.information_id, i.languages_id, if(length(i1.info_title), i1.info_title, i.info_title) as info_title , i.page, i.page_type FROM ' . TABLE_INFORMATION .' i left join ' . TABLE_INFORMATION . ' i1 on i.information_id = i1.information_id and i1.languages_id = '. $languages_id . ' and i1.affiliate_id = ' . (int)$HTTP_SESSION_VARS['affiliate_ref'] . ' WHERE i.visible='1' and i.languages_id ='.$languages_id.' and FIND_IN_SET('footer', i.scope) and i.affiliate_id = 0 ORDER BY i.v_order');[/color]

 

 

Any help would be greatly appreciated before the boss finds out!!

 

Thanks

Link to comment
Share on other sites

I thought you might need a terminating ?> before [/color], but [/color] is not an html tag so it depends how that's sneaked into the code line. Did you add it yourself or is it an actual part of line 28? The code is not standard osc code, it seems to be something to do with an affiliate addon, perhaps.

www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used!

Link to comment
Share on other sites

I thought you might need a terminating ?> before [/color], but [/color] is not an html tag so it depends how that's sneaked into the code line. The code is not standard osc code, it seems to be something to do with an affiliate addon, perhaps.

 

I am now clearly showing my inexperience [/color] isn't actually on the original code, when posting the problem I think I accidentally added this by trying to highlight line 28. Sorry, hope you've got chance to take another look.

 

Thanks

Link to comment
Share on other sites

Change the query to ..

 

$sql=tep_db_query("
SELECT i.information_id, i.languages_id, if(length(i1.info_title), i1.info_title, i.info_title) as info_title , i.page, i.page_type
FROM " . TABLE_INFORMATION . " i
left join " . TABLE_INFORMATION . " i1
on i.information_id = i1.information_id
and i1.languages_id = " . $languages_id . "
and i1.affiliate_id = " . (int)$HTTP_SESSION_VARS['affiliate_ref'] . " WHERE i.visible = '1'
and i.languages_id = " . $languages_id . "
and FIND_IN_SET('footer', i.scope) and i.affiliate_id = 0 ORDER BY i.v_order");

Link to comment
Share on other sites

Thanks for this, I have tried however when I go to save the file a new window opens with the following:

 

$current_path = /home/sites/edwinjagger.co.uk/public_html///templates/Original

$HTTP_POST_VARS['filename'] = footer.php

 

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/edwinjagger.co.uk/public_html/admin/file_manager.php:53) in /home/sites/edwinjagger.co.uk/public_html/admin/includes/functions/general.php on line 192

 

I am guessing that I do not have access to this area and will need to discuss with the guys who initially set it up. If you can confirm my theory that would be something.

 

Thanks for the efforts though. Better get my coat!

Link to comment
Share on other sites

Thanks for this, I have tried however when I go to save the file a new window opens with the following:

 

$current_path = /home/sites/edwinjagger.co.uk/public_html///templates/Original

$HTTP_POST_VARS['filename'] = footer.php

 

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/edwinjagger.co.uk/public_html/admin/file_manager.php:53) in /home/sites/edwinjagger.co.uk/public_html/admin/includes/functions/general.php on line 192

 

I am guessing that I do not have access to this area and will need to discuss with the guys who initially set it up. If you can confirm my theory that would be something.

 

Thanks for the efforts though. Better get my coat!

 

Aaaah never use the "File Mangler" it doesn't work and is a security risk that should be removed from the site.

 

To view edit and change files use ftp.

Link to comment
Share on other sites

Thanks for that, I have been trying to get to the bottom of which member of the chain of suppliers has access to the FTP. I would feel happier doing it this way but as of now no one wants to part with any information. I am guessing this is to protect their own interests.

 

I will however mention the fact that it appears that the File 'Mangler' had caused the issue here and for once I might be in the clear. I am sure I didn't actually change anything in the php file.

 

Maybe the P45 was a bit premature!

Link to comment
Share on other sites

Your original problem was here:

WHERE i.visible='1' and
FIND_IN_SET('footer', i.scope)

where you had a 'string' within a '-delimited string. You either need to change it to

WHERE i.visible=\'1\' and
FIND_IN_SET(\'footer\', i.scope)

OR, change the use of ' to " to enclose the quoted material (as FWR Media suggested). At a minimum, the offending section:

" WHERE i.visible='1' and i.languages_id =".$languages_id." and 
FIND_IN_SET('footer', i.scope) and i.affiliate_id = 0 ORDER BY i.v_order");

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...