3 Replies - 547 Views - Last Post: 25 October 2010 - 02:26 PM Rate Topic: -----

#1 lingqin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-October 10

mysql-connect not working

Posted 22 October 2010 - 12:21 PM

Hi,
I am trying to connect mysql database with codes below:
$con = mysql_connect("localhost", "***", "***");
if (!$con) {
  die('Could not connect: ');
  }


after I have submit, it took for a while to bring up the login.php page and showed a bunch of warnings. at the end, it shows:

Quote

Fatal error: Maximum execution time of 30 seconds exceeded in \login.php on line 7


I am using apache 2.2, anyone could help me?

thanks so much!
Lingqin

This post has been edited by Dormilich: 22 October 2010 - 01:37 PM
Reason for edit:: please use [code] /* your code source here */ [/code] tags when posting code


Is This A Good Question/Topic? 0
  • +

Replies To: mysql-connect not working

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,444
  • Joined: 08-June 10

Re: mysql-connect not working

Posted 22 October 2010 - 01:38 PM

that rather looks like an infinite loop. did you check all other db functions, whether they return what you expect?

This post has been edited by Dormilich: 22 October 2010 - 01:38 PM

Was This Post Helpful? 0
  • +
  • -

#3 lingqin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-October 10

Re: mysql-connect not working

Posted 25 October 2010 - 02:07 PM

View PostDormilich, on 22 October 2010 - 12:38 PM, said:

that rather looks like an infinite loop. did you check all other db functions, whether they return what you expect?


No! this is my very first try to connect db? there is no infinite in code at all.
thanks!
Was This Post Helpful? 0
  • +
  • -

#4 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 928
  • View blog
  • Posts: 3,212
  • Joined: 19-January 10

Re: mysql-connect not working

Posted 25 October 2010 - 02:26 PM

Can we see your full source and all of the errors?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1