Please describe how to upgrade cakePhp version 0.2.9 to any latest version of cakephp .
Are you sure this is the cakephp version you want to update?
The current version of Cake 2.0 in /path/to/cake/lib/Cake/VERSION.txt. The txt file contains a commented block stating that it has been there since Cake 0.2.9, followed by the actual version number.
The same file may be found in Cake 1.3 in /path/to/cake/cake/VERSION.txt.
0.2.9 is not your cake php version.Its a first version of cake php that is written like #since CakePHP(tm) v 0.2.9.You can find your cake php version just go to the path cake/lib/Cake/VERSION.txt.In last line of version.text you will find your cake php version. t's easy to miss, but it should just be a number, e.g. 1.3.8."
Related
I mtrying to get back an older version of mongodb 2.4.6 with windows version .
I need some help to find it.
can anyone tell me how can I install cakephp 2 in 2022 I tried many ways to install it I also have its zip file which I extract it and when I tried to run it it shows.
Fatal Error
Error: Cannot use 'String' as class name as it is reserved
File: E:\xampp\htdocs\cakephp2.3\lib\Cake\Utility\String.php
Line: 27
Notice: If you want to customize this error message, create app\View\Errors\fatal_error.ctp
CakePHP 2 needs php5
since Version 2.8 you can use php70
php71 is possible but you need to install mcrypt seperatly.
Its possible to run a CakePHP 2.8 on php72 with some core hacks. But i wouldn't recommend this.
I got my answer we can download its zip file from github and copy its file in htdocs folder and run it without an issue. By the way I downloaded cakephp 2.10. and it is also running in xampp with php version 8. If in your system it is not running then try to use xampp with php version 7.
I am using Cakephp 3.x but i want to know the exact version number using command line ? is there any command available which can show us the correct version which we are using in our application ?
i know we can use this echo Configure::version(); to check version using code, i was just curious to know if i can come to know the same thing using command line interface only..
FYI, i have windows 7 as OS, xampp as server with composer and other stuff installed in my cakephp application ..
Command for any OS (ubuntu,windows) will be welcomed to come to know about it ..
Thanks
According to their documentation for version 3.x , this is how you can do this. Shells, Tasks & Console Tools
In which they have mentioned to go to directory first using command line tool and then by typing bin/cake Something like this
cd /path/to/app
bin/cake
And in response you will be able to see not only CakePHP's current version but also PHP's current version and few more information.
Welcome to CakePHP v3.0.0 Console
---------------------------------------------------------------
App : App
Path: /Users/markstory/Sites/cakephp-app/src/
---------------------------------------------------------------
Current Paths:
-app: src
-root: /Users/markstory/Sites/cakephp-app
-core: /Users/markstory/Sites/cakephp-app/vendor/cakephp/cakephp
Changing Paths:
Your working path should be the same as your application path. To change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
Available Shells:
[Bake] bake
[Migrations] migrations
[CORE] i18n, orm_cache, plugin, routes, server
[app] behavior_time, console, orm
To run an app or core command, type cake shell_name [args]
To run a plugin command, type cake Plugin.shell_name [args]
To get help on a specific command, type cake shell_name --help
Also I am not so sure this will work for older version than CakePHP 3.x as I have tried this in version 3.x only.. so please take a note on that too.
Because it doens't show the version when simply typing bin/cake in the project forlder, I also recommend this approach:
Browse to your project forlder
continue browsing to the bin forlder ( cd bin)
then type cake version
That works for me and it shown 3.5.6
Also I recommend including PHP in the system or user path if so you can type php -version anywhere in the prompt to get your php version.
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.
I have a ZF2 based upon the ZF2 Skeleton. How can I find out, which ZF2 version is currently being used?
As per zend framework official site, version can be retrieved with command
echo Zend_Version::getLatest();
So, to access PHP in Terminal run
php -a
then
echo "Zend engine version: " . zend_version();
and press enter button to get the version information something like
Zend engine version: 2.6.0
Or check VERSION value in file Zend/Version.php if your project is using some specific version of zend framework.
With the Composer's show command in the root directory of the (ZF2 Skeleton based) project:
$ cd /path/to/project/
$ php composer show --installed
...
zendframework/zendframework 2.1.4 Zend Framework 2
...
If for whatever reason you didn't use composer to install ZF2 (come on! what's wrong with you, always use composer :)) you can run your app from the console to check the version:
$ cd <project_root>
$ php public/index.php
This assumes that index.php is your ZF2 front controller.
This will output something like:
Zend Framework 2.1.4 application
Usage:
There seems to be quite a confusion between what is asked and what is the solution.
For instance, here at the same system;
'''php public/index.php'''
results in "3.0.0"
'''die(zend_version());'''
results in "3.2.0"
'''echo Zend_Version::getLatest();'''
results in "1.12.20".
and
'''echo Zend_Version::VERSION;'''
results in "1.12.20".
To get the version of the Zend Framework, written in PHP, as a web framework, use:
'''echo Zend_Version::VERSION;'''
... As stated on the official page of the Zend Framework for web pages:
Getting the Zend Framework Version - Zend_Version
Often is Zend Framework confused with The Zend Engine. The Zend Engine is the standard PHP interpreter, and is an open source scripting engine that interprets the PHP programming language.
If you like to get the version of the Zend Engine "inside" PHP, then use:
'''die(zend_version());'''
results in "3.2.0"
In Zend framework (3.0.0), try this:
die(zend_version());