Hi!
I put the file on a joomla site, unfortunately using a cron on the server, I can not always control it manually.
The final urlset tag is not closed, it is missing.
Sitemap Version 2.1
Thanks
For the sake of completeness, I added these php code lines to the beginning of the file if they can serve for later versions.
// Set the start URL. Here is https used, use http:// for non SSL websites.
// URL Association for SSL and Protocol Compatibility
$http = 'http://';
if (!empty($_SERVER['HTTPS'])) {
$http = ($_SERVER['HTTPS'] === 'on') ? 'https://' : 'http://';
}
define ("SITE", $http."www.site.com");
Quote from: txmodxoops on July 21, 2017, 16:53:05 PM
The final urlset tag is not closed, it is missing.
Do you run the script with the php program (cli) or with wget (or similar as website)?
Elmar
The program is notepad++
Quote from: txmodxoops on July 23, 2017, 13:36:06 PM
The program is notepad++
??? I mean, how do you run the php script. Not how you view the xml file.
Through a cron job on the linux server
Quote from: txmodxoops on July 24, 2017, 15:02:34 PM
Through a cron job on the linux server
How does the cron job line look like?
Command linux + https://www.mysite.com/sitemap-2.1.php
It seems you don't understand what information I need from you to help you. I give up.
Can you explain me better please? Thank you
I sent you a private message with the code
I had forgotten to specify that the problem came after switching to php 7