Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/03/2010, 11:27
Avatar de maycolalvarez
maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 9 meses
Puntos: 1532
Respuesta: Problemas con sesiones http y https

pues, ami mí me funciona perfectamente:

redirec.php (pagina en https):
Código PHP:
<?php
    
if(isset($_POST['user'])){
        @
session_name('Ses_id');
        @
session_start();
        
$_SESSION["user"]=$_POST["user"];
        
$_SESSION["password"]=$_POST["password"];
        function 
normalpath(){
            return 
"http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
        }
        
$page=normalpath();
        
$lastpath=strrpos($page,"/");
        
$newpage=substr($page,0,$lastpath+1)."destino.php";
        
//echo $newpage;
        
header("location: ".$newpage);
    }
destino.php (en http):
Código PHP:
<?php
    
@session_name('Ses_id');
    @
session_start();
    echo 
"Completado- usuario:",$_SESSION["user"]," pass:",$_SESSION["password"];