#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0

    Question App works in XAMPP but not WAMP ???


    Hi,

    I have a small application which accesses a MySQL database and prints out the results.

    I can either run the application from my windows desktop or from within a browser using 127.0.0.1/cgi-bin/application.exe

    Here's the problem. When using XAMPP the application works fine in both modes, but when using WAMP the application only works from the desktop, not when run from within a browser.

    Both XAMPP & WAMP have the same verion of Apache (2.4.2) and the same version of MySQL (3.5.1).

    The details are:

    Run from the desktop using XAMPP = Application works fine
    Run from within Browser using XAMPP = Application works fine

    Run from the desktop using WAMP = Application works fine
    Run from within Browser using WAMP = Runs ok, but stops when it reaches the MySQL bit and displays "Unable to connect to MySQL Database".

    The fact that the application works correctly from the desktop in WAMP rules out a privilege problem.

    Likewise it runs any code prior to the MySQL bit in the browser ok, so it's not an Apache config problem i.e. It is running the .exe ok.

    Can't see any reason as to why the application only fails in a browser when using WAMP.

    Any guru have the answer?

    Thanks & regards,

    Pete
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    What language is the application written in? The problem is probably there rather than with the database.

    The database version number you give doesn't make sense, there is no MySQL 3.5. Maybe you mean 5.1.3?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by E-Oreo
    What language is the application written in? The problem is probably there rather than with the database.

    The database version number you give doesn't make sense, there is no MySQL 3.5. Maybe you mean 5.1.3?
    Hi E-Oreo,

    Apologies mate - I was quoting the phpMyAdmin version.

    Details are:
    Database client version: libmysql - mysqlnd 5.0.10 - 20111026
    Database Server Software version: 5.5.24
    phpMyAdmin version: 3.5.1
    Apache/2.4.2 (Win64) PHP/5.4.3


    The application is a compiled ".exe" file.

    As indicated its run 100% ok from the desktop - just now from a browser when using WAMP (127.0.0.1/cgi-bin/app.exe)

    Runs 100% ok from both desktop and browser when using XAMPP.

    Cheers,

    Pete
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    The application is a compiled ".exe" file.
    What language was the application programmed in before you compiled it into an executable? PHP? I ask because it is extremely unusual for PHP to be precompiled into an executable like that, particularly when it's being run from a web environment.

    As I mentioned before, I doubt the problem here is with the database. It is probably an incompatibility between the executable code and WAMP. You might need to tweak the code for the executable or you might need to tweak the configuration for WAMP, or possibly it's something that can't be fixed easily.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo