gitscrum-team / laravel-gitscrum

GitScrum is a Project Management Tool, developed to help entrepreneurs, freelancers, managers, and teams Skyrocket their Productivity with the Agile methodology and Gamification.
https://site.gitscrum.com
MIT License
2.89k stars 727 forks source link

PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 error after installing gitscrum #279

Closed jafar690 closed 6 years ago

jafar690 commented 7 years ago

i have just installed gitscrum but when i do an artisan serve, i get the following error on my terminal Laravel development server started: <http://127.0.0.1:8000> [Mon Oct 9 19:34:47 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Oct 9 19:34:47 2017] PHP Fatal error: Unknown: Failed opening required '/home/jafar690/school/laravel-gitscrum/server.php' (include_path='.:/usr/share/php') in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Fatal error: Unknown: Failed opening required '/home/jafar690/school/laravel-gitscrum/server.php' (include_path='.:/usr/share/php') in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Fatal error: Unknown: Failed opening required '/home/jafar690/school/laravel-gitscrum/server.php' (include_path='.:/usr/share/php') in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Oct 9 19:34:48 2017] PHP Fatal error: Unknown: Failed opening required '/home/jafar690/school/laravel-gitscrum/server.php' (include_path='.:/usr/share/php') in Unknown on line 0 i have installed everything correctly but i have not been able to get rid of this error, any help will be highly appreciated.

AgusRdz commented 7 years ago

Trying add this file to root project folder https://github.com/laravel/laravel/blob/master/server.php

luizhenriquesoares commented 7 years ago

trying add this file.

<?php

/**

$uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) );

// This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. This provides a convenient way to test a Laravel // application without having installed a "real" web server software here. if ($uri !== '/' && file_exists(DIR.'/public'.$uri)) { return false; }

require_once DIR.'/public/index.php';

fatonsopa commented 7 years ago

This one works with 5.5

`<?php

/**

$uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) );

// This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. This provides a convenient way to test a Laravel // application without having installed a "real" web server software here. if ($uri !== '/' && file_exists(DIR.'/'.$uri)) { return false; }

require_once DIR.'/public/index.php'; ?> `

jafar690 commented 7 years ago

@AgusRdz i get a page not found in github for that url.

jafar690 commented 7 years ago

@luizhenriquesoares now i get this error in my terminal

✘ jafar690@gakami  ~/school/laravel-gitscrum   master ●  art serve --port=8080 Laravel development server started: http://127.0.0.1:8080 [Wed Oct 25 17:07:03 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:03 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:03 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:07:04 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:07:04 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20

jafar690 commented 7 years ago

@fatonsopa i get this error

✘ jafar690@gakami  ~/school/laravel-gitscrum   master ●  art serve --port=8080 Laravel development server started: http://127.0.0.1:8080 [Wed Oct 25 17:08:02 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:08:02 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:08:02 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:02 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:03 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 16 [Wed Oct 25 17:08:03 2017] PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:03 2017] PHP Warning: require_once(DIR/public/index.php): failed to open stream: No such file or directory in /home/jafar690/school/laravel-gitscrum/server.php on line 20 [Wed Oct 25 17:08:03 2017] PHP Fatal error: require_once(): Failed opening required 'DIR/public/index.php' (include_path='.:/usr/share/php') in /home/jafar690/school/laravel-gitscrum/server.php on line 20

hieptm96 commented 6 years ago

@jafar690 You should setup virtual host (apache or nginx) and point to public folder in root project. If you want to run by php artisan serve, you must add server.php file to root folder project (this file is default when installing laravel project, perhap someone has deleted it). But if you run serve by php artisan serve, it is a PHP's built-in development server. And it is not stable. Typically, you may use a web server such as Apache or Nginx to serve your applications

Idimma commented 5 years ago

I my own case I noticed that require_once __DIR__.'/public/index.php'; is not this same as require_once __DIR__.'./public/index.php'; on different servers

line 21 of server.php