Hi.
Since upgrading to version 22.12, any new APP that I run gives me a blank screen for at least 5 minutes and then displays the error below:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/glucose/resources/lib/Authentication.php on line 358
It seems the Authentication.php is new since using the old releases, anyone else had this issue?
I run this on a Raspberry Pi which I have done for over a year.
I recompiled some old code using the axp file and they still work by any new code doesn't.
Kind regards
Alan Duff.
Fatal Error: Authentication.php
Re: Fatal Error: Authentication.php
Update:
I have located the issue to be with memory allocation through PHP.
I have increased the memory_limit in the php.ini file but again the error still persists, no ,matter what numbers I try it just keeps failing.
Last message:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/glucose/settings-manager.php on line 73
The Raspberry Pi has 1GB of memory and swap file size of 1GB with disk free space of 4GB... I have had no issues running PHP scripts generated by AppGini before the upgrade so wonder if something has changed in the generating of coding which now requires more memory.
I have tried the same using XAMPP which runs on my main WIndows 10 computer and it runs OK.
I'm mythed as to what is causing these PHP memory errors.
Kind regards
Alan Duff
I have located the issue to be with memory allocation through PHP.
I have increased the memory_limit in the php.ini file but again the error still persists, no ,matter what numbers I try it just keeps failing.
Last message:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/glucose/settings-manager.php on line 73
The Raspberry Pi has 1GB of memory and swap file size of 1GB with disk free space of 4GB... I have had no issues running PHP scripts generated by AppGini before the upgrade so wonder if something has changed in the generating of coding which now requires more memory.
I have tried the same using XAMPP which runs on my main WIndows 10 computer and it runs OK.
I'm mythed as to what is causing these PHP memory errors.
Kind regards
Alan Duff
Re: Fatal Error: Authentication.php
PHP 7.4?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Fatal Error: Authentication.php
Hi.
The version I have is
7.3.31-1~deb10u1
Would this be the issue?
The version I have is
7.3.31-1~deb10u1
Would this be the issue?
Re: Fatal Error: Authentication.php
No, I think every version > PHP7 should be fine.
I have upgraded to 22.12 two days ago, regenerated a couple of apps but I don't have any problems. But I have not tested on RasPI.
Sorry I don't have any other idea right now.
I have upgraded to 22.12 two days ago, regenerated a couple of apps but I don't have any problems. But I have not tested on RasPI.
Sorry I don't have any other idea right now.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Fatal Error: Authentication.php
Hi Jsetzer.
Thank you for replying.
I will continue to search for an answer and post here once hopefully solved.
Kind regards
Alan Duff
Thank you for replying.
I will continue to search for an answer and post here once hopefully solved.
Kind regards
Alan Duff
Re: Fatal Error: Authentication.php
You could maybe try disabling memory_limit on the scripts that your are having issues with? See if it makes a difference?
https://www.php.net/manual/en/ini.core. ... mory-limit
ini_set('memory_limit', -1);
https://www.php.net/manual/en/ini.core. ... mory-limit
ini_set('memory_limit', -1);
Re: Fatal Error: Authentication.php
Hello peebee.
I changed the memory_limit to -1 but then execution time 120 seconds was exceeded.
I then changed the max_execution_time to 300 seconds and then the old message appeared:
PHP Fatal error: Out of memory (allocated 1910505472) (tried to allocate 262144 bytes) in /var/www/html/glucose/settings-manager.php on line 187
My old code works fine it's new code generated by the latest version gives this error which sounds like allocation of memory has changed or something is causing it to request more.
I tried the same code on XAMPP (Windows) and the new code works fine.
The Raspberry Pi has 1GB memory so maybe this is the issue now but wasn't before the latest release.
I'm baffled and still trying other things to see what the cause is as I prefer to use the Raspberry Pi as I have always done with no issue until now.
Kind regards
Alan Duff
I changed the memory_limit to -1 but then execution time 120 seconds was exceeded.
I then changed the max_execution_time to 300 seconds and then the old message appeared:
PHP Fatal error: Out of memory (allocated 1910505472) (tried to allocate 262144 bytes) in /var/www/html/glucose/settings-manager.php on line 187
My old code works fine it's new code generated by the latest version gives this error which sounds like allocation of memory has changed or something is causing it to request more.
I tried the same code on XAMPP (Windows) and the new code works fine.
The Raspberry Pi has 1GB memory so maybe this is the issue now but wasn't before the latest release.
I'm baffled and still trying other things to see what the cause is as I prefer to use the Raspberry Pi as I have always done with no issue until now.
Kind regards
Alan Duff
Re: Fatal Error: Authentication.php
Hi there,
just to make sure. Do you have an custom code that is executed, or are you using a plain App?
If you have custom code, try to generate a simple App and load it to you Rasp to see if that gives the same result.
just to make sure. Do you have an custom code that is executed, or are you using a plain App?
If you have custom code, try to generate a simple App and load it to you Rasp to see if that gives the same result.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Fatal Error: Authentication.php
Hi pbottcher.
I have no custom code I'm just using a simple plain App with 1 table and 3 fields.
Kind regards
Alan Duff
I have no custom code I'm just using a simple plain App with 1 table and 3 fields.
Kind regards
Alan Duff
Re: Fatal Error: Authentication.php
Hi,
did you check with a new "empty" App if it has the same effect?
did you check with a new "empty" App if it has the same effect?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Fatal Error: Authentication.php
Hi.
Yes, I have created two new apps but with the same result.
I'm not a coder so wouldn't know where to check what's going on, is there a feature where it shows the flow the code follows to track where the memory is being requested?
Kind regards
Alan Duff
Yes, I have created two new apps but with the same result.
I'm not a coder so wouldn't know where to check what's going on, is there a feature where it shows the flow the code follows to track where the memory is being requested?
Kind regards
Alan Duff
Re: Fatal Error: Authentication.php
Hi,
can you checl your DB table membership_groups to see if there is any stange entry.
Also can you check your confg.php for the anonymousGroupand check if that is in the membership_groups
can you checl your DB table membership_groups to see if there is any stange entry.
Also can you check your confg.php for the anonymousGroupand check if that is in the membership_groups
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Fatal Error: Authentication.php
Hi.
Having pointed me in the right direction the issue has now been resolved but not sure why it occurred, thank you!
Here's what I found.
I'm wondering at what point the above are created/populated as it appears this part was never executed.
The only thing I can think of is when the config.php is created it fails on creation (for me), maybe permissions error, at the fail point the details are displayed to copy and paste after creating the file manually. There is no continue button at this fail point so maybe the creation of the membership tables above are then not created?
Screenshot of the page where it fails to create the config.php file attached.
Kind regards
Alan Duff
Having pointed me in the right direction the issue has now been resolved but not sure why it occurred, thank you!
Here's what I found.
- membership_groups - *missing from DB* - created the table from a known working DB
membership_users - *missing from DB* - created the table from a known working DB
membership_grouppermissions - *empty* populated from a known working DB
I'm wondering at what point the above are created/populated as it appears this part was never executed.
The only thing I can think of is when the config.php is created it fails on creation (for me), maybe permissions error, at the fail point the details are displayed to copy and paste after creating the file manually. There is no continue button at this fail point so maybe the creation of the membership tables above are then not created?
Screenshot of the page where it fails to create the config.php file attached.
Kind regards
Alan Duff
- Attachments
-
- Failed to create config.php
- Screenshot 2022-03-08 211609.jpg (53.22 KiB) Viewed 2592 times
Re: Fatal Error: Authentication.php
I have now resolved the issue with the Raspberry Pi so that the config.php does not fail to create.
used command:
sudo chown -R www-data:www-data /var/www
Kind regards
Alan Duff
used command:
sudo chown -R www-data:www-data /var/www
Kind regards
Alan Duff