# Is there are way to log PHP errors in fastcgi?

**URL:** <https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523>\
**Category:** NGINX\
**Created:** [November 3, 2010, 1:39am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523 "2010-11-03T01:39:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [November 3, 2010, 1:39am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/1 "2010-11-03T01:39:44Z")

</div>

I have configured the virtual host with a custom php.ini which has the  
error\_log value configured, but the file is empty, it is not created at  
all.

Does the FastCGI have another way to log the PHP errors?

–  
Frank C.

=======================  
[http://devblog.brahmancreations.com](http://devblog.brahmancreations.com)

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [November 4, 2010, 1:21am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/2 "2010-11-04T01:21:14Z")

</div>

Hi

Any fastcgi errors will be shown in your php log. You might have to  
edit php.ini for that.

HTH,  
Nuno

–  
Mars 2 Stay!

> **[Golden Hammer](https://xkcd.com/801/)**
>
> Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.

/etc

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [November 4, 2010, 1:00am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/3 "2010-11-04T01:00:07Z")

</div>

On 3 November 2010 00:38, Frank C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> =======================  
> [http://devblog.brahmancreations.com](http://devblog.brahmancreations.com)

Any help?

Does nginx or the fastcgi module cause all the php errors to show in the  
main error log?  
The configuration is definitely correct, phpinfo() shows them both  
correctly, but the php error log is still not created.

–  
Frank C.

=======================  
[http://devblog.brahmancreations.com](http://devblog.brahmancreations.com)

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [November 4, 2010, 7:07am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/4 "2010-11-04T07:07:48Z")

</div>

stderr of fastcgi would be logged in nginx’s error.log file.

On Wed, Nov 3, 2010 at 8:38 AM, Frank C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have configured the virtual host with a custom php.ini which has the  
> error\_log value configured, but the file is empty, it is not created at  
> all.
> 
> Does the FastCGI have another way to log the PHP errors?

–  
Ren Xiaolei

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [November 5, 2010, 12:49pm UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/5 "2010-11-05T12:49:47Z")

</div>

On 3 November 2010 23:58, Frank C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> Does nginx or the fastcgi module cause all the php errors to show in the

Output of phpinfo()

display\_errors Off  
display\_startup\_errors Off  
error\_log /opt/manager\_app/www/logs/php\_error.log  
log\_errors On  
log\_errors\_max\_len 1024

Everything appears to be set correctly.

Can something in the additional ini files affect it?

–  
Frank C.

=======================  
[http://devblog.brahmancreations.com](http://devblog.brahmancreations.com)

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [November 4, 2010, 1:21am UTC](https://www.ruby-forum.com/t/is-there-are-way-to-log-php-errors-in-fastcgi/198523/6 "2010-11-04T01:21:52Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On 11/03/2010 09:58 PM, Frank C. wrote:

> The configuration is definitely correct, phpinfo() shows them both  
> correctly, but the php error log is still not created.

It’s a php.ini issue. At phpinfo output, check the following flags:

- 
  - error\_log (php\_errors.log) - Also, check file permissions.

- 
  - log\_errors (should be on)

Hope this helps

* * *

/_---------------------------------------------------_/  
/\* \* Flavio Torres _/  
/_ /_\ /int y,z;main(x){x=(x\>0?-9:x);z=((z=(x+5)  
/ o. .o /)\>0?z:-z);printf(!x&&++y?“\n”:z?z\>y%3+y/  
/ ((Y)) /3?" “:x\<-5?”/“:”\“:y?”|“:”“);y-9?main(  
/\* ()) (() \*/++x):puts(” ||_“)&&puts(” \_\_\_/");}  
/\* ()^() A party animal isn’t just for Christmas.\*/

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzR/QgACgkQNRQApncg296IdACeMOj5EYib9jLQyVXBHVdENl79  
yKkAn2M47rUNM8fc9GN0HtMEWev5VAFZ  
=cZvD  
-----END PGP SIGNATURE-----
