Benjamin-Loison / YouTube-operational-API

YouTube operational API works when YouTube Data API v3 fails.
399 stars 50 forks source link

Get Docker errors #325

Open Benjamin-Loison opened 3 weeks ago

Benjamin-Loison commented 3 weeks ago

Would help https://matrix.to/#/!xUzcWVLNMgGmLGBdRL:matrix.org/$UzmAQOtYWNzuKpWbe19VCbbZwW7j9Olrp-UX8S4LP04.

test.php: ```php test.php
php test.php
PHP Parse error:  syntax error, unexpected end of file, expecting "," or ";" in /var/www/html/YouTube-operational-API/test.php on line 4
Benjamin-Loison commented 3 weeks ago
curl 'http://localhost:8080/test.php'
Output: ```html
Parse error: syntax error, unexpected end of file, expecting "," or ";" in /var/www/html/test.php on line 4
```
api_1  | 172.18.0.1 - - [28/Oct/2024:15:40:02 +0000] "GET /test.php HTTP/1.1" 200 361 "-" "curl/7.88.1"
Benjamin-Loison commented 3 weeks ago
include_once 'common.php';

does not change anything. Maybe it is because a parsing error and not a runtime error.

Benjamin-Loison commented 3 weeks ago

Adding after include_once 'common.php';:

include_once 'not_existing.php';
curl 'http://localhost:8080/test.php'
test

If remove include_once 'common.php';, then have:

curl 'http://localhost:8080/test.php'
Output: ```html
Warning: include_once(not_existing.php): Failed to open stream: No such file or directory in /var/www/html/test.php on line 5

Warning: include_once(): Failed opening 'not_existing.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/test.php on line 5
test ```
Benjamin-Loison commented 3 weeks ago

In last both cases have:

curl -I 'http://localhost:8080/test.php'
Output: ``` HTTP/1.1 200 OK Date: Mon, 28 Oct 2024 20:58:42 GMT Server: Apache/2.4.62 (Debian) X-Powered-By: PHP/8.3.13 Content-Type: text/html; charset=UTF-8 ```
api_1  | 172.18.0.1 - - [28/Oct/2024:20:58:42 +0000] "HEAD /test.php HTTP/1.1" 200 154 "-" "curl/7.88.1"