Hello Cedric,
php notice means nothing,
the function of the sript works.
php error is something you should report.
Try a search on google with php notice.
best regards
steve
Thread Starter
Cédric
(@icedo)
i understand what you mean but a good plugin doesn’t made 10 Mo of php notices by day.
One notice or ten notices by day, it’s ok. i have got more than 10k pages to preload.
i don’t write a subject for one or two php notices by day. i have created this thread because it produce me a debug.log of 10Mo by day …
I have a lot of work, i don’t made a thread to spend my time. It’s not my plugin, do what you want with your plugin.
But, I love this plugin! So, i report that because i think, as a developper, this need to be revised.
Best regards,
Cedric
(nb: sorry if my english is bad, it’s not my main language)
@icedo, just out of curiosity. What PHP version is your server running?
Thank you
That’s strange. $wp_cache_object_cache is defined in the config file and has been since 2010.
Can you check if $wp_cache_object_cache is set in wp-content/wp-cache-config.php ?
Are you doing anything unusual to preload? Running it through wp-cli or something?
Thread Starter
Cédric
(@icedo)
Hello @donncha,
$wp_cache_object_cache is defined in wp-content/wp-cache-config.php at line 8:
$wp_cache_object_cache = 0;
I found that the file was corrupted. A line with a lot of black “NULNULNULNUL” appeared at line 64 (just after $wp_super_cache_front_page_notification). So i have fixed it thanks to the sample version. Then i tried to save settings to see if the “bug” appear again but it seems to be good.
I launch the preload. I hope that was the problem.
I’m using the linux crontab for wp-cron.php
Best regards
Thread Starter
Cédric
(@icedo)
This problem is solved.
Did you plan to fix this warning in a future version?
PHP Warning: strpos(): Empty needle in /var/www/clients/client1/web1/web/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 636
I know there is a small custom fix on github but i thought it could be fix in new version. Maybe you can’t?
Thank you for your help
Best regards
Where is that PHP Warning: strpos(): Empty needle in
bug mentioned? Are you seeing this when running command line WP scripts? $WPSC_HTTP_HOST should almost always be defined, except where you’re using a command line ..
Try the development version. I fixed the corrupted config file issue there: https://odd.blog/y/2o
Thread Starter
Cédric
(@icedo)
this warning appear in the debug.log when preload mode work.
i have this warning every second or two.
it’s maybe because i launch wp-cron.php from the server crontab
thank you for the link
Ah, that’s why. There’s no HTTP HOST when you call things from the command line. You could modify that line so it looks like this:
if ( $WPSC_HTTP_HOST == '' || false === strpos( $permalink, $WPSC_HTTP_HOST ) ) {
That will at least stop that PHP warning. I’ll add that in the next release.
Thread Starter
Cédric
(@icedo)
it’s perfect. no more notice. Thank you very much.