Failing to upload files of any size - Internal server error

Hi, I have installed the latest version of nexcloud (version 12) for the first time, following the installation wizard on a subdomain and it looked like the installation was successful. However, I could not upload files of any size (even small files). There is a message saying: Internal server error. I went to check the logs for errors and this is the full message:

Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. at Unknown#0

Can anyone experienced and solved similar problem? I do not have much experience with php or databases so I will appreciate is someone can provide a very detail (step by step) explanation on how to solve this issue.

Thank you all for your support.

Angelo

Before any help can be given It’s useful to supply the following system information.

OS ?
php version ?
apache or nginx ?
SQL DB version ?

Hi Vincent,

Here the information required:

Linux (cpanel)
Apache: 2.4.25

PHP
Version: 5.6.30
Memory Limit: 536870912
Max Execution Time: 3600
Upload max size: 511 MB

Database
Type: mysql
Version: 5.6.35

Thank you for your support!

Angelo

Start with what is suggested edit the php.ini
search for always_populate_raw_post_data=0
and change that to -1 to suppress the warning. this is a bug.

sources:
https://bugs.php.net/bug.php?id=66763

Hi Vincent,

Thank you for your suggestions.

After changing some php settings, file uploading went from internal server error to forbidden, but finally it worked!

Now I am able to upload file without any problem.

Thank you.

Angelo

Great to hear it’s working for you now.

IF possible can you add what you have done to solve the issue. So to help others that may encounter the same or similar problem.

Hi Vincent,

Yes mate. This is how I did it:

In my cpanel (Godaddy) I selected php version under the Software section. I am running php version 5.6. Then, I ensured all the php modules that NextCloud recommended are ticked. Note, that not all of the recommended modules appeared, but I ensured the ones that appeared and are in the recommended list are ticked.
After that, I went to php options to ensure memory limit is 512M, set up post_max_size to 128M and upload_file max_size is 64M. From there I can see that max_input_time is -1 and file upload in ON.

I installed NexTCloud version 12 on a subdomain I created. Followed the wizard and tested. I also created a php.ini file and copy and paste the code to enable php OPcache - available in the documentation https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

Now it looks like it is working fine. However, there are two repetitive errors that always appeared:

PHP Startup: Unable to load dynamic library ‘/opt/alt/php56/usr/lib64/php/modules/ffmpeg.so’ - libswscale.so.3: cannot open shared object file: No such file or directory at Unknown#0

and

Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route “theming.Theming.getLogo” as such route does not exist.
/home/angelosaavedra/public_html/cloud/lib/private/Route/Router.php - line 339: Symfony\Component\Routing\Generator\UrlGenerator->generate(‘theming.Theming…’, Array, 1)
/home/angelosaavedra/public_html/cloud/lib/private/URLGenerator.php - line 70: OC\Route\Router->generate(‘theming.Theming…’, Array)
/home/angelosaavedra/public_html/cloud/apps/theming/lib/ThemingDefaults.php - line 156: OC\URLGenerator->linkToRoute(‘theming.Theming…’)
/home/angelosaavedra/public_html/cloud/lib/public/Defaults.php - line 186: OCA\Theming\ThemingDefaults->getLogo(true)
/home/angelosaavedra/public_html/cloud/core/templates/layout.guest.php - line 45: OCP\Defaults->getLogo()
/home/angelosaavedra/public_html/cloud/lib/private/Template/Base.php - line 176: include(’/home/angelosaa…’)
/home/angelosaavedra/public_html/cloud/lib/private/Template/Base.php - line 151: OC\Template\Base->load(’/home/angelosaa…’, NULL)
/home/angelosaavedra/public_html/cloud/lib/private/legacy/template.php - line 202: OC\Template\Base->fetchPage(NULL)
/home/angelosaavedra/public_html/cloud/lib/private/legacy/template.php - line 224: OC_Template->fetchPage()
/home/angelosaavedra/public_html/cloud/lib/private/Template/Base.php - line 132: OC_Template->fetchPage()
/home/angelosaavedra/public_html/cloud/core/templates/404.php - line 10: OC\Template\Base->printPage()
{main}

I don’t know the reason of these two errors. Any ideas why this is happening and how to fix it?

Regards,

Angelo