I have a script that works on my Live Server on the Web, the only problem I am having is when I run it with WAMP I get a Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in
Error when trying to make a connection to the database. I spent a few hours making sure everything in my code was correct, and that it wasn't because I was trying to upgrade to PHP 5.2.6 (Tried the one I am using on the webserver as well)
Now I troubleshot everything down and figured out that it's either not accepting my Include files, or it's not bringing over the Variable for the Database Connection.
Instead of "Including" the files with the Database connection I just pulled over the connection variables and mysql_connect queries, And it works for that page (but obviously none of the others that are using the same config.php file)
Is there something I am missing to turn on the allowing of Includes through WAMP?
Hi Jack, Shorttags issue maybe? (Just google it if you don't know). Just a possibility/thought.
I am a bit tired right now, but to mention... I ran into an issue regarding handling relative paths in the include 'links' (and using the SERVER('DOCUMENT_ROOT') variable and some trying issues with relative paths). After going 'round all the houses' I finally learned that there are different considerations need to be taken into account if "php has been installed as an apache module", or not, etc. If memory serves, I think there's some input on this at php.net (the manual) under 'virtual(), the 'other' include statement. Worth a look. While your at it, try testing using an absolute URI for the include... not recommended for deployment, but if that works then you know there is an issue with include syntax and relative path handling.