7340 lighttpd's mod_fastcgi won't execute .php files

I finally got it working with chroot and phpinfo loads fine, but I keep getting php errors with different scripts. The two most occuring errors are:

Code:
2011-05-02 12:27:15: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the fastcgi process died): pid: 31694 socket: unix:/var/run/lighttpd/php-fastcgi.socket-2

and

Code:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 2147483648 bytes) in ...

I've read that the latter error is probably due to the "memory_limit" setting in php.ini and that I should increase it. Which is fine, but it tries to allocate 2GB of memory, so no matter how high I try to set it it'll never be enough.
 
You're right, a memory limit of 2GB is pretty high.
If you don't get the same messages without chroot, you might have missed a file in your chroot that doesn't lead to an immediate error message, but instead to strange effects later on.
 
I get both the same errors with and without chroot.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.