El_Dudereno Posted August 21, 2009 Share Posted August 21, 2009 I have placed the following piece of code in the body of my page(I have taken out my username and password): L17:<?php L18:$db=mysql_connect("**********","*******","*******") || die; L19:mysql_select_db("********"); L20:mysql_close() L21:?> But when I check the code I keep getting the following error message: XML Parsing Error: no element found Location: http://usernet.scm.tees.ac.uk/users/g7068821/wes/wes_ica/ Line Number 18, Column 1: ^ actual page source code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <html> <head> <link rel="stylesheet" type="text/css" href="wes_ica.css" /> <script type="text/javascript" src="wes_ica.js"></script> <script type="text/javascript" src="../../../u0000700/wes_ica_08_09/wes_ica.js"></script> <title>Web Scripting ICA</title> </head> <body onload="globalclock()" BGCOLOR="E0FFFF"> <br /> <b>Warning</b>: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in <b>/web/users/g7068821/wes/wes_ica/index.php</b> on line <b>18</b><br /> Quote Link to comment https://forums.phpfreaks.com/topic/171268-updated-database-connection-problem-with-page-source/ Share on other sites More sharing options...
Daniel0 Posted August 21, 2009 Share Posted August 21, 2009 Do the things in this topic help? Quote Link to comment https://forums.phpfreaks.com/topic/171268-updated-database-connection-problem-with-page-source/#findComment-903136 Share on other sites More sharing options...
El_Dudereno Posted August 21, 2009 Author Share Posted August 21, 2009 No these don't really help. They all seem to be people with the same problem as me but no soloution. Quote Link to comment https://forums.phpfreaks.com/topic/171268-updated-database-connection-problem-with-page-source/#findComment-903146 Share on other sites More sharing options...
Daniel0 Posted August 21, 2009 Share Posted August 21, 2009 Some of them report that using a hostname instead of IP address resolves the issue. Others say that it's because the MySQL host is denying the connection. Also see this: http://dev.mysql.com/doc/refman/5.1/en/access-denied.html Quote Link to comment https://forums.phpfreaks.com/topic/171268-updated-database-connection-problem-with-page-source/#findComment-903149 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.