PHP, Flash and SSL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chanssf
Forum Newbie
Posts: 2
Joined: Tue Dec 09, 2003 3:35 am

PHP, Flash and SSL

Post by chanssf »

Hi

I've got a webpage written with PHP and Flash running fine. When I change to use SSL that is support by my web host, the Flash part of my site went dead. What I can see is that the Flash is triggered by some PHP Session variables. When going through the SSL connection the Flash bit cannot grap the session variable so that it lies deadly. I wonder if anyone can help.

Many Thanks.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Might want to give us some more info, and code too.
chanssf
Forum Newbie
Posts: 2
Joined: Tue Dec 09, 2003 3:35 am

Post by chanssf »

Some of the code here:

Actionscript from the flash file:

function language( ) {
var sendPhp = new LoadVars();
var receivePhp = new LoadVars();
receivePhp.onLoad = function() {
if (receivePhp.loaded ) {
_root.test = this.ret;
if( this.ret == "eng") {
_root.gotoAndStop("eng");
} else if( this.ret=="tchi") {
_root.gotoAndStop("tchi");
}
}
}
sendPhp.sendAndLoad("lang.php",receivePhp,"GET");
}


The PHP code in file "lang.php"

<?
session_start();
if( !isset( $_SESSION['dd_lang'] ) ) {
echo "IS SET";
$_SESSION['dd_lang'] = "eng";
}

if( isset($_GET['cmd']) )
$command = $_GET['cmd'];
else
$command = "";

if( isset($_GET['arg1']) )
$arg1 = $_GET['arg1'];
if( $command=="get" ) {
// nothing to do
}
echo '&ret=';
echo $_SESSION['dd_lang'];
?>


They work absouletly fine going though simple connection. But when they go though SSL connection, it seems that the flash LoadVars object cannot grap any of those $_SESSION variable. any idea???

Many Thanks.
Post Reply