I am new in cake php development, I have done a cake php upgrade from 2.7.5 to latest version 3. but i have some issues, when i try to run bin/cake server it shows below errors.
PHP Warning: include(Cake/Console/ShellDispatcher.php): failed to
open stream: No such file or directory in
/var/www/project_1/bin/cake.php on line 31 PHP Warning: include():
Failed opening 'Cake/Console/ShellDispatcher.php' for inclusion
(include_path='/var/www/lib:.:/usr/share/php') in
/var/www/project_1/bin/cake.php on line 31
PHP Fatal error: Could not locate CakePHP core files. in
/var/www/project_1/bin/cake.php on line 32
I can see the file cake.php which does not have any change but all other files moved from app to src folder, using cake php upgrade tool
Related
I am running a self-administrated 1and1 dedicated server:
CentOS 6.10 (Final)
Linux 2.6.32-504.30.3.el6.x86_64
and getting the following error: "PHP Fatal error: Your PHP version must be equal or higher than 5.6.0 to use CakePHP". My initial thought is I have missed setting the path for PHP somewhere. I have tried checking/changing the following things, and I'm not sure what else to try.
phpinfo() shows:
PHP Version 7.3.7
php -v shows:
PHP 7.3.7 (cli) (built: Jul 5 2019 12:52:53) ( NTS )
bin/cake produces:
PHP Fatal error: Your PHP version must be equal or higher than 5.6.0
to use CakePHP.
Removing from requirements.php:
if (version_compare(PHP_VERSION, '5.6.0') < 0) {
trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.' . PHP_EOL, E_USER_ERROR);
}
bin/cake again after that line removed:
PHP Fatal error: Class 'DateTimeImmutable' not found in
/var/www/vhosts/xxxxxxxxxx.com/app/vendor/cakephp/chronos/src/Chronos.php
on line 50
which php shows:
alias php='/opt/plesk/php/7.3/bin/php' /opt/plesk/php/7.3/bin/php
i use command : "cake server" to start the project.
It run the first time. The second time it give me this error
Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0
Fatal error: Unknown: Failed opening required
‘C:\Users\duyqu\Desktop\page\webroot/index.php’ (include_path=’.;C:\php\pear’) in Unknown on line 0
I have check several time and it appear to delete the “index.php” file in webroot folder for no reason.
Here is what is already try:
-re-download Wamp server and composer
-update to newest version 3.5.2 of cakePHP
-copy the index.php to another place and recopy them back to webroot ( can’t be done because access denied)
I am stuck and have no idea what is happening. I have been use cakePHP for 6 months and this is the first
I think it could be antivirus. Everytime I create new project - everytime my antivirus tries to delete webroot/index.php
I have php 5.4.42 on Linux with Apache and mysql. All the required extensions are loaded and I did a fresh install of cakephp 3 using the command
composer create-project --prefer-dist cakephp/app c3
It installed everything but when I open the URL in browser, it shows me an error in the browser
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in c3/config/bootstrap.php on line 107
Got the solution from cakephp github. My php version is not correct. Issue is that command line on linux (php -v) shows version as 5.4.42 but correct version is shown only using phpinfo() on a webpage and there it shows 5.3.29
I am a novice and tried running the bookmarker tutorial from cakephp cookbook but it is showing the following error:
theclownprince#theclownprince-K53SM:~/bookmarker/bin$ cake server
Error: Class ServerShell could not be loaded.
If it try running it from bookmarker folder it showing a different error
theclownprince#theclownprince-K53SM:~/bookmarker$ bin/cake server
PHP Warning: require_once(/home/theclownprince/bookmarker/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in /home/theclownprince/bookmarker/vendor/autoload.php on line 3
PHP Fatal error: require_once(): Failed opening required '/home/theclownprince/bookmarker/vendor/composer/autoload_real.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/theclownprince/bookmarker/vendor/autoload.php on line 3
Thanks.
H!
I'm new to cakePHP I have have a cakePHP application . I got from
https://github.com/OldWest/CakePHP-1.3-MEIO-image-upload-sample-code
I want to install this in my wamp server. PHP version:5.4.16
I am getting 3 errors
1.Warning: include(cake\bootstrap.php): failed to open stream: No such file or directory in D:\wamp\www\cake\webroot\index.php on line 76
2.Warning: include(): Failed opening 'cake\bootstrap.php' for inclusion (include_path='E:\wamp\www_cake\cakephp-cakephp-1.3.2-38-g8581350\cakephp-cakephp-8581350;D:\wamp\www\cake\;.;C:\php\pear') in D:\wamp\www\cake\webroot\index.php on line 76
3.Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in D:\wamp\www\cake\webroot\index.php on line 77
How Can i use the same cakePHP folder used for Blog application in tutorials
I mean multiple application with same cakePHP library How?
Don't use version 1.3. it is an old version.
Use the latest. https://github.com/cakephp/cakephp/releases/tag/2.4.6
The old versions will get you in trouble (as a beginner) with new php versions.
Also, the framework had evolved greatly since 1.3.
Not new to either php or programming here, but I too am saddled with a cake 1.3 site that must be yanked along to work with newer code. Telling people to just upgrade is not helpful.
I looked in the 'advanced configuration' section here https://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Installation.html
and by examining the current index.php found that my existing installation was expecting the core cake files to be elsewhere entirely on the system. You could then either plunk the core files where expected, or change the configuration in index.php, depending on current practices.