Loading...
 
Skip to main content

Features / Usability


File Upload Fatal Error in 9.4

Brand new installation of Tiki 9.4 gives the following error when uploading larger files:

Fatal error: Call to a member function fetchRow() on a non-object in .../installer/installlib.php on line 252

It appears to be related to file size. I can upload files up to about 3 MB. Bigger than that and I get the error.

The max file size is set to 128 MB, so I don't think that's the problem. I've seen years-old chatter about this error on the forum, but haven't found a thread where the problem was resolved. Anything current and applicable to 9.x?

Thanks!!

anything?

Additional info:

To be more precise, maximum file size for upload to the File Gallery is consistently 2.50 MB. Above that and upload fails with the error message:

Fatal error: Call to a member function fetchRow() on a non-object in /home/frien116/public_html/installer/installlib.php on line 252

Begging for help here. I can't use Tiki if the max file size for the gallery is 2.5 MB!


Sorry, Rick, for the delayed response. For some reason didn't get email notification from the forum. Anyway, I just now tried the demo site upload and it works fine. So, yes it appears specific to my installation.

That installation was via the installer currently used by my host InMotion. They encourage TikiWiki use through some documentation they've prepared themselves. They offer some limited Tiki support, and appear to want to help, but they're not Tiki specialists and can't figure this one out.

File size limit is still consistently 2.5 MB. PHP settings appear to be in order. Can't figure out what's wrong, but I really need to. Any ideas where to continue my search?

File Gallery storageQuestion is set to the default "Store in Database".

My php.ini settings are at default, and are the same as those specified in the Tiki docQuestion except for the three I have marked. Details below.

memory_limit = 512M *
file_uploads = On
upload_max_filesize = 128M
post_max_size = 128M
allow_url_fopen = On
session.save_handler = files
session.save_path = /tmp
max_execution_time = 30 * *
max_input_time = 60
magic_quotes_gpc = Off
default_charset = "utf-8"
;mbstring.func_overload = 0 * * *

* memory_limit is higher than the recommended 128M

* * max_execution_time is 30 rather than the recommended 60

* * * mbstring.func_overloadQuestion is commented out. You can see the ";" character I copy/pasted from the php.ini file.

Would any of these discrepancies account for the consistent 2.50MB file size limit?

So far as I know, all related settings are at default. I don't have the Tiki experience to boldly tweak settings, though I have the inexperience to accidentally break things.

Rick's workaround is a success. While I continue to be concerned that there's a config error lurking somewhere in my Tiki installation, limiting upload filesize for the database to 2.50MB, I am pleased to have an alternate solution.

As I have found many mentions of this problem on the Internet, but no solutions other than Rick's, I'll share my experience and maybe it will help others.

First, get a little background info from the Tiki Documentation on File StorageQuestion. Supplement this with info from Tiki for Smarties on Configuring File GalleriesQuestion.

Following that guidance...

1) I created a directory in my Tiki main directory called "uploads". Permissions defaulted to 755 and I left them that way.

2) In that directory I created a new text file named ".htaccess", and in that text file I placed a single line of text: "Options All -Indexes" (without the quotes). This prevents web browsers from peering into this directory, and make the Tiki File Gallery the way to access these files.

3) I logged into my Tiki site as admin, and went to Admin Home > File Galleries. There, under the "General Settings" tab, I set Storage to "Store in Directory". That revealed a new field called "Path to store files in the file gallery:", where I entered "uploads/" (sans quotes). Clicked on the Change Preferences button at the bottom to save the changes.

4) After I had saved those changes (not before), I was able to click on that page's button labeled "Move files from database to directory". This successfully moved the few small image files I had already uploaded to the database, and the article/wiki pages that used those photos continued to work.

So far this solution appears fine. I will post again if it creates unforeseen troubles.

Real credit goes to Rick, who made this solution possible for me. As a new Tiki user looking forward to expansion of my Tiki site, I'm a little concerned that Rick appears to be singlehandedly providing forum support and quality documentation (i.e.,Tiki for SmartiesQuestion) for this software. That makes all Tiki users vulnerable to Rick's continued participation.