Jump to content

Recommended Posts

Posted (edited)

I've a little bit of time in hand and it seems like this is the next necessary thing to solve, the use of php7.2.  But I need your help to point out any problematic area so that attention can be given to them.

To help...you'll need an installation of CE (any flavour that is Frozen or later) running on php 7.2 - with error reporting dialled right up.  To set up error_reporting to show everything that is wrong:

includes/application_top.php

  • Find:

    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
     
  • Change to:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

admin/includes/application_top.php

  • Find:

    error_reporting(E_ALL & ~E_NOTICE);

    if (defined('E_DEPRECATED')) {
      error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    }
     
  • Change to:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

Save both files.  Obviously...you DO NOT want to do this on a live shop as it will show errors to your customers, so hopefully a few people have a test shop to play with...

Now if you browse your test shop...all warning and errors will appear. 

Thank you in advance.

Please copy/paste the following as a reply:

URL: 
WARNING/ERROR:

Edited by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

URL: 
shopping_cart.php (with at least 1 product)

WARNING: 
Notice: Constant TABLE_HEADING_QUANTITY already defined in \includes\languages\english\shopping_cart.php on line 29
Notice: Constant TABLE_HEADING_PRICE already defined in \includes\languages\english\shopping_cart.php on line 31


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
Posted (edited)
10 minutes ago, burt said:

I've a little bit of time in hand and it seems like this is the next necessary thing to solve, the use of php7.2.  But I need your help to point out any problematic area so that attention can be given to them.

To help...you'll need an installation of CE (any flavour that is Frozen or later) running on php 7.2 - with error reporting dialled right up.  To set up error_reporting to show everything that is wrong:

Maybe set up to have errors output to a file, so that even the owners of live shops can help as well?

Eddy

Edited by Moxamint

Share this post


Link to post
Share on other sites

In general, it's considered bad to display errors to the public, as that can give hackers valuable information. Sending detailed errors to a log file would be good, with maybe just a generic "sorry, something went sideways" message to the public. Now, how can you capture error output (to stdout, I presume, which gets folded into the page) if such a thing can happen just about anywhere? Do error messages have a distinctive "look" to them, so that if you could capture all output to a string,  and before releasing that string ("print") to the browser, look through it for error messages and remove them? Offhand, I'm not sure how that could be done, at least across a wide range of servers.

Share this post


Link to post
Share on other sites

PHP allows all error's to be sent to a error_log file, but you need to edit your php.ini file to do this.

Most people will not have access to the php.ini file so it's simlply best to ask your host to turn on error logging for your site.

Then simlpy check your error_log file for any errors beeing logged.

If you feel upto it and have access to your php.ini then this blog shows you how to do it.

https://www.cyberciti.biz/tips/php-howto-turn-on-error-log-file.html


 

Share this post


Link to post
Share on other sites

Hi Gary,

Could you please post a download link of the preferable version to test with?
I've been running with php7.2 for quite a while, so might be of assistance here.
Unfortunatly I work with no stock versions, so comparing will not be as simple, but could set up a testshop too.
 


Building great webshops for customers with opensource backoffice application for a robotic accounting solution including POS
Migrating osC 2.x webshops to 2.3.4.x
osCommerce dedicated hosting/colocation + turnkey solutions + building addons per request

Share this post


Link to post
Share on other sites

PHP 7.2.12

In admin:

/admin/paypal.php

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\DP\DP.php on line 35

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\DP\DP.php on line 37

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\EC\EC.php on line 35

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\EC\EC.php on line 37

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\HS\HS.php on line 34

Warning: Use of undefined constant OSCOM_APP_PAYPAL_GATEWAY - assumed 'OSCOM_APP_PAYPAL_GATEWAY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\modules\HS\HS.php on line 36


  • Gold is EOL
  • Frozen is Sunset
  • Edge is defunct and no longer exists
  • Phoenix is the default recommended download

Share this post


Link to post
Share on other sites

Admin/index.php Dashboard:

Warning: constant(): Couldn't find constant OSCOM_APP_PAYPAL_LIVE_API_USERNAME in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\OSCOM_PayPal.php on line 285

Warning: constant(): Couldn't find constant OSCOM_APP_PAYPAL_SANDBOX_API_USERNAME in C:\xampp\htdocs\SHOP_TEST\includes\apps\paypal\OSCOM_PayPal.php on line 288

By the way I am running local on Xammp.


  • Gold is EOL
  • Frozen is Sunset
  • Edge is defunct and no longer exists
  • Phoenix is the default recommended download

Share this post


Link to post
Share on other sites

Live shop so just quoting from the error log. This is the most commonly reported warning.

[01-Mar-2019 17:30:17 UTC] PHP Warning:  Illegal string offset 'iso_code_2' in /home/xxx/public_html/includes/modules/shipping/zones.php on line 121

Share this post


Link to post
Share on other sites

Installation Errors:

Localhost under Windows 10 XAMPP PHP 7.2.9.

NOTE: Duplicated errors have been removed.

 

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/install/install.php

Notice: Undefined index: DB_SERVER in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined variable: _SESSION in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: DB_SERVER_USERNAME in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: DB_SERVER_PASSWORD in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: DB_DATABASE in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

 

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/install/install.php?step=2

Notice: Undefined index: HTTP_WWW_ADDRESS in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined variable: _SESSION in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: DIR_FS_DOCUMENT_ROOT in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

 

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/install/install.php?step=3

Notice: Undefined index: CFG_STORE_NAME in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined variable: _SESSION in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: CFG_STORE_OWNER_NAME in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: CFG_STORE_OWNER_EMAIL_ADDRESS in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: CFG_ADMINISTRATOR_USERNAME in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: CFG_ADMINISTRATOR_PASSWORD in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Notice: Undefined index: CFG_ADMIN_DIRECTORY in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\install\includes\functions\html_output.php on line 16

Share this post


Link to post
Share on other sites
Posted (edited)

Admin side:

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/admin/modules_content.php?module=cm_in_card_products&action=edit

When installed: New Products [index_nested] content module.

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_STATUS already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_CONTENT_WIDTH already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_MAX_DISPLAY already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_DISPLAY_ROW_SM already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_DISPLAY_ROW_MD already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_DISPLAY_ROW_LG already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_DISPLAY_ROW_XL already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_BUTTON already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

Notice: Constant MODULE_CONTENT_IN_CARD_PRODUCTS_SORT_ORDER already defined in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\admin\includes\application_top.php on line 70

 

 

 

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/admin/modules.php?set=payment&module=braintree_cc

When installed shows:

Notice: Undefined offset: 1 in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\payment\braintree_cc.php on line 883

 

 

 

includes/languages/english/modules/payment/sofortueberweisung_direct.php
language file needs update to UTF-8 encoding. It shows: Sofortberweisung Direkt

When installed sofortueberweisung_direct.php on store side:

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/checkout_payment.php

Sofort�berweisung ist der kostenlose, T�V-zertifizierte Zahlungsdienst der Payment Network AG. Ihre Vorteile: keine zus�tzliche Registrierung, automatische Abbuchung von Ihrem Online-Bankkonto, h�chste Sicherheitsstandards und sofortiger Versand von Lagerware. F�r die Bezahlung mit Sofort�berweisung ben�tigen Sie Ihre eBanking Zugangsdaten, d.h. Bankverbindung, Kontonummer, PIN und TAN.

Notice: Undefined index: field in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\checkout_payment.php on line 205

 

 

Edited by raiwa

Share this post


Link to post
Share on other sites

Store side: index page, all content modules and boxes installed:


http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/login.php
Warning: Use of undefined constant MODULE_BOXES_INFORMATION_BOX_DATA - assumed 'MODULE_BOXES_INFORMATION_BOX_DATA' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\boxes\bm_information.php on line 37

Warning: Invalid argument supplied for foreach() in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\boxes\bm_information.php on line 37

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/index.php
Warning: Use of undefined constant MODULE_CONTENT_CARD_PRODUCTS_TITLE - assumed 'MODULE_CONTENT_CARD_PRODUCTS_TITLE' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index\cm_i_card_products.php on line 29

Warning: Use of undefined constant MODULE_CONTENT_CARD_PRODUCTS_DESCRIPTION - assumed 'MODULE_CONTENT_CARD_PRODUCTS_DESCRIPTION' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index\cm_i_card_products.php on line 30
Warning: Use of undefined constant MODULE_CONTENT_CARD_PRODUCTS_HEADING - assumed 'MODULE_CONTENT_CARD_PRODUCTS_HEADING' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index\templates\tpl_cm_i_card_products.php on line 2
MODULE_CONTENT_CARD_PRODUCTS_HEADING

Warning: Use of undefined constant MODULE_CONTENT_CARD_PRODUCTS_BUTTON_VIEW - assumed 'MODULE_CONTENT_CARD_PRODUCTS_BUTTON_VIEW' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index\templates\tpl_cm_i_card_products.php on line 29
Warning: Use of undefined constant MODULE_CONTENT_FOOTER_INFORMATION_DATA - assumed 'MODULE_CONTENT_FOOTER_INFORMATION_DATA' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\footer\cm_footer_information_links.php on line 45

Warning: Invalid argument supplied for foreach() in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\footer\cm_footer_information_links.php on line 45
Warning: Use of undefined constant MODULE_CONTENT_FOOTER_TEXT_HEADING_TITLE - assumed 'MODULE_CONTENT_FOOTER_TEXT_HEADING_TITLE' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\footer\templates\tpl_cm_footer_text.php on line 2
MODULE_CONTENT_FOOTER_TEXT_HEADING_TITLE

http://localhost/2019_03_03_2.3.4.1._EDGE_BS4/index.php?cPath=1
Categorie level index_nested
NOTE: repeated error from box and footer removed.
Warning: Use of undefined constant MODULE_CONTENT_IN_CARD_PRODUCTS_TITLE - assumed 'MODULE_CONTENT_IN_CARD_PRODUCTS_TITLE' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index_nested\cm_in_card_products.php on line 29

Warning: Use of undefined constant MODULE_CONTENT_IN_CARD_PRODUCTS_DESCRIPTION - assumed 'MODULE_CONTENT_IN_CARD_PRODUCTS_DESCRIPTION' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index_nested\cm_in_card_products.php on line 30
Warning: Use of undefined constant MODULE_CONTENT_IN_CARD_PRODUCTS_HEADING - assumed 'MODULE_CONTENT_IN_CARD_PRODUCTS_HEADING' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index_nested\templates\tpl_cm_in_card_products.php on line 2
MODULE_CONTENT_IN_CARD_PRODUCTS_HEADING
Warning: Use of undefined constant MODULE_CONTENT_IN_CARD_PRODUCTS_BUTTON_VIEW - assumed 'MODULE_CONTENT_IN_CARD_PRODUCTS_BUTTON_VIEW' (this will throw an Error in a future version of PHP) in C:\xampp_php_7_2_9\htdocs\2019_03_03_2.3.4.1._EDGE_BS4\includes\modules\content\index_nested\templates\tpl_cm_in_card_products.php on

 

Share this post


Link to post
Share on other sites

Store side: Bestseller box: <li> dot shows outside the box

Share this post


Link to post
Share on other sites

As PHP 7.2 is now fairly well established (and PHP 7.3 is starting to show up), any thoughts on how "Frozen" could be upgraded to work on 7.2 and up? If there are a lot of changes to make, perhaps general guidelines would be in order, rather than an exhaustive list of fixes (or even an add-on!). This would still leave a lot of work to be done by shop owners, but it may be the best we can do. Add-ons will be yet another issue.

I presume that Edge is/will be PHP-7.2 ready out of the box, but there are still a lot of people on Frozen just because it's nice and stable. That's the one that I install for clients. Once Slushee comes out (next freeze of Edge), that is at least PHP-7.2 ready, I would assume that any further work on Frozen would cease.

And oh, how about calling the next one osC 2.3.5? It's obvious that HPDL is never going to accept any of Gary's work as the official product, and he's probably never going to release another osC, so why not ease the confusion?

Share this post


Link to post
Share on other sites

I'm slowly but surely, as and when I can give time, updating the software. 

Thanks to all who are helping the software to move forward 👍


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

With a big thanks to @Heatherbell I have a day next week and a day the week after to commence work on;

  • fixing php7.2 warnings and errors
  • translating old x.x (some of which relates to php4!) php code to newer 7.x formatted code

In the meantime, if anyone sees any more errors/warnings please reply to this thread stating what the error says and where you found it (eg an URL) or how you made the error appear (eg only happens when pressing edit on XYZ module) and so on.  As much details as you can give would be very helpful.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Gary is this pertaining just to edge core related errors?  I have some add ons that are causing some notices, etc.


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Just for core related at the moment...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×