Subject: Max size of uploads

Posted on: 05/06/21 12:16pm
By: spergol

My next problem is trying to upload a file.

It tells me that the max upload size is 16 bytes (!) - which I don't have to tell anyone is just slightly too small to be of much use.

I've tried to find help - the most recent posts here are from 2008 and all of them mention a php.ini file - which I cannot find anywhere either. My program searched all the source-code and it only found places where the max size is supposed to be fetched from another place.
The closest one was:

UploadHandler.php tells me:
// The php.ini settings upload_max_filesize and post_max_size
// take precedence over the following max_file_size setting:
'max_file_size' => null,
'min_file_size' => 1,

According to Phpinfo though:
upload_max_filesize 500M
post_max_size 800M

I've also uploaded a file via FTP directly to the articles folder, but don't see an option to use that one as workaround.

Sorry for all these problems - just trying to get it to run.

Re: Max size of uploads

Posted on: 06/06/21 08:42am
By: Laugh

PHP config has the last say on what the file size should be. It looks like from what you are telling me that it is set to 500MB. PHP config options are usually stored in the php.ini file but depending on the host it could be somewhere in the host control panel. You would have to contact them to figure this out.

If you type Size into the Geeklog Configuration search you will come up with options for image sizes or file size in the File Manager. I believe the File Manager defaults to 16 MB.

You didn't say how you are uploading the file (Article Editor or File Manager) or what the size of the file is.

Check the size of your file and the config option set in Geeklog and make sure the config option is higher and the PHP config option for max upload files size is set to the same as Geeklog or higher.

Re: Max size of uploads

Posted on: 06/06/21 11:10am
By: spergol

The file's size was 62kb - not exactly huge.
I tried to upload it using various methods - in the article creator, in the Rich FileManager and directly via FTP into the articles folder.

In the config-page I just figured out that the default there is 16 bytes not MB.
It tells me to enter the size in MiB, but when I entered 500000 instead of 16, the Rich FileManager changed the 16 bytes to 500 kb as max size.

The upload-function within the article-creator still does the same though - nothing.
The file's name is shown, but there is no upload being done.
I've also increased the max size on pictures in articles in the config, but no change.

Also, I haven't managed to figure out how to show files in articles that are already uploaded, the browse function only goes to my computer's drive.
I'll try to figure that out later - probably easy ...

Re: Max size of uploads

Posted on: 06/06/21 04:01pm
By: Laugh

It is probably a permissions issue then. Does it show any errors for permissions in the Environment Check?

Re: Max size of uploads

Posted on: 06/06/21 05:10pm
By: spergol

No, environment check is completely green on this server.

Re: Max size of uploads

Posted on: 07/06/21 07:00am
By: Laugh

That is such a small file. Their isn't any file settings we have that would prevent that upload (unless you changed the file size settings yourself to something smaller or the file doesn't have a proper image file extension like jpg, gif, png, etc)

I have seen directory permission checks like we use in the Environment Check run into issues on some hosts and report false positives or negatives (not sure why). This happens in other CMSs as well.

Anyways can you manually check your file permissions for the images directory and all folders beneath it? You will need to log in via FTP and make sure these directories have a permission of 755. The files have permission of 644.

Check out this article for instructions on how to do this (it is not a Geeklog article but the process to change permissions via FTP is the same)

Sometimes the user you log in with for FTP is different than what the website uses to access the files so this may not work. If that is the case then you will need to contact the host (but this is usually not the case).

Re: Max size of uploads

Posted on: 07/06/21 11:22am
By: spergol

Confirm, all folders were 755, files 644.
I'd actually already checked that - but doublechecked just now.

The dimensions of the picture aren't huge (620 x 350) - and I actually increased the max size on that too, to be safe.

Filetype is jpg - so not exotic at all.
To make sure it isn't some odd thing with this specific file or jpg pictures, I tried it with a gif and a png yesterday too - same result.

Edit: I also tried using various browsers to exclude that possibility, too.

Re: Max size of uploads

Posted on: 07/06/21 11:58am
By: Laugh

Are you uploading the file in the Article Editor?

What is the actual error you get when you try to upload the file?

If you enable root debug what error do you get now?

Are there any errors listed in the Geeklog error.log file?

Re: Max size of uploads

Posted on: 08/06/21 09:02am
By: spergol

Yes, I'm trying to upload in the article.
The filemanager works, since I massively increased the max size in the settings from 16 bytes.

There is no error shown at all really - there simply happens pretty much nothing:
The filename I've chosen appears on the right, but the two grey boxes where (probably) the preview of the picture and the thumb are supposed to appear remain grey.

Nothing indicating that it's working on it either - although it should be pretty much instant with 62kb.

In case it's just the previews that don't work, I also tried to preview and even just post a test-article, using the image1 code thing that it tells me below is required to actually post the article.
The result is the article to show it as content-text.


I just enabled root debug, the env-check still shows all green.
If you wanted me to run something else for errors, I don't know what.


No errors concerning uploads in the log.
Somehow error.log shows a lot of successful plugin-insatallations from the installation-date - not what I would consider errors? And no, I didn't try to install any plugin, those are just the automatically installed ones - spamX and such.

Re: Max size of uploads

Posted on: 08/06/21 10:00am
By: Laugh

With Root Debug enabled, try reuploading the images via the editor. It might show an actual error on screen or in the error.log file.

I am wondering if maybe the files are getting uploaded (since it works in the FileManager) but it is having an issue creating the thumbnail.

Geeklog - Forum