Jump to content

Problems after installing remote copy to local


theo
 Share

Recommended Posts

Hi,

I have a PW Site on a remote Server and wanted a local copy.

So i have copied everything, files and database, made some adjustments and voila, the frontend is running under mod_userdir.

But I can not login into the backend. I'm getting all sorts of errors.

Please see also "Fatal error: Uncaught exception 'PDOException'" at the bottom

My site/assets and config.php is writeable.

Which could be the problem(s)?

Thank you.

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------

    Field: Fieldtype 'FieldtypeAdminCustomPagesSelect' does not exist

    ProcessWire: ProcessLogin: This request was aborted because it appears to be forged.

    DEBUG MODE BACKTRACE ($config->debug == true):
    #0 /home/theo/public_html/schweigpw_remote/wire/modules/Inputfield/InputfieldForm.module(98): SessionCSRF->validate()
    #1 [internal function]: InputfieldForm->___processInput(Object(WireInputData))
    #2 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #3 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('processInput', Array)
    #4 /home/theo/public_html/schweigpw_remote/wire/modules/Process/ProcessLogin/ProcessLogin.module(132): Wire->__call('processInput', Array)
    #5 /home/theo/public_html/schweigpw_remote/wire/modules/Process/ProcessLogin/ProcessLogin.module(132): InputfieldForm->processInput(Object(WireInputData))
    #6 [internal function]: ProcessLogin->___execute()
    #7 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #8 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('execute', Array)
    #9 /home/theo/public_html/schweigpw_remote/wire/core/ProcessController.php(236): Wire->__call('execute', Array)
    #10 /home/theo/public_html/schweigpw_remote/wire/core/ProcessController.php(236): ProcessLogin->execute()
    #11 [internal function]: ProcessController->___execute()
    #12 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #13 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('execute', Array)
    #14 /home/theo/public_html/schweigpw_remote/wire/core/admin.php(94): Wire->__call('execute', Array)
    #15 /home/theo/public_html/schweigpw_remote/wire/core/admin.php(94): ProcessController->execute()
    #16 /home/theo/public_html/schweigpw_remote/wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/home/theo/publ...')
    #17 /home/theo/public_html/schweigpw_remote/site/templates/admin.php(15): require('/home/theo/publ...')
    #18 /home/theo/public_html/schweigpw_remote/wire/core/TemplateFile.php(182): require('/home/theo/publ...')
    #19 [internal function]: TemplateFile->___render()
    #20 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #21 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('render', Array)
    #22 /home/theo/public_html/schweigpw_remote/wire/modules/PageRender.module(422): Wire->__call('render', Array)
    #23 /home/theo/public_html/schweigpw_remote/wire/modules/PageRender.module(422): TemplateFile->render()
    #24 [internal function]: PageRender->___renderPage(Object(HookEvent))
    #25 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #26 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('renderPage', Array)
    #27 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(459): Wire->__call('renderPage', Array)
    #28 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(459): PageRender->renderPage(Object(HookEvent))
    #29 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('render', Array)
    #30 /home/theo/public_html/schweigpw_remote/wire/modules/Process/ProcessPageView.module(187): Wire->__call('render', Array)
    #31 /home/theo/public_html/schweigpw_remote/wire/modules/Process/ProcessPageView.module(187): Page->render()
    #32 [internal function]: ProcessPageView->___execute(true)
    #33 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(398): call_user_func_array(Array, Array)
    #34 /home/theo/public_html/schweigpw_remote/wire/core/Wire.php(333): Wire->runHooks('execute', Array)
    #35 /home/theo/public_html/schweigpw_remote/index.php(209): Wire->__call('execute', Array)
    #36 /home/theo/public_html/schweigpw_remote/index.php(209): ProcessPageView->execute(true)
    #37 {main}

ProcessWire

    AdminLogin

The process returned no content.

