February 16th, 2013, 11:48 AM
App works in XAMPP but not WAMP ???
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,
February 16th, 2013, 01:06 PM
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?
February 17th, 2013, 06:35 AM
Originally Posted by E-Oreo
Apologies mate - I was quoting the phpMyAdmin version.
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.
February 17th, 2013, 01:20 PM
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.