Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2009
    Posts
    5

    Unanswered: *Resolved* Can connect to hosted mySQL, having trouble with local

    We have a web application that we had developed that connects to a mySQL db through .php pages. We have the application hosted at Network Solutions. Works fine.

    I'm building a local machine to use for offline demos. I've downloaded the database from Network Solutions and put the .php files in the correct directory to use.

    CentOS 5.3
    apache
    php
    mysql

    Http://127.0.0.1/secure/index.php takes me to the application's login page, but it doesn't connect to the db.

    phpMyAdmin:

    Server: localhost Database: database1


    Users having access to "database1"
    User Host Type Privileges Grant Action
    webuser localhost global ALL PRIVILEGES Yes
    root localhost global ALL PRIVILEGES Yes



    The two pages that deal with connecting to the db I edited: class.login.php and class.dbcon.php to:

    private static $dsn = "mysql:host=localhost;dbname=database1";
    private static $usr = "webuser";
    private static $psw = "xxxxxxxxxxx";

    The password "xxxxxxxxxxx" is the password that I set in phpMyAdmin for the user 3cpo.

    What am I missing? Thanks in advance, J.
    Last edited by JohnLuker; 10-21-09 at 19:01. Reason: resolved

  2. #2
    Join Date
    Oct 2009
    Posts
    5
    I was able to successfully log in to phpMyAdmin using the username/pwd combination from the two files, if that helps.

  3. #3
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    If it's a web app why do you need a local machine to do demo's? Surely you just go the web page as before as a guest user. Also the address 127.0.0.1 is a special type of URL that goes back to your own machine so giving it to us will do nothing (see this page).

  4. #4
    Join Date
    Oct 2009
    Posts
    5
    Quote Originally Posted by mike_bike_kite
    If it's a web app why do you need a local machine to do demo's? Surely you just go the web page as before as a guest user. Also the address 127.0.0.1 is a special type of URL that goes back to your own machine so giving it to us will do nothing (see this page).

    You must have missed the "offline demo" part. There is a specific reason for this that is not really relevant to the discussion.

    Thanks for the link.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    has the db been restarted or privileges flushed since they changes been made

    in the absence of error messages its hard to diagnose the fault
    there may be some more info in the web server logfile
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    Quote Originally Posted by JohnLuker
    You must have missed the "offline demo" part. There is a specific reason for this that is not really relevant to the discussion.
    I didn't miss it, I just didn't understand why you were doing it that way. A few advantages of using the same live web application for the demo might be:
    • no need to install your application plus MySQL, PHP, Apache etc onto separate hardware
    • easy to demo to the user in the environment they're going to use it - ie on their browser
    • the user sees the real application and not whatever version of the software you last downloaded onto your PC
    • the performance of all the demo will mimic that of the live system
    • generally fewer issues to contend with and so save time
    • you don't have to be physically at every demo
    • no chance of loosing your hardware and all the precious code with it
    • no need to drag any hardware around with you

    Obviously I know nothing of your application but I'm just curious what benefits you were expecting from going against this more traditional approach? Going against this approach also caused you the problems you're having so it is kind of relevant to the discussion.

    Mike

  7. #7
    Join Date
    Oct 2009
    Posts
    5
    Quote Originally Posted by mike_bike_kite
    I didn't miss it, I just didn't understand why you were doing it that way. A few advantages of using the same live web application for the demo might be:
    • no need to install your application plus MySQL, PHP, Apache etc onto separate hardware
    • easy to demo to the user in the environment they're going to use it - ie on their browser
    • the user sees the real application and not whatever version of the software you last downloaded onto your PC
    • the performance of all the demo will mimic that of the live system
    • generally fewer issues to contend with and so save time
    • you don't have to be physically at every demo
    • no chance of loosing your hardware and all the precious code with it
    • no need to drag any hardware around with you

    Obviously I know nothing of your application but I'm just curious what benefits you were expecting from going against this more traditional approach? Going against this approach also caused you the problems you're having so it is kind of relevant to the discussion.

    Mike
    Actually going against the "traditional" approach helped me learn something, so there is great value there. Why we're doing what we're doing really is completely and totally irrelevant to the discussion.

    But since you're so interested: We're doing the demo offline because the production system will be installed on an intranet. The system contains sensitive information that cannot be transmitted across the public internet.

  8. #8
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    That's all I needed to know, good luck learning how to fix your problem

  9. #9
    Join Date
    Oct 2009
    Posts
    5
    Quote Originally Posted by mike_bike_kite
    That's all I needed to know, good luck learning how to fix your problem
    Thanks. Got it working earlier, hence the "*resolved" edit.

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •