Re: [PHP] mediator between PHP and Perl (with sessions)

2005-02-15 Thread Matt M.
 Is there a way to use sessions variables in PHP shell script (without
 reading the session file and parse it in the script)?

Do you have a database available?  You could put the session info in a database.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] mediator between PHP and Perl (with sessions)

2005-02-15 Thread YaronKh
Hi

What you can do is change the php.ini file
In the [session] section like this:

session.use_cookies = 0

session.use_only_cookies = 0

session.auto_start = 0

and now make sure that all script are running under the same session id
at the beginning of each php script you should add the following lines :

session_id(0f516a62cf2bab6f867dda9320358b6d);
session_start();


hope I've helped 
Yaron Khazai

-Original Message-
From: Eli [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 15, 2005 10:09 AM
To: php-general@lists.php.net
Subject: [PHP] mediator between PHP and Perl (with sessions)

Hi...

I got a shared lib API written in PHP, that depends on sessions for its 
operation.
I took a prepared system in Perl that I want integrate with the shared 
lib API in PHP.

What I thought about is, to write a mediator class in Perl that will 
define the same API functions as I got in the shared lib API in PHP. I 
do not want to imitate the API functions workflow in Perl, but instead 
call the shared lib API in PHP from Perl (this way I don't have to 
maintain 2 class APIs in different languages).

I thought of making a PHP script that can run on shell and return 
serialized output of any API function in the shared lib. Then call that 
script from Perl and process the returned output in Perl.
Problem in this way is, that the shared lib in PHP uses sessions which 
are un-accessable from a shell script. And I cannot put that script on 
the web, since it returns sensitive data.
Is there a way to use sessions variables in PHP shell script (without 
reading the session file and parse it in the script)?

If anyone is familiar with any other implementation of such a mediator, 
please tell.

-thanks, Eli.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php