Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A chat room tested locally ? An error.

Status
Not open for further replies.

DaSe

Programmer
Feb 14, 2008
149
0
0
GB
Hi guys,
I am trying to test a simple flash based chat room locally. I get an error :
-----------------

Error opening URL 'file:///C|/xampp/htdocs/first_access.php?submit=true&username=kl'
undefined
-------------------------
Can chat be tested locally ? Why does it return an error.
The part of the script is :

// ---- php files path ---- //
read_mysql = "read_mysql.php";
write_mysql = "write_mysql.php";
login_mysql = "first_access.php";
// --------------------
And it seems that it has problems with opening these files...Does anyone know why ? Thank you.
 
Hi , yes. I'm using Xampp that has PHP/MySQL built in.I have the database set up and it's working correctly.
 
The chat is in Flash file i.e. 'chat.fla' what I do is to convert it to 'chat.swf' and embed it in the xampp localhost folder. Then I embed the file into an index.php ( in the same folder ) and when I launch it from the browser , or directly the file opened with the browser it still says 'undefined' in the chat window.
 
Ok I explain more thoroughly. There are 7 .php files and one Chat.swf file in my localhost folder. The index.php file is empty so I can embed my chat.swf into it and launch it from my localhost folder. I launch directly by "open with" then "Internet Explorer" or I launch the chat.swf with IE as well in both cases the chat opens in IE windows but return "undefined". The chat I got is from :


There are those files to download in zip.
 
Code:
I launch directly by "open with" then "Internet Explorer"
Sorry, that makes no sense.

You are getting 'undefined' for one of two reasons, either the Flash .SWF file is not receiving the data or the .PHP script is not sending the data.

You really do need to make sure that the .PHP scripts are working. This can only be done by running each .PHP from the address line of your browser. Something like .........
Code:
[URL unfurl="true"]http://localhost/first_access.php?submit=true&username=kl[/URL]


Keith
 
The .php files are working fine. It looks like chat.swf refers to the database but it cannot get the users so it returns "undefined". There's one 'config.inc.php' file - and it is configured properly. The rest of .php files begin with calling the 'config.inc.php' session and they contain no errors - don't seem to contain the errors.
 
Code:
It looks like chat.swf refers to the database
All the database calls are from the PHP scripts.

Code:
The .php files are working fine
If they were, they wouldn't be returning 'undefined' to the .SWF.





Keith
 
I'll explain. In chat.swf ( or to be more precise ) in chat.fla you have an action script that opens those php files first. Here's the beginning , that's why I wrote "chat.swf refers to the database ".
---------------------------------------------
*/

// ---- php files path ---- //
read_mysql = "write_mysql = "login_mysql = "// --------------------
// Main interval
------------------------------------------

Those above is from chat.swf.
 
So you mean that it's .php files that refer to database and they may not be configured correctly I understand ?
 
Ok. thanks a lot for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top