Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    help question MySQL stopped workin after I edited a couple zen cart files

    Hi:

    I have installed MySQL 5 on my intel core duo iMac. It ran flawlessly. I installed to work with Zen Cart which I had been setting up. While I am not a unix guru by any sort (am a paleontologist who uses Macs and PCs and runs websites -- via dreamweaver mostly in terms of editing) but I got it going with the shop demos they give you. So I go and edit a couple of the *.phps in the include/language directory to see if I can change the header on the demo website and learn how to modify it for own use. I edited the two php files and saved to a new CUSTOM folder like they said to do in Zen Cart documents. No change, so I think maybe I should quit MySQL and restart? I do so and wham MySQL does not run any longer, it runs for about 30 seconds in my process list and then dies.

    MySQL was running when I edited the two files in dreamweaver (I had setup zencart dir as a new site in Dreamweaver -- also while MySQL is running in background). Dreamweaver asked if I wanted to change paths in the edited file I saved to the new CUSTOM directories I created following the zen cart documentation. I said yes and not sure what that changed.

    Anyway if anyone has an idea of what might have changed to make MySQL not run I would appreciate some pointers. Have been scouring online documentation for this and Zen cart and found nothing that makes sense to me. I even removed the MySQL directory that got put in usr/local and reinstalled MySQL from scratch and zencart from scratch. But MySQL still will not run so obviously someother file is broken/corrupted elsewhere on my system.

    Thanks for any suggestions you might have.

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Russell J. Jacobson
    Geologist 217-244-2426
    Coal Section Fax 217-333-2830
    Specialties: Stratigraphy, Coal Geology
    Coal Resources, Geoscience Outreach
    and Vertebrate Paleontology
    615 E Peabody Drive
    Illinois Geological Survey
    Champaign, IL 61820
    Email: jacobson AT isgs DOT uiuc DOT edu

    Keeper of DINO RUSS's LAIR:
    [www.dinoruss.com] or [www.dinoruss.org]
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  2. #2
    Join Date
    Nov 2006
    Posts
    1
    Plugin Contributions
    0

    Default Re: MySQL stopped workin after I edited a couple zen cart files

    Hello,
    That sounds pretty strange. The first thing I would do is try to run MySQL from the command line, because if it dies it will be obvious, because you will be back in the terminal.
    run /usr/local/mysql/bin/mysql . At least, that it where it should be. Editing the PHP should have nothing to do with the database, and MySQL should be pretty robust. Try to find an error message somewhere, because then online fourms + docs should get you on your way.
    Good luck

  3. #3
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: MySQL stopped workin after I edited a couple zen cart files

    Quote Originally Posted by rainier View Post
    Hello,
    That sounds pretty strange. The first thing I would do is try to run MySQL from the command line, because if it dies it will be obvious, because you will be back in the terminal.
    run /usr/local/mysql/bin/mysql . At least, that it where it should be. Editing the PHP should have nothing to do with the database, and MySQL should be pretty robust. Try to find an error message somewhere, because then online fourms + docs should get you on your way.
    Good luck
    Hi:

    I did some further exploring of the issue and found in the MySQL error log that it was starting and quiting after 3 sections because of some kind of socket problem. Here is error message:

    061109 07:18:05 mysqld started
    061109 7:18:05 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
    061109 7:18:05 InnoDB: Started; log sequence number 0 43655
    061109 7:18:05 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
    061109 7:18:05 [ERROR] Do you already have another mysqld server running on port: 9000 ?
    061109 7:18:05 [ERROR] Aborting

    061109 7:18:05 InnoDB: Starting shutdown...
    061109 7:18:08 InnoDB: Shutdown completed; log sequence number 0 43655
    061109 7:18:08 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

    061109 07:18:08 mysqld ended


    So I looked furhter and on Apple site I found with 10.4 and above apple has the socket moved as below and I found that for /ect/my.cnf that my settings for MySQL were:

    [FONT=Arial]NOTE: mine has

    [mysqld]
    #Port number to use for connections.
    port=9000

    I changed the file to match the info below and MySQL now works, but when I "renstalled" zen cart via the zen cart install folder that zen cart did not seem to work now. So while I have MySQL working nwo Zen Cart will not run (the setup works fine but then Admin and the demo are not found). This seems to be something to do with the fact that when I set up things the first time I had Zen Cart and MySQL working it was on port/socket 9000 and MysQL normally uses 3306. I am a bit confused as to where to now go but it seems I need to do something in the set up of Zen Cart that deals with the sockets that mac and MySQL are now working with 3306. Is there info somewhere on this site about this?
    [/FONT]
    [FONT=Arial]When running MySQL and PHP on the same Mac OS X 10.4 server, you may find that PHP cannot connect to MySQL. When PHP is communicating with a MySQL server on the same host, it uses a socket file to communicate, and looks for it at /tmp/mysql.sock. On Mac OS X Server 10.4, MySQL creates this socket file at /var/mysql/mysql.sock.

    To resolve this issue, you can either change the location where MySQL creates its socket file, or modify the location where PHP looks for the file. Please note that the first option is less secure than the second. Before delving in, you should also review new information relevant to PHP and MySQL on Mac OS X Server 10.4.4 and later.

    To change the location where MySQL creates its socket file, do this:

    Open your preferred text editor and create a plain text file.
    Type this text (on two lines as shown):

    [mysqld]
    socket=/tmp/mysql.sock
    Sav
    e the file as: /etc/my.cnf
    To chang
    e the location where PHP looks for the socket file, follow these steps:

    In Terminal: sudo cp /etc/php.ini.default /etc/php.ini
    Open /etc/p
    hp.ini in your preferred text editor.
    Find the [MySQL] section, and change the mysql.default_socket directive:
    ; Default socket name for local MySQL connects. If empty, uses
    the built-in
    ; MySQL defaults.
    mysql.default_socket = /var/mysql/mysql.sock

    Change the permissions on /var/mysq
    l so that www can read the socket, by executing this in Terminal:

    sudo chmod 775 /var/mysql
    [/FONT]

  4. #4
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: MySQL stopped workin after I edited a couple zen cart files

    Ok I now have MySQL running as noted above. But I now am unable to get Zen Cart to work with MySQL after a fresh setup in my browser via the zen-cart install folder. I susppect it has to do with the proper socket and path to the MySQL server I need to give zen-cart during the time when it askst the following info:

    Before Running the Installer

    The installer is fairly intelligent and should be able to automatically supply answers to the questions listed below.

    You will, however, need to confirm that the auto-detected answers are, in fact, correct as on some servers they may differ.

    You will need the following information for the installation:
    The simple instructions the first time I had this working all seemed to say use the path name localhost in my Mac but it took over 2 minutes for each screen of my Safari browser to go to next page using the name local host. Well I was tinkering the first time before MySQL failed and found if I used the internal ip number of 127.0.01 that MySQL is running on instead of localhost in the above that it ran great. And it was not just 127.0.01, I had to give the ip number and socket, which the first time was the 9000 socket I mention in my first reply above. When I used the 127.0.01:9000 in lieu of local host in the paths above then Zen Cart ran very fast in my safari browser.

    So when I got MySQL working again this morning I thought I would use the 127.0.01:9000 server address but lo I found with following Apples directions (in my first reply above) that MySQL is running on socket 3306 rather than 9000.

    So I suspect that I need to deal with this but to let you know right off I tired just 127.0.01, that did not work, I tried 127.0.01:3306 and got a error message about a handshake problem. I guess I need to find out about the proper path I need to give in the above part of the zen cart install and it has something to do with the socket. Are there document details somewhere here to help me put the proper paths above. Remember it is not the term"localhost" as that runs very, very slow, so I need to use the ip number for the server and probably the socket number 3306, but that gave me an error so I am at a standstill again.

    Thanks for any help others here can lend me on this -- I figure eventually this will get resolved -- and I am learning alot more about the underlying aspects of OS X than I have in sometime.

    Thanks

    Russ Jacobson

  5. #5
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: What I am doing with Zen Cart

    I thought I should add one more thing to this thread. I am testing Zen Cart on my iMac Intel Core Duo in local mode on the included Apache web server. So at moment this cannot be seen on web. I may then test it on web via my broadband connection but it is not out yet. So I am doing everything on localhost but that is too slow hence the need to use the full ip with socket.

    In case you ask using the configuration file section that shows some of the paths I use here is what worked the first time (before MySQL would not work)

    define('HTTP_SERVER', 'http://127.0.01:9000');
    define('HTTPS_SERVER', 'https://127:0.01:9000');
    The default in MacOS X that came up the first install was localhost in place of 127.0.01:9000.

    So maybe my more direct question is what paths do I use in the system configuration of zen cart for the local server on my mac to access MySQL with zen cart. And where the heck did the 9000 socket come from when MySQL is running on 3306.

    Well enough for now.

    Thanks for any suggestions, ideas!

    Russ

  6. #6
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,230
    Plugin Contributions
    0

    Default Re: MySQL stopped workin after I edited a couple zen cart files

    I would suggest you install MAMP (or a similar third-party AMP package).

    The included Apache/MySQL/PHP in OS X is not easy (or ideal) from the setting-up perspective. Once you have your MAMP (or similar package) installed you shouldn't need :3306 or :9000. MAMP installs in your application folder (IIRC) so doesn't affect any systems settings:

    http://www.mamp.info/en/index.php

  7. #7
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: MySQL stopped workin after I edited a couple zen cart files

    Quote Originally Posted by Pixxi View Post
    I would suggest you install MAMP (or a similar third-party AMP package).

    The included Apache/MySQL/PHP in OS X is not easy (or ideal) from the setting-up perspective. Once you have your MAMP (or similar package) installed you shouldn't need :3306 or :9000. MAMP installs in your application folder (IIRC) so doesn't affect any systems settings:

    http://www.mamp.info/en/index.php
    I looked at that program after the fact, even used to install on my PC at work but I am less familar with some root level file structures so have not tried on PC yet. Anyway I have it running on my mac locally and remotely. I have a local file that runs via the router assigned ip for my iMac and I have another copy of zen cart that is running via my dynDNS service over my broadband connection. I also found a program that can set virtual servers but not sure I needed it. Once I got things set with my dynDNS it all is working now.

    Thanks for advice however!

    Russ

 

 

Similar Threads

  1. Sites stopped working after installing Ultimate SEO for Zen 1.5.1
    By slavka001 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 30 Dec 2013, 10:46 PM
  2. site ssl stopped working after delete and restore files
    By divinelighting in forum General Questions
    Replies: 10
    Last Post: 10 May 2012, 04:02 PM
  3. Considering Zen Cart: couple of basic questions?
    By debbier in forum General Questions
    Replies: 3
    Last Post: 17 Oct 2009, 11:15 PM
  4. Zen id stopped hiding after first click
    By Paul27 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Oct 2009, 07:42 PM
  5. Couple of Questions about Zen-Cart!
    By wmorris in forum General Questions
    Replies: 9
    Last Post: 25 Jan 2008, 05:37 PM

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