Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default final install page->mysql_real_escape_string() expects parameter 2 to be resource

    FYI

    This is a development copy of my real shop files, located on my hosting.
    I have not used it for a long time, and found the configures had old data in them.
    I could get the admin side to work ok, but the catalog was always "an error ocurred etc..." no error log messages.
    I gave up staring at it and decided to reinstall to re-create them.

    I deleted the configures, dropped all the db tables and ran the installer.
    On the final page where it installs/or not the demo products it gave the "an error ocurred....refresh" white page of death· etc.
    The only error log is this
    [26-Sep-2013 23:10:45 Europe/London] PHP Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /....../tienda_copy/includes/classes/db/mysql/query_factory.php on line 89
    [26-Sep-2013 23:10:45 Europe/London] PHP Fatal error: 0:Install Error: Could not connect to the Database :: update configuration set configuration_value = '' where configuration_key = 'STORE_NAME' in /......./tienda_copy/includes/classes/db/mysql/query_factory.php on line 120
    In the end I found the install problem was caused by selecting "use SSL" for both the catalog and admin in the installer. I'm not sure which was the problem or the use of both.

    Once it had installed ok, I imported my real database and enabled SLL in the newly created configures and all works ok.
    I checked the new configures against the old ones (where the catalog one would not work) and they were identical.

    So in summary, it all should have worked from the start.

    So two issues:
    1) why it would not work from the start, somehow related to
    2) why did the installer choke?

    Any idea what happened here?
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: final install page->mysql_real_escape_string() expects parameter 2 to be resource

    I use SSL all the time when running zc_install, and check the use-ssl box about 80% of the time when testing/dev and 100% of the time when installing real sites, so can't see how it could be related to that.

    But, that particular screen actually reads the contents of the configure.php to obtain the db credentials, so the error is most likely related to a problem reading configure.php contents correctly.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: final install page->mysql_real_escape_string() expects parameter 2 to be resource

    I had omitted to delete the /local folder from the files so it was indeed reading the wrong configure information.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 

Similar Threads

  1. Replies: 3
    Last Post: 6 Jun 2016, 02:37 AM
  2. v153 PHP Warning: addslashes() expects parameter 1 to be string
    By BlackOrchidCouture in forum General Questions
    Replies: 2
    Last Post: 17 Sep 2014, 10:47 PM
  3. PHP Warning: mktime() expects parameter 6 to be long
    By milkyway in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 29 Dec 2010, 03:19 PM
  4. PHP Warning mktime() expects parameter 6 to be long
    By dave_dave in forum General Questions
    Replies: 2
    Last Post: 2 Sep 2010, 04:41 AM
  5. Replies: 0
    Last Post: 26 Jun 2010, 12:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR