Closed saurabhkarve closed 2 years ago
Please check if your anti-virus software is not flagging the rewrite.php
as a virus. There are several reports in the forums regarding this issue.
There is nothing wrong with antivirus. I have checked it. need a good solution
https://forum.codeigniter.com/thread-78052-post-391280.html?highlight=rewrite#pid391280 https://forum.codeigniter.com/thread-78981-post-390187.html?highlight=rewrite#pid390187
Clearly, this is not a bug with CodeIgniter. For proper support, please ask your questions in the forum.
PHP Version
8.0
CodeIgniter4 Version
4.1.5
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
macOS
Which server did you use?
cli-server (PHP built-in webserver)
Database
No response
What happened?
Terminal
php spark serve --php /opt/homebrew/bin/php
CodeIgniter v4.1.5 Command Line Tool - Server Time: 2021-11-21 12:19:36 UTC-06:00
CodeIgniter development server started on http://localhost:8080 Press Control-C to stop. [Sun Nov 21 23:49:37 2021] PHP 8.0.13 Development Server (http://localhost:8080) started [Sun Nov 21 23:50:10 2021] [::1]:49525 Accepted [Sun Nov 21 23:50:10 2021] [::1]:49526 Accepted [Sun Nov 21 23:50:10 2021] PHP Warning: require_once(/Users/SK/API-project/CI4/api/public/index.php): Failed to open stream: No such file or directory in /Users/SK/API-project/CI4/api/vendor/codeigniter4 /framework/system/Commands/Server/rewrite.php on line 43 [Sun Nov 21 23:50:10 2021] PHP Fatal error: Uncaught Error: Failed opening required '/Users/SK/API-project/CI4/api/public/index.php' (include_path='.:/opt/homebrew/Cellar/php/8.0.13/share/php/pear') in /Users/SK/API-project/CI4/api/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php:43 Stack trace:
0 {main}
thrown in /Users/SK/API-project/CI4/api/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php on line 43 [Sun Nov 21 23:50:10 2021] [::1]:49525 Closing [Sun Nov 21 23:50:10 2021] [::1]:49526 [200]: GET /favicon.ico [Sun Nov 21 23:50:10 2021] [::1]:49526 Closing
Getting Following Output on Browser
Steps to Reproduce
php spark serve --php /opt/homebrew/bin/php
Expected Output
CodeIgniter v4.1.5 Command Line Tool - Server Time: 2021-11-21 12:19:36 UTC-06:00
CodeIgniter development server started on http://localhost:8080 Press Control-C to stop. [Sun Nov 21 23:49:37 2021] PHP 8.0.13 Development Server (http://localhost:8080) started [Sun Nov 21 23:50:10 2021] [::1]:49525 Accepted [Sun Nov 21 23:50:10 2021] [::1]:49526 Accepted [Sun Nov 21 23:50:10 2021] PHP Warning: require_once(/Users/SK/API-project/CI4/api/public/index.php): Failed to open stream: No such file or directory in /Users/SK/API-project/CI4/api/vendor/codeigniter4 /framework/system/Commands/Server/rewrite.php on line 43 [Sun Nov 21 23:50:10 2021] PHP Fatal error: Uncaught Error: Failed opening required '/Users/SK/API-project/CI4/api/public/index.php' (include_path='.:/opt/homebrew/Cellar/php/8.0.13/share/php/pear') in /Users/SK/API-project/CI4/api/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php:43 Stack trace:
0 {main}
thrown in /Users/SK/API-project/CI4/api/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php on line 43 [Sun Nov 21 23:50:10 2021] [::1]:49525 Closing [Sun Nov 21 23:50:10 2021] [::1]:49526 [200]: GET /favicon.ico [Sun Nov 21 23:50:10 2021] [::1]:49526 Closing
Anything else?
No response