Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-27-2002, 01:12 AM   #1
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
php cgi

how do i convert my php file into a cgi script file
Old 11-27-2002, 10:43 AM   #2
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
why would you want your php file to be a cgi script? the functionality of PHP is more or less the same as any perl CGI script.

but, to convert it what you need to do is rename the file to .cgi, chmod it to 755, put it on your cgi-bin or have ExecCGI enabled in apache.

in the script itself, you'll need to put "#!/usr/bin/php" at the top of your file and modify the script accordingly. i'm not sure if a PHP CGI script will execute with the <?php tags in there, so they might need to be removed as well.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which one is best? CGI : PHP : ASP coolguy_iiit Programming 12 05-02-2005 03:35 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
php rpm as cgi .shapeShifter Linux - Software 4 04-11-2003 02:40 AM
php as cgi nakkaya Linux - Software 3 03-18-2003 03:42 AM
PHP/CGI help ugenn Programming 2 08-23-2002 03:12 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration