I was wrong, 512MB is not a low number, the problem resides somewhere else.
But ...since the error reports 512MB then this is the real value on your server, try using a phpinfo.php file with the following content
<? phpinfo(); ?>
Search for the memory_limit constant and let us know the value. If the memory_limit is above 512MB then definitely something else is going wrong.
If not... then just restart httpd and check again, or if you have ssh access (must have in order to achieve all that) then just fire the following command in order to find which php.ini is the one that your server is configured to read.
php -i | grep 'Configuration File'