martin.hitch Posted November 11, 2009 Share Posted November 11, 2009 hello.... im only learning php (working through some tutorials and looking at other peoples scripts) i have just installed and configured WAMP with the passwords need and everyhing is working fine apart from when i try and view php scripts. the scripts run fine in my php enabled website one looks like this but when i run the same script in wamp i get this please help this is really making things hard to learn and not very enjoyable Thanks heaps Martin Quote Link to comment Share on other sites More sharing options...
cags Posted November 11, 2009 Share Posted November 11, 2009 My guess is your script uses short open tags and they are disabled on your wamp server (as they really should be) and enabled on your live server. Does you script have <? rather than <?php anywhere in it? Quote Link to comment Share on other sites More sharing options...
martin.hitch Posted November 11, 2009 Author Share Posted November 11, 2009 yes it does use the short tags <? i went through and changed all the short tags to long tags on all the php scripts (gotta love find and replace ) i ran it again and got Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'your_name'@'localhost' (using password: YES) in G:\~~WEBSERVER~~\wamp\www\martin.site11.com\include\database.php on line 24 Access denied for user 'your_name'@'localhost' (using password: YES) i had a look over line 24 of the database script and could find nothing that i would need to change to allow access (after all so far all i have changed is <? to <?php) here is the code that is having the access issue so now i have another error that i dont know how to deal with Quote Link to comment Share on other sites More sharing options...
cags Posted November 11, 2009 Share Posted November 11, 2009 Assuming the code is unchanged from the live server I imagine the password/hostname/username is different on your localhost than it is on your live server. Somewhere in your code you will probably have define('DB_SERVER', "something"); etc for each of server, user, password and database name. These will all need changing to be appropriate for your WAMP server. Quote Link to comment Share on other sites More sharing options...
martin.hitch Posted November 11, 2009 Author Share Posted November 11, 2009 cool i just went through all the scripts again and i did find that i hadnt set up the access permissions to the database i cant believe i missed that simple step anyways THANK YOU VERY MUCH everything is fine and working now :D Quote Link to comment Share on other sites More sharing options...
cags Posted November 11, 2009 Share Posted November 11, 2009 Glad it's sorted. There is a button bottom left of your screen to mark a topic as 'Solved'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.