• Welcome to Sitemap Generator Forum.
 

Problems after upgrading

Started by dozemonster, December 29, 2023, 08:17:47 PM

Previous topic - Next topic

dozemonster

We just upgraded our server to using php 8.2 and we upgraded our sitemap generator code as well.

Now when we run the sitemap generator, it creates the sitemap, but fills up our php log file with over 1GB of warnings.  I'm just assuming the sitemap file created is correct.

Can you fix?  Here's a sample from the logfile.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "ddbg" in /home/dozeman1/public_html/sitemap-generator/pages/class.utils.inc.php on line 107
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 116
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 116
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_prev_sm_incl" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 739
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_prev_sm_cache" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 741
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_badreq_httpcode" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 751
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_interrupt_httpcode" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 753
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "path" in /home/dozeman1/public_html/sitemap-generator/pages/class.grab.inc.php on line 802
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_urlprefix" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 117
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "port" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 151
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "ddbg" in /home/dozeman1/public_html/sitemap-generator/pages/class.utils.inc.php on line 107
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "skipip" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 145
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_curlproxy" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 112
[29-Dec-2023 20:01:51 UTC] PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 112
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_extra_param" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 112
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_portconnection" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 113
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_portconnection" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 114
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "port" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 114
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_more_ips" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 126
[29-Dec-2023 20:01:51 UTC] PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 126
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "req" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 120
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_crawl_ident" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 115
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_http_nogzip" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 121
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "addheaders" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 121
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_keep_alive" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 121
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "ddbg3" in /home/dozeman1/public_html/sitemap-generator/pages/class.utils.inc.php on line 107
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "ddbg" in /home/dozeman1/public_html/sitemap-generator/pages/class.utils.inc.php on line 107
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "ddbg3" in /home/dozeman1/public_html/sitemap-generator/pages/class.utils.inc.php on line 107
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "anytype" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146
[29-Dec-2023 20:01:51 UTC] PHP Warning:  Undefined array key "xs_httplimit" in /home/dozeman1/public_html/sitemap-generator/pages/class.http.inc.php on line 146

dozemonster

Correction - we're on php v8.1.26.

sitemap generator v8.2


XML-Sitemaps Support

Hello,

those messages do not affect created sitemap and can be ignored. You can configure php to omit logging those for the time being.

dozemonster

Oleg -

Thanks for your quick reply.

We have php running throughout our site, so we can't disable php warning messages globally.  We have over 20,000 pages and need to know if there's an issue.

If those warning messages from sitemap generator can be ignored, can you add "error_reporting(E_ERROR);" or "error_reporting(-1);" to the beginning of the sitemap script so it's disabled for sitemap generator only?

That could be a quick fix for now, and then eventually maybe you could even add that into the configuration options?



Brian


XML-Sitemaps Support

>We have over 20,000 pages and need to know if there's an issue.
That's not an issue.

Error messages output is already suppressed in generator script, but looks like file logging is still enabled due to server configuration.

dozemonster

I think you misunderstood - we have over 20,000 php pages on our website, and so we can't globally disable php warnings in the log file in case there are issues with the website.

So, we need to disable warning messages for just the sitemap generator php script.

What's the best way to do that?





dozemonster

So, the only way we know of to disable php warning messages on an individual script level is to add a line of code to the php script.

Could you provide a version of the script with the single line "error_reporting(0);" added?  That should do the trick.


XML-Sitemaps Support

Hello,

the script already has error_reporting(E_ERROR); line which should suppress warning messages.

dozemonster

But it's not suppressing warning messages, as you can see in the sample log file I provided above.

In fact, it's generating almost 3GB of warning messages when it's run.

So I really need the script to suppress those warning messages.  It's not doing it now.  That's the problem.