ProcessWire 2.7.2 © 2016

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'id' at row 1' in /home/theo/public_html/schweigpw_remote/wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module:109 Stack trace: #0 /home/theo/public_html/schweigpw_remote/wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module(109): PDOStatement->execute() #1 [internal function]: SessionHandlerDB->write('0pmdm6l560fqn3q...', 'Session|a:3:{s:...') #2 [internal function]: session_write_close() #3 {main} thrown in /home/theo/public_html/schweigpw_remote/wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module on line 109

Link to comment
Share on other sites

Hi,

I've never experienced this, but the forum seems to be "full of" the issue, so you might find the answer with this search:

https://www.google.hu/?client=safari#q=site:processwire.com%2Ftalk+"appears+to+be+forged"

Edit: also, this message should be dealt with, I suppose: "Field: Fieldtype 'FieldtypeAdminCustomPagesSelect' does not exist"

Edited by szabesz
  • Like 2
Link to comment
Share on other sites

Thank you. I have read all this before, but it doesn't help.

Permissions of site/assets/ are:

-------------------------------------------------------------------------------

-rwxrwxrwx+ 1 wwwrun www   205 17. Feb 14:59 active.php
drwxrwxrwx+ 1 wwwrun www    76 22. Feb 21:51 cache
drwxrwxrwx+ 1 wwwrun www    54 22. Feb 16:47 files
-rwxrwxrwx+ 1 wwwrun www   208 17. Feb 14:45 index.php
-rwxrwxrwx+ 1 wwwrun www   161 17. Feb 14:58 installed.php
drwxrwxrwx+ 1 wwwrun www   152 18. Feb 23:03 logs
drwxrwxrwx+ 1 wwwrun www 45032 14. Jul 17:37 sessions

-------------------------------------------------------------------------------

 

I have an installation of exactly the same version of PW (ProcessWire 2.7.2) on the same machine (with installer) in a different folder/database. It works without problems.

The copy from the web however does not.

I have copied all the files and the DB, adjusted .htaccess, site/config.php, copied the $config->userAuthSalt.

What else can I try?

Thank you!

Link to comment
Share on other sites

Only to be sure, you have setup your site/config.php to point to your local DB?

I believe it is a caching problem. If you just copied a dump from the remote DB to your local DB, you should delete all session and cache records before starting your local installation.

  • Like 1
Link to comment
Share on other sites

Yes! I removed those two rows and now I can log in.
Thank you!

But what does it mean? Don't I need this SessionHandlerDB stuff?

 

I still have a message "Field: Fieldtype 'FieldtypeAdminCustomPagesSelect' does not exist" though.

It seems like a minor problem, but why is that?

Thanks again.

 

Link to comment
Share on other sites

It is a caching problem. You have copied cache values (directory pathes) from one computer (your online) to another computer (your local), and file_last_modified timestamps too. But this stored ones from your online mostly will not match to your locals. So you need to clear caches and have to refresh the modules lists. (Maybe better 2 times than only once :) )

After all the caches are refreshed and the filecompiler builds all fitting to your local computer, all settings in DB should work again.

The second thing in your case is the SessionHandlerDB. SessionHandlerDB is an alternative handler fro session management. Now, after you have disabled it the hard way, PW switched to the default session management via files, located under site/assets/sessions/. If you like, you also can switch back to SessionHandlerDB after all other caches (also minor one!) are working perfect again. To switch back, please go to modules and install it via the interface, as you have done when using the first time. (Don't modify the modules table!! this only works the other way round!)

------ --- ------

To avoid those caching issues, you could use the SiteExporterModule, but this would not give you an exact copy of your online site. So, in your case you have done most things right. Only thing what you may try next time could be:

  • make a copy of all site/... files to your local PC
  • modify the site/config.php to point to your local DB
  • get a mysql dump from your online DB
  • modify the mysql dump: remove all entries of the tables "caches, sessions", but only the data value entries, not the table definitions!
  • import the modified mysql dump into your local DB
  • login into admin, go to modules and hit the refresh button one or two times

 

  • Like 7
Link to comment
Share on other sites

  • 2 months later...
On 7/15/2016 at 9:35 AM, horst said:

There is SessionHandlerDB and ProcessSessionDB in the modules table. Both belong together, ProcessSessionDB is a submodule of SessionHandlerDB.

I am having the same issue and I look in the modules table and do not see a SessionHandlerDB or a ProcessSessionDB.

**UPDATE**

Ok, rereading this thread I see that I do not have that module installed that's why I don't see them listed in the modules table.

***UPDATE AGAIN***

I could not log in because the session.referer_check in php.ini was set to the wrong domain.

Edited by watertower
Resolved!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...