• Resolved oldteaseller

    (@oldteaseller)


    Report no: ZQUTFZOA

    Hi Litespeed,

    Recently my error log is being filled up with errors of the type:

    2021-02-08 10:35:43.469558 [NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-includes/class-http.php on line 272
    2021-02-08 10:35:43.469514 [NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-content/plugins/stops-core-theme-and-plugin-updates/includes/MPSUM_Utils.php on line 37
    2021-02-08 10:35:43.469383 [NOTICE] [11389] [127.0.0.1:38928#APVH_io-te.dk:443] [STDERR] PHP Warning: substr() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 391

    etc. etc. etc.

    Do you know what causes the problem and how I may fix it?

    Kind regards and thank you,

    Simon

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-includes/class-http.php on line 272

    This only tells WP gets some incorrect format data, like it wants to have a string , but for whatever reason an array is given

    but it doesn’t tell where it comes or how it forms up , it might related to LSCWP, or it might not.

    please try install https://www.ads-software.com/plugins/query-monitor/ , it may provide you some more information when that error happens

    Best regards,

    Thread Starter oldteaseller

    (@oldteaseller)

    I see. Thanks for your reply.

    Since most error messages are of the kind:

    “2021-02-09 02:55:27.017718 [NOTICE] [10818] [127.0.0.1:57010-3#APVH_io-te.dk:443] [STDERR] PHP Warning: substr() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-content/plugins/litespeed-cache/src/css.cls.php on line 391”

    I thought it might be related to litespeed (perhaps due to JS minification?). But yes, sometimes the errors point to other directories as well.

    I downloaded the query monitor, but I haven’t seen any errors reported through it yet – only a few duplicated queries and sometimes a slow query (slow queries are always linked to litespeed btw: “INSERT INTO www_options (option_name, option_value, autoload)
    VALUES (‘_transient_wc_outofstock_count’, ‘6’, ‘no’) …” ).

    I’m not particularly tech savvy at all, so it’s difficult for me to identify what might be the real cause of these errors. But I understand that it might not be your responsibility to look into this either, since it may not be LS-related.

    Kind regards,

    Simon

    • This reply was modified 3 years, 9 months ago by oldteaseller.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    well , in that sense

    /wp-content/plugins/stops-core-theme-and-plugin-updates/includes/MPSUM_Utils.php on line 37

    it might be also related to that plugin , doesn’t it ? ??

    from the log

    [STDERR] PHP Warning: parse_url() expects parameter 1 to be string, array given in /home/iotedk/public_html/wp-includes/class-http.php on line 272

    edit that line 272, you will see $arrURL = parse_url( $url );

    add this line AFTER it

    error_log( print_r($url, TRUE) , 3, "/home/iotedk/public_html/lscwp.log");

    then when this error happens again , check “/public_html/lscwp.log” file

    this should log out what is passed into that function , then see what we can find

    Best regards,

    Thread Starter oldteaseller

    (@oldteaseller)

    I see. Thank you. I will try that.

    Kind regards,

    Simon

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    sure thing , please keep us posted

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    hmmmm

    please try use this block to log error

    error_log( "\nstart_line\n" , 3, "/home/iotedk/public_html/lscwp.log");
    error_log( print_r($url, TRUE) , 3, "/home/iotedk/public_html/lscwp.log");
    error_log( "\nend_line\n" , 3, "/home/iotedk/public_html/lscwp.log");

    to break the line , to make it easier to read.

    Best regards,

    Thread Starter oldteaseller

    (@oldteaseller)

    Thank you for continuing to help out.

    Now the error log looks like the following:

    start_line
    https://www.io-te.dk/wp-cron.php?doing_wp_cron=1612918576.5504450798034667968750
    end_line

    start_line
    https://www.io-te.dk/wp-admin/admin-ajax.php?action=as_async_request_queue_runner&nonce=6bdc524c1b
    end_line

    start_line
    https://purchase.izettle.com/purchases/v2/?lastPurchaseHash=1612887931841X4aNMmrzEeuHIZSTH-jliw
    end_line

    start_line
    https://purchase.izettle.com/purchases/v2/?lastPurchaseHash=1612887931841X4aNMmrzEeuHIZSTH-jliw
    end_line

    I am currently in touch with the developer of our “WooCommerce iZettle Integration”-plugin who is also looking into the matter.

    Please feel free to let me know if you spot the cause for, or a possible solution to, these errors.

    Kind regards,

    Simon

    • This reply was modified 3 years, 9 months ago by oldteaseller.
    Plugin Support qtwrk

    (@qtwrk)

    well … be honest these URLs are valid , and they should be a “string” , not an “array”

    do they come up alone with your PHP error log like the ones you posted in first post ?

    Plugin Support qtwrk

    (@qtwrk)

    okay , try add this line

    error_log( date("Y-m-d H:i:s") , "3" , "/home/iotedk/public_html/lscwp.log");

    after the start_line

    this way , it will log out the date and time , easier to locate which one is which one

    • This reply was modified 3 years, 9 months ago by qtwrk.
    • This reply was modified 3 years, 9 months ago by qtwrk.
    Thread Starter oldteaseller

    (@oldteaseller)

    looks like the Woo and translation logs are related to automatic updates

    Plugin Support qtwrk

    (@qtwrk)

    I’m sorry ?

    Thread Starter oldteaseller

    (@oldteaseller)

    sorry, do you see the earlier message which appears to be “held for moderation by our automated system and will be manually reviewed by a moderator.” ?

    Plugin Support qtwrk

    (@qtwrk)

    no but mods don’t like long-code here

    you can paste it somewhere like https://pastebin.ubuntu.com/

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @qtwrk Please do not ask people to post logs on this forum. It doesn’t work.

    @oldteaseller Please do not post large code or responses like that here, it doesn’t work after ~10 lines or so.

    If you need share that data please use https://gist.github.com/ or https://pastebin.com/ instead and post the link to that paste.

    Thread Starter oldteaseller

    (@oldteaseller)

    there was a handful of references to woocommerce and translation files appearing at the same time as an automatic update of those files took place

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[STDERR] Php Warning – Error 443’ is closed to new replies.