SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Phil-man's Avatar
    Join Date
    Nov 2000
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using PHP and Perl Together

    Hi:

    I have a shopping cart program that uses PHP and MySQL, and it works great, and I have it up and running on a particular web server. Now, I'd like to use the same shopping cart on a server that, for some reason, doesn't allow PHP and SSL to play nice together. (The server owner insists there isn't anything we can do about it, so I have to just go with that for now).

    Since I don't need SSL for most of the cart's functions, I'm hoping to use the existing PHP functions and then just pass everything to a CGI script when it's time to use SSL to get credit card info, etc., and then use the CGI script to write the order information to the MySQL database.

    Is there any reason why this wouldn't work? Are there any issues I should know about before attempting to do this? Thanks for any help!

  2. #2
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty sure it should work, with a Header("Location: newscript.cgi"); as part of your PHP file.

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only issue I can see is how you will get all the data to your cgi script, as using header() will just redirect to the script. I think your best bet will be to use POSt to get all the data to the cgi script, since you are going from PHP to Perl, sessions are out. You could store all the information in a database and then pass of an id to the cgi script, then using Perl you could retrieve the data from the database.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well yeah, like he said, just pass everything to the CGI script.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •