Solved

PHP to PERL CGI

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now