Run Kohana framework+php script in linux command prompt - php

We have a ubuntu server where we dump our Kohana framework+php code & want to run it through cron job. But when we try it in command line it shows the following error:
root#andola-dev:~# php /var/www/realradius/index.php /var/www/realradius/system/core/Bootstrap.php
Warning: require(/root/system/core/Bootstrap.php): failed to open stream: No such file or directory in /var/www/realradius/index.php on line 139
Fatal error: require(): Failed opening required '/root/system/core/Bootstrap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/realradius/index.php on line 139

Linux filesystems are case sensitive, windows ones are not. Bootstrap.php is usually lowercase. Try fixing that.

Related

Warning: require(./wp-blog-header.php): failed to open stream: No such file or directory in /home/newapropos/public_html/index.php on line 17

This is what the error message says :
Warning: require(./wp-blog-header.php): failed to open stream: No such file or directory in /home/newapropos/public_html/index.php on line 17
Fatal error: require(): Failed opening required './wp-blog-header.php' (include_path='.:/opt/alt/php73/usr/share/pear') in /home/newapropos/public_html/index.php on line 17
but I don't know what to change in the line 17 to fix?
If you need to update your PHP version, you can follow this guide. The update process also depends on if you use Ubuntu, Nginx, or apache, etc... What I shared here is for Ubuntu.
I think check your php version should be greater than 7.4

Error while using running chat application in CodeIgniter 4

Downloaded a git repo for a chat application using the below link
Git Repo for Chat Application
Then changed the env file to .env file and also uncommented default database block as shown below.
database.default.hostname = localhost
database.default.database = chat
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
Then opened terminal and executed this command php spark migrate
But while executing this error pops up
PS C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial> php spark migrate
PHP Warning: require(C:\xampp\htdocs\Codeigniter-4-Chat-
Tutorial\app\Config/../../vendor/codeigniter4/framework/system/bootstrap.php): failed to
open stream: No such file or directory in C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial\spark on line 44
Warning: require(C:\xampp\htdocs\Codeigniter-4-Chat-
Tutorial\app\Config/../../vendor/codeigniter4/framework/system/bootstrap.php): failed to open
stream: No such file or directory in C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial\spark on line 44
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Codeigniter-4-Chat-
Tutorial\app\Config/../../vendor/codeigniter4/framework/system/bootstrap.php'
(include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial\spark on line 44
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Codeigniter-4-Chat-
Tutorial\app\Config/../../vendor/codeigniter4/framework/system/bootstrap.php'
(include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial\spark on line 44
PS C:\xampp\htdocs\Codeigniter-4-Chat-Tutorial>
How to resolve this? Any help appreciated.
It looks to me that you didn't run the composer update command after starting the project. So in this case your vendor folder is probably missing a lot of files.
Go to the root of your project in the terminal and run:
$ composer update
And you should be fine.

Running "laravel new" command in laravel project

I accidentally ran the laravel new command in a laravel project, which apparently deleted autoload_real.php
I get these error messages when running php artisan serve:
"PHP Warning: require(C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
Warning: require(C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\e-commerce\vendor\composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\e-commerce\vendor\composer\autoload_real.php on line 66"
Is there a way to get back autoload_real.php?
Just run:
composer update
inside your project, it should fix it.
Check if the file actually exists. If it's missing, but the folder 'symfony/polyfill-ctype' is there and empty, try to delete vendor folder and run composer install again. It might be that composer install crashed previous time and it thinks the package is there. That was the case for me.

xampp does not run fatal error

I got the following warning and error working on laravel project using xampp:
Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0
Fatal error: Unknown: Failed opening required 'server.php'
(include_path='C:\xampp\php\PEAR') in Unknown on line 0
Solved
My antivirus deleted some of my files. I just turned off and now is working.
just run in cmd or terminal depends on your os
cd c:/xammp/htdocs/your_laravel_project
php artisan serve
Make sure you installed composer

Running PHPUnit on command line errors out

I run this on the command line: phpunit --version
I get the following errors:
PHP Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in /usr/lib/php/pear/PHPUnit/Autoload.php on line 45
PHP Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.:/Users/dennismonsewicz/pear/share/pear:/usr/local/share/pear:/usr/lib/php/pear/PHPUnit') in /usr/lib/php/pear/PHPUnit/Autoload.php on line 45
Anyone else run into these issues? It is also causing me issues when I try to run my tests via the command line.
Ended being an issue with my include_path
This is my updated include path
include_path = ".:/php/includes:/usr/lib/php/pear"

Categories