tommy168 Posted February 1, 2011 Share Posted February 1, 2011 Hi guys so i keep getting this error, 403 Forbidden: Forbidden You don't have permission to access (/directory/) on this server. for everytime I try to run my php scripts which have access to database. But when I run php scripts without accessing database, there would be no problems. Is this a problem with MySQL? I have checked a lot of times in my connection.php page that my mysqli_connect( ) has everything right, including user name and password shown on the web hosting server, as well as mysqli_select_db ( ) with a correct databasename. Still no success and this error keeps arising. Any help is appreciated ! Link to comment https://forums.phpfreaks.com/topic/226359-403-forbidden/ Share on other sites More sharing options...
ttocskcaj Posted February 2, 2011 Share Posted February 2, 2011 Do you have mysql_error() somewhere? For example you can use mysql_query($query) or die(mysql_error()); to print the mysql error message. That way you know for sure if it's MySQL failing. If you get a MySQL error post it here. Link to comment https://forums.phpfreaks.com/topic/226359-403-forbidden/#findComment-1168739 Share on other sites More sharing options...
tommy168 Posted February 2, 2011 Author Share Posted February 2, 2011 the problem has been solved if i use php as an extension instead of html on my web server, it works perfectly fine thanks Link to comment https://forums.phpfreaks.com/topic/226359-403-forbidden/#findComment-1168842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.