Troubles with Drupal, File Uploads, and XAMPP
Ever tear your hair out for hours trying to track down why something is not working, only to find out that it is the simplest thing?
Well, after losing a large chunk of my life that is never to return, I am happy to say that it is solved. While doing some module development on my Mac using xampp, I was running into the problem that file uploads to nodes, either via upload.module or CCK filefield was not working at all. Not in D5, not in D6. Nothing I could do or think of would solve it. Nothing on Google or any other search engine despite my myriad of search terms.
After literally hours trying all I could think of, debugging PHP, JavaScript, etc, I finally found out that Irakli was having the same problem and swooped in to the rescue. Turns out that it was a configuration parameter that was left to “default” in php.ini. By default
; Temporary directory for HTTP uploaded files (will use system default if not specified).
;upload_tmp_dir = Was not actually using a valid system default as best we can tell. Simply changing it to
; Temporary directory for HTTP uploaded files (will use system default if not specified).
upload_tmp_dir = /tmp fixed all if our upload woes and we were back in business. Now, can I have that last half a day of my life back?


Comments
Thanks this helped a ton!
Thanks this helped a ton!
all files uploaded but no rendering
Hi Frank,
I have a question about using xampp. I installed in and built my website with html, css and php. Works great in Localhost. But when I upload all the files all I see is my nav bar
Here is the code for the index.php file
<?php @ require_once ("menu.php");?>
<?php @ require_once ("$page.html");
?>
Online, I can see the content of the page variable. But, again, all looks good on localhost.
Thanks for your help and hope all is well!
Photi
all files uploaded but no rendering
Hi Frank,
I have a question about using xampp. I installed in and built my website with html, css and php. Works great in Localhost. But when I upload all the files all I see is my nav bar
Here is the code for the index.php file
<?php @ require_once ("menu.php");?>
<?php @ require_once ("$page.html");
?>
Online, I can't see the content of the page variable. But, again, all looks good on localhost.
Thanks for your help and hope all is well!
Photi
thx
Thanks Frank, you have just saved my day!!
Tom at Zevaa.com
Hah, I just did the same
Hah, I just did the same exact thing, except my client's website is on a shared hosted server so I don't have access to php.ini! Guess I'll have to see where this goes...
Frank... you are a god.
Frank - Just wanted to say thanks a million for posting this. If only I would have found it 6 hours ago. I too am using XAMPP on a Mac and have been banging my head and Googling like a mad-man trying to find the answer. You should post this over at Drupal somewhere. Anyway, thanks again.
Thank you for another great
Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. PS: My blog pour parier en ligne sur betclic.
Post new comment