Please remember that in a shared hosting environment setting the memory_limit might not work as hosting providers could overrule your settings.
But if you develop localy or host your project on you own server or a vps it is be possible to set the memory limit by numbers of ways: inside your php.ini configuration file, a htaccess file or inside your own .php script file.