Windows File Upload
Hi,
I am running Mahara on windows and everything seems to work except uploading files.
I can upload profile icons without any problems but not upload files.
Version of Mahara is 1.1.6 (2009022617), PHP Version 5.2.4, Windows server 2003 ISAPI.
The files are uploading to the PHP temp folder correctly then disapear.
I have cheked in the artefact/file folder and there is only the profileicons folder where the profile icons are uploading. No other folders or files are created.
Any ideas?
Thanks
Re: Windows File Upload
Interesting - I've seen this before somewhere, I'm pretty sure we fixed it but I can't remember what exactly the problem was.
A random guess: if you add this line to your config.php, do new uploads start working?:
$cfg->insecuredataroot = true;
Re: Windows File Upload
Thanks for the quick reply.
Tried adding $cfg->insecuredataroot = true;
Didn't help.
Same problem loading files into a blog as well.
Does the profileicons use the same upload script as the 'file' upload beacuse the profileicons upload does work?
Re: Windows File Upload
I checked the file upload in a blog and it actually puts the file in the artifacts/blog/uploads folder but the web page contually shows uploading the file.
blogspot_file_pending has the file listed but doesn't go any further.
Re: Windows File Upload
Hi - it's a strange one, I've been racking my brains but can't remember what the problem was last time 
Is there any way I could get some kind of access to your system? A login to the Mahara would be a start, though even better would be ssh access.
Re: Windows File Upload
Is it anything to do with addslashes or using \\ in the php.ini for folders?
I will send some server details to you.
Re: Windows File Upload
Hello,
I have just dropped in the conversation as I had exactly the same problem while installing 1.1.2 (2009-03-10) with Windows, under wampserver, before I decided to migrate it to Ubuntu.
I could install and run the previous versions in Windows without problems, so I thought that it may be some sort of bug that appeas in windows for that version.
I tried adding the line you mention in the config,php, Nigel, but the problem persists, and it is everytime you try to upload a file, It just gets stuck and there is a message saying "loading files".
However, I recently installed and test Mahara 1.1.5 in Wampserver without this problem. So whatever it causing it, it only appears in Windows but it is difficult to reproduce.
Regards
Re: Windows File Upload
Ok, I spend the day tracing through where it is locking and found the code crashed here
if (is_image_file($path)) {
// If it's detected as an image, overwrite the browser mime type
$imageinfo = getimagesize($path);
$data->filetype = $imageinfo['mime'];
$data->width = $imageinfo[0];
$data->height = $imageinfo[1];
return new ArtefactTypeImage(0, $data);
}
in artefact/file/ lib.php
If I comment this out it works...
It didn;t make any difference if it was an image file or not.
I have't gone any further to check what is_image_file() does or what further impact this will have yet.
Re: Windows File Upload
Hi - that suggests that the function is_image_file is causing the crash. Do you have any way to find out any more details about the crash? Can you get access to the apache error log for your Mahara and see if there are any messages in there about it?