Questions tagged [mod-php]
The mod-php tag has no usage guidance.
58 questions
0
votes
0
answers
18
views
Apache2 - Prevent access to .php files if the php module is not enabled or in any case in which the php files are not parsed
I would like to prevent php files from being displayed in case they are not parsed as php, in Apache2.
For example, at the moment, if there's a failure in mod_php or its configuration, the files would ...
0
votes
1
answer
391
views
Apache + PHP with mod_php No timeout
I am actually working on Apache server 2.4 with PHP 8.2 (mod_php) & debian 11.2
Recently I sent a HTTP Request with more than 100 seconds without a timeout. This request executed a large MySQL ...
0
votes
0
answers
334
views
$_POST is empty when obtaining in "ErrorDocument 404" (nginx + apache + mod_php)
I try to transfer website from old server to new, and stucked with one problem. PHP/JS code on both servers is the same, but on new server it is not working - $_POST data are empty in AJAX-request.
...
0
votes
0
answers
700
views
Apache+mod_php so slow
I have a problem setting up my Apache server with mod_php.
I have a website whose index.php page is generated in ~200ms. But Apache serves it in about 1.5sec. Why is this slowdown taking place?
If ...
0
votes
1
answer
8k
views
mod_php is not installed on CentOS 7 with remi's php 5.4 - a bit of confusion
I have a fresh installation on CentOS 7 with httpd and following remi's wizard I installed php 5.4 as single version (I know it's old, but part of my requirements !!).
My problem is that httpd cannot ...
0
votes
0
answers
106
views
How to debug strange HTTP/PHP server behavior (garbled text in some files)
This is a weird one. I'm administering a FreePBX server using their standard CentOS 7 based distribution running in a virtual machine.
Every so often (usually a few months in between occurrences), ...
1
vote
1
answer
366
views
Vagrant & Puppetlabs/apache setting two MPM's
Currently I'm attempting to update my Vagrant machine with Puppet modules to PHP7, and ofcourse, with updated modules. However since updating the puppetlabs/apache module to version 3.0.0, it is ...
-1
votes
2
answers
2k
views
.htaccess vs php.ini in mod_php and CGI
As far as I know, mod_php can be configured either by means of php.ini or .htaccess files while, for CGI, .htaccess files cannot be used.
Does the fact that mod_php can use .htaccess files makes it ...
0
votes
1
answer
2k
views
Apache 2.4 w/ PHP 7: PHP7.1-FPM and/or libapache2-mod-fastcgi
I am in the process of upgrading a web server from using the slower, resource-intensive mod_php, and all has been well, until I noticed that PHP 7.1 is running successfully using only the php7.1-fpm ...
0
votes
1
answer
466
views
Apache mod_filter + PHP (mod_php)
I'm trying to configure my server to automatically insert a tracking code (Piwik) to all pages served. I'm using both static sites and some PHP sites. I've used the following method found on Piwik ...
0
votes
0
answers
345
views
Apache strace getsockname call is slow
While load testing I am getting almost 100% CPU usage by Apache processes. To find out the root cause I attached Apache process with strace and found slow calls.
11840 0.000063 accept4(3, {...
1
vote
1
answer
2k
views
Debian apache2 is not executing php scripts, instead it's showing the source
I know this is probably most discussed topic online, I did search here and stackexchange and tried various answers but none of them seems to be working for me, hence why I am posting this.
I have a ...
2
votes
1
answer
1k
views
httpd memory usage (Apache/2.4.16 (Amazon))
I'm running an apache server (default configuration, mod_php) on an amazon linux VM with just 1G of RAM.
There are two kinds of php applications running: memory heavy ones that are executed not so ...
3
votes
1
answer
1k
views
Nginx as reverse proxy in front of Apache
Current Setup Single CentOS 6 VPS with 6G memory running apache 2.2, mariadb & PHP via FastCGI. Server has mostly wordpress sites, but also has some other PHP based sites. Right now we are not ...
108
votes
2
answers
130k
views
Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM
There are few different php "wrappers"(?). What are differences between them? Tried to google some, but cant seem to find informations. (mod-php is not googleable).
Why might I choose one over ...
0
votes
1
answer
321
views
Varnish backend slow-start
The situation:
I'm using Varnish in front of some heavy loaded mod-php apache servers. When a cold (empty xcache, cold template cache) apache gets started, the server may overload because of too many ...
2
votes
2
answers
688
views
When does main www/mod_php5 port get updated?
I haven't been able to find any info regarding this anywhere while burying through the thousands of results I have been getting concerning php5 so here goes.
We have several FreeBSD 9.2 machines and ...
2
votes
1
answer
805
views
php-fpm process running when using mod_php
I've been having some out of memory issues. Pretty much there after tuning Apache but I have noticed something odd when analyzing memory usage. php-fpm is running in the background when, as far as I ...
0
votes
1
answer
46
views
Apache becomes unconnectable after certain time?
After maybe ~20 minutes it seems like my apache server becomes unconnectable. By unconnectable, I mean if I curl any page, it just results in nothing for 2-3 minutes and then nothing ever shows up. I'...
2
votes
1
answer
1k
views
Using both mod_php(Apache) and php-fpm(nginx) in one server
Is it possible to use Apache+mod_php and nginx+php-fpm in same server?
I know these two servers can NOT share same port, but is it possible to run two different PHP modules in one server?
I'm ...
5
votes
1
answer
11k
views
Apache 2.4: mod_php vs php-fpm performance
There are plenty of old benchmarks on Apache mod_php vs nginx with php-fpm
However, with version 2.4, Apache can use php-fpm. Are there any sensible benchmarks comparing mod_php with php-fpm (both ...
0
votes
1
answer
595
views
Changing Php's Handler Name
On my apache server I'd like to run multiple versions of PHP concurrently so that I can easily switch between them depending on the needs of the project. I noticed that some shared hosting providers ...
9
votes
2
answers
2k
views
How can I use SELinux to confine PHP scripts?
I want to compartmentalize different PHP applications on my SL6.4 (RHEL 6.4 rebuild) web server so that they cannot access each others' data. It seems that SELinux might be able to do this, but I am ...
0
votes
1
answer
2k
views
Does PHP take advantage of APC if run as apache module with prefork?
I have installed APC, but I am not observing as big an impact on performance as I expected. Actually, I'm not sure I'm observing any benefit, though maybe it's just because the cpu time spent in ...
1
vote
1
answer
2k
views
Give PHP a fake request URL and protocol with Apache2 and mod_php
I run a web server with multiple users. The machine provides Apache-based virtual hosts to a bunch of users, who can serve static content or use PHP. No other forms of server-side scripting are ...
0
votes
1
answer
1k
views
Effect of PHP memory limit on Apache2 workers [closed]
As you would have guessed I have a server setup with mod_php and Apache2 (prefork) with APC . The site receives decent amount of traffic daily and on highest being 280-290 users at the same time. A ...
0
votes
1
answer
577
views
From suPHP to mod_php
I have a Centos6 64-bit server, Apache/2.2.15, PHP5.3.3, one IP and four name-based virtual hosts and SSL/SNI to provide https in addition to http. All those hosts are assigned to different linux ...
0
votes
1
answer
390
views
Apache prefork vs. workder - what is wrong with my settings?
I have installed PHP as an Apache module. I have had prefork running all this while. I've read that worker would consume less memory while offer higher performance]1. So, I've edited /etc/sysconfig/...
1
vote
1
answer
118
views
forbid custom php config settings on apache 2.2 + mod_php server
I have a server where php is running as an apache module.
Every user on the server is restricted to his own directory with open_basedir.
I have disabled the following functions:
disable_functions = ...
1
vote
0
answers
946
views
amazon ec2-medium apache requests per second terrible
EDITED -- test running from localhost now to rule out network...
i have a c1.medium using EBS. when i do an apache benchmark and i'm just printing a "hello" for the test from localhost - no database ...
5
votes
1
answer
4k
views
What is difference of PHP handler (CGI vs FastCGI vs Mod_PHP vs suPHP )?
I understand that there are four different PHP handlers out there (AFAIK).
CGI (php-cgi)
FastCGI (php-fpm)
Mod_PHP
suPHP
I need to know the pros and cons of these handler and what environments ...
0
votes
1
answer
550
views
Configuring Apache vhost to process PHP files [duplicate]
Possible Duplicate:
Apache not parsing files? Just sending downloads
Description
Now I have setup up a site in Apache using vhost. If I request something it response me a PHP file raw.
Question
...
0
votes
1
answer
1k
views
Mod_Perl AddType .pl execution on apache
I've recently been using PHP via mod_php, and I assumed that getting mod_perl running properly was going to require a similar setup:
AddType application/x-httpd-php .php
unfortunately this does ...
0
votes
1
answer
1k
views
(Serving PHP) Does Apache2 will create new thread on every connection?
Based on many online sources, in serving static files, Apache2 will create new thread on every different connection... results in resource hungry
But how about serving PHP through Apache2 (mod_php, ...
0
votes
3
answers
2k
views
Apache with mod_php high memory utilization
We have Magento application deployed on Apache with mod_php and mysql.
I have observed that sometime apache server starts consuming high memory which causes memory swapping and results in high load on ...
4
votes
1
answer
1k
views
mod_spdy problems and speculations
I'm trying out mod_spdy and I've run into a problem - it seems to be incompatible with AJAX requests and mod_php as in this: https://www.modspdy.com/blog/2012/04/15/using-mod_spdy-with-php/
The ...
2
votes
2
answers
3k
views
How to run mod_php and fastcgi side-by-side?
How would it be possible to run certain scripts (this could be in either a vhost or directory setting in the apache conf) to run as mod_php when the current server configuration is running FPM/FastCGI?...
0
votes
1
answer
2k
views
Count specific php function calls executed by apache
Is there a way to count how often apache executes a specific php function?
At the end I want I file like this:
From 2012-01-01 till 2012-01-31 apache executed:
system() : 10
printf() : 1000
...
1
vote
0
answers
868
views
Apache 2.2.16 with mod_php on Debian Squeeze CPU high load
Configuration:
CPU 16 cores
14 GB RAM
Apache 2.2.16
PHP 5.3.3-7 with enabled APC
Apache mpm config:
StartServers 50
MinSpareServers 50
MaxSpareServers 256
...
2
votes
1
answer
378
views
How to reduce Nginx tasks running under php-fpm?
What is Apache's mod_php equivalent in Nginx? I have Nginx with php-fpm. Everything is perfect but the problem is that it works like fcgi in Apache not mod_php. This means that a task is added for ...
1
vote
2
answers
2k
views
mod_wsgi and mod_php running together - possible?
Is it possible to run apache with mod_wsgi and mod_php running together to serve python and php pages?
If so where can I find info on doing this?
0
votes
1
answer
206
views
Always using eAccelerator
If eAccelerator uses an opcode cache for PHP requests, then why don't all companies employ this on their production servers? Is there a reason why Apache/PHP/mod_php doesn't bundle it with their ...
0
votes
2
answers
709
views
Apache + mod_php Ignores SUID?
Does apache or mod_php cause a SUID flag to be ignored when using the shell_exec command from a web accessed PHP script?
I'm trying to allow a web accessible PHP script to rename some files which the ...
13
votes
2
answers
12k
views
How long do Apache processes stay alive?
When apache forks a process for mod-php, how long does it stay alive? Does the process die as soon as the response is sent, or will it stay alive until the browser receives the full response?
0
votes
1
answer
279
views
How do you serve php files located outside of the apache folders
I've just installed phpMyAdmin at /usr/share/phpMyAdmin on a CentOS 5 machine running webmin / virtualmin. I have also added an alias to the apache config, being the following line:
Alias /phpMyAdmin ...
2
votes
2
answers
3k
views
Running mod_php and suPHP same time
I recently went from Debian Lenny with 5.2.x and was able to use mod_php for any php files that were not located in /home/ and suPHP for all the php files that were located in /home/.
I did this ...
1
vote
1
answer
528
views
Re: How can Django/WSGI and PHP share / on Apache?
in response to: How can Django/WSGI and PHP share / on Apache?
Hello,
could you please post the complete config file from /sites-available
I am having a problem seems like rewrite engine redirects ...
2
votes
1
answer
4k
views
How can Django/WSGI and PHP share / on Apache?
I have a server running an established PHP site, as well as some Django apps.
Currently, a VirtualHost set up for PHP listens on port 80, and requests to certain directories are proxied to a ...
2
votes
5
answers
1k
views
Own server, multiple website: most secure PHP setup
We have a company server with a variety of websites. They are maintained by different people from within our company. All websites are public. The server access is limited to our company only. This is ...
4
votes
2
answers
2k
views
Comparing Nginx+PHP-FPM to Apache-mod_php
I'm running Drupal and trying to figure out the best stack to serve it. Apache + mod_php or Nginx + PHP-FPM
I used ApacheBench (ab) and Siege to test both setups and I'm seeing Apache performing ...