hi after install neew dev version and clean the cache file ..i becomes errors like this
warning: fopen() expects at least 2 parameters, 1 given in .../xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 84.

and sitemap.xml is empty

Comments

apaderno’s picture

Title: warning: fopen() expects at least 2 parameters, » Wrong parameters for fopen()
Status: Active » Fixed

I noticed that the second parameter was not correct also in the function calls it get it; the second parameter should be 'w+'.

The code has been changed, and committed in CVS.
Thanks for your report.

apaderno’s picture

The second parameter has been changed to wb+, which is a better value for compatibility with Windows systems.
Thanks to earnie for the suggestion.

eule’s picture

Title: Wrong parameters for fopen() » Wrong parameters for fopen() fclose()

hi

i run the new dev from today.
xmlsitemap is not visible

in the logs is a php error
fclose(): supplied argument is not a valid stream resource in ./xmlsitemap/xmlsitemap/xmlsitemap.pages.inc in Zeile 85.

eule’s picture

Status: Fixed » Active
apaderno’s picture

Title: Wrong parameters for fopen() fclose() » Wrong variable being used
Priority: Critical » Normal
apaderno’s picture

Title: Wrong variable being used » The variable is not initialized

The code has been changed, and committed in CVS.

Thanks for your report.

apaderno’s picture

Status: Active » Fixed

Of course, the status should be changed to fixed.

parasolx’s picture

i still not get what need to be modified.

i have changed all the "w+" with "wb+" in xmlsitemap.pages.inc but the error still came out when target to sitemap.xml

Warning: fclose(): supplied argument is not a valid stream resource in /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 85

Warning: Cannot modify header information - headers already sent by (output started at /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc:85) in /home/kripkorn/domains/kripkornstudios.com.my/public_html/includes/common.inc on line 141

apaderno’s picture

If you want to fix the code before the new development snapshot archive is generated (it will happen at 12:00 AM GMT), you can simply change the line containing

  fclose($fd);

in

  fclose($fp);
parasolx’s picture

ok.. after changing it all, the sitemap.xml turn into blank page?

then i apply this patch: http://drupal.org/files/issues/xmlsitemap_tools_settings_091190.patch

i delete all the sitemap cache and after that view it again. this error came out:

Warning: fclose(): supplied argument is not a valid stream resource in /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 222

Warning: fclose(): supplied argument is not a valid stream resource in /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 231

Warning: fclose(): supplied argument is not a valid stream resource in /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 231

Warning: fclose(): supplied argument is not a valid stream resource in /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc on line 231

Warning: Cannot modify header information - headers already sent by (output started at /home/kripkorn/domains/kripkornstudios.com.my/public_html/modules/xmlsitemap/xmlsitemap/xmlsitemap.pages.inc:222) in /home/kripkorn/domains/kripkornstudios.com.my/public_html/includes/common.inc on line 141

parasolx’s picture

then i refresh this error came out:

XML Parsing Error: no element found
Location: http://www.kripkornstudios.com.my/sitemap.xml
Line Number 1, Column 1

i check in xmlsitemap table, the data is there.

Anonymous’s picture

Status: Fixed » Needs work

I confirm the #11 comment.

apaderno’s picture

Title: The variable is not initialized » Wrong parameters for fopen() / fclose()
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.