McShandy Posted November 26, 2009 Share Posted November 26, 2009 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 More sharing options...
Ben Nevis Posted November 26, 2009 Share Posted November 26, 2009 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 More sharing options...
McShandy Posted November 26, 2009 Author Share Posted November 26, 2009 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 More sharing options...
♥FWR Media Posted November 26, 2009 Share Posted November 26, 2009 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"); Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
McShandy Posted November 26, 2009 Author Share Posted November 26, 2009 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 More sharing options...
♥FWR Media Posted November 26, 2009 Share Posted November 26, 2009 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. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
McShandy Posted November 26, 2009 Author Share Posted November 26, 2009 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 More sharing options...
MrPhil Posted November 26, 2009 Share Posted November 26, 2009 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 More sharing options...
McShandy Posted December 3, 2009 Author Share Posted December 3, 2009 Thanks very much everyone. The instructions worked and I feel I am making some progress. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.