I received the below error during the process of a ZenCart shopping cart upgrade. The error was noticed when navigating through the ZenCart store admin via a web browser. I wanted to post a resolution because I wasn’t able to locate the exact resolution to my answer online and it took me awhile to locate the issue. Most of the resolutions I located on the Internet talked about modifying the post_max_size or other options located in the php.ini file however no matter what I changed these to I ended up receiving the same error.
Error: PHP Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 491520 bytes) in /path/to/file
After a lengthy troubleshooting process I finally noticed that my FTP application was acting oddly and for some reason was partially uploading files without warning and was also uploading some files in ASCII instead of Binary. To resolve the issue I installed the FileZilla FTP application which is my FTP application of choice anyway. Once installed I uploaded all of the files again and then no longer received the error.
So if you receive this error and cannot find the root of the problem you might consider making sure the PHP files that are being processed are the correct size and if not verify that they have been uploaded to the server properly.