How to upgrade cakephp from 1.3 to 2.1? - cakephp

I'm a newbie in cakephp, I'm trying to upgrade cakephp to the latest version.
I install the fresh cakephp 1.3 on my computer and the upgrade it to cakephp 2.1.
I use shell to upgrade, but after I run 'upgrade all' command, I saw two error:
Warning Error: chmod(): Operation not permitted in [/var/www/cakephp-1.3/lib/Cake/Utility/Folder.php, line 639]
Warning Error: touch(): Utime failed: Operation not permitted in [/var/www/cakephp-1.3/lib/Cake/Utility/Folder.php, line 640]
I think it has upgraded complete. Because I see the message from terminal like this:
Done updating /var/www/cakephp-1.3/app/Console/cake.php
Done updating /var/www/cakephp-1.3/app/Console/Command/AppShell.php
Running components
Running exceptions
Then I refresh my app and I got some errors:
http://flic.kr/p/bwUpwY
Then I delete 'cake' directory, and the error message has changed:
http://flic.kr/p/bKP7Te
So now I don't know what to do next, because I did many ways but still not make it work.
So anybody please tell me what I did wrong and how can I upgrade cakephp successful.
Thanks in advance.

This looks like you have permissions issues on some of the directories that the CakePHP migration script expects to be writable.
This could lead to the migration failing on some parts and leaving a partially broken install after it completes.

Related

Opendaylight Nitrogen: Unable to Install features

I am getting an error while installing the features.
error executing command: error restarting bundles
Initially, it worked fine for some of the features but then it suddenly started throwing this error.
Any suggestion on this would be appreciated.
if you clean karaf, you can resolve the issue, by running the following command, you can clean the karaf.
./karaf clean
When OpenDaylight moved to karaf 4 there were problems identified with
installing features in the karaf shell one after the other. I think
you are hitting that problem.
you can try listing out all the features you want in the featuresBoot
variable of the etc/org.apache.karaf.features.cfg file.
You may also have some success trying to install on the karaf shell with
the following flag --no-auto-refresh, like this:
feature:install --no-auto-refresh odl-l2switch-switch
Also, as sridhar reddy noted, if you use "karaf clean" to start karaf it will
wipe the data/ folder (and more) so that old loaded features will not come
back in on startup and you will start "clean".

Not able to start SOLR service

