Re: [PHP] PHP and Perl Integration for E-Cart
John Nichel wrote: Pushpinder Singh wrote: Hello all, We are trying to incorporate a CGI Perl based E-Cart module into our PHP driven site. This is because the E-Cart supplied by our merchant uses CGI. I want to check with all of you if its possible to integrate PHP with Perl. Will it be too much of a job ... or is it easier to create a new e-Cart software by ourselves ? Any comments / suggestion will be welcome ! Thanks in advance Pushpinder Singh I don't know E-Cart at all, but I'm sure it's possible. If it's database driven, displaying your products with php would be easy. However, moving from the php side of the site to the Perl cart may cause headaches (cookies, sessions, cart contents, etc.). You may be better off using a shopping cart which is built in PHP, like X-Cart or Squirrelcart. Ugh...stay away from Squirrelcart. Works ok on its own but if you ever want to do something in it...it's nearly impossible to read and modify. -- paperCrane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Perl Integration for E-Cart
Pushpinder Singh wrote: The session ID is not stored in the database, its propagated invisible via a cookie (I think so ;-) ) Is is possible to check for the existance of a PHP session ID on a Perl script ?? This ways I want to be able to send a confirmation email to to the buyer after he completes a transaction. I also want to update the buyer's record to now include the Item Number of the product he purchased. This is important because if the Perl-PHP combo approach does not work, then I will have to go for a pure PHP based shopping cart ( so that it is fully integrable with the PHP Login Module ). Also then the question comes up, that I need to get hold of a PHP-based payment gateway. Thanks again -Pushpinder On Tuesday, April 20, 2004, at 04:22 PM, John W. Holmes wrote: From: "Pushpinder Singh" <[EMAIL PROTECTED]> This is the situation at hand ... we have a PHP Session based Login module. The user is required to login to get to the Shopping cart (which is provided for by the Merchant) This shopping cart is CGI / Perl based. So my question would be to integrate the ordering with the PHP Login module, so that the Perl code knows the PHP session variable. This ways I can keep track of the the user name/email/ order status etc. So all you really need is for a way for Perl to read PHP session files? Or are you using a database for sessions? I'm sure this has already been written. The session ID is available in a cookie or from the URL. You just need to find the right file, open it, unserialize it and create your variables to see if the person is actually logged in or not. No cookie or session id in the URL means they haven't logged in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You don't actually need a PHP based payment gateway, you just need a PHP cart of package that supports your particular payment gateway. Payment gateways are not scripting language specific, each just uses its own set of protocols and such. There are many PHP-based shopping crarts out there that support many payment gateways. There's also PEAR's Payment_Process package, but I don't think it's stable yet. I wrote my own shopping cart (using a bunch of PEAR modules) in a few months which is very fully featured. Then again, it took two months of full time work. ;-) -- paperCrane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Perl Integration for E-Cart
The session ID is not stored in the database, its propagated invisible via a cookie (I think so ;-) ) Is is possible to check for the existance of a PHP session ID on a Perl script ?? This ways I want to be able to send a confirmation email to to the buyer after he completes a transaction. I also want to update the buyer's record to now include the Item Number of the product he purchased. This is important because if the Perl-PHP combo approach does not work, then I will have to go for a pure PHP based shopping cart ( so that it is fully integrable with the PHP Login Module ). Also then the question comes up, that I need to get hold of a PHP-based payment gateway. Thanks again -Pushpinder On Tuesday, April 20, 2004, at 04:22 PM, John W. Holmes wrote: From: "Pushpinder Singh" <[EMAIL PROTECTED]> This is the situation at hand ... we have a PHP Session based Login module. The user is required to login to get to the Shopping cart (which is provided for by the Merchant) This shopping cart is CGI / Perl based. So my question would be to integrate the ordering with the PHP Login module, so that the Perl code knows the PHP session variable. This ways I can keep track of the the user name/email/ order status etc. So all you really need is for a way for Perl to read PHP session files? Or are you using a database for sessions? I'm sure this has already been written. The session ID is available in a cookie or from the URL. You just need to find the right file, open it, unserialize it and create your variables to see if the person is actually logged in or not. No cookie or session id in the URL means they haven't logged in. ---John Holmes... -- 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
Re: [PHP] PHP and Perl Integration for E-Cart
From: "Pushpinder Singh" <[EMAIL PROTECTED]> > This is the situation at hand ... we have a PHP Session based Login > module. The user is required to login to get to the Shopping cart > (which is provided for by the Merchant) This shopping cart is CGI / > Perl based. So my question would be to integrate the ordering with the > PHP Login module, so that the Perl code knows the PHP session variable. > This ways I can keep track of the the user name/email/ order status etc. So all you really need is for a way for Perl to read PHP session files? Or are you using a database for sessions? I'm sure this has already been written. The session ID is available in a cookie or from the URL. You just need to find the right file, open it, unserialize it and create your variables to see if the person is actually logged in or not. No cookie or session id in the URL means they haven't logged in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Perl Integration for E-Cart
This is the situation at hand ... we have a PHP Session based Login module. The user is required to login to get to the Shopping cart (which is provided for by the Merchant) This shopping cart is CGI / Perl based. So my question would be to integrate the ordering with the PHP Login module, so that the Perl code knows the PHP session variable. This ways I can keep track of the the user name/email/ order status etc. I want to to know whether it is possible to do this. Thanks again ! --Pushpinder On Tuesday, April 20, 2004, at 03:57 PM, John W. Holmes wrote: From: "Pushpinder Singh" <[EMAIL PROTECTED]> We are trying to incorporate a CGI Perl based E-Cart module into our PHP driven site. This is because the E-Cart supplied by our merchant uses CGI. I want to check with all of you if its possible to integrate PHP with Perl. If you're talking about integrating PHP and Perl on the same page, then no. You can call a Perl script from PHP using virtual(), though, but it will still be difficult to "integrate" them if you want communication back and forth on the same page. If you're just talking about extra PHP pages working with the inventory or something, then that shouldn't be an issue; just figure out the database structure. ---John Holmes... -- 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
Re: [PHP] PHP and Perl Integration for E-Cart
From: "Pushpinder Singh" <[EMAIL PROTECTED]> > We are trying to incorporate a CGI Perl based E-Cart module into > our PHP driven site. This is because the E-Cart supplied by our > merchant uses CGI. I want to check with all of you if its possible to > integrate PHP with Perl. If you're talking about integrating PHP and Perl on the same page, then no. You can call a Perl script from PHP using virtual(), though, but it will still be difficult to "integrate" them if you want communication back and forth on the same page. If you're just talking about extra PHP pages working with the inventory or something, then that shouldn't be an issue; just figure out the database structure. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Perl Integration for E-Cart
Pushpinder Singh wrote: Hello all, We are trying to incorporate a CGI Perl based E-Cart module into our PHP driven site. This is because the E-Cart supplied by our merchant uses CGI. I want to check with all of you if its possible to integrate PHP with Perl. Will it be too much of a job ... or is it easier to create a new e-Cart software by ourselves ? Any comments / suggestion will be welcome ! Thanks in advance Pushpinder Singh I don't know E-Cart at all, but I'm sure it's possible. If it's database driven, displaying your products with php would be easy. However, moving from the php side of the site to the Perl cart may cause headaches (cookies, sessions, cart contents, etc.). You may be better off using a shopping cart which is built in PHP, like X-Cart or Squirrelcart. -- *** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \/ /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and Perl
Brad -- ...and then Brad Wright said... % % Hi all, Hi! % % can php call perl scripts? Yep. It can call anything, right? So just call it like ls or du or any other program. % % I know nothing of perl, but have found a perl script that will process a % MSword document in a way that it seems php cannot. Oooh! Hey, what is it? I'd love to see it. % % At this stage, my knowledge of perl is limited to "it's used in web stuff % sometimes isnt it" :) but i am sure i will soon find a bit more about perl % itself elsewhere from this list. If you can speak php then you're already on your way to working with perl. Dive right in :-) % % Can i indeed use php to 'call' a perl script/function/app whatever its % called? Yep. Check out the system() call in the manual; it also has pointers to other calls. You might even let Apache make the call for you and use the virtual() function, depending on the output and what you want to do with it. % % Cheers, % % Brad HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] php and Perl
www.php.net/virtual ---John Holmes... - Original Message - From: "Brad Wright" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Thursday, March 27, 2003 8:00 AM Subject: [PHP] php and Perl Hi all, can php call perl scripts? I know nothing of perl, but have found a perl script that will process a MSword document in a way that it seems php cannot. At this stage, my knowledge of perl is limited to "it's used in web stuff sometimes isnt it" :) but i am sure i will soon find a bit more about perl itself elsewhere from this list. Can i indeed use php to 'call' a perl script/function/app whatever its called? Cheers, Brad Nel vino la verità, nella birra la forza, nell'acqua i bacilli -- In wine there is truth, in beer there is strength, in water there are bacteria -- 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
Re: [PHP] php and Perl
Yes, you can call perl scripts using "exec" or "system" function just like you will call any other system function. You will have to make sure that the apache user (or nobody if your apache runs as nobody) has executable permission on perl script. So if your perl script is: /home/nikunj/test.pl you can call some thing like this: Regards, Nikunj Virani - Original Message - From: "Brad Wright" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Thursday, March 27, 2003 6:30 PM Subject: [PHP] php and Perl Hi all, can php call perl scripts? I know nothing of perl, but have found a perl script that will process a MSword document in a way that it seems php cannot. At this stage, my knowledge of perl is limited to "it's used in web stuff sometimes isnt it" :) but i am sure i will soon find a bit more about perl itself elsewhere from this list. Can i indeed use php to 'call' a perl script/function/app whatever its called? Cheers, Brad Nel vino la verità, nella birra la forza, nell'acqua i bacilli -- In wine there is truth, in beer there is strength, in water there are bacteria -- 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
RE: [PHP] PHP and Perl
try use redirections. e.g, call your php script that redirects to your pl script with all required parameters that redirects for a resulting php script... arrrgg but i think the better way is to convert everthing to PHP or Perl Cheers Valter Santos WEB/WAP Consultant > -Original Message- > From: Jarosław Jankowski [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 04, 2001 8:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP and Perl > > > Hi, > I have something like this in the script : > header("Content-Type: application/force-download"); > header("Content-Disposition:filename=$clientname.xls"); > set_time_limit(180); > passthru("d:\\perl\\bin\\perl.exe test2.pl $var \"$query\" > \"$query1\""); > exit; > ?> > Perl script is generating Excel file. > My question is : > How to do it in PHP (maybe javascript) that after sending data to > this script first I will have window with something like " Wait, > generating file" > and when perl script is done another window with link to > generated file? > Any suggestions ? > Thx in advance. > jarek > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP and Perl script in same file?
Not any convenient or secure way I've yet found. But I do have PHP pages that slip out and exec() a Perl script to grab specific results that I need. Anyone else? B -Original Message- From: Tom Beidler [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 4:46 PM To: php list Subject: [PHP] PHP and Perl script in same file? Can php and perl code reside in the same file? When the document is served up it parses the PHP and then the Perl? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]