LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2007, 03:54 AM   #1
Sachin.Verma
LQ Newbie
 
Registered: Sep 2007
Location: Delhi, India
Distribution: Fedora
Posts: 5

Rep: Reputation: 0
Configure php5 as module and php4 as CGI to run at the same time


I have a problem..

i have compiled php5 as a apache2 module and it's running fine..! Now i need to run php4 with the same apache as a CGI sccript, i tried google and find out, to configure php as CGI/fastCGI to apache the option required are

--enable-discard-path --enable-force-cgi-redirect --enable-fastCGI and rest of the options and without apxs2 of course, and then configured apache accordingly.

Now when i tried to run phpinfo script, it's giving hell of warnings and syntax error however that php5 is running fine with out any error.

I don't want to use rpms( i'm using fedora) wanted everything to compile so any one please help me out !!
 
Old 09-23-2007, 01:49 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
can you run php4 from the command line?

cgi accesses scripts from cgi-bin. Such scripts have the typical first line #!/bin/sh or #!/usr/local/bin/perl or #!<your-path-to-php4>. That should just work. Try it without any additional configurations such as the fastCGI.

If you need Apache configured for both php5 and php4 depending on circumstances, I'm not sure of that. However, take it one step at a time. Make sure php4 still works from the command line. Make sure you can execute a script that calls for php4. Make sure you can execute that script from a web browser through cgi. Then start messing with tuning.
 
Old 09-23-2007, 11:28 PM   #3
Sachin.Verma
LQ Newbie
 
Registered: Sep 2007
Location: Delhi, India
Distribution: Fedora
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
can you run php4 from the command line?
yeah ! i can run it from command line.. the same script for phpinfo is running fine from command line.

Quote:
cgi accesses scripts from cgi-bin. Such scripts have the typical first line #!/bin/sh or #!/usr/local/bin/perl or #!<your-path-to-php4>. That should just work. Try it without any additional configurations such as the fastCGI.
I tried, it still giving the same errors, when accessed from browser but runs pretty fine when accessed from command line.



Quote:
If you need Apache configured for both php5 and php4 depending on circumstances, I'm not sure of that. However, take it one step at a time. Make sure php4 still works from the command line. Make sure you can execute a script that calls for php4. Make sure you can execute that script from a web browser through cgi. Then start messing with tuning.
Help me !!!!!
 
  


Reply

Tags
apache, at, php, php4, running, same, time



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Running Apache2 With PHP5 And PHP4 At The Same Time LXer Syndicated Linux News 0 02-26-2006 10:01 AM
PHP5 to PHP4 on FC4? kz26 Fedora 5 10-24-2005 05:09 AM
Can php4 and php5 run simultaneously on apache2? tisource Linux - Software 1 09-14-2005 11:53 PM
Php5 >> Php4 Eric45008 Slackware 22 04-25-2005 07:37 PM
how to configure apache in Suse 9.1 t run cgi programmes written in python drako123 Linux - Software 0 08-21-2004 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 PM.

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