I have installed the solr service on a LINUX environment. Now trying to start the service using the below command
service solr start
After executing this command, am getting below error from the server
Waiting to see Solr listening on port 8080 [-] Still not seeing Solr listening on 8080 after 30 seconds!
tail: cannot open `/var/solr/logs/solr.log' for reading: No such file or directory
I created the solr.log file manually and placed it under the above mentioned path, But as soon, i issue the command "service solr start" . The solr.log file will be renamed and there won't be any new file created with the solr.log. hence the service fails to start. Could anyone let me know how to tackle this issue.
Thanks in advance.
I had a similar issue, and was able to find a hint in the /var/solr/logs/solr-8983-console.log
Originally I had been using Java 8, and Solr was working just fine for me.
When I switched to Java 11, Solr would have the issue you reported.
The log file contained the following:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I switched back to Java 8 and Solr started just fine.
First, did you use the procedure provided to install the Solr service page 461
Second, did you set the proper overrides to the environment defaults in a solr.in.sh script (p. 462 of the ref manual). You also need to make sure that the LOG4J_PROPS in the solr.in.sh file points to your log4j.properties file. Also make sure that SOLR_LOGS_DIR is pointing to the correct place.
If all that is correct, then check that the values in your log4j.properties file are set correctly (p. 468 of the ref manual).
You can get the reference manual here: https://www.apache.org/dyn/closer.lua/lucene/solr/ref-guide/ if you don't have it already.
I had a tough time getting Solr to run as a service, but in the end I simply wasn't reading carefully enough.

Cloud9 error when running project "Error retrieving pid file"

I have been playing around with the Cloud9 web-based IDE learning PHP
Today I went to run my project, and was presented with this error:
(20014)Internal error: AH00058: Error retrieving pid file /home/ubuntu/lib/apache2/run/apache2.pid
AH00059: Remove it before continuing if it is corrupted.
I have since been able to migrate my work using XAMPP, but would like to resolve my Cloud9 issue. Does anyone know how to resolve this in the Cloud9 environment?
Well, I feel rather dumb...resolved the issue myself by using Cloud9's terminal to navigate to the directory and then removed the corrupt file.
I got Same type problem & solution as follows. Hope someone may helpfull
Problem:
Started apache2
(20014)Internal error: AH00058: Error retrieving pid file
/home/ubuntu/lib/apache2/run/apache2.pid
AH00059: Remove it before continuing if it is corrupted.
Solution:
sudo rm /home/ubuntu/lib/apache2/run/apache2.pid then
sudo /home/ubuntu/lib/apache2/run/apache2.pid restart

Cakephp 3 upgrade tools unable to access file

I try to use Cakephp 3 upgrade tool.
I installed composer, I made this:
cd /path/to/upgrade
bin/cake upgrade all /home/mark/Sites/my-app
Then I get tons of error like this in windows command shell.
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\a2d4223f62e3499a84b6ca30be24bfdb4cb6de40''
Update C:\mydir\myapp\lib\Cake\View\Helper\CacheHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\7fbe7651712387f351b1eb670b14c18e1161fcb8''
Update C:\mydir\myapp\lib\Cake\View\Helper\HtmlHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\2301f9bed1167ddb29ca4e06706d0d21bd015766''
Update C:\mydir\myapp\lib\Cake\View\Helper\NumberHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\e71af0cbc7df7ff76e801c5fb06ec07ee7f45233''
Update C:\mydir\myapp\lib\Cake\View\Helper\PaginatorHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\1b04b5a763ca4e798d1e176111e49008b7486724''
Update C:\mydir\myapp\lib\Cake\View\Helper\TextHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\f8ead667c131610c1f70f38d10c7122b34d9a7fc''
Update C:\mydir\myapp\lib\Cake\View\Helper\TimeHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\4a2c2e7f3f7e9faf744d10e6e1f3ff24bead7f08''
Update C:\mydir\myapp\lib\Cake\View\HelperCollection.php
I run command shell as administrator. What would be the problem ? When I check folder during operation, I can see that temporary file exists in folder.
I got the very same issue. Here's a description of the issue :
This is a Git error
Git command that fails is called by /upgradeTool/src/Shell/Task/StageTask.php on line 176 by exec() php function (seems different for you)
command to run git looks like this : git diff --no-index 'T:\Logiciels\CakePHP_3_upgradeTool\tmp\upgrade\c5d0aaadb3484d4bfe56bdfc4553b444f6789e66' 'T:\Logiciels\CakePHP_3_upgradeTool\tmp\upgrade\4a6662f82cd03d46b515c28f7d77ef8a64c08cfd'
EDIT (2015-07-12)
As ndm noted, "the source of the problem is the single quote usage in the arguments for the git command, the Windows CLI will pass them as if they belong to the file path"
I changed this line (/upgradeTool/src/Shell/Task/StageTask.php on line 176) from :
exec("git diff --no-index "$oPath" "$uPath"', $output);
to :
exec('git diff --no-index "'.$oPath.'" "'.$uPath.'"', $output);
Now the process seems complete. Many many thanks !
After tryouts I found solution. As DarXnake noted, problem is git.
When you install git it asks whether you want to use git from command line or not. Default option is Use Git Bash only. I had selected that option.
Now I updated git and when setup asked for install type, I selected Run Git from the Windows Command Prompt. Then I retried cakephp upgrade and I didn't get any access error.

Cakebake not working

I am using cakephp-2.4.4 When I have backed my project in console this giving me below error
myphp version :5.4.12
If any body face this types of problem.Please help me to solve it.
I can ensure there is no any problem in environment variable.I have checked.
Bake is run in Console directory.Try in app/Console
Call Console cake
In the early days it was recommended to put cake in your path so you could type cake anywhere. Eventually this was realised to be a bad idea, it's not the recomended way to do things any more instead use the executable that's in your application:
> cd my\app
> Console\cake
Welcome to CakePHP v2.x.x Console
---------------------------------...
Read the error message
If using the correct executable doesn't immediately fix the problem - read the error message. It's not possible to say more as the image in the question truncates the output, however it contains:
<title>... Errors</title>
This in an indication that the output is a cakephp error i.e. the html you're seeing is the result of a fatal error of some kind (e.g. a missing plugin, model or other class).
Read the error message (or open app\tmp\error.log and read it there), address the problem and Console\cake will work as expected.

Resources