Project migration problem

90 views
Skip to first unread message

Artyom M

unread,
Oct 14, 2014, 10:08:39 PM10/14/14
to koala-fra...@googlegroups.com
Hello!

I try to transfer working project on KWF to my localhost server but I have problem. Project not work.
Project works on server with this configuration:
php 5.3.10 with zend 2.3.0 and apc 3.1.7
apache 2.2.22
mysql 5.5.31

First of all I have a question. Where can I find information about version of KWF?

I found in this file \kwf-lib\config.ini:
application.kwf.version = 3.5

Is it true info about version?

What I did:
1. Export mysql DB and import to localhost
2. Copy project folder
3. Set this settings:

database.web.host = localhost
database.web.username = <username>
database.web.password = <password>
database.web.dbname = <db name>
debug.error.log = true
debug.querylog = true
debug.eventlog = true
debug.benchmark = true

And result is blank/white screen in browser. No errors in PHP/Apache, no log-files in \log directory.


I found same project in github and copy to another folder (+1 project in localhost). Then I copy kwf-lib and library from 3.7 branch and now see this text in browser:

config.local.ini already exists but server.baseUrl is not set

I put this line to my config.local.ini:
server.baseUrl = ""

Problem still exists.

Need help =)

Niko Sams

unread,
Oct 15, 2014, 12:20:16 PM10/15/14
to Koala Framework Dev
On Wed, Oct 15, 2014 at 4:08 AM, Artyom M <psycho...@gmail.com> wrote:
Hello!

I try to transfer working project on KWF to my localhost server but I have problem. Project not work.
Project works on server with this configuration:
php 5.3.10 with zend 2.3.0 and apc 3.1.7
apache 2.2.22
mysql 5.5.31

First of all I have a question. Where can I find information about version of KWF?

I found in this file \kwf-lib\config.ini:
application.kwf.version = 3.5

Is it true info about version?

yes, this is the used kwf version.
 

What I did:
1. Export mysql DB and import to localhost
2. Copy project folder
3. Set this settings:

database.web.host = localhost
database.web.username = <username>
database.web.password = <password>
database.web.dbname = <db name>
debug.error.log = true
debug.querylog = true
debug.eventlog = true
debug.benchmark = true

And result is blank/white screen in browser. No errors in PHP/Apache, no log-files in \log directory.

additionally you need (changed to your config):
server.domain = localhost
server.baseUrl = ""
 


I found same project in github and copy to another folder (+1 project in localhost). Then I copy kwf-lib and library from 3.7 branch and now see this text in browser:

config.local.ini already exists but server.baseUrl is not set

I put this line to my config.local.ini:
server.baseUrl = ""

Problem still exists.
after changing config files you need to clear-cache.
does that work?


Niko 

Artyom M

unread,
Oct 15, 2014, 6:30:48 PM10/15/14
to koala-fra...@googlegroups.com
Niko,

clear-cache not work in both projects =(

From console:
C:\OpenServer\domains\aviashelf1>php bootstrap.php clear-cache
Thu Oct 16 09:27:36 2014 (3936): Fatal Error Unable to open base address file

How to fix?

Artyom M

unread,
Oct 15, 2014, 9:24:33 PM10/15/14
to koala-fra...@googlegroups.com
That was my WAMP problem and I already found a solution.


First project (with white screen) did not reach (nothing after clear-cache).

Second project said this:

C:\OpenServer\domains\aviashelf1>php bootstrap.php clear-cache
Please create config.local.ini with server.domain and server.baseUrl

But I already have this file in root directory with this lines. I don't understant what it wants =)

Artyom M

unread,
Oct 16, 2014, 1:27:07 AM10/16/14
to koala-fra...@googlegroups.com
Done!

First thing - right line in config.local.ini:
server.domain = <your virtualhost name> (not localhost!)

After that I copy repository from github and copy kwf-lib and library from 3.7 branch - project start, but work with errors. I delete kwf-lib and library and put this folders from branch 3.5 in my server.
All works well now.

Interesting... why does not work a simple copying of the project folder? Show me blank/white page without errors.

Can i migrate to branch 3.7 from 3.5 without problems with my app??? Has 3.7 incompatible changes?

Niko Sams

unread,
Oct 27, 2014, 4:36:55 PM10/27/14
to Koala Framework Dev
On Thu, Oct 16, 2014 at 7:27 AM, Artyom M <psycho...@gmail.com> wrote:
Done!

First thing - right line in config.local.ini:
server.domain = <your virtualhost name> (not localhost!)
also make sure you set server.baseUrl correctly, that setting didn't exist in 3.5.
 
 

After that I copy repository from github and copy kwf-lib and library from 3.7 branch - project start, but work with errors. I delete kwf-lib and library and put this folders from branch 3.5 in my server.
All works well now.

Interesting... why does not work a simple copying of the project folder? Show me blank/white page without errors.
you should always see errors, especially during development it is essential. check you have:
- debug.error.log = false in config.ini (or config.local.ini)
- display_errors = on in php.ini
 

Can i migrate to branch 3.7 from 3.5 without problems with my app??? Has 3.7 incompatible changes?
There are incompatible changes, but most of them should not affect your ext-only application.
You can also use the scripts/update-to-3.6.php and  scripts/update-to-3.7.php to update some changes (execute both of them)



Artyom M

unread,
Oct 27, 2014, 8:14:38 PM10/27/14
to koala-fra...@googlegroups.com
 >also make sure you set server.baseUrl correctly, that setting didn't exist in 3.5.
server.baseUrl = "" in my working project (v 3.5)

>you should always see errors, especially during development it is essential. check you have:
>- debug.error.log = false in config.ini (or config.local.ini)
>- display_errors = on in php.ini
Parameters displayed as you wrote. Nothing. Clear-cache - nothing in console. Not works at all.
How to resurrect this corpse? =))

