Sitemap successful, but gave several warnings
« on: June 13, 2018, 09:31:13 PM »
Hi there,

I recently upgraded to 8 and did my first sitemap. It was successful, but I did see these warning messages. Can you explain them please? (domain name redacted)

PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0

PHP Notice: Undefined variable: ISnE4kx2AC in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Notice: Undefined variable: ISnE4kx2AC in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Notice: Undefined variable: ISnE4kx2AC in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Notice: Undefined variable: ISnE4kx2AC in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102

PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/mywebsite.com/httpdocs/generator/runcrawl.php on line 102
Re: Sitemap successful, but gave several warnings
« Reply #1 on: June 14, 2018, 04:12:17 AM »
Hello,

those are 2 messages, repeating - displaying of them depends on server configuration and can be safely ignored in this particular case.
Re: Sitemap successful, but gave several warnings
« Reply #2 on: March 26, 2020, 10:29:59 AM »
Im also getting lots of warnings from the crawler install on our server. Running version 2018-05-17 v8.0

Could you fix these warnings and notices?

This doesn't give us much reassurance in the continued use of this product.
Seems unmaintained given the lack of updates.

Code: [Select]
PHP Stack trace:
PHP   1. {main}() C:\Users\ab\GitHub\test-web\public\crawler\runcrawl.php:0
PHP   2. include() C:\Users\ab\GitHub\test-web\public\crawler\runcrawl.php:105
PHP   3. include() C:\Users\ab\GitHub\test-web\public\crawler\index.php:102
PHP   4. XMLCreator->pnY5V4T1aq($VfoZIHwvppID93dLX = *uninitialized*, $urls_completed = *uninitialized*, $Jw6Vzo9vDDMLUc = *uninitialized*) C:\Users\ab\GitHub\test-web\public\crawler\pages\page-crawlproc.inc.php:214
PHP   5. XMLCreator->q8SLPqSbfW5wmtFAwEU($urls_completed = *uninitialized*, $t9v8ohOpFm = *uninitialized*) C:\Users\ab\GitHub\test-web\public\crawler\pages\class.xml-creator.inc.php:106
PHP   6. fclose(*uninitialized*) C:\Users\ab\GitHub\test-web\public\crawler\pages\class.xml-creator.inc.php:624
</pre>OUT > <pre>352 | 0 | 8,557.2 | 0:04:39 | 0:00:00 | 5 | 2,680.9 Kb | 348 | 0 | 2680
</pre>ERR > <pre>PHP Warning:  Use of undefined constant tru - assumed 'tru' (this will throw an Error in a future version of PHP) in C:\Users\ab\GitHub\test-web\public\crawler\pages\class.grab.inc.php on line 102
Re: Sitemap successful, but gave several warnings
« Reply #3 on: March 26, 2020, 11:37:53 AM »
I have tried very hard to mute these warning and notices. I finally found a way to do it.

There are two instances of error_reporting(E_ALL&~E_NOTICE) in the following source files:
- public/crawler/index.php
- public/crawler/pages/class.grab.inc.php

This overrides any error_reporting set previously e.g. in the command line:

Code: [Select]
php -d error_reporting=E_ERROR public/crawler/runcrawl.php
I changed these to error_reporting(E_ERROR)

So now when I run the following all warnings and notices are muted:

Code: [Select]
php -d error_reporting=E_ERROR public/crawler/runcrawl.php
Please could you at least let developers turn off these disturbing warnings without us having to hack the source code or even better could you fix these warnings and notices (fixing the root cause)? Thank you!
Re: Sitemap successful, but gave several warnings
« Reply #5 on: February 12, 2024, 10:12:23 AM »
Was there any work done to make it possible to control the error output?
Every day I've tonnes of warnings and notices in logs, which is unacceptable.
I just checked the older set up and I've GBs of logs, all not important warnings and notices...
Re: Sitemap successful, but gave several warnings
« Reply #6 on: February 12, 2024, 12:41:18 PM »
Hello,

currently this can be only achieved by suppressing it in the server side configuration.