# Where is php error log?



## Elliott (Mar 2, 2020)

I have installed nginx, php73, and mysql80 in a jail for development.  I'm having an issue with curl_exec() in a PHP script:

```
Error 1024 on line 118: OpenSSL SSL_read: No error: 0
```

I'm trying to get more information on this, so I set these options: 

```
CURLOPT_VERBOSE => TRUE,
CURLOPT_STDERR => fopen('php://stderr', 'w')
```

but I can't figure out where the verbose error is being written.
In php.ini I set these options:

```
error_reporting = E_ALL & ~E_STRICT
display_errors = On
log_errors = On
error_log = php_errors.log
```

I searched the hard drive and there is no file called php_errors.log
I've checked /var/log/messages and /var/log/nginx/error.log
Is there some way to view STDERR for a running process like /proc/86959/fd ?


----------



## SirDice (Mar 2, 2020)

I'm going to bet you're getting an SSL error because security/ca_root_nss isn't installed.


```
error_log = php_errors.log
```
Use a full path here.


----------



## Elliott (Mar 2, 2020)

Nope, that's already installed, version 3.50


----------



## Elliott (Mar 2, 2020)

I figured out if that changing the URL to https instead of http makes this error goes away.

An example curl request:
`curl "http://148.129.75.136/geocoder/geographies/onelineaddress?benchmark=Public_AR_Current&vintage=Census2010_Current&address=6920%20Lindley%20Ave%20Reseda%20CA%2091335&format=json&layers=Census+Tracts" -L -k`

I am using the IP address to save time with DNS resolution, and I'm not concerned about security because this data is all public.  But this API is set to always redirect to https and the SSL certificate doesn't match so I set it to insecure mode.
My FreeBSD system has curl 7.67.0 and it shows the error I mentioned above, followed by the correct response body.
I tried curl 7.68.0 on another machine and it does not show this error.
In this case, I think the simple answer is just to use https.  But for better understanding, I would still like to figure out how to read STDERR.


----------

