# Fatal error

**URL:** https://forum.kirupa.com/t/fatal-error/188887
**Category:** Uncategorized
**Created:** [May 11, 2006, 3:57pm UTC](https://forum.kirupa.com/t/fatal-error/188887 "2006-05-11T15:57:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![melvijin](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@melvijin](https://forum.kirupa.com/u/melvijin)
#### Post date: [May 11, 2006, 3:57pm UTC](https://forum.kirupa.com/t/fatal-error/188887/1 "2006-05-11T15:57:54Z")

</div>

right now, im migrating to php5… i opened my script in php 4 and there’s a message…

Fatal error: Call to undefined function mysql\_connect() in D:\WEBSITES\steco\includes\konek.php on line 7

this is my konek.php

```php
<?php
$dbname="stecodb";
$dbuser="root";
$dbpass="";
$dbhost="localhost";

$db=mysql_connect("$dbhost","$dbuser","$dbpass")
or die("Could not connect");

mysql_select_db("$dbname",$db) 
or die ("Could not open db");
?>

```

can anyone tell me what’s wrong with my connection? tnx… rok on!!!

---

<div class="post-metadata">

### Author: ![ironikart](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@ironikart](https://forum.kirupa.com/u/ironikart)
#### Post date: [May 11, 2006, 11:55pm UTC](https://forum.kirupa.com/t/fatal-error/188887/2 "2006-05-11T23:55:48Z")

</div>

It means the php version you are using on the server has not been compiled with mysql support (hence no function exists to talk to mysql). If you are able to compile it yourself on the server you need the _–with-mysql_ switch in your ./configure line. Also, the obvious point, make sure you have mysql installed on the server.

---

<div class="post-metadata">

### Author: ![CriTiCeRz](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@CriTiCeRz](https://forum.kirupa.com/u/CriTiCeRz)
#### Post date: [May 12, 2006, 12:38am UTC](https://forum.kirupa.com/t/fatal-error/188887/3 "2006-05-12T00:38:33Z")

</div>

Well I don’t know about PHP5, but I know that you arent supposed to put variables between " ". Try this:

```auto

$db=mysql_connect($dbhost,$dbuser,$dbpass)

```

---

<div class="post-metadata">

### Author: ![ironikart](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@ironikart](https://forum.kirupa.com/u/ironikart)
#### Post date: [May 12, 2006, 6:18am UTC](https://forum.kirupa.com/t/fatal-error/188887/4 "2006-05-12T06:18:46Z")

</div>

The double quote’s shouldn’t matter, but yeah - it’s highly unecessary (must have missed than when I first looked at it)
