Configure php5 as module and php4 as CGI to run at the same time
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 !!
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.