Jump to content

php and vb please advise me or help cheers.. php session not seen


redarrow

Recommended Posts

Hi there all i was working on a project i had to first get a image application to snap shot web sites...

 

that i got it called snapshotter.exe

 

The problam is that the session can not be read when php exec() function pass the session to

the vb application...

 

so what happends is that the image is not created from the php session...........

 

if i remove the session and manually place the info /url /image name it all works fine....

 

does anyone have any idear what i can add or do to solve this combination off vb and php........

 

i can not be exspected to add the url and file name all day long...........

 

please help..........

 

 

I have tried $_POST[''] and normal file names was just testing the session way...........

 

redarrow..........


<?php session_start(); 

$_SESSION['name']='google.jpg';
$_SESSION['url']='http://google.com';


exec("C:\\image_program\\snapshotter.exe -u  ".$_SESSION['url']." -o 
'c:/images/".$_SESSION['name']." -w 120 -h 120 a1 j1 s1");


echo "".$_SESSION['url']." : ".$_SESSION['name']."";
?>

 

 

 

i was thinking off adding javascript aswell .....

 

How can i get the document.write(var) written correctly please......

 

i found out that javascript where the vb is needed works dont no theo

 

i currently got errors...

 

tried everythink.....

 

<?php session_start(); 

$_SESSION['name']='http://google.com';

?>

<head>

<script type="text/javascript">

var =<?php $_SESSION['name']; ?>

</script>

</head>

<?php

exec("C:\\image_program\\snapshotter.exe -u  '".document.write(var)."'  -o 
'c:/images/'".document.write(var)."' -w 120 -h 120 a1 j1 s1");

?>

Are you sure the exec is working properly without error?

 

exec("C:\\image_program\\snapshotter.exe -u  ".$_SESSION['url']." -o

'c:/images/".$_SESSION['name']." -w 120 -h 120 a1 j1 s1");

^^ Notice the missing half quote.

 

That needs to have another half quote to even be right...

 

exec("C:\\image_program\\snapshotter.exe -u  ".$_SESSION['url']." -o

'c:/images/".$_SESSION['name']."' -w 120 -h 120 a1 j1 s1");

 

So maybe that's the problem and you just overlooked the typo...

I don't see what else it could be since the string with the variable in it should be parsed by PHP before the string is even passed to exec I would think...

 

As to the JS, yes, you should in theory be able to pass variables if you write the file containing it in PHP, but I don't think you need to here...

 

 

Anyways HTH

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.