tmp file was not found?????

I am trying to write my first php scrip on Apple, my php distributed with latest os x.5 works fine (php info displays everything), I have installed MySQL latest version. I am writing this code in Dreamweaver and this is what displays when I preview my php code in browser : “The requested URL /TMPvm1xyzhqki.php was not found on this server.” I have absolutely no idea what the tmp…file is. Everytime the number after TMP is different!!! I created very simple db just to learn. My code is as follows:

<?php $dbhost =; $dbuser = 'root'; $conn = mysql_connect($dbhost, $dbuser) or die ('Error connecting to mysql'); $dbname = 'STOMA'; mysql_select_db($dbname); $query = 'SELECT first_name, last_name, email FROM info' $result = mysql_query($query,$conn); echo ("First: %s
n", mysql_result($result,0,"first_name")); mysql_close($conn); ?>

Are you clicking “Preview in browser” in dreamweaver? You should just go the file directly in your directory instead of clicking preview in browser. In dreamweaver CS3, they do not use temp files any more.

Also, is your file in the web server directory? otherwise it won’t work.

Sponsor our Newsletter | Privacy Policy | Terms of Service