• Resolved shadmuhammad

    (@shadmuhammad)


    My Website PHP Error log is showing this error, and its recurring. Should i be worried? Is everything running fine>

    
    [09-Aug-2020 13:25:24 UTC] PHP Warning:  Illegal string offset 'url' in 
    /public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42
    
    [09-Aug-2020 13:25:26 UTC] PHP Warning:  Illegal string offset 'url' in 
     /public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 26
    
    [09-Aug-2020 13:25:26 UTC] PHP Warning:  Illegal string offset 'cf_cookie' in 
    /public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 38
    
    • This topic was modified 4 years, 7 months ago by Yui.
    • This topic was modified 4 years, 7 months ago by Yui. Reason: please use CODE button for code formatting

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @shadmuhammad ,
    please send me the log file. You find the download option on Other tab.

    Thread Starter shadmuhammad

    (@shadmuhammad)

    I had previously disabled the Log Mod.

    However, after activating the log and waiting for some time.

    Here are the Plugin’s Log File and Error.log file.

    https://drive.google.com/file/d/1YfSZ4LAafNcGcAj9wNgHBAXlzL4eiu9Y/view?usp=sharing

    https://drive.google.com/file/d/1UNyI82laDxA149z_IPScjJMz-jHM4pzP/view?usp=sharing

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Many thanks. Can you tell me what options you configured for preloader? And if you added some sitemap, can you please give me the link?

    Thread Starter shadmuhammad

    (@shadmuhammad)

    Options configured in Preloader tab:

    Enable preloader: Yes

    Automatically preload the pages you have purged from Cloudflare cache with this plugin: Yes

    Preloader operation: All are ticked

    Preload all URLs into the following sitemaps: /sitemap.xml

    Varnish: No

    Sitemap Location: https://www.mytrustworth.com/sitemap.xml

    Thread Starter shadmuhammad

    (@shadmuhammad)

    Again same errors are repeating daily. I have pasted the error.log for better insights.

    
    [10-Aug-2020 21:41:09 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42
    
    [10-Aug-2020 21:41:11 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 26
    
    [10-Aug-2020 21:41:11 UTC] PHP Warning:  Illegal string offset 'cf_cookie' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 38
    
    [10-Aug-2020 21:41:11 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42
    
    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Can you tell me if errors go away if you disable the sitemap preloading?

    Thread Starter shadmuhammad

    (@shadmuhammad)

    No, removing the sitemap didnot fixed the problem and the PHP error.log reappeared.

    I did updated the wordpress version to 5.5, which do include the sitemap by default. Including that in Preload Sitemap didnot work too.

    Current Active Options:

    Enable preloader: Yes

    Automatically preload the pages you have purged from Cloudflare cache with this plugin: Yes

    Preloader operation: All tick

    Preload all URLs into the following sitemaps: EMPTY

    The problem seems to lie somewhere else.

    • This reply was modified 4 years, 7 months ago by shadmuhammad.
    • This reply was modified 4 years, 7 months ago by shadmuhammad.
    Thread Starter shadmuhammad

    (@shadmuhammad)

    I have disabled the Preloader. And cleared the cache! Preloader is working fine in logs, but PHP Error is showing errors.

    Still Error.log is showing the same error.

    
    [12-Aug-2020 06:16:45 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42
    
    [12-Aug-2020 06:16:47 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 26
    
    [12-Aug-2020 06:16:47 UTC] PHP Warning:  Illegal string offset 'cf_cookie' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 38
    
    [12-Aug-2020 06:16:47 UTC] PHP Warning:  Illegal string offset 'url' in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42
    
    • This reply was modified 4 years, 7 months ago by Yui.
    • This reply was modified 4 years, 7 months ago by Yui. Reason: please use CODE button for proper formatting
    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @shadmuhammad ,
    do you see the warnings even with latest version of the plugin?

    Thread Starter shadmuhammad

    (@shadmuhammad)

    Yes. Still problem exists.

    Please confirm is there any URL limit set by your plugin for both Preload and Fallback Cache?

    As all the current PHP warnings are referring to URL Strings.

    PHP Warning: Illegal string offset ‘url’ in
    PHP Warning: Illegal string offset ‘cf_cookie’ in
    PHP Warning: file_put_contents(/home3…………….html): failed to open stream: File name too long in /home3/mytrustw/public_html/wp-content/advanced-cache.php on line 100

    For info.: Few URLs are really quite long. Do you think that might be the cause of errors?

    Secondly, Preloader is not stopping. It has entered into the recurring mode. Preloading all URLs again and again. Even when they are already cached into Cloudflare.

    Do you think the above-mentioned PHP errors are the cause of Preloader not stopping when cache preload is complete?

    PHP Error Log of last 4 Days:
    https://drive.google.com/file/d/1PdMkDDCSCAAeKeZjOqFSAc2Y8N233sC5/view?usp=sharing

    And Yes in previous version Preload Debug was not showing Preloading URL strings, with latest update Preload URLs are visible.

    Debug Log of Plugin:
    https://drive.google.com/file/d/1YfSZ4LAafNcGcAj9wNgHBAXlzL4eiu9Y/view?usp=sharing

    Thread Starter shadmuhammad

    (@shadmuhammad)

    I searched it over internet. Its famous issue: Failed to open stream: File name too long.

    Solution:
    Create file with name that is close to the filesystem limit of 255 bytes (say 253 bytes).

    It is the Server level limitations.

    I will have to truncate the URLs to 256 characters. Then no problem will be faced.

    Your Plugin is identifying the correct issue. And is working fine.

    Do you have any configuration for escaping the Preload or Escape Fall Back Cache for such long URL Strings or Urls having errors?

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @shadmuhammad ,
    to avoid these kind of problems, on next release I will update the cache key used by fallback cache so that file name length is max 255 characters.

    Thread Starter shadmuhammad

    (@shadmuhammad)

    Dear @salvatorefresta :

    Yesterday I installed a plugin “Longer Permalinks“.

    It automatically resolved PHP Error of Preload i.e.

    [12-Aug-2020 06:16:45 UTC] PHP Warning: Illegal string offset ‘url’ in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42

    [12-Aug-2020 06:16:47 UTC] PHP Warning: Illegal string offset ‘url’ in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 26

    [12-Aug-2020 06:16:47 UTC] PHP Warning: Illegal string offset ‘cf_cookie’ in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 38

    [12-Aug-2020 06:16:47 UTC] PHP Warning: Illegal string offset ‘url’ in /home3/mytrustw/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/preloader.class.php on line 42

    The above-mentioned PHP errors stopped now.

    However, fallback cache still shows PHP errors for 20 to 30 links out of 7234 links. And yes those links are quite large in characters.

    [19-Aug-2020 05:50:32 UTC] PHP Warning: file_put_contents(/home3/mytrustw/public_html/wp-content/wp-cloudflare-super-page-cache/www.mytrustworth.com/fallback_cache/civil_engineering_astm_standards_codes_astm_d_miscellaneous_materials_astm_d5283_standard_practice_for_generation_of_environmental_data_related_to_waste_management_activities_quality_assurance_and_quality_control_planning_and_implementation.html.headers.php): failed to open stream: File name too long in /home3/mytrustw/public_html/wp-content/advanced-cache.php on line 323

    [19-Aug-2020 05:59:16 UTC] PHP Warning: file_put_contents(/home3/mytrustw/public_html/wp-content/wp-cloudflare-super-page-cache/www.mytrustworth.com/fallback_cache/civil_engineering_astm_standards_codes_astm_d_miscellaneous_materials_astm_d5338_standard_test_method_for_determining_aerobic_biodegradation_of_plastic_materials_under_controlled_composting_conditions_incorporating_thermophilic_temperatures.html.headers.php): failed to open stream: File name too long in /home3/mytrustw/public_html/wp-content/advanced-cache.php on line 323

    [19-Aug-2020 06:04:28 UTC] PHP Warning: file_put_contents(/home3/mytrustw/public_html/wp-content/wp-cloudflare-super-page-cache/www.mytrustworth.com/fallback_cache/civil_engineering_astm_standards_codes_astm_d_miscellaneous_materials_astm_d5367_standard_practice_for_evaluating_coatings_applied_over_surfaces_treated_with_inhibitors_used_to_prevent_flash_rusting_of_steel_when_water_or_water_abrasive_blasted.html.headers.php): failed to open stream: File name too long in /home3/mytrustw/public_html/wp-content/advanced-cache.php on line 323

    These details might be helpful for perfecting your lines of code.

    I am marking as RESOLVED. As percentage error is quite insignificant.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP Error Log’ is closed to new replies.