I'm over SOAP (extension php_soap) and I get the following message when I try to use a SOAP object passed in session:
supplied argument is not a valid sdl resource
In a login page, I initialize the object and instantiates:
PHP Code:
$_SESSION["conn_telephone"] = new connections_telephone();
if ($_SESSION["conn_telephone"]->login_reseller($_POST["t_pseudo"],$_POST["t_password"])){
$_SESSION["conn_telephone"]->id_session = $_SESSION["conn_telephone"]->login_reseller($_POST["t_pseudo"],$_POST["t_password"]);
redirect("index.php?p=member" );
}
And on top of the member's area, I would do this:
PHP Code:
$tab_customer = $_SESSION["conn_telephone"]->get_customers();
for($i=0; $i<count($tab_customer->{'customer_list'});$i++){
$curr_customer = $tab_customer->{'customer_list'}[$i]->{'i_customer'};
$tab_competes = $conn_portaone->get_competes($curr_customer);
for($j=0; $j<count($tab_competes ->{'account_list'});$j++){
echo $tab_competes ->{'account_list'}[$j]."<br><br>";
}
}
So after some reading on the internet, I tried using serialize and unserialize but without success ...
Login Page:
PHP Code:
$conn_telephone = new connections_telephone();
if ($conn_telephone->login_reseller($_POST["t_pseudo"],$_POST["t_password"])){
$conn_telephone->id_session = $conn_telephone->login_reseller($_POST["t_pseudo"],$_POST["t_password"]);
serialize($conn_telephone);
redirect("index.php?p=member" );
}
Page of the member's area:
PHP Code:
unserialize($conn_telephone);
$tab_customer = $conn_telephone->get_customers();
for($i=0; $i<count($tab_customer->{'customer_list'});$i++){
$curr_customer = $tab_customer->{'customer_list'}[$i]->{'i_customer'};
$tab_competes = $conn_portaone->get_competes($curr_customer);
for($j=0; $j<count($tab_competes ->{'account_list'});$j++){
echo $tab_competes ->{'account_list'}[$j]."<br><br>";
}
}
And there I have a message that $conn_telephone is not defined!
If you saw an error in my code, or if you have a track then please help me!
Bookmarks