Forums | Mahara Community
Support
/
1.2RC Export error
10 November 2009, 8:25
Hi
Received the following error in the logs when exporting in the 1.2RC
[10-Nov-2009 12:20:03] PHP Fatal error: Call to undefined function apache_setenv() in /home/mywebsite/public_html/eportfolio2/htdocs/export/download.php on line 41
Any ideas?
Thanks
10 November 2009, 9:20
Hi Patrick,
I guess maybe you're not using Apache as your webserver ?
However, those functions should probably be wrapped inside a function_exists in case of someone using Mahara on something other than Apache.
Would you mind filing a bug report about this? In the meantime you can just comment out that line in that file and it should work. There's actually another call to apache_setenv in the new files code that allows for unzipping files within Mahara, so you'll need to comment it out there too, if you're using that feature, it's in htdocs/artefact/file/extract-progress.php on line 37.
Penny
10 November 2009, 9:47
Hi Penny
Yes, using Apache. First thing I did was to comment it out but no joy.
With it left in I just get the:
Please wait while your export is being generated...
If I comment out then it says: unable to generate report.
10 November 2009, 10:41
Weird, I don't know why those functions wouldn't be available when you're using apache. You're not doing anything weird like running php as cgi ?10 November 2009, 18:17
Grr grr PHP
Apparently the functions are available when running PHP as an apache module. I guess I should have wrapped them in function_exists.
If you have gzip compression enabled, and that function isn't available, the progress bar won't appear to move until the file is completed, at which time it'll jump to 100%.
If you're just seeing it freeze, there's probably some other issue (maybe you didn't comment out the call right?). You can find out by looking in the apache error log for your Mahara install.
11 November 2009, 0:12
Mmmm...nothing showing in the logs apart from what was in the export log.
When I disable the call I can almost (!) get it working now. Seems that the resulting page is being displayed within the progress bar.
Anyone else any ideas?
11 November 2009, 3:14
I had another go at removing the call. The ZIP file is being created (have checked and it is there and accurate) but there is no obvious way for the user to download it...I presume it links from the export page.
This is all I get:
11 November 2009, 17:45
Hm, that suggests that the inner page might show a non recoverable error. Try editing theme/raw/static/style/style.css, finding "#progress", and changing the height from 40px to 800px. Then try the export again, and see if you can read what's on that page.11 November 2009, 19:44
Error is:
Access Denied: You do not have permission to access this page
12 November 2009, 22:47
Well that's confusing
Is your site available publicly so we can have a look at it?
Maybe also you could try setting $cfg->insecuredataroot = true; in your config.php and seeing if that helps.. but I'm still confused to exactly how the exporter could have generated a file you weren't allowed to download.