Solved

PHP to PERL CGI

Posted on 2000-04-15
4
508 Views
Last Modified: 2013-12-25
i have to change all the PHP web pages to PERL CGI web pages,
do u think it is possible?


in my PHP web pages, i would check cookie at the very beginning,
how can i do that if now i have files  of .html or .shtml only?

or all my pages must be changed to .cgi?


0
Comment
Question by:stanleyhuen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:monas
ID: 2719403
php code can be run as cgi!

you should

1) add #!/path/to/php/binary to start of every php file;
2) add "AddHandler cgi-script php" to apache config (either system or .htaccess);
3) and check php docs what changes are necessary to start working as cgi-s.

I hope this way you will need less changes.
0
 

Expert Comment

by:mwhuen
ID: 2720200
but my boss asks me to change all the PHP code to PERL CGI code...

in my PHP code, i would check cookie at the very beginning,
how can i do that if now i have files  of .html or .shtml only?

0
 

Author Comment

by:stanleyhuen
ID: 2721729
can I use run php in cgi?
0
 

Accepted Solution

by:
mwhuen earned 10 total points
ID: 2744178
you can use SSI, server side include.

it usually has extention of .shtml.

you can write a cookie.pl to check the cookie,
and then use include virtual.
<!--#include virtual = /cgi-bin/cookie.pl-->

and all your php code can change to shtml.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question