Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    37
    Plugin Contributions
    0

    Default Can not passed Database setup

    Hi, I am a newb!!!!!! I have been trying to find a fix for my install problem and haven' been able to find an answer yet soI decided to post..... I am trying out or want to try out zen cart on my local server before putting it up on my web host. I am running osx 10.6 server, (I am very new toOSX server as well) I made sure I set up zen cart database in mysql and made sure all the permissions were correct, (I had no clue about mysql) but quickly learned how to set up a user a database name at least and the permissions........
    Before I set up the mysql server I was getting the normal error can not connect to database. I think all that is set up now because I get a new error message that I have not seen on the forums (and this very well be due to my local web server not being set up correctly........ Any way now i get this message and can not get around it .....
    Safari can’t open the page “http://localhost/zc_install/index.ph...atabase_setup” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.

    No matter what now I get this message, If I give it the wrong Database or wrong password I get the usual can not connect to database message............

    Any Ideas? .. remember I am not a big programmer so please be pretty basic with me, I am great with hardware lol ....... anyway I hope someone has an idea for me......

    I am running OSX SNOW LEOPARD SERVER, PHP 5.3.0, MYSQL 5.0.82-log.... and apache 2.2 .......

    Oh I did forget to do a software update since install of the server software, (I am testing out configurations before rollout next year )
    So I will be updated to 10.6.2 ...

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Can not passed Database setup

    I'd start with applying the PHP 5.3 patch to your Zen Cart files: http://www.zen-cart.com/forum/showthread.php?t=140960
    .

    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
    Dec 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Can not passed Database setup

    Thanks for the reply !!!!!!!!!!!!!!!
    Ok I installed the patch per the instructions, butI still get the server timeout...... Since I am new I can not rule out the possibility that my web server is not configured correctly..... In the web server error logs I do get this error " child pid 64293 exit signal Segmentation fault (11)"

    I have tried this with and with out ssl as well ..........
    I know it has to be me .............
    I could try this right from the web host, butI really want to configure and see it in action locally......

    Any other ideas???????????

  4. #4
    Join Date
    Dec 2006
    Location
    Augusta, GA
    Posts
    72
    Plugin Contributions
    0

    Default Re: Can not passed Database setup

    It appears that this is a php bug: http://bugs.php.net/bug.php?id=48754 that's been fixed. Without MAMP, looks like I'll be learning how to install php 5.3.1 from scratch. Yippie!
    I know the easy solution; but, now I'm mad.

  5. #5
    Join Date
    Dec 2006
    Location
    Augusta, GA
    Posts
    72
    Plugin Contributions
    0

    Default Re: Can not passed Database setup

    Interesting. I did this in zc_install/classes/installer.php
    Code:
          if ($this->error == false) {
            if ($zp_type == 'mysql') {
              if (@mysql_connect($zp_host, $zp_username, $zp_pass) == false )
    
    ----
    
    mysql_close();
    to

    Code:
    	$a = @mysql_connect($zp_host, $zp_username, $zp_pass);
          if ($this->error == false) {
            if ($zp_type == 'mysql') {
              if ($a == false )
    ----
    
    mysql_close($a);
    and

    Code:
          if ($zp_create != 'true' && $this->error == false) {
            if ($zp_type == 'mysql') {
              @mysql_connect($zp_host, $zp_username, $zp_pass);
    -----
    
    mysql_close();
    to

    Code:
    	$a = @mysql_connect($zp_host, $zp_username, $zp_pass);
          if ($zp_create != 'true' && $this->error == false) {
            if ($zp_type == 'mysql') {
              $a;
    
    ---
    
    mysql_close($a);
    and…the bloody thing worked!!

  6. #6
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    bug FIX: ZenCart 1.38a Install crashes Apache on WampServer 2.0 (or PHP 5.3)

    Does this sound familiar?...

    • I have WAMP Server 2.0 installed (and working!) with PHP 5.3.
    • I am new to Zen cart. I am trying to install zen-cart 1.3.8a.
    • The apache server is shutting down at the ZenCart database setup stage.
    • I found the forums about the patch and applied it.
    • The apache server is still shutting down after the database setup
    .

    I had this same problem, as it seems do many others...

    The problem appears to be with a PHP mysql_close() function bug...
    http://bugs.php.net/bug.php?id=48754

    The solution (for me) was fairly simple in the end:
    Thanks to the solution provided in this thread, but not very clear, so expanded by me below!

    1. Install the ZenCart Patch following the details in this post.
    2. With your favourite text editor, open up: zc_install/classes/installer.php
    3. Search for: function dbConnect
    4. Replace the entire function with this one...
      PHP Code:
          function dbConnect($zp_type$zp_host$zp_database$zp_username$zp_pass$zp_error_text$zp_error_code$zp_error_text2=ERROR_TEXT_DB_NOTEXIST$zp_error_code2=ERROR_CODE_DB_NOTEXIST) {
          
      $fix53 = @mysql_connect($zp_host$zp_username$zp_pass);
          if (
      $this->error == false) {
              if (
      $zp_type == 'mysql') {
                if (
      $fix53 == false ) {
                  
      $this->setError($zp_error_text.'<br />'.@mysql_error(), $zp_error_codetrue);
                } else {
                  if (!@
      mysql_select_db($zp_database)) {
                    
      $this->setError($zp_error_text2.'<br />'.@mysql_error(), $zp_error_code2true);
                  } else {
                    @
      mysql_close($fix53);
                  }
                }
              }
            }
          } 
    5. Search for: function dbExists (a couple of lines below the dbConnect function)
    6. Replace the entire function with this one...
      PHP Code:
          function dbExists($zp_create$zp_type$zp_host$zp_username$zp_pass$zp_name$zp_error_text$zp_error_code) {
            
      //    echo $zp_create;
            
      if ($zp_create != 'true' && $this->error == false) {
              if (
      $zp_type == 'mysql') {
                
      $fix53 = @mysql_connect($zp_host$zp_username$zp_pass);
                if (@
      mysql_select_db($zp_name) == false) {
                  
      $this->setError($zp_error_text.'<br />'.@mysql_error(), $zp_error_codetrue);
                }
                @
      mysql_close($fix53);
              }
            }
          } 
    7. Save the modded installer.php
    8. Run ZenCart setup once again.

    I hope it works for you as it did for me.

    I suggest the powers that be make these changes in the patch zip file to avoid further problems for people.

    PS. It appears from here that this error has been fixed in ZenCart 1.3.9 and so it should disappear when that is released.
    Last edited by Celtic; 3 Feb 2010 at 08:21 PM. Reason: added some more links

  7. #7
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Can not passed Database setup

    um, note in the above two functions that the @mysql_error() calls may also have to be replaced with @mysql_error($fix53) to reference the open database. Haven't tested it, sorry, as I didn't get any errors.


    Also, can we please change the title of this thread to be a bit more descriptive of the error it discusses. I had posted my solution above in its own thread with an appropriate title, but it seems to have been dumped here by the moderators!!!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Can not passed Database setup

    Quote Originally Posted by Celtic View Post
    Also, can we please change the title of this thread to be a bit more descriptive of the error it discusses.
    Not necessary, as a couple weeks ago I updated the patch to include the fix posted by hermes. I double-checked it last week, at which time I also updated the readme to include the filename, etc. So, using the patch should avoid the problem, thus making it unnecessary to do the edits manually.
    .

    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.

  9. #9
    Join Date
    Feb 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Can not passed Database setup

    Hi ,

    I am facing same problem. I have done changes in functions dbConnect and dbExists same as mentioned above , but after these changes , a blank page appear when i press ok in database set up page . Please advise on this issue .


    System set up

    PHP 5.3 Version
    Apache 2.2.11
    Operating System Mac OS Ver 10.6
    MySql :- 5.1.44 - LOG

    Vandana

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Can not passed Database setup

    Quote Originally Posted by vandy76 View Post
    PHP 5.3 Version
    http://www.zen-cart.com/forum/showthread.php?t=140960
    .

    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.

 

 

Similar Threads

  1. Can't get past 'Database Setup' page
    By gavwright in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 17 Jul 2010, 04:56 PM
  2. Anyone can help? how do i complete the database setup ?
    By lllp7899 in forum Installing on a Windows Server
    Replies: 4
    Last Post: 6 Mar 2010, 04:43 PM
  3. Can't get past database setup
    By RavenMoon in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 6 Sep 2007, 12:49 AM

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