Solved

PHP to PERL CGI

Posted on 2000-04-15
4
503 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wallpaper not updating when file is swapped out 6 56
Need help to rewrite script 3 79
Example unit tests with AngularJS 3 45
powershell md/mkdir/New-item   -Quiet 10 44
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

772 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