PHP.INI

PHP.INI

Nosūtīja Tom Denton
Atbilžu skaits: 3

Let me start with a big thank you for the team - i am a three day old moodler and it is just great!

My only problem is that of upload size - i have looked at all the advice about changing settings in php.ini - but i can't find where it is! Any suggestions or do i create it in the first instance?

Vidējais novērtējums: -
Atbildot uz Tom Denton

Re: PHP.INI

Nosūtīja Bill Burgos
Hi Tom,

If you are in a unix environment, php.ini is usually right under the /etc directory:

/etc/php.ini

On a Windows machine, you can do a file search for it.

Once you find php.ini, look in it for a section that is something like this:

<snip>
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

<snip>

Change the upload_max_filesize to the size you want, save the file, and restart you web server. You can then change the settings in the Admin section of your Moodle installation.

Atbildot uz Bill Burgos

Re: PHP.INI

Nosūtīja Tom Denton

Thanks Bill, I appreciate your help - i actually got round the problem by manually uploading (ftp) to the site (once i had created the course and a new folder). I have several SCORM files that are up to 200Mb! I need permission for admins only to do this (ie myself) so as it turns out i will not change the upload settings that the teachers use after all.

Thanks again and regards

Tom

Atbildot uz Tom Denton

Re: PHP.INI

Nosūtīja Just H
Hi all

This is a fairly common request and not everyone has the knowledge or the access to change these settings.

A work around I used can be found here http://tips-scripts.com/?tip=php_ini#tip This is a page set up by one of the guys who now works for my host. The script this link takes you to allows you to amend a hosts php.ini (to do things like up the file upload size) and another script shows you how to duplicate the amended script throughout your site. If set up to run every now and then via cron, any changes made by your host will have a minimal affect on your site.

There's a few useful little tips for newbie's like myself on that page.

Hope this comes in useful smile