Monday, February 25, 2013

Re: Stuck with migration from 1.3 to 2.x / euromark plugin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi euromark,


some questions to your readme:

a) Copy this plugin into your /app/Plugin folder
My app doesn't have a Plugin folder just a plugins folder. So I created
an empty folder Plugin.
Was that correct?

b) I copied the contents of the Zip file in that folder so that I have 3
subfolders: Console, Lib, Test
Was taht correct or should the folder upgrade-master go there?

c) In your readmy you mention "Run any of the above commands." My
problem is that nowhere above you mention any commands. That comes
later. So to which commands are you referring?

d) If I try to run the following command (being in my app folder)
/var/www/cakephp-2.3.0/app$ ../lib/Cake/Console/cake Upgrade.Upgrade
locations -v


I get the following output:
PHP MissingPluginException: Plugin Upgrade could not be found. in
/var/www/cakephp-2.3.0/lib/Cake/Core/CakePlugin.php on line 142
PHP Stack trace:
PHP 1. {main}() /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:0
PHP 2. ShellDispatcher::run($argv = array (0 =>
'/var/www/cakephp-2.3.0/lib/Cake/Console/cake.php', 1 => '-working', 2
=> '/var/www/cakephp-2.3.0/app', 3 => 'Upgrade.Upgrade', 4 =>
'locations', 5 => '-v')) /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:43
PHP 3. ShellDispatcher->dispatch()
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:67
PHP 4. ShellDispatcher->_getShell($shell = 'Upgrade.Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:189
PHP 5. class_exists('UpgradeShell')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:239
PHP 6. App::load($className = 'UpgradeShell')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:0
PHP 7. App::path($type = 'Console/Command', $plugin = 'Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Core/App.php:542
PHP 8. App::pluginPath($plugin = 'Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Core/App.php:225
PHP 9. CakePlugin::path($plugin = 'Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Core/App.php:364


MissingPluginException: Plugin Upgrade could not be found. in
/var/www/cakephp-2.3.0/lib/Cake/Core/CakePlugin.php on line 142

Call Stack:
0.0003 232072 1. {main}()
/var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:0
0.0095 317704 2. ShellDispatcher::run($argv = array (0 =>
'/var/www/cakephp-2.3.0/lib/Cake/Console/cake.php', 1 => '-working', 2
=> '/var/www/cakephp-2.3.0/app', 3 => 'Upgrade.Upgrade', 4 =>
'locations', 5 => '-v')) /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:43
0.0637 1920272 3. ShellDispatcher->dispatch()
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:67
0.0638 1920576 4. ShellDispatcher->_getShell($shell =
'Upgrade.Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:189
0.0640 1922128 5. class_exists('UpgradeShell')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:239
0.0640 1922424 6. App::load($className = 'UpgradeShell')
/var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:0
0.0641 1923032 7. App::path($type = 'Console/Command', $plugin
= 'Upgrade') /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:542
0.0641 1923168 8. App::pluginPath($plugin = 'Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Core/App.php:225
0.0641 1923200 9. CakePlugin::path($plugin = 'Upgrade')
/var/www/cakephp-2.3.0/lib/Cake/Core/App.php:364

Dump $_SERVER
$_SERVER['HTTP_HOST'] is undefined
$_SERVER['SERVER_NAME'] is undefined

Variables in local scope (#9):
$_plugins = *uninitialized*
$plugin = 'Upgrade'

Error: Plugin Upgrade could not be found.
#0 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(364):
CakePlugin::path('Upgrade')
#1 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(225):
App::pluginPath('Upgrade')
#2 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(542):
App::path('Console/Command', 'Upgrade')
#3 [internal function]: App::load('UpgradeShell')
#4 [internal function]: spl_autoload_call('UpgradeShell')
#5 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(239):
class_exists('UpgradeShell')
#6 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(189):
ShellDispatcher->_getShell('Upgrade.Upgrade')
#7 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(67):
ShellDispatcher->dispatch()
#8 /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php(43):
ShellDispatcher::run(Array)
#9 {main}

Ouch....
Ok the Ouch was mine ;) Just a test if you read until here.

As always any help is appreciated!

Calamity Jane





Am 24.02.2013 15:48, schrieb euromark:
> You did read the readme.txt right? :)
> It answers all of your questions above and many more..
>
>
> Am Sonntag, 24. Februar 2013 14:05:52 UTC+1 schrieb acl68:
>>
> Hi everybody,
>
>
> after getting strange error messages with the default 2.0 migration
> shell I tried it now with the improved version from euromark:
> https://github.com/dereuromark/upgrade
>
>
> Here the facts:
> I am running Linux with php 5.4.
> I downloaded cake 2.3.0 and euromarks plug-in.
> After unpacking the new cake version to my webroot ( and setting all
> rights to executable for me an my Apache) I renamed my 1.3 app to "app",
> adapted the cake core path in my webroot/index.php so it points to the
> Cake folder in the "lib" folder. I renamed app/config to app/Config and
> added the CakePlugin::loadAll(); to the bootstrap.
>
>
> Questions:
> Where do the files from the plug-in go? Do they just stay in the
> app/plug-in/upgrade-master folder? Or do I replace the files in the
> default Cake Core folders with them?
>
> Can I tell the upgrade shell which app it should update, or do I have to
> rename it to "app"?
>
> When I tried to let it run no files were changed but empty folders
> "Model" Controller" etc were created under /app/Console/...
>
>
> Exists there somewhere an extensive HowTo for using this plug-in? The
> readme doesn't answer all my questions.
>
>
> Also it works only if I call the shell with
> /var/www/cakephp-2.3.0/app/Console$ ./cake upgrade all
> and not
> /var/www/cakephp-2.3.0/app/Console$ ./cake Upgrade.Upgrade all
>
> Thanks for any help! If I don't get this done within the next week I
> will stay with 1.3. *sigh*
>
> Calamity Jane
>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlErwQEACgkQbOdiIJzHNKH0fACeL3Eilr6IN68tzjeVjFcdUPMm
rTMAn19xtxoz8NJmo4P3KHgvN6IS7Cq2
=LzPI
-----END PGP SIGNATURE-----

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: