Solved

PHP to PERL CGI

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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 the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

763 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