• Resolved dcbuffalo

    (@dcbuffalo)


    We recently updated this plugin, AND updated the cPanel to PHP 7.4, and immediately the site was generating massive amounts of PHP errors similar to this:

    [13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant name – assumed ‘name’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 46
    [13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant name – assumed ‘name’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 52
    [13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant value – assumed ‘value’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 53
    [13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant name – assumed ‘name’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 58

    (multiple lines, all the way up to line 689 and then it stops)

    I have my back-end developer looking at our customized invoice.php file to see if it needs anything updated, but as soon as I switch the cPanel back to PHP 7.4, the errors stop generating.

    Thoughts?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter dcbuffalo

    (@dcbuffalo)

    By HUGE – what I mean is, the php error log got up to 5.8 GB, and it was increasing by about 1-2MB per minute. Constant errors.

    Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @dcbuffalo,

    I’m sorry you’re dealing with issues like this. ??

    Are you working with a custom template? At first glance it looks you have a mistake with your code somewhere in there.

    • This reply was modified 3 years, 6 months ago by Darren Peyou.
    Thread Starter dcbuffalo

    (@dcbuffalo)

    I will have the back-end developer take a look. We created a custom invoice to pull in variables from the TM Extra Product Options plugin. It’s all working on the front-end just fine, so I’m sure there’s just some wacky extra or missing syntax somewhere.

    Thanks!

    Thread Starter dcbuffalo

    (@dcbuffalo)

    So the original back-end developer isn’t responding. I checked the code, and added the new “line 1” to the custom invoice, but otherwise it looks fine to me. All of the errors are being generated based on custom field values that are being called in from the TM Extra Product Options plugin. The field values are being correctly imported and printed on the invoices, but these giant sequences of errors are being generated whenever someone clicks to generate and download an invoice. We cleared the error log out a couple of weeks ago, and it’s already back up to almost 800MB.

    Is there a chance that someone there could take a look?

    Plugin Contributor Ewout

    (@pomegranate)

    you will need to correct the errors that are collected in your error log, just go over them one by one:

    
    undefined constant name – assumed 'name' ... invoice.php on line 46
    

    check for code with with name instead of 'name' and change accordingly. Same for line 52.

    
    Use of undefined constant value – assumed 'value' ... invoice.php on line 46
    

    check for code with with value instead of 'value' and change accordingly.

    etc…

    you don’t necessarily need the original developer – anyone with basic knowledge of PHP should be able to fix these if you provide them with the invoice.php file (and perhaps the full list of errors).

    Good luck!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP 7.4 HUGE error’ is closed to new replies.