Posted by:
teknikalcrysis
(---.dsl.covlil.sbcglobal.net)
okay i guess I need to be more specific...
i have the source php script.... this script does not have nor does it need an install.php ... it just simply needs to be edited to access a SQL database.......the MySQL database that this script uses is stored on my OWN pc, using the SQL database provided with WAMPSERVER
the php script is config'd to access the SQL Database on my pc... if I put the setlive.php script ANYWHERE with in the www folder provided by WAMP ( say for example - www\stage\setlive.php ) and then I use my browser to navigate to [
localhost] ...all I get is a connect reset error page ....when I got to [
localhost] ...I can see the WAMP Info page ...and can even view the phpinfo script ... but for some reason the setlive.php script doesnt work when I host it locally ... okay, now I have a domain, teknikalcrysis.com ..that I do NOT host, it is provided by 1and1 hosting that I pay for... if I take the same setlive.php script and put it ANYWHERE on teknikalcrysis.com ( Say for example - teknikalcrysis.com/stage/setlive.php ) WITHOUT CHANGING ANY CONFIG SETTING, meaning this same setlive.php file is STILL ACCESSING THE SQL DATABASE ON MY LOCAL MACHINE provided by WAMP and then Navigate to teknikalcrysis.com/stage/setlive.php
the script works perfectly ...it give me a textbox to type the title of the DJ's show and a button that says GO LIVE ... after the title is set and the button is pressed ...the php script logs in to my LOCAL SQL DATABASE and CORRECTLY inputs the information into my LOCAL SQL database just like it is supposed to do
my question is, if I have the source file, and my database info within that file is correct (which i know it is)
why when uploading the php file to my teknikalcrysis.com domain does the file show up on my screen, and when used locally, get a connection error
here is the code from the setlive.php file
****I have removed potential login info for security reasons...
*** teknikalcrysis.kicks-ass.net is a DynDNS routed to my local pc hosting WAMP and my SAM Broadcaster for my radio stream
<?php
$dbhost='teknikalcrysis.kicks-ass.net'; // Sams MySQL ip or host address
$dbuser='USERNAME-HERE'; // Sams MySQL username
$dbpass='PASSWORD-HERE'; // Sams MySQL password
$dbnamesam='SAMDB'; // Sams MySQL database name
...
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[
www.w3.org];
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="admin.css" rel="stylesheet" type="text/css">
<title>Live DJ Request</title>
<link href="admin.css" rel="stylesheet" type="text/css">
<body>
<center>
<?php
...
mysql_connect($dbhost,$dbuser,$dbpass) OR DIE ('Unable to connect to database! Please try again later.');
mysql_select_db($dbnamesam) or die( "Unable to select database"
;
...
?>
...
</body>
</html>
now I have tried to change the $timeout and this has no effect
Edited 2 time(s). Last edit at 05/19/2010 01:54AM by yfastud.