Usually the issue that you canât see the error message is that the error reporting is not showing the error message. In order to see the error try for debugging the following instructions: How do I get PHP errors to display? - Stack Overflow
Now for your specific issue since the default value oh php.ini for upload_max_file_size is 100KB I donât think that this is a coincidence. Please try to restart Apache to apply the changes. If this is still not working then maybe the php.ini file is on different folder.
Try creating a file with name phpinfo.php and add the following lines:
<?php
phpinfo();
This will print the configurations of PHP that you are using. Search for php.ini and you will see the location of your php.ini file as you can also see at the screenshot:
Hello @entrylvlSE yes thatâs correct the C:\php\php.ini file is the file that you should change. Also make sure that youâve also restarted Apache or else the changes will not be applied.
Last but not least it seems that you are using PHP version 5.6.30 which we silently not support. I would suggest you to upgrade to PHP version 7 or later (if possible) as you may experience other issues with the library as well.
Back to your problem. From my experience when there are some upload limitations then the error is not reported from PHP (e.g. it canât handle it and it is showing a blank page). I strongly believe that the issue is still that the configuration is not updated. Can you attach the screenshot of phpinfo by searching upload_max_filesize as you can also see at the below screenshot?
If this is still doesnât work then I am not convinced that it picked up the correct configuration still . Can you open the page with the enterprise version and instead of loading the CRUD (e.g. $crud->setTable()⌠e.t.c.) to output the below code and let me know the output please?
var_dump(ini_get('upload_max_filesize'));
exit;
and see if this is corresponding the correct value for you? My blind guess would be that you have 2 PHP installed into your machine. If this is the case you will need to find the second php.ini file and do the change there as well.
Thatâs very weird then. The only thing that you can do here is to debug it a little bit if this is not a big issue for you. Go to the file: application/libraries/GroceryCrudEnterprise/grocerycrud/enterprise/src/GroceryCrud/Core/State/UploadState.php and start debugging it to see where the issue is. More specifically go to the line 26 and start adding some var_dump . For example:
public function render()
{
var_dump('hello');
die;
$stateParameters = $this->getStateParameters();
$this->setModel();
$model = $this->gCrud->getModel();
$this->initializeLight($model);
If this will work try to move the:
var_dump('hello');
die;
to a lower line to see where the issue is. My blind guess will be that this is not even going to the ârenderâ function and PHP is blocking it.
When I upload a file 100kb less, I get the var_dump message hello, but when I upload 100kb more I get the error (reading body) just like the first picture I uploaded on this forum.
I tried adding @ in array_keys($_FILES)[0] then I upload a file 400kb in size. I prompted to the error message (âThis operation is not allowedâ);
Also a blind guess from your report. Iâve noticed that the memory limit is also low on your PHP. Can you please change the memory_limit from 60MB to 512MB ?
This configuration seems that it is on Apache from what I see here: Configuring mod_security so if that doesnât work maybe try to disable the mod_security plugin temporarly (since you are running it locally) and try again? Donât forget to always restart Apache as well.
Thank you for the vast support facing this problem.
After hours of googling and researching, I found the root of the problem.
The upload_tmp_directory is disabled. After setting up an temporary directory, the upload works. Iâm not quite sure if thatâs the reason but Iâm happy it worked.
Thank you again for your support and help Sir @johnny.