Skip to content

Commit 39dff31

Browse files
gjedeerschlessera
andauthored
Better wording for php-cgi error
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
1 parent 1f4c492 commit 39dff31

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎php/boot-phar.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

33
if ( 'cli' !== PHP_SAPI ) {
4-
echo "Only PHP-CLI access.\n";
5-
echo "You're currently using the " . PHP_SAPI . " PHP SAPI.\n";
6-
echo "If you're trying to run this file with a web browser, don't.\n";
7-
echo "When running in command line, ensure that `php -v` has the\n";
8-
echo "word \"cli\" in the first line of output.\n";
4+
echo "WP-CLI only works correctly from the command line, using the 'cli' PHP SAPI.\n",
5+
"You're currently executing the WP-CLI binary via the '" . PHP_SAPI . "' PHP SAPI.\n",
6+
"In case you were trying to run this file with a web browser, know that this cannot technically work.\n",
7+
"When running the WP-CLI binary on the command line, you can ensure you're using the right PHP SAPI",
8+
"by checking that `php -v` has the word 'cli' in the first line of output.\n";
99
die( -1 );
1010
}
1111

0 commit comments

Comments
 (0)