LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-27-2002, 12:12 AM   #1
jayakrishnan
Member
 
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, 09:43 AM   #2
Syncrm
Member
 
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.
 
  


Reply



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 02:35 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
php rpm as cgi .shapeShifter Linux - Software 4 04-11-2003 01:40 AM
php as cgi nakkaya Linux - Software 3 03-18-2003 02:42 AM
PHP/CGI help ugenn Programming 2 08-23-2002 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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