>You can also use the scripts/update-to-3.6.php and  scripts/update-to-3.7.php to update some changes (execute both of them)
I only have this files in kwf-lib\scripts:
update-to-3.4.php
update-to-3.5.php

where can I get 3.6 and 3.7 php update files? Download last branch and copy from?

Niko Sams

unread,
Oct 28, 2014, 4:20:50 PM10/28/14
to Koala Framework Dev
>you should always see errors, especially during development it is essential. check you have:
>- debug.error.log = false in config.ini (or config.local.ini)
>- display_errors = on in php.ini
Parameters displayed as you wrote. Nothing. Clear-cache - nothing in console. Not works at all.
How to resurrect this corpse? =))

try to delete cache/setup* and execute clear-cache again.
 
>You can also use the scripts/update-to-3.6.php and  scripts/update-to-3.7.php to update some changes (execute both of them)
I only have this files in kwf-lib\scripts:
update-to-3.4.php
update-to-3.5.php

where can I get 3.6 and 3.7 php update files? Download last branch and copy from?

simply checkout 3.7 branch and directly start them.


Niko

Artyom M

unread,
Oct 28, 2014, 7:24:47 PM10/28/14
to koala-fra...@googlegroups.com
>try to delete cache/setup* and execute clear-cache again.
Wow, magic! I deleted setup/setup2/setup3 and now page and console shows me errors... better than nothing. 

Error

Errortype:

Message:
exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)' in C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Abstract.php:129
Stack trace:
#0 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Abstract.php(129): PDO->__construct('mysql:host=loca...', 'root', 'xxxxxx', Array)
#1 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#2 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect()
#3 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET names UTF8', Array)
#4 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Dao.php(47): Zend_Db_Adapter_Pdo_Abstract->query('SET names UTF8')
#5 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Setup.php(83): Kwf_Dao->getDb()
#6 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Registry.php(7): Kwf_Setup::createDb()
#7 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Registry.php(150): Kwf_Registry->offsetGet('db')
#8 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Db\Table\Abstract.php(40): Zend_Registry::get('db')
#9 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Table\Abstract.php(739): Kwf_Db_Table_Abstract->_setupDatabaseAdapter()
#10 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Db\Table\Abstract.php(25): Zend_Db_Table_Abstract->_setup()
#11 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Table\Abstract.php(268): Kwf_Db_Table_Abstract->_setup()
#12 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(924): Zend_Db_Table_Abstract->__construct(Array)
#13 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(254): Kwf_Model_Db->getTable()
#14 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(834): Kwf_Model_Db->createDbSelect(Object(Kwf_Model_Select))
#15 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(784): Kwf_Model_Db->_getDbSelect(Object(Kwf_Model_Select), NULL, NULL, NULL)
#16 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Abstract.php(196): Kwf_Model_Db->getRows(Object(Kwf_Model_Select))
#17 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Util\Model\Redirects.php(42): Kwf_Model_Abstract->getRow(Object(Kwf_Model_Select))
#18 C:\OpenServer\domains\puls1\cache\setup3.php(102): Kwf_Util_Model_Redirects->findRedirectUrl('domainPath', 'puls1/')
#19 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Setup.php(34): include('C:\\OpenServer\\d...')
#20 C:\OpenServer\domains\puls1\bootstrap.php(10): Kwf_Setup::setUp()
#21 {main}

Next exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)' in C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Abstract.php:144
Stack trace:
#0 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET names UTF8', Array)
#3 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Dao.php(47): Zend_Db_Adapter_Pdo_Abstract->query('SET names UTF8')
#4 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Setup.php(83): Kwf_Dao->getDb()
#5 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Registry.php(7): Kwf_Setup::createDb()
#6 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Registry.php(150): Kwf_Registry->offsetGet('db')
#7 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Db\Table\Abstract.php(40): Zend_Registry::get('db')
#8 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Table\Abstract.php(739): Kwf_Db_Table_Abstract->_setupDatabaseAdapter()
#9 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Db\Table\Abstract.php(25): Zend_Db_Table_Abstract->_setup()
#10 C:\OpenServer\domains\puls1\library\zend\1.10.7\Zend\Db\Table\Abstract.php(268): Kwf_Db_Table_Abstract->_setup()
#11 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(924): Zend_Db_Table_Abstract->__construct(Array)
#12 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(254): Kwf_Model_Db->getTable()
#13 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(834): Kwf_Model_Db->createDbSelect(Object(Kwf_Model_Select))
#14 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Db.php(784): Kwf_Model_Db->_getDbSelect(Object(Kwf_Model_Select), NULL, NULL, NULL)
#15 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Model\Abstract.php(196): Kwf_Model_Db->getRows(Object(Kwf_Model_Select))
#16 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Util\Model\Redirects.php(42): Kwf_Model_Abstract->getRow(Object(Kwf_Model_Select))
#17 C:\OpenServer\domains\puls1\cache\setup3.php(102): Kwf_Util_Model_Redirects->findRedirectUrl('domainPath', 'puls1/')
#18 C:\OpenServer\domains\puls1\kwf-lib\Kwf\Setup.php(34): include('C:\\OpenServer\\d...')
#19 C:\OpenServer\domains\puls1\bootstrap.php(10): Kwf_Setup::setUp()
#20 {main}

In my config.local.ini all parametres are fine (same as in project that works well). What can I do now?

>simply checkout 3.7 branch and directly start them.
I don't uderstand what I have to do. More info please =)

Niko Sams

unread,
Oct 29, 2014, 8:42:08 AM10/29/14
to Koala Framework Dev
good :D

looks like your database config is not correct - or it is not correctly picked up by koala.
is the root username as it shows up in the exception correct?
 
>simply checkout 3.7 branch and directly start them.
I don't uderstand what I have to do. More info please =)

1. checkout 3.7 branch:
cd webroot/kwf-lib
git checkout 3.7

2. execute update scripts:
cd webroot
./kwf-lib/scripts/update-to-3.6.php
./kwf-lib/scripts/update-to-3.7.php


Niko

Artyom M

unread,
Oct 30, 2014, 9:39:05 AM10/30/14
to koala-fra...@googlegroups.com
>is the root username as it shows up in the exception correct?
Yes, it correct. 
I use root without password on my WAMP by default.

As you say, it is not correctly picked up by koala.

Niko Sams

unread,
Oct 30, 2014, 12:44:42 PM10/30/14
to Koala Framework Dev
could you try setting empty password using ""
eg.
....password = ""

(then clear-cache)

Niko


--
You received this message because you are subscribed to the Google Groups "Koala Framework Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to koala-framework...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Artyom M

unread,
Oct 30, 2014, 7:18:12 PM10/30/14
to koala-fra...@googlegroups.com
>could you try setting empty password using ""
>eg.
>....password = ""

Already in my cpnfig.local.ini:
database.web.username = root
database.web.password = ""

>(then clear-cache)

Same error:

Niko Sams

unread,
Oct 31, 2014, 12:09:47 PM10/31/14
to Koala Framework Dev
that is strange.

please try to debug that in kwf-lib/Kwf/Dao.php; check out the contents of $dbConfig (line 45)

this is the place where the connection is created...

Niko

Artyom M

unread,
Nov 12, 2014, 3:18:30 AM11/12/14
to koala-fra...@googlegroups.com
OMG! 
Again I got this error during the migration on WORKING project from windows to linux platform! =((((

White screen. Clear-cache not work.

apache2 error log:
Wed Nov 12 19:01:19.756192 2014] [authz_core:debug] [pid 1049] mod_authz_core.c(828): [client 192.168.1.9:65096] AH01628: authorization result: granted (no directives)

After deleting setup3.php login page is appeared, but I see error in firebug:

exception 'Zend_Log_Exception' with message '"/var/www/puls1/querylog" cannot be opened with mode "w"' in /var/www/puls1/library/zend/1.10.7/Zend/Log/Writer/Stream.php:78
Stack trace:
#0 /var/www/puls1/kwf-lib/Kwf/Db/Profiler.php(15): Zend_Log_Writer_Stream->__construct('/var/www/puls1/...', 'w')
#1 /var/www/puls1/kwf-lib/Kwf/Dao.php(61): Kwf_Db_Profiler->__construct(true)
#2 /var/www/puls1/kwf-lib/Kwf/Setup.php(83): Kwf_Dao->getDb()
#3 /var/www/puls1/kwf-lib/Kwf/Registry.php(7): Kwf_Setup::createDb()
#4 /var/www/puls1/library/zend/1.10.7/Zend/Registry.php(150): Kwf_Registry->offsetGet('db')
#5 /var/www/puls1/kwf-lib/Kwf/Db/Table/Abstract.php(40): Zend_Registry::get('db')
#6 /var/www/puls1/library/zend/1.10.7/Zend/Db/Table/Abstract.php(739): Kwf_Db_Table_Abstract->_setupDatabaseAdapter()
#7 /var/www/puls1/kwf-lib/Kwf/Db/Table/Abstract.php(25): Zend_Db_Table_Abstract->_setup()
#8 /var/www/puls1/library/zend/1.10.7/Zend/Db/Table/Abstract.php(268): Kwf_Db_Table_Abstract->_setup()
#9 /var/www/puls1/kwf-lib/Kwf/Model/Db.php(924): Zend_Db_Table_Abstract->__construct(Array)
#10 /var/www/puls1/kwf-lib/Kwf/Model/Db.php(906): Kwf_Model_Db->getTable()
#11 /var/www/puls1/kwf-lib/Kwf/Model/Db.php(956): Kwf_Model_Db->getPrimaryKey()
#12 /var/www/puls1/kwf-lib/Kwf/Model/Abstract.php(191): Kwf_Model_Db->select(1)
#13 /var/www/puls1/kwf-lib/Kwf/Controller/Action/User/LoginController.php(32): Kwf_Model_Abstract->getRow(1)
#14 /var/www/puls1/kwf-lib/Kwf/Controller/Action.php(33): Kwf_Controller_Action_User_LoginController->headerAction()
#15 /var/www/puls1/library/zend/1.10.7/Zend/Controller/Dispatcher/Standard.php(295): Kwf_Controller_Action->dispatch('headerAction')
#16 /var/www/puls1/library/zend/1.10.7/Zend/Controller/Front.php(953): Zend_Controller_Dispatcher_Standard->dispatch(Object(Kwf_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /var/www/puls1/kwf-lib/Kwf/Controller/Front.php(137): Zend_Controller_Front->dispatch(Object(Kwf_Controller_Request_Http), NULL)
#18 /var/www/puls1/bootstrap.php(20): Kwf_Controller_Front->dispatch()
#19 {main}

and some 500 errors:
"NetworkError: 500 Internal Server Error - http://puls1/kwf/user/login/header"
header
"NetworkError: 500 Internal Server Error - http://puls1/assets/all/web/ru/Admin.printcss?v=1415103017"

What happened now?

Niko Sams

unread,
Nov 12, 2014, 4:59:20 AM11/12/14
to Koala Framework Dev
kwf tries to write querylog file (which happens only if debug.querylog = true)
easy to solve by giving the www user apache runs write permissions:
chmod a+w /var/www/puls1

Niko

--

Artyom M

unread,
Nov 12, 2014, 7:11:47 PM11/12/14
to koala-fra...@googlegroups.com
keep getting strange errors:

<br />
<b>Fatal error</b>:  Uncaught exception 'ErrorException' with message 'Invalid argument supplied for foreach()' in /var/www/portal1/kwf-lib/Kwf/Exception/Logger/LogFiles.php:16
Stack trace:
#0 /var/www/portal1/kwf-lib/Kwf/Exception/Logger/LogFiles.php(16): Kwf_Debug::handleError(2, 'Invalid argumen...', '/var/www/portal...', 16, Array)
#1 /var/www/portal1/kwf-lib/Kwf/Exception.php(42): Kwf_Exception_Logger_LogFiles-&gt;log(Object(Kwf_Exception_Other), 'error', '** Exception **...')
#2 /var/www/portal1/kwf-lib/Kwf/Exception/Abstract.php(61): Kwf_Exception-&gt;log()
#3 /var/www/portal1/kwf-lib/Kwf/Debug.php(301): Kwf_Exception_Abstract-&gt;render()
#4 [internal function]: Kwf_Debug::handleException(Object(ErrorException))
#5 {main}
  thrown in <b>/var/www/portal1/kwf-lib/Kwf/Exception/Logger/LogFiles.php</b> on line <b>16</b><br />


Config->developers is null

Artyom M

unread,
Nov 12, 2014, 7:24:35 PM11/12/14
to koala-fra...@googlegroups.com
something:

SyntaxError: syntax error
and loading loop in login page.


In home computer with SAME virtual machine I has error 500 - can't connect with 'root'@localhost (as i described higher). 

Artyom M

unread,
Nov 13, 2014, 5:47:20 AM11/13/14
to koala-fra...@googlegroups.com
Finally found a solution for all my projects.

1. Delete ALL files in \cache dirs manually, except folders. I think clear-cache command not do it well. Connection problem (root@localhost) immediately passed.
2. Enable short_open_tag in php.ini. See how to do it: http://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags

Everything works well now.
Reply all
Reply to author
Forward
0 new messages