Argonautic Posted February 4, 2007 Share Posted February 4, 2007 I have been running upsxml on my shop without any problems for about a year now suddenly I start geting errors and am busting my brains to find out what is wrong. it all started after reloading a back-up of the oscommerce folder. anyway long story I'll cut short: If you go to checkout as a registered customer and try to checkout you get this error: Warning: fopen(upsxml_response.txt): failed to open stream: Permission denied in /home/httpd/vhosts/argonautic-online.com/httpdocs/oscommerce/includes/modules/shipping/upsxml.php on line 740 disregarding that and trying to continue to check out brings this up: Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/argonautic-online.com/httpdocs/oscommerce/includes/modules/shipping/upsxml.php:740) in /home/httpd/vhosts/argonautic-online.com/httpdocs/oscommerce/includes/functions/general.php on line 29 I have been through nearly every post on the topic of UPS and the different problems but have not come across anything that resembles this. Any Help is greatly appreciated. Thanks David Stone Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 4, 2007 Share Posted February 4, 2007 Warning: fopen(upsxml_response.txt): failed to open stream: Permission denied in /home/httpd/vhosts/argonautic-online.com/httpdocs/oscommerce/includes/modules/shipping/upsxml.php on line 740 I have been through nearly every post on the topic of UPS and the different problems but have not come across anything that resembles this. This has never been in UPSXML. Only in version 1.2.5 there was a hint at that with a piece of code I used to test someone else's response in the function _upsGetQuote (starts at line 801 in upsxml.php): //post request $strXML; $xmlResult = $this->_post($this->protocol, $this->host, $this->port, $this->path, $this->version, $this->timeout, $xmlRequest); // BOF testing with a response from UPS saved as a text file /* $filename = '/Library/WebServer/Documents/nytest/includes/modules/shipping/response.txt'; $fp = fopen($filename, "r") or die("couldn't open file"); $xmlResult = ""; while (! feof($fp)) { $xmlResult .= fgets($fp, 1024); } // EOF testing with a text file */ return $this->_parseResult($xmlResult); Or perhaps the file refererenced was used to store the errors (around line 92): // to enable logging of just the errors, do as above but call the file upsxml_error.log // $this->ups_error_file = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml_error.log'; Needless to say that the first thing you should have done is look what that line 740 says instead of running to post at the forums <_< Link to comment Share on other sites More sharing options...
Argonautic Posted February 4, 2007 Author Share Posted February 4, 2007 This has never been in UPSXML. Only in version 1.2.5 there was a hint at that with a piece of code I used to test someone else's response in the function _upsGetQuote (starts at line 801 in upsxml.php): //post request $strXML; $xmlResult = $this->_post($this->protocol, $this->host, $this->port, $this->path, $this->version, $this->timeout, $xmlRequest); // BOF testing with a response from UPS saved as a text file /* $filename = '/Library/WebServer/Documents/nytest/includes/modules/shipping/response.txt'; $fp = fopen($filename, "r") or die("couldn't open file"); $xmlResult = ""; while (! feof($fp)) { $xmlResult .= fgets($fp, 1024); } // EOF testing with a text file */ return $this->_parseResult($xmlResult); Or perhaps the file refererenced was used to store the errors (around line 92): // to enable logging of just the errors, do as above but call the file upsxml_error.log // $this->ups_error_file = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml_error.log'; Needless to say that the first thing you should have done is look what that line 740 says instead of running to post at the forums <_< Well thanks for the intelligent answer :P Oh I did and this is what it says:if($fp = fopen($s_file_name,"a+")) and to say that this was never in UPSXML is wrong as its in mine! :-" Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 4, 2007 Share Posted February 4, 2007 Oh I did and this is what it says:if($fp = fopen($s_file_name,"a+")) and to say that this was never in UPSXML is wrong as its in mine! Obviously it is in yours, but has never been in any UPSXML file that was uploaded as a contribution as far as I can remember. In my opinion this is for sure something you or someone else for you added to the UPSXML you are using. The line tells me that the file upsxml_response.txt is used for logging (most likely the response from UPS). You have a number of options: A. create an empty file called upsxml_response.txt, upload it to your /oscommerce/includes/modules/shipping/ directory and make it writable for the server B. comment out the section that is writing to that file (that is the best option any way if you got your upsxml working again, no need to create a multiple megabyte file after having operated the shop for a while) C. download the latest version, make a note of all your current settings, deinstall upsxml in the admin, upload the new upsxml.php files (shipping and language file, keep backups of your own files, you never know) and install again. Link to comment Share on other sites More sharing options...
Argonautic Posted February 4, 2007 Author Share Posted February 4, 2007 Obviously it is in yours, but has never been in any UPSXML file that was uploaded as a contribution as far as I can remember. In my opinion this is for sure something you or someone else for you added to the UPSXML you are using. The line tells me that the file upsxml_response.txt is used for logging (most likely the response from UPS). You have a number of options: A. create an empty file called upsxml_response.txt, upload it to your /oscommerce/includes/modules/shipping/ directory and make it writable for the server B. comment out the section that is writing to that file (that is the best option any way if you got your upsxml working again, no need to create a multiple megabyte file after having operated the shop for a while) C. download the latest version, make a note of all your current settings, deinstall upsxml in the admin, upload the new upsxml.php files (shipping and language file, keep backups of your own files, you never know) and install again. Thanks for the tips again :D this upsxml file is direct from ups Greece. I'll let you know how I get on and once again thx. :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.