Milde Shag Posted October 2, 2009 Posted October 2, 2009 I have a minor problem with a code error and I have searched for a clue to repair it has me stumped. It may be a simple thing. A little help would be really appreciated. www.tminz.co.nz/shop Can you have a look and select the image "click to enlarge" you will see "?>" and the image it looks like ?> is acting like a place holder but it is visible. I also notice this as pages load. Some help with this would be really appreciated. One other option is to load an image contribution but I am not sure I am up to this yet.
Dwimmerlaik Posted October 2, 2009 Posted October 2, 2009 Im just guessing but you only need to remove it in this code: ?> THIS IS THE PROBLEM <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>SST-EAGLE FREYA EVOLUTION 80-91 0414-926</title> <base href="http://www.tminz.co.nz/shop/"> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i=40; if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i); self.focus(); } //--></script> </head> http://www.tminz.co.nz/shop/popup_image.php?pID=37 And the other is in your index i might be wrong but look for it, you only need to erase the ?>
MrPhil Posted October 2, 2009 Posted October 2, 2009 If it's not something you did, it's possible that your site was the target of an attempted hack: <?php ....base64_decode.... ?> <!doctype... (original first line) It's not necessarily in your index.php -- it could be in one of many other PHP files. Whatever the cause, at some point some PHP code was erased, and only the closing ?> marker was accidentally left behind. Did you recently add or remove a contribution? Hand edit something? Clean up after a hack?
Milde Shag Posted October 3, 2009 Author Posted October 3, 2009 If it's not something you did, it's possible that your site was the target of an attempted hack: <?php ....base64_decode.... ?> <!doctype... (original first line) It's not necessarily in your index.php -- it could be in one of many other PHP files. Whatever the cause, at some point some PHP code was erased, and only the closing ?> marker was accidentally left behind. Did you recently add or remove a contribution? Hand edit something? Clean up after a hack? Hi, thank you for your reply. Actually I have not added any contribs since the template. I have been editing some files mostly to do with freight modules. I will check the files for any errors. Re: Error I have also found it on every page and its most noticable when the pages load before applying dark background colour. I have only realy noticed it on the popup image page with default background colour. this makes the ?> visible. You can also notice if you click drag across the top left corner. How would I know if it has been hacked. I have checked the index.php & popup_image.php files and reloaded several files in an atempt to resolve. But I can not find any problems with the files comparing them to the original un-edited files. Any ideas no how to proceed would be really appreciated.
MrPhil Posted October 3, 2009 Posted October 3, 2009 If it's on every page, check your application_top.php file, as well as other commonly used language etc. .php files. Somewhere (maybe more than one place), you'll find a ?> without the matching <?php or <? opening. You then have to figure out whether some PHP code was removed accidentally, a contribution/mod didn't install correctly, or a hack was attempted (often a new line <?php some_nasty_PHP_code ?> inserted at the beginning of many PHP files). You may also find something like <?php (or <?) some_PHP_code_possibly_innocent_or_a_hack ?>?> That's a botched insertion of some PHP code (contribution or a hack) that got a double end bracket (?>). If the new code was inserted in the wrong place (just ahead of an existing end tag) I would expect a PHP error about an unexpected <? or <?php found. Most likely, some PHP code was removed and the end bracket was forgotten. I would not simply remove the superfluous ?>, but try to figure out why it's there -- was some existing PHP code removed by an edit, a hacker, or a contribution; or was someone trying to add something and then maybe cover their tracks by removing the code (and forgot a bit of it)? You might get a listing of all your files, and look at the dates and times on them, concentrating on recently changed files. Can you account for why they were changed?
Milde Shag Posted October 4, 2009 Author Posted October 4, 2009 Hi Mr Phil, thank you again for your input. I have a feeling that there has been no hack atempt. However it could be somthing I have done with out realising. I have downloaded the site to check the code in the *.php files. So far all open and closed comments are in order but I have not finished checking. With a bit of luck I suppose I will find it. Other than that it seems to be a big task for a small issue. Just hoping that I will get pointed int the right direction with regard to which file to check. It appears on every page at the top left accept on popup images where it is lower left of image. ?> is still the problem. Thank in advance for any help you provide. :blink:
Xpajun Posted October 4, 2009 Posted October 4, 2009 Top of every page would tend to point at root>>incudes>>application_top.php or root>>includes>>header.php My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
Milde Shag Posted October 4, 2009 Author Posted October 4, 2009 Ok, thank you for the pointer. Have checked those root files. Really weird now? I check against undedited original instal files. Nothing that I could find this is indicating something else. Could this possibly be a database issue with my hosts? Any way I changed the background colour to teporarily show the issue. Please have a look at how it loads www.tminz.co.nz/shop MY SHOP it appears even before the index loads. If you hit stop at the correct time you can catch it without anything else loaded?? Still open to suggestions. Thank you for taking the time to help with this issue. :wacko:
Xpajun Posted October 4, 2009 Posted October 4, 2009 Ok, thank you for the pointer. Have checked those root files. Really weird now? I check against undedited original instal files. Nothing that I could find this is indicating something else. Could this possibly be a database issue with my hosts? Any way I changed the background colour to teporarily show the issue. Please have a look at how it loads www.tminz.co.nz/shop MY SHOP it appears even before the index loads. If you hit stop at the correct time you can catch it without anything else loaded?? Still open to suggestions. Thank you for taking the time to help with this issue. :wacko: How have you centered your shop? My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
Milde Shag Posted October 5, 2009 Author Posted October 5, 2009 How have you centered your shop? Thank you for your message. I used a template. I also modified most of the coulours. I will have a look at the table sizes in the root/index.php also column_left.php I think thes are the locations for sizing. But as fot centering I wil have to dig deeper. the template is called Grey Template Link. <_<
Xpajun Posted October 5, 2009 Posted October 5, 2009 Thank you for your message. I used a template. I also modified most of the coulours. I will have a look at the table sizes in the root/index.php also column_left.php I think thes are the locations for sizing. But as fot centering I wil have to dig deeper. the template is called Grey Template Link. <_< Right - in that template look for the opening body tag, just after I think you may find your problem - it will either be there or in the first file it calls - but I'd bet on the template ;) My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
Xpajun Posted October 5, 2009 Posted October 5, 2009 what other contribs have you added? My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
Milde Shag Posted October 5, 2009 Author Posted October 5, 2009 :unsure: what other contribs have you added? Thank you for your reply There are no other Contribs added yet. I have checked code in the files included with contrib Grey Template. I can not find anything out of place or the extra ?>. This is really weird. I can load the original index.php and other file that may be the problem but I have not yet found the file that stops the ?> from appearing? Really baffling. :unsure: Please have a look at the site again I have changed the bg so it is easier to see the problem. This one is definately outside the normal box. Thank you for taking the time to help.
Milde Shag Posted October 6, 2009 Author Posted October 6, 2009 I can reload the original files that are over written with the template and the problem still exists the ?> at the top of the page keeps loading up before everything else. :angry:
♥FWR Media Posted October 6, 2009 Posted October 6, 2009 Got to be in includes/application_top.php or includes/header.php All you have to search for is ?> somewhere there is one that shouldn't be there ( as if you didn't know ) 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.
Milde Shag Posted October 6, 2009 Author Posted October 6, 2009 Got to be in includes/application_top.php or includes/header.php All you have to search for is ?> somewhere there is one that shouldn't be there ( as if you didn't know ) LoL if only I knew. application_top.php has only one "?>" its the closing comment at the very bottom of page :P header.php has 18 "?>" and exactly 18 "<?php", they're all the same colour in DW. BTW I only use dw to edit the code. I use ftp for loading. :wacko:
Milde Shag Posted October 6, 2009 Author Posted October 6, 2009 Could it have somthing to do with the charset in the DB collation ??
Milde Shag Posted October 7, 2009 Author Posted October 7, 2009 Ok. Problem Solved. You guys that said it was just an extra ?> were correct. Just the file location was the issue. My knowledge of php files creating html output is still at Newbie level. So I had a friend look at it and he looked outside the box unlike me. includes/classes/currencies.php was the culprit. It was not mentioned and I did not even think to search there. My friend is methodical, that has paid off with his life and career. Thank you to all that have posted here to try and help. :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.