icamys / php-sitemap-generator

A simple PHP sitemap generator.
MIT License
168 stars 65 forks source link

Notice & Fatal Error #37

Closed alexonbstudio closed 1 year ago

alexonbstudio commented 2 years ago

Notice: Trying to access array offset on value of type bool in /webser/verlibs/icamys/php-sitemap-generator/src/SitemapGenerator.php on line 647

Fatal error: Uncaught RuntimeException: failed to run curl_exec, error: Could not resolve host: submissions.ask.com in /webserver/libs/icamys/php-sitemap-generator/src/SitemapGenerator.php:638 Stack trace: #0 /webserver/sitemap-php.php(99): Icamys\SitemapGenerator\SitemapGenerator->submitSitemap() #1 {main} thrown in /webserver/libs/icamys/php-sitemap-generator/src/SitemapGenerator.php on line 638

I trying without composer also.

alexonbstudio commented 2 years ago

now files.xml.gz create inside have sitemap.xml but have fatal error: Fatal error: Uncaught RuntimeException: failed to run curl_exec, error: Could not resolve host: submissions.ask.com in C:\xampp\htdocs\dev.lan\website-project\libs\icamys\php-sitemap-generator\src\SitemapGenerator.php:638 Stack trace: #0 C:\xampp\htdocs\dev.lan\website-project\sitemap-php.php(99): Icamys\SitemapGenerator\SitemapGenerator->submitSitemap() #1 {main} thrown in C:\xampp\htdocs\dev.lan\website-project\libs\icamys\php-sitemap-generator\src\SitemapGenerator.php on line 638

The file not creat automatly to final.xml

alexonbstudio commented 2 years ago

PHP8.0 / 8.1

alexonbstudio commented 2 years ago

Capture d’écran 2022-06-22 020126 exemple

kasperkamperman commented 2 years ago

Same issue here. Something goes wrong with the submission of the sitemap. Probably to ask.com. The script works fine if you turn submission off: //$generator->submitSitemap();

francogp commented 2 years ago

It would be a good idea to be able to turn off some search engines so we can disable ask.com or others when they fail

lithium720 commented 2 years ago

Just ran into this

Script should probably catch and skip with warning

francogp commented 2 years ago

It also fail All other search engines (except google). All of them disabled the sitemap upload, and implemented the IndexNow API. This should be implemented as a new feature.

icamys commented 1 year ago

All ping pages except Yandex are now removed, so I'm closing this thread. If anyone experiences the issue again, please provide code examples so I can reproduce the problem. Cheers!