Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP to PERL CGI

Posted on 2000-04-15
4
Medium Priority
?
509 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 40 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

719 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