Edit report at https://bugs.php.net/bug.php?id=80936&edit=1
ID: 80936
Comment by: onmovies99 at gmail dot com
Reported by: samsanchez at qq dot com
Summary: php.exe -f test.php doesn't work
Status: Not a bug
Type: Bug
Package: Scripting Engine problem
Operating System: Windows 10
PHP Version: *
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The steps below may work with other editions of Windows, PHP, and Apache, Installing PHP on your
development PC allows you to safely create and test. regards https://ghdsportsapk.xyz/
You can run the .msi package, i.e. windows installer for PHP to install PHP. Besides. recommending
using the production ini in production and testing environments. not defined, or if the function
doesn't include/implement the missing class. will be allowed to be executed via the exec family
of functions.
Previous Comments:
------------------------------------------------------------------------
[2021-04-07 13:21:38] cmb@php.net
Ah, this is about UTF-16LE, not UTF-8. I can confirm the reported
behavior, but this is not a bug; at least, you need to enable
zend.multibyte[1] for non ASCII compatible encodings; otherwise
the PHP engine doesn't recognize the <?php. See also
<https://www.php.net/manual/en/migration71.windows-support.php>.
[1] <https://www.php.net/manual/en/ini.core.php#ini.zend.multibyte>
------------------------------------------------------------------------
[2021-04-06 14:38:50] samsanchez at qq dot com
I attach a file with unicode bom. to reproduce this bug:
1) download the patch file 'rename_this_file_extension.txt'
2) open it by any kindof txt editor. add <?php to the 1st line
3) rename it to test.php
4) command line to exec: php.exe -f tes.php
5) output here it's
<?php
echo 'hello php8';
=====================
what i expect to get are
1) fatal error exception raise
2) or show me 'hello php8'
------------------------------------------------------------------------
[2021-04-06 14:31:12] samsanchez at qq dot com
The following patch has been added/updated:
Patch Name: rename_this_file_extension.txt
Revision: 1617719472
URL: https://bugs.php.net/patch-display.php?bug=80936&patch=rename_this_file_extension.txt&revision=1617719472
------------------------------------------------------------------------
[2021-04-05 15:29:54] cmb@php.net
I cannot reproduce, neither with JIT enabled nor disabled.
------------------------------------------------------------------------
[2021-04-05 08:51:18] samsanchez at qq dot com
I find the problem is because the encode of test.php is UTF-8 With BOM!
changing the encode to UTF-8 without BOM make it work as expect.
however i think the php cli should raise me an error instead of output the whole source to me.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80936
--
Edit this bug report at https://bugs.php.net/bug.php?id=80936&edit=1