I also faced a problem uploading images to the system, fortunately I was able to figure out what the problem was, and it didn't come from TastyIgniter's code but from my system configuration. I'll share the solution here in case someone else happened to face that same problem.
PROBLEM:
System > Tools > Image Manager > Upload
- An error is reported when trying to upload images.
Whatever the value set in System > Settings > Image Manager > Maximum File Size, images larger than +/- 130KB are reported to exceed the maximum allowed size.
- The uploaded image thumbnail appears with a cross over it and "Delete file" underneath.
- Hovering the image shows raw html code (this could be corrected in TastyIgniter's code):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p>
<p>Please contact the server administrator, webmaster@........ and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p>
<p>More information about this error may be available in the server error log.</p>
</body></html>
- The apache error log shows:
[Wed Jun 08 05:08:49 2016] [warn] [client 172.20.20.1] mod_fcgid: HTTP request length 135362 (so far) exceeds MaxRequestLen (131072), referer: http://......./admin/image_manager?popup=iframe&field_id=&sub_folder=/Slideshow/&57578c0190ae2
- Hitting the "Delete file" text shows: "Permission denied: File is not writable" (probably because it wasn't stored in the first place)
Checked with phpinfo(); and have:
SOLUTION:
- Edit your Apache's fcgid module configuration file (/etc/apache2/mods-available/fcgid.conf)
- Add or edit the line "MaxRequestLen <max-bytes>" and set the max file volume in bytes. For a 500KB limit this would look like:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FcgidConnectTimeout 20
FcgidIOTimeout 300
MaxRequestLen 500000
</IfModule>
Note that MaxRequestLen was changed to FcgidMaxRequestLen in Apache 2.4
Then restart Apache service:
> sudo service apache2 restart