Difference Between Running PHP Using Fast CGI Or As An Apache Module?
Mar 10, 2008
I have been a web developer using PHP for years now, and my work laptop runs CentOS with PHP5 as an Apache Module. This suits me just fine for development, but now I want to setup a web server that runs PHP 4.4.8 and PHP 5.2.5 and offer hosting to people. I know PHP4 is very old, but I am looking to offer my users the freedom of choice, as there are still third party applications out there that may need to be run on PHP4.
I will want PHP 5 to be the default, and allow PHP 4 to be used if either the file extension is .php4, or they have a line in their .htaccess file. I have seen various tutorials in search engine results saying to run both, I can either do one of the following:
1. Install PHP5 as a module, and run PHP4 using FastCGI
2. Install PHP5 and PHP4 and run both using FastCGI
3. Install PHP4 as a module, and run PHP5 using FastCGI
In the future I will also be looking to support PHP6 once a stable version has been released, though that will probably be optional to begin with and require a line in the .htaccess file too - like PHP4. I will be using Apache 2.2.8 on CentOS 5.1. I am also looking to install Ruby on Rails and Django too, which I think use FastCGI.
What's the difference between running as an Apache Module, or using FastCGI? This will be for a shared hosting environment so performance over lots of connections, stability and security are my concerns. Should I run everything using FastCGI, if not, would the default PHP version be better off installed as an Apache Module?
I have installed image::magick perl module but its not running error is :--
Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Image/Magick/Magick.so' for module Image::Magick: libMagickCore.so.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. at flickr.pl line 55 Compilation failed in require at flickr.pl line 55. BEGIN failed--compilation aborted at flickr.pl line 55.
I would like to know is there any module for Apache which can collect information like who is surfing our website and how many pages they have accessed in last one hour. I know awstats or webalizer can do this but i need some thing realtime on apache level.
I found a script that updated php to 5.5, however it's only enabling me to run it as a CGI script, if I want to run PHP an Apache module, it's still only 5.3. How can I upgrade the Apache version?
I have a server running Apache 2 with PHP as an Apache module. There are a few php scripts that use lots of cpu when they run and have lots of hits, but Apache is still running fine and pages and php scripts load pretty fast. I was just wondering if running PHP as fastcgi would use less cpu or make php scripts load faster.
i have a dedicated server that i use for stream flv files. In this server i have apache.
Do you know any apache solution for prevent streaming of flv files to others domain name ? I want to stop leeching and permit stream of files only for my domain name. The htaccess solution in my case don't works...
I have recently installed the latest version of apache which is version 2.2.4 and it seems many modules were left out so I decided to add one of my favorite modules myself
I have DirectAdmin install so here is what I did
I edited this file: configure.apache_2 and at the end of the file added --enable-expires
After adding normally we would recompile apache I was doing that and I got this error
Code: /usr/local/directadmin/customapache/configure.apache_2: line 24: --enable-expires: command not found
*** There was an error while trying to configure Apache 2. Check the configure.apache_2 file
Not sure what I'm doing wrong if someone could help me I would be greatful.
If a User logs in with username only, all works correct. If a user use the DomainUsername format, the login is rejected with "user not found".Should it not work with both login styles ? Or is there a option to reformat or rewrite the username before authentication without the "Domain part ?
- Plesk 12 (v12.0.18 Update #40) and - Linux CentOS 6.6 (v2.6.32-504.12.2.el6.x86_64) to another VPS with: - Plesk 12 (v12.0.18_build1200140606.15) and - Linux CentOS 6.6 (v2.6.32-504.12.2.el6.x86_64)
I tried to do the following:
- Tools & Settings / Tools & Resources / Migration & Transfer Manager / Start New Migration - Data source: Transfer data from another server - Transfer the following data / Migrate the whole server
Following error/warrning message is recieved then:The following Apache modules are disabled on the destination server: sysenv. Please enable these modules to prevent possible problems.
How to be able to fix my problem that is related to the https using apache2 (enabling https in apache2) at opensuse:
By the way, my opensuse version is:
openSUSE 12.1 (x86_64) VERSION = 12.1 CODENAME = Asparagus
1) At the /etc/apache2/vhosts.d/vhost-ssl.conf, and if I do not have a name (as the server will be accessed using its IP address), can I place in the ServerName 192.168.0.5? Do I have to place it 192.168.0.5:443 or it is enough to be 192.168.0.5?
2) Is there a relation between the SSLCipherSuite values and the used method to generate the certificate?
3) I am afraid from the way that I am using to generate the certificate and the ssl module that is coming with apache2 at my machine which has opensuse. How can I select the right way?
Actually I used following commands to generate the .crt, .key and the .csr:
4) Do I have to configure the virualhost? Do I have to create files under the directory /etc/apache2/vhosts.d? Because I will have one application to be browsed .. nothing more.
to install mod_evasive module on our Apache2 that runs on Fedora server. However, for that we need Apache's apxs to compile it. We found out that we can do that by running the
yum install httpd-devel However, when we run that, we get the following:
============================================================================= Package Arch Version Repository Size ============================================================================= Installing: httpd-devel i386 2.2.8-1.fc7 updates 144 k Updating: httpd i386 2.2.8-1.fc7 updates 1.0 M openldap i386 2.3.34-7.fc7 updates 291 k Installing for dependencies: apr-devel i386 1.2.8-6 fedora 170 k apr-util-devel i386 1.2.10-1.fc7 updates 54 k cyrus-sasl-devel i386 2.1.22-8.fc7 updates 351 k db4-devel i386 4.5.20-5.fc7 fedora 2.3 M expat-devel i386 1.95.8-9 fedora 129 k openldap-devel i386 2.3.34-7.fc7 updates 1.5 M Updating for dependencies: httpd-manual i386 2.2.8-1.fc7 updates 821 k mod_ssl i386 1:2.2.8-1.fc7 updates 85 k openldap-clients i386 2.3.34-7.fc7 updates 179 k
Total download size: 7.0 M We're kind of cautios, because we have never updated Apache on our live server. We'd prefer if we could download and install just the httpd-devel module. Is this possible?
If not, would this mess up any of our existing configuration? Could we expect any problems? And do we need to shut Apache down, then run the updates and only then restart it?
I've installed apache on my windows 2008 vps . It's run and when I browse localhost , it's works fine . But when I enter the vps ip address , it says Chrome could not connect to ... , I'm sure that httpd is running on port 80 (I checked it via netstat -ao and task manage ) ....
I'm not an admin, I can't make apache run cgi's, I have followed several documents in different pages without luck, I can run normal html pages but not cgi's. I only get the code displayed in screen.
I have small issue with load speed of pages when number of apache running processes goes over +-310, during peak traffic of day. IE: They load really slow.
Here's pic of what I mean:
=> [url]
Only thing that fixes it temporarily (at least until peak traffic ends) is to stop either httpd or mysql for several seconds, as everything cools down, then start it back up. Stop/starting mysql usually has longer terms temporary fix.
Anyway, would you have any ideas on what to configure or change within the system in order to keep the processes under 300?
The load is normal. Even at load 40, pages are blistering fast, as long as processes are under 300. So it's got nothing to do with load.
My server was running a cronjob backup, and my apache always fail
root@b# service httpd restart /etc/init.d/httpd restart: httpd not running, trying to start /etc/init.d/httpd restart: httpd started root@b# service httpd restart /etc/init.d/httpd restart: httpd not running, trying to start /etc/init.d/httpd restart: httpd started root@b# service httpd restart /etc/init.d/httpd restart: httpd not running, trying to start /etc/init.d/httpd restart: httpd started
I can only restart them on my CPanel WHM
Attempting to restart httpd Waiting for httpd to restart.... . . . . . . . . . . finished.
httpd status root 5805 0.8 0.9 21092 19504 ? S 22:39 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd root 1012 4.0 0.6 23348 13828 ? Ss 22:39 0:00 /usr/local/apache/bin/httpd -DSSL
httpd started ok
root@b# service httpd restart /etc/init.d/httpd restart: httpd restarted
Code: [root@serwer /]# httpd restart /usr/sbin/httpd restart: httpd not running, trying to start /usr/sbin/httpd restart: httpd could not be started
Code: [root@serwer /]# httpd status Looking up localhost Making HTTP connection to localhost Alert!: Unable to connect to remote host. lynx: Can't access startfile [url]
How do I configure Lighttpd to serve images/javascript/css files that are littered about my websites? Can I just input the paths of all the directories that I want Lighttpd to serve from?
For example, I have 4 separate websites with each having a message board, main page etc... Could I have lighty serve the files from: