Justin
Justin

Reputation: 4263

Unable to run propel:build-model in Symfony 1.4 and PHP 5.3, PHP Fatal error: Allowed Memory Size

I have a Symfony 1.4 project that I am unable to successsfuly run the task:

./symfony propel:build-model

This results in the following error:

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /plugins/sfPropel15Plugin/lib/vendor/propel-generator/lib/builder/om/PHP5PeerBuilder.php on line 2033

Interestingly, I am able to run the build model class for this project on a machine with PHP 5.2 on it.

I am running this on a VMware Player virtual machine build with PHP 5.3.3 installed. I've tried increasing the memory_limit in the php.ini file to rediculously high amounts but it still bombs.

Upvotes: 2

Views: 2322

Answers (2)

Emmeram Morning
Emmeram Morning

Reputation: 101

Solution: set memory_limit in the php.ini used by CLI to a value other than -1.

In the configuration you mentioned (at least PHP 5.3, Symfony 1.3), there appears to be a bug in Symfony that faults when the value of memory_limit is -1.

Upvotes: 3

Justin
Justin

Reputation: 4263

Ok, yes...I am an idiot.

I was unaware of the CLI specific .ini file.

I upped the memory_limit in the /etc/php5/cli/php.ini file and things worked fine.

Thanks everyone.

Upvotes: 0

Related Questions