Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

  • Days Won


Posts posted by altoid

  1. 4 hours ago, raiwa said:

    Hello Steve @altoid,

    Please change line 29:




    Let me know if this solves the error.

    Hello,  I updated accordingly.

    I did some test adding products, etc. and checked the log. Nothing yet.  I will keep an eye on the log for a few days and see what happens and let you know.


  2. Hello,

    Checking error logs today I see these in the log:

    PHP Warning:  Cannot assign an empty string to a string offset in /home/barkav5/public_html/includes/hooks/shop/checkout_process/qtpro_hooks.php on line 36
    PHP Notice:  Uninitialized string offset: 0 in /home/barkav5/public_html/includes/hooks/shop/checkout_process/qtpro_hooks.php on line 40

    They were logged yesterday and this is the first and only time they have showed since I set up logging.

    CE...PHP 7.2


  3. @raiwa I hope this is the correct place for this, and this is just an FYI anyway.

    For modular checkout, with ship in cart installed it seems that  the USPS module does not always show ship in cart  options. 

    However, upon emptying my text purchase from the cart and trying again, ship in cart shows USPS the second time.  Hmmm.

    I am guessing but this may be because of some PHP issues in the USPS module add on.  Just doing a test, then looking in the log I see the errors being logged.

    All just FYI in case someone else asks


  4. On 9/14/2018 at 1:32 PM, rulegacy said:

    @altoid Just trying to figure out whether a missing PHP extension is the cause of our issue with the latest add-on version. We are running the following: cli, curl, gd, iconv, mbstring, mysqlnd, posix, xml. This should cover every possible need but who knows...

    As for Header Tags SEO, it has been part of core code for a while now. Why not use it?

    Working with these extensions is beyond my technical knowledge.  However scanning through my server info, I have those running it seems.

  5. On 9/13/2018 at 10:28 AM, Jack_mcs said:

    Changing if (CHARSET == 'utf-8') { to if ('CHARSET' == 'utf-8') { should fix it. The ability to use defined names without apostrophes is being removed in php 8 so they are warning about it in 7 to allow time to change the code.

    Please post the result of the change here in case others run across this.

    Hi Jack, I am today getting around to this.  I just made the change you suggested.  I'll monitor the error log for a few days and get back to you.

    But I wanted to mention a couple of things.

    The error log only showed this warning on one day, 12 Sept.   Why not before and after I don't know.

    Secondly, then on 13 Sept I see several PHP notices for this same file.  Only on that day, not before or after.  I don't want to mix issues so I'll list those notices in a separate post once we see what happens over the next few days with issue one.


  6. 53 minutes ago, Jack_mcs said:

    Yes, it works fine in CE. I have installed it in many of them though I can't recall if any are running php 7, which I assume you are. If you are and you are able to switch php to version 5.6 it might be worth doing so to isolate the problem. Although @raiwaprovided the updated class file to make it 7.0 compatible and I assume he tested it in a shop running that version first.

    Are you seeing any errors in the error_log file or in your control panel? It might be due to some other extension missing from php, though I can't think of which that might be at the moment.

    Running this on CE with php 7.2. 

    Shopside showing seo urls.

    No shop admin side issues

    In the error log I see:

     PHP Warning:  Use of undefined constant CHARSET - assumed 'CHARSET' (this will throw an Error in a future version of PHP) in /home/UserName/public_html/includes/classes/seo.class.php on line 1834
     That code is:
             function strip($string){
                    if (CHARSET == 'utf-8') {
                       $string =  iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);

  7. This add on looks to be working with the CE version of responsive osCommerce and running php 7.2, meaning orders are being processed with USPS postage as shipping.

    I've already made some changes to pertinent files as per previous suggestions to deal with errors in the log.

    A few issue still linger if anyone could help.

    There's a couple notices and one warning as follows.

    I am pasting the block of code around the error not just the line.....

    PHP Notice:  Undefined index: Package in /home/barkav5/public_html/includes/modules/shipping/usps.php on line 424

          if (isset ($response_array['Package']['Postage']) && tep_not_null($response_array['Package']['Postage'])) {
            $service = $response_array['Package']['Postage']['MailService'];
            $temp_service = preg_replace( $pattern, '', $service );
            $response_array['Package']['Postage']['MailService'] = preg_replace( '/\s+/', ' ', $temp_service );
            $response_array['Package']['Postage']['DeliveryDays'] = $this->get_delivery_days( $pattern, $service );
          } elseif (is_array($response_array['Package'])) {  THIS IS LINE 424
            // Step through all of the quotes
            $count_services = count( $response_array['Package'] );
            for( $index=0; $index<$count_services; $index++ ) {
              $service = $response_array['Package'][$index]['Postage']['MailService'];

    PHP Notice:  Undefined property: usps::$quotes in /home/barkav5/public_html/includes/classes/shipping.php on line 94

            foreach($this->modules as $value) {
              $class = substr($value, 0, strrpos($value, '.'));
              if ($GLOBALS[$class]->enabled) {
                $quotes = $GLOBALS[$class]->quotes; THIS IS LINE 94
                for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) {
                  if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {
                    $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
                                     'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
                                     'cost' => $quotes['methods'][$i]['cost']);

    PHP Warning:  sizeof(): Parameter must be an array or an object that implements Countable in /home/barkav5/public_html/includes/classes/shipping.php on line 95

            foreach($this->modules as $value) {
              $class = substr($value, 0, strrpos($value, '.'));
              if ($GLOBALS[$class]->enabled) {
                $quotes = $GLOBALS[$class]->quotes;
                for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) { THIS IS LINE 95
                  if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {
                    $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
                                     'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
                                     'cost' => $quotes['methods'][$i]['cost']);

    If these are taken care of I'll try to figure out how to upload the CE / PHP 7.2 updates so others can benefit.


  8. 33 minutes ago, Jack_mcs said:

    Yes, you are correct. It seems that when I clicked to upload, I chose the 1.4 package from my files instead of the 1.14 one. I have uploaded the correct files using version 1.14a. Please try it now. My apologies to you and anyone that had trouble due to my mistake. :blush:

    As the sage and all knowing Forest Gump once said...S&%# Happens. 😀

  9. 11 hours ago, Jack_mcs said:

    It appears you didn't upload the latest file since the files in this last version don't contain

    require_once(DIR_WS_INCLUDES . 'filenames.php'); 

    That will definitely cause a failure since DIR_WS_INCLUDES isn't defined and filenames.php doesn't exist (unless you've added it).

    Hi Jack....downloading package oscom-google-xml-sitemap-seo-QN8hJ-XvqMV from https://apps.oscommerce.com/QN8hJ&amp;google-xml-sitemap-seo

    In \oscom-google-xml-sitemap-seo-QN8hJ-XvqMV\catalog\googlesitemap\index.php I see starting on 47 thru 51 

        require_once(DIR_WS_INCLUDES . 'filenames.php');
        require_once(DIR_WS_INCLUDES . 'database_tables.php');
        require_once(DIR_WS_FUNCTIONS . 'database.php');
        tep_db_connect() or die('Unable to connect to database server!');


  10. Jack,  these errors must have appeared while I was following your instructions to troubleshoot..and may help.

    [07-Sep-2018 19:06:30 UTC] PHP Warning:  Use of undefined constant DIR_WS_HTTP_CATALOG - assumed 'DIR_WS_HTTP_CATALOG' (this will throw an Error in a future version of PHP) in /home/MyUserName/public_html/googlesitemap/index.php on line 45
    [07-Sep-2018 19:06:30 UTC] PHP Warning:  Use of undefined constant DIR_WS_INCLUDES - assumed 'DIR_WS_INCLUDES' (this will throw an Error in a future version of PHP) in /home/MyUserName/public_html/googlesitemap/index.php on line 48
    [07-Sep-2018 19:06:30 UTC] PHP Warning:  require_once(DIR_WS_INCLUDESfilenames.php): failed to open stream: No such file or directory in /home/MyUserName/public_html/googlesitemap/index.php on line 48
    [07-Sep-2018 19:06:30 UTC] PHP Fatal error:  require_once(): Failed opening required 'DIR_WS_INCLUDESfilenames.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/MyUserName/public_html/googlesitemap/index.php on line 48

  11. 1 hour ago, Jack_mcs said:

    I don't see this warning so I can't say for sure but I think this will fix it. Find this line

     $url = $this->make_url($page, $this->get_category_name($actualID), 'cPath', $fullID, '.html');

    and add this above it

     $page = (! (isset($page) && tep_not_null($page) ?: basename($_SERVER['SCRIPT_NAME']));


    Got this error...but added an ) at the end as so and it seems OK

    PHP Parse error:  syntax error, unexpected ';' in /home/barkav5/public_html/includes/classes/seo.class.php on line 2626

    $page = (! (isset($page) && tep_not_null($page) ?: basename($_SERVER['SCRIPT_NAME'])));

    Checking error log, I don't see any more for this issue after the update.

    So looks goo on that.  Thank you

  12. 1 hour ago, Jack_mcs said:

    Thank you. That clears up quite a bit. But one last question: can you run the script manually (not with cron)?

    Assuming you can, there must be something in the file that is not working with your server. The easiest way to find this since there are no errors showing is to edit the googlesitemap/index.php file with lines to display text. So before the line



    echo 'start<br>';

    Then run the cron job and you should see start displayed. If not, then you need to go back to your host since that should always work. If it works, then move those two lines down a ways, like after

    require_once('googlesitemap/' . $mapfile);

     and try again. If it just shows a white page, then the cause of the failure is above where you added it and you need to move it up until you find the cause. If it works, then move it farther down.

    It will probably turn out to be something simple but without any indication of the failure, that's the only way to go about it. I can tell you that the script definitely works with php 7.2. But if your hosting account allows you to switch php versions, you might try a lower version just to see if that is related somehow.

    Manually running...

    Looks like it starts at line 48

        require_once(DIR_WS_INCLUDES . 'filenames.php');

  13. 2 hours ago, Jack_mcs said:

    Steve - I'm sorry but I am totally confused about this. Previously you said with this installed you would get a white page at https://www dot myshop dot com/.  Are you sure about that? This addon doesn't make changes to the shops files so that should be impossible. Or are you saying that when you visit https://www dot myshop dot com/googlesitemap/index.php you get a white page and that your site still works? 

    Also, you mentioned cron. Is the failure only with cron?

    Have you looked in your root directory to see if there is an error_log file there? If there is it may contain the reason for the failure.

    Hi Jack, sorry for the confusion.

    What I am reporting is related to just the cron url only


    Please note for the purposes here, I have changed the domain name.

    When running that url

    1 in Chrome I get this error message

    This page isn’t working
    www.mydomain.com is currently unable to handle this request.
    HTTP ERROR 500

    2 in FF I get a blank white page for the cron.

    3 in IE I get a blank white page for the cron.

    Accordingly then, the sitemap pages, all set to 0755 are empty after running the cron.

    When in contact with my host support, after much back and forth they conclude the issue is not a server problem.
    They said it's a PHP problem.

    To make their point, they changed the /googlesitemap/index.php file to just plain text and ran it.  It displayed just text properly.    

    They said that means the problem is not a server issue but a php issue.

    Whether that's accurate, I don't know. But that's what they said.

    However, I do have an php error log, and I see nothing in it related to running the above url.

  14. Jack, I was on with the support guy for a while, he took the matter to tier 2 support.  After all that, they conclude it's not the server. for the googlesitemap/index.php file they simply replaced the code with plain text to see if the file would show..and it does....says "Test Page".

    This is for:
    https://www.mydomain dot com/googlesitemap/index.php

    My cron email came back this AM with this info:

    Status: 500 Internal Server Error

    X-Powered-By: PHP/7.0.31

    Set-Cookie: osCsid=e49acaa263514efa79d54d19f37461fe; path=/; domain=.mydomain.com

    Expires: Thu, 19 Nov 1981 08:52:00 GMT

    Cache-Control: no-store, no-cache, must-revalidate

    Pragma: no-cache

    Vary: Accept-Encoding

    Content-type: text/html; charset=utf-8

    Here's part of the cron email from two days ago..showing things working.

    X-Powered-By: PHP/7.0.31

    Set-Cookie: osCsid=a3151e4d0fae5141117ac8a54641f89f; path=/; domain=.mydomain.com

    Expires: Thu, 19 Nov 1981 08:52:00 GMT

    Cache-Control: no-store, no-cache, must-revalidate

    Pragma: no-cache

    Vary: Accept-Encoding

    Content-type: text/html; charset=utf-8

    <style>.red { color:red; } </style>

    <pre><span class="red"><strong>CONGRATULATIONS! All files generated successfully.</strong></span>


    I've tried the most current version, and then I've tried the version just before that I had installed for a while.

    The only other store modifications I have made during the past couple days is to install some modules (that don't affect the core code) and Ultimate SEO Urls.

    So anyway...all just FYI and for now I'll give this a rest and come back to it later.

    Thanks for your time.



  15. 10 hours ago, Jack_mcs said:

    I'm not clear how this is failing. When this addon is installed, none of the shop files are changed so as far as the shop is concerned, the addon doesn't exist. But if I am understanding you correctly, you are saying when you install it the pages on the shop, like index.php, fail to load. I don't see how that is possible so I must not be understanding the problem.

    I have a support ticket into my host company about the server error 500 on this matter.  We'll see what they come up with.

    This is for url: 

    https://www dot myshop dot com/googlesitemap/index.php

  16. 53 minutes ago, Jack_mcs said:

    Steve, when you say you get a blank page, are you referring to http://your site.com/googlesitemap/index.php or http://your site.com/index.php? This addon has nothing to do with the latter so if that is the case, the problem is something else.

    Jack, it was the sitemap url. I've uninstalled for now and will try a couple things tomorrow and see how it goes.