Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi.
I installed the module in a new site and when i check the xml file i got an empty page.
http://www.todo-peleas.com/sitemap.xml
I have got a message in the admin page that could be the problem :P
"Unable to load site map. Make sure your temporary directory exists and is writable by Drupal."
I dont know where the temporary directory is.
I have tried all the alias for that web page,
/gsitemap/0 etc.
I have pathauto and clean urls installed.
Thanks for your help
Comments
Comment #1
dami CreditAttribution: dami commentedBy default, temporary directory is set to /tmp, which is at the same level where your public_html or www directory is. You can change it in drupal admin panel.
I have 2 sites at the same host (site5.com), but I am using their multisite plan, so these two sites are physically under 2 different directories: /home/site1/ and /home/site2/. Both sites have the same setup, using default /tmp directory. Interestingly, gsitemap works perfectly fine for site1 but not for site2. (Same error:temperary directory not wirtable.) Both /tmp folder has permission 755. So I am really puzzled...I haven't tried chmod 777, does it bring any security problem? Thanks.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedSame problem here. The Sitemap is empty and no error messages appear in the protocol. Maybe it's a PHP problem because on my dev-server (PHP 5) the sitemap is created without errors. The live server has PHP 4.4.6.
Comment #3
dami CreditAttribution: dami commentedJust a follow up, changed /tmp to 777 didn't help. Still the same error msg: temporary directory not writable or not exist ....
Comment #4
bacchus101 CreditAttribution: bacchus101 commentedI have the same issue.
For some reason if I go to: Administration --> File System and change the temporary directory to /files it works.
All the permissions are equitable to /tmp so I am not sure what is causing the issue but in my situation the redirect to files serves the need and produces an XML Sitemap.
Comment #5
darkpollo CreditAttribution: darkpollo commentedwhen i tried to change it into /files it shows a text that say: that folder doesnt exist... :S
I had noticed that tmp doesnt exist also, so i created it.
I have php 4 also on my server so could be a reason to fail. Anyone more with php4?
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedI recently noticed that my problem wasn't related to php4. I changed the tmp-Directory and now everything works fine.
Comment #7
dami CreditAttribution: dami commentedmglanznig: Can you give some details what changes you made to tmp-dir? Did you change it to /files, or created a new subdir under your drupal installation, and what's the new directory permission? Thanks.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedI created a new sub directory under the drupal root called tmp. I think the privileges for creating directories inside my old tmp dir where missing or something like that related to access rights.
Comment #9
dami CreditAttribution: dami commentedThanks, it works for me. What did was followed mglanznig's instruction, using 'tmp' instead of '/tmp' as the temporary directory. Looks like it has something to do with how the absolute path is translated...
Comment #10
darkpollo CreditAttribution: darkpollo commentedChange /tmp into tmp fix the problem.
Thank you very much!
:D
Comment #11
darkpollo CreditAttribution: darkpollo commentedComment #12
minimism CreditAttribution: minimism commentedI'm not sure that this is a fix for everyone - at least, not for me. I have tried different tmp directories etc., but I still have an empty XML file... I've posted my system details here. It's rather annoying, because I have a sitemap working on one site, but no another!
http://www.rapitasystems.com/sitemap.xml - DOES work
http://namke.com/sitemap.xml - DOESN'T work
Comment #13
rousehouse CreditAttribution: rousehouse commentedSame issue here until I changed my "/tmp" setting for temporary files to my "files" directory (off the root of my drupal site). I created a new "tmp" directory by changing the setting to "files/tmp", and it's working great.
Comment #14
minimism CreditAttribution: minimism commentedLike I said, this is not a fix for everyone - I have the following set:
file system path:
files
temporary directory:
files/tmp (doesn't work)
tmp (doesn't work)
download method is public (since I'm using imagecache, which apparently doesn't work otherwise)
The module creates the drupal_gsitemap directory, but does not create the subdirectory. Would the fact that the top-level .htaccess file redirects http://www.namke.com/* to http://namke.com/* be an issue? I can't imagine why, but I'm clutching at straws...
Comment #15
minimism CreditAttribution: minimism commentedOk, it would seem that the "_gsitemap_update_cache()" function is returning FALSE. A small investigation shows me that the "file_check_directory" function (which should create the directory if it doesn't exist??) is failing when it gets to (in my case) "files/tmp/drupal_gsitemap/namke.com" - i.e. it is not creating the "namke.com" directory.
Comment #16
Ryanbach CreditAttribution: Ryanbach commentedI have the same issue when I use Drupal's normal cache, except that my XML file is corrupt and produces strange characters instead.
Comment #17
vigoncas CreditAttribution: vigoncas commentedI was tracing code.
When system has enabled safe_mode, mkdir command is affected when trying to create recursive directories.
I paste a comment from official PHP documentation:
In my case, this is the problem and I supposed that I can apply to all places where we need create recursive directories or we have differences between directory owner and user that launchs the script.
If we create directories manually and set the correct owner and permissions, the system can create sitemaps without problems.
Tested :-)
Comment #18
minimism CreditAttribution: minimism commentedAaaaaahh! Thank you :-) Manually creating the directories has solved it for me. Would be nice to have an automatic solution, but for now I'm happy ;-)
Comment #19
vigoncas CreditAttribution: vigoncas commentedProblem can be solved creating only one directory with domain name included. For example 'drupal_gsitemap_example.com' instead of 'drupal_gsitemap/example.com'.
It's less elegant than actual solution but it's more flexible and solve problem with recursive paths when safe mode is active.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedThe following solution worked for me:
1. I have manually created a temp directory in my drupal root directory, called tmp
2. I have manually set its permissions to wrxwrxwrx (777)
3. I have set tmp to my Temporary directory under Home » Administer » Site configuration
4. I have manually created drupal_gsitemap directory under tmp
5. I have manually set its permissions to wrxwrxwrx (777)
6. I have manually created www.mydomainname.com directory under drupal_gsitemap
7. I have manually set its permissions to wrxwrxwrx (777)
remove existinig folders, if they exist with wrong permissions
Comment #21
afagioliIn my case, there was nothing to do with the tmp directory.
My system was just missing the php5-zlib - PHP5 Extension Module
I've added my very easy hack at the file
gsitemap.module:1146
Maybe in the next release af the xmlgsitemap module will have a check of the existance of the php zlib module?
More info at http://www.fagioli.biz/?q=drupal-5-xml-sitemap-create-empy-site-map
Comment #22
Riccardo83 CreditAttribution: Riccardo83 commentedok guys, I got it working that sitemap is created in
/httpdocs/files/tmp/drupal_gsitemap/www.jbsoulscan.com/
but
/httpdocs/sitemap.xlm is not created at all ? why?
Comment #23
Laurel Papworth CreditAttribution: Laurel Papworth commentedslightly different fix worked for me - changed admin->site config ->file system from /tmp to straight tmp (no slash). Worked fine.
Comment #24
Darren OhFixed in CVS commit 83400.
Comment #25
Darren OhComment #26
(not verified) CreditAttribution: commentedComment #27
yecarrillo CreditAttribution: yecarrillo commentedI got same error. My HTTP_HOST is subdomain.domain.com:8080, so Drupal is unable to create folders with ":". Please use other ENV vars or cut non alphanumeric characters.
Comment #28
Darren OhThis was fixed. If you're not comfortable using the dev release, you can wait for the next stable release.
Comment #29
sentinelcz CreditAttribution: sentinelcz commentedHello for all,
I need help with XML sitemap and safe mode.
1.I have TMP folder with 777 - ok.
2.Temporary files are created in this folder -ok.
3.In TMP folder these files stays without moving.
They have permission only 600, read, write - what is problem.
I tried to change in these files permission to 777, because I hoped that files will process.
In FTP program occurs message "/tmp/filenZd9GV: Operation not permitted".
Is this problem of Drupal or provider?
How could I solve it?
Thank you for help.
Comment #30
shohaml CreditAttribution: shohaml commentedI refer to the new xmlsitemap, and not gsitemap.
I had a couple of errors:
1) the system always complained that the temporary file (file) in the temp directory is unreadable.
2) the system was unable to find the xmlsitemap directory in the 'files' directory.
After many trials, and some code dwelling, I got to the following solution:
1) Don't care where your Drupal temporary files reside, as long as the directory is 777 (depends on your host preferences for running Apache).
2) The actual sitemap files are always inside 'files/xmlsitemap'. Make sure this path exists, and set to 777.
3) Once the initial files (gss.xsl, sitemap.xml.gz) are created in 'files/xmlsitemap', make sure to change their permissions to 777.
That fixed everything for me.
Comment #31
Darren OhPlease do not change the topic of old issues. See issue 197104 for a discussion of this issue in XML Sitemap.
Comment #32
sentinelcz CreditAttribution: sentinelcz commentedTHKS - shohaml
My problem was that xmlsitemap was missing in files folder.
to Darren Oh
OK, I apologize for wrong place.
Comment #33
sonicthoughts CreditAttribution: sonicthoughts commentedchanging to tmp worked for me!