A
A
Arseny Sokolov2017-03-20 08:47:33
PHP
Arseny Sokolov, 2017-03-20 08:47:33

What causes PHP CLI to display nothing?

PHP 5.6.30 is installed on CentOS 7, the sites work and everything seems to be fine, but php-cli does not work, more precisely, if you try to do something, it does not display anything, there are no results or errors either, it's just empty. What could be causing this problem?
Here's a script:

<?php
echo "Hello!";
?>

If you do this: php test.php > test.log will create an empty text.log
and if you just do php text.php nothing either

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Konyukhov, 2017-03-20
@ArsenBespalov

It most likely crashes before the start of any output, and all error output is disabled in php.ini.
Check: php script.php && echo ok
If "ok" doesn't appear in the console, it means that it really crashed.
The second option - somewhere die / exit crept in before the start of the output

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question