azer Posted October 31, 2005 Share Posted October 31, 2005 (edited) Custom HTTP Error Page v1.5 - corrected grammatical errors - corrected wrong link to css - added a test, if no path given in the admin, by default the log will be written in catalog\log folder using relative path as defined in configure.php rather than hard coded path - added a french translation ( not finished) - defined that in admin the default valur would be to write a log and also send the store owner a mail alert Edited October 31, 2005 by azer Quote MS2 Link to comment Share on other sites More sharing options...
azer Posted October 31, 2005 Author Share Posted October 31, 2005 link is : http://www.oscommerce.com/community/contributions,933 Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2005 Share Posted December 13, 2005 I love this contribution, but I wish there was a way to not report errors from specific IP addresses. For Example, I use ScanAlert to search my site for Vulnerabilities, and it checks for pages that aren't there, so I get about 1000 HTTP Error e-mails in my box every day! There should be a place to put a list of IP addresses to ignore. If you could help me with this, it'll be greatly appreciated. Thank You, James Black Quote Link to comment Share on other sites More sharing options...
dragon5 Posted June 5, 2006 Share Posted June 5, 2006 Hello. How would I test this to see if it's working properly? Thanks d5 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 2, 2007 Share Posted May 2, 2007 I have everything working fine, well almost. I have turned off email error reporting via the database. I have checked my error log file and there seems to be some information missing: 02/05/2007 11:01:41,403,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:51,404,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:55,404,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:57,404,http://www.coolnquiet.co.uk,,, See there is a series of commas at the end of each line that I believe should contain some information. Any Ideas Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted October 2, 2009 Share Posted October 2, 2009 I have everything working fine, well almost. I have turned off email error reporting via the database. I have checked my error log file and there seems to be some information missing: 02/05/2007 11:01:41,403,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:51,404,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:55,404,http://www.coolnquiet.co.uk,,, 02/05/2007 11:04:57,404,http://www.coolnquiet.co.uk,,, See there is a series of commas at the end of each line that I believe should contain some information. Any Ideas Thanks This has just happened to me after migrating to php 5. I think the problem is with the variables in http_error.php around // Send the HTTP Error to Store Owner if (EMAIL_HTTP_ERROR == 'true') { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, sprintf(EMAIL_BODY, HTTP_SERVER, $HTTP_GET_VARS['error_id'], $error_text, date("m/d/Y G:i:s"), HTTP_SERVER . $REQUEST_URI, $REMOTE_ADDR, $HTTP_USER_AGENT, $HTTP_REFERER), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); } // Save the HTTP Error Report to disk if (STORE_HTTP_ERROR == 'true') { // change of 1.5 : check if there is there is a path given in the admin, if not store it ot catalog\log\http_error.log if (STORE_HTTP_ERROR_LOG !="") { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ',' . $HTTP_GET_VARS['error_id'] . ',' . HTTP_SERVER . $REQUEST_URI . ',' . $REMOTE_ADDR . ',' . $HTTP_USER_AGENT . ',' . $HTTP_REFERER . "\n", 3, STORE_HTTP_ERROR_LOG); } else { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ',' . $HTTP_GET_VARS['error_id'] . ',' . HTTP_SERVER . $REQUEST_URI . ',' . $REMOTE_ADDR . ',' . $HTTP_USER_AGENT . ',' . $HTTP_REFERER . "\n", 3, DIR_FS_CATALOG . '/log/http_error.log'); } } The $HTTP_GET_VARS needs to be changed to $_GET, but I don't know what else to change. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 3, 2009 Share Posted October 3, 2009 Nevermind, I worked it out. Quote Link to comment Share on other sites More sharing options...
johnnybebad Posted October 19, 2009 Share Posted October 19, 2009 Nevermind, I worked it out. I have installed this, but havent got the log to work, can you provide details please? Thanks Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
satyr37 Posted December 20, 2009 Share Posted December 20, 2009 link is : http://www.oscommerce.com/community/contributions,933 I have installed this contribution without the error reporting. 404 custom error page seems to load fine, but I'm getting two bugs; 1) the Search Help java popup page isn't working (whilst still working in the Advanced search page), 2) the Date From and Date to fields are auto filled with 'dd/mm/yyyy', however if user a) omits to put proper 'from' and 'to' numerical dates, or b) delete the prefilled text dates, it gives an Advanced Search error message with 'invalid from date' and 'invalid to date'. If I instead go straight to the Advanced Search page and leave the 'From' and 'to' fields with prefilled 'dd/mm/yyy' text and do a search it does not yield any 'invalid date' messages. Any suggestions on which files I have to edit? I did a keyword search on http_error.php, advanced_search.php, and advanced_search_results.php for the text string dd/mm/yyyy, and also looked around for how it passes them onto other files but no luck. Site is ezpcstart dot com if it will help to have a look. Thank you. Quote I'm fluent in gibberish. I've been reading gibberish since 1982. Link to comment Share on other sites More sharing options...
Guest Posted December 20, 2009 Share Posted December 20, 2009 Nevermind, I worked it out. // Send the HTTP Error to Store Owner if (EMAIL_HTTP_ERROR == 'true') { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, sprintf(EMAIL_BODY, HTTP_SERVER, $_GET['error_id'], $error_text, date("m/d/Y G:i:s"), HTTP_SERVER . $_SERVER['REQUEST_URI'], $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['HTTP_REFERER'], $_SERVER['REMOTE_HOST']), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); } // Save the HTTP Error Report to disk if (STORE_HTTP_ERROR == 'true') { // change of 1.5 : check if there is there is a path given in the admin, if not store it at catalog\log\http_error.log if (STORE_HTTP_ERROR_LOG !="") { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ',' . $_GET['error_id'] . ',' . HTTP_SERVER . $_SERVER['REQUEST_URI'] . ',' . $_SERVER['REMOTE_ADDR'] . ',' . $_SERVER['HTTP_USER_AGENT'] . ',' . $_SERVER['HTTP_REFERER'] . ',' . $_SERVER['REMOTE_HOST'] . "\n", 3, STORE_HTTP_ERROR_LOG); } else { error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ',' . $_GET['error_id'] . ',' . HTTP_SERVER . $_SERVER['REQUEST_URI'] . ',' . $_SERVER['REMOTE_ADDR'] . ',' . $_SERVER['HTTP_USER_AGENT'] . ',' . $_SERVER['HTTP_REFERER'] . ',' . $_SERVER['REMOTE_HOST'] . "\n", 3, DIR_FS_CATALOG . '/log/http_error.log'); } } Quote Link to comment Share on other sites More sharing options...
brouillard Posted January 4, 2010 Share Posted January 4, 2010 Happy new year 2010 ! I have this recurring error that keeps coming, but I have no link to favicon.ico. An idea?! Website: http://www.yoursite.com Error Code: 404 - 404 - Page Not Found Appearing: 01/04/2010 18:42:41 Requested URL: http://www.yoursite.com/favicon.ico Visitor Address: 92,143,208,142 Browser: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SV1;. NET CLR 2.0.50727; Media Center PC 5.0;. NET CLR 3.5.30729;. NET CLR 3.0.30618) REFERENCE: Quote Link to comment Share on other sites More sharing options...
brouillard Posted January 5, 2010 Share Posted January 5, 2010 Happy new year 2010 ! I have this recurring error that keeps coming, but I have no link to favicon.ico. An idea?! Website: http://www.yoursite.com Error Code: 404 - 404 - Page Not Found Appearing: 01/04/2010 18:42:41 Requested URL: http://www.yoursite.com/favicon.ico Visitor Address: 92,143,208,142 Browser: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SV1;. NET CLR 2.0.50727; Media Center PC 5.0;. NET CLR 3.5.30729;. NET CLR 3.0.30618) REFERENCE: Pb solved, I made a favicon.ico with GIMP. Here the source: http://egressive.com/tutorial/creating-a-multi-resolution-favicon-including-transparency-with-the-gimp Quote Link to comment Share on other sites More sharing options...
Ken44 Posted March 28, 2010 Share Posted March 28, 2010 (edited) Hi There is a possible security risk with this contribution The code can create a logfile which logs all errors – Even the ones from admin. Anyone who knows this contribution is installed will know there maybe a logfile created which can contain the name of admin – even if Admin has been renamed. RENAME THE LOGFILE TO SOMETHING THAT WILL BE DIFFICULT TO FIND Regards Ken Edited March 28, 2010 by Ken44 Quote Link to comment Share on other sites More sharing options...
Cheepnis Posted March 24, 2011 Share Posted March 24, 2011 (edited) 404 custom error page seems to load fine, but I'm getting this bug: the Date From and Date to fields are auto filled with 'dd/mm/yyyy', however if user a) omits to put proper 'from' and 'to' numerical dates, or b ) delete the prefilled text dates, it gives an Advanced Search error message with 'invalid from date' and 'invalid to date'. If I instead go straight to the Advanced Search page and leave the 'From' and 'to' fields with prefilled 'dd/mm/yyy' text and do a search it does not yield any 'invalid date' messages. Anybody have any help to provide for this problem? Edited March 24, 2011 by Cheepnis Quote Link to comment Share on other sites More sharing options...
DAVID3733 Posted September 28, 2011 Share Posted September 28, 2011 Hi there I have a heavily modded setup and have been usinf this contrb with no problems, however i have a multistore set up which is causeing a few problems if the item is on the other store, and what want to do is include the http_error,php file like <?php if ($product_check['total'] < 1) { header("HTTP/1.1 404 Not Found"); header("Status: 404 Not Found"); require('http_error.php'); }else{ } ?> which is working, well sort of its giving me redeclare errors ect, i am trying to use require_once instead of require but i am not sure if i am going about this the right way, any pointers would be great, maybe instead of require the file i should be doing something else? thank you Quote David Link to comment Share on other sites More sharing options...
Guest Posted November 26, 2011 Share Posted November 26, 2011 Great Contribution! Three questions: 1.) What do the search engine spiders do when they come to one of the error pages -- do they not know it is a 404 page (for example) and call it a good search? Hopefully, that is the case. 2.) A lot of the emails I receive say there was a 403 (Forbidden) error generated by a call to sitename.com/images/ (Requested URL). If I click on the Referer link, the real product page comes up fine. There is no call to the images folder on the page without an image file name attached to it. 3.) What causes the 500 (Internal Server) error? If I click on the Requested URL, the real product page comes up properly. Quote Link to comment Share on other sites More sharing options...
bensuba Posted August 8, 2012 Share Posted August 8, 2012 I still have this error message Warning: error_log(/log/http_error.log) [function.error-log]: failed to open stream: No such file or directory in /home/content/41/9670941/html/http_error.php on line 48 I couldnt figure it out what is wrong Quote My profile Link to comment Share on other sites More sharing options...
bensuba Posted August 8, 2012 Share Posted August 8, 2012 I still have this error message Warning: error_log(/log/http_error.log) [function.error-log]: failed to open stream: No such file or directory in /home/content/41/9670941/html/http_error.php on line 48 I couldnt figure it out what is wrong I have deleted folder configuration in HTTP Errors Log Destination It works now. Thanks for this contribution. I love it!! Quote My profile Link to comment Share on other sites More sharing options...
bensuba Posted January 17, 2013 Share Posted January 17, 2013 How to exclude rule for spesific folder ? Any1 have solution? Quote My profile Link to comment Share on other sites More sharing options...
WebDev22 Posted August 23, 2013 Share Posted August 23, 2013 I've been at it for a couple of hours now and cannot get any custom HTTP error pages to appear. I'm still getting the same old generic error pages. I carefully followed instructions, but can't figure it out. Any suggestions what I can try? Quote Link to comment Share on other sites More sharing options...
jbhobro Posted January 18, 2014 Share Posted January 18, 2014 Hi Could anyone please help me to implement the '410 Gone' error code in this great contribuion ? Quote Link to comment Share on other sites More sharing options...
♥peterpil19 Posted October 15, 2017 Share Posted October 15, 2017 @wdepot Hi, I downloaded and installed your update to this Add On. Thanks for taking the time to update it. Some feedback on items not working however: 1. filenames.php I am fairly certain is deprecated in recent versions. I fixed by hardcoding the filenames. 2. the instructions ask the user to reference a /catalog/ directory in their .htaccess file. I would assume most are installing oscommerce into their public_html folder and not using a catalog folder. 3. The pop up search help link does not work. It references a popup_search_help.php file which is missing from my installation of osCommerce. Peter Quote CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
wdepot Posted October 18, 2017 Share Posted October 18, 2017 1. filenames.php is active through all versions of osCommerce 2.3. Maybe in 2.4 they are removing it but the contribution wasn't updated for 2.4 but for 2.3 2. I thought I had updated the instructions to say that the htaccess (or httpd.conf) needed to point to the actual location of the http_error.php file. 3. The pop up search comes directly from the advanced_search.php file since the search portion of the error document was copied directly from the advanced_search.php file that came with osCommerce 2.3.4. Download a copy of osCommerce 2.3.4 and use the pop up search file from that if your version is missing the file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.