All Questions
Tagged with php apache-2.2
1,925
questions
0
votes
0
answers
13
views
Apache - How to compress (gzip) only specific calls
I have PHP application served with Apache 2.4
I need the apache to compress (mod_deflate - gzip) calls for specific users. So the application should decides dynamically which calls gets gzipped.
I was ...
1
vote
1
answer
60
views
How to enable executing php files in Fedora Apache?
I installed httpd and php v8.2.11 on my Linux Fedora.
But Apache can't execute .php files. (Responses "Access denied.")
I tried to use chmod shell command to enable executing and add AddType ...
0
votes
3
answers
79
views
File hosting on multiple servers? [closed]
I have a PHP website for file hosting (like Dropbox) on a Debian server with Apache, but I'm running out of disk space. Is there a way to add another server in the network and somehow make Apache use ...
0
votes
1
answer
148
views
Clear gettext cache of PHP-Apache Server to apply .mo updates
Although many questions on SO already relate to this, they're A) pretty old and B) I felt that it's better to ask about this here, as it seems to be related to some server-level, and not programming-...
0
votes
0
answers
284
views
Apache server working, PHP isn't
I had a php tool working on my old macbook pro. I've recently install via homebrew the HTTPD server and install PHP per a few websites.
The local page loads but it seems that PHP isn't working ...
1
vote
0
answers
54
views
How to redirect using .htaccess in Apache
I am using the following .htaccess rules to redirect the url for following conditions:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^$ https://example.com/page.php [L,R=...
0
votes
0
answers
39
views
Which web server can return this page with empty html tags ? Cloudflare / Nginx / Apache
I am using a monitoring tool that constantly checks server status, and sometimes it gets this empty tags reply. The monitoring service doesn't give me more info, like status code.
<html><head&...
0
votes
3
answers
646
views
CGI scripts: when can you return a document, instead of an HTTP response?
Script 1 below is bash, and is at https://example.com/cgi-bin/test. It produces the output 'Under construction' when fetched. It echos Status and Content-type headers, and some HTML. If I instead try ...
1
vote
0
answers
501
views
index.php displays as listing on Apache2 server
My OS is Ubuntu 22.04
I started out by installing php 8.1
I then installed Apache/2.4.52 (Ubuntu) Server
Then I added the following:
sudo apt-get install -y php php-cli php-common php-mysql php-zip ...
1
vote
1
answer
2k
views
Why environment variable set by SetEnv in apache httpd.conf cannot be passed to php?
I set an environment variable in httpd.conf:
SetEnv http_proxy "http://localhost:3128"
But I cannot get this variable in php using getenv:
<?php
echo getenv("http_proxy");
...
0
votes
0
answers
47
views
How to server index.php from different directory through .htaccess?
I am working on a project which is in Yii2. I have to integrate swagger UI for API documentation. My current directory structure:
This is what the .htaccess looks like:
RewriteEngine on
RewriteCond %{...
0
votes
0
answers
352
views
Create ubuntu user with home folder located in www and restrict ssh access using ChrootDirectory to that folder
I posted this on stackoverflow and was told to post here:
I am running a Ubuntu remote dev server, heavily restricted (due to compliance) environment which i previously had configured correctly for ...
0
votes
1
answer
115
views
Is the slow down due to traffic every day near 12 pm
I checked the slow logs and I got only 4 queries in 2 hours and all of them were similar to this:
"SELECT HEX(uhash) AS uhash, vehid, IF(deleted = 0 AND follow_price_drop = 1, 1, 0) AS ...
1
vote
0
answers
299
views
Apache with PHP FPM and requests spikes, how to set optimal configuration?
I was lucky enough that my website went viral, and the server of course wasn't ready for it.
Unfortunately my setup is quite bad, a single server with Apache, PHP (Laravel), Mongodb and redis.
The ...
0
votes
1
answer
988
views
PHP website not working as expected in NGINX but working in Apache
Hi I just created a link shortening app. But when I try to redirect a shorten link to the full URL which is shared on Facebook it is not working as expected.
for example : https://bowa.me/c8443 this ...
1
vote
1
answer
155
views
Uniform Server cron not executing php script
I'm running Uniform Server Zero XIV and am trying to use the cron to run a php script every 15 minutes. When ran manually, the script does what it is supposed to, which is updating values in a ...
-1
votes
1
answer
509
views
What's does the user daemon mean?
I was just checking my VPS. I am using Apache server and I found user daemon is taking 15-30% CPU use
User Daemon
1
vote
1
answer
2k
views
Convert Apache2 configuration to nginx configuration
I have RHEL 6 with apache/httpd (v2.2) configured to handle two different path of WordPress:
FOO path: /var/www/html/FOO/
BAR path: /var/www/html/BAR/
We plan to move to a new machine running RHEL 7 ...
1
vote
1
answer
2k
views
Apache Error log format: how to find current format?
I am building a log parser in PHP and have trouble with apache error log format.
With access log, it's easy to see the default LogFormat in apache config file then check in my virtual hosts for any ...
0
votes
0
answers
691
views
When too many concurrent connection to MySQL, all Apache-PHP site unable connect to DB
I'm using RDS from amazon, and tuned the MySQL config to the max.
However, all the site will be stop connecting to the MySQL when the number of connection reached a certain numbers of activities. It's ...
1
vote
1
answer
2k
views
php geoip not working on ubuntu 18.04 [closed]
I can't get the GeoIP PHP extension working on Ubuntu 18.04 with PHP 7.2
i have intalled it by the cli: sudo apt-get install -y php7.2-geoip
Its enabled in system but not working:
php7.2 -i | grep ...
1
vote
1
answer
6k
views
Why returns apache a http 500 but does not log any errors?
On a 12 year old (web) server is still 1 old (custom) PHP application hosted. We want to shutdown this server and remove it from the rack. Unfortunately we still need the application, is not actively ...
0
votes
1
answer
427
views
Restarting Apache with PHP
How would I go about restarting Apache with a PHP script while keeping correct security measures on a production server? This is because restarting Apache requires the use of sudo or root privileges, ...
1
vote
1
answer
91
views
Legacy php app - what's the correct order to update things? [closed]
I have a legacy PHP application running on:
HTTP 1.0
Apache 2.4.10
PHP 5.4.45
MySQL 5.5.42
I have an open source framework which the previous team have manually been writing changes into, so we ...
0
votes
0
answers
348
views
Dealing with IDM (internet download manager) connections to server and rate limiting
I run a file hosting platform, and am struggling to work out how to handle IDM (internet download manager) connections.
When a file is requested, I create a download token, which expires after 10 ...
-2
votes
1
answer
101
views
a site use Linux Server take long time to load
i get this problem first time since 5 years i use same site same script without any change .
i have a site xxxxxxx.com (php script) use a ip http://1.1.1.1 (example) , i use centos as OS for the ...
0
votes
0
answers
111
views
Migrate PHP website from Apache to Nginx
What are the implications of moving a site build in PHP 7 on a server running Apache 2.2 to another running nginx 1.12 (CentOS)?
Is there any standard practice for doing this? Are there any ...
0
votes
2
answers
1k
views
Nginx Apache reverse proxy with php-fpm
trying to install nginx with apache revers proxy, apache itself does sent to php-fpm to port 9000 on localhost
so apache http on port 8081, apache https 444
nginx 80 and nginx ssl 443
php-fpm port ...
0
votes
0
answers
269
views
Install PHP 4 in Wamp, UwAmp or Apache
I'm .Net developer, and I found in company a physical RedHat server with a lot applications in PHP and I need to create a local server to start translate this PHP apps to .NET, but I need install PHP ...
0
votes
1
answer
126
views
Can undefined variables and notices cause a cpu spike?
We're running centos 6.7, PHP 5 and MySQL 5.5 and Apache 2.2.15. Sometimes we see high CPU usage, mainly caused by MySQL so we take all the logs we can get. We're addressing MySQL optimization ...
0
votes
0
answers
262
views
Unable to connect to local LDAP server in php script
I have setup an LDAP server using Apache Directory Studio on my Windows 10 machine. I used all of the default settings and haven't configured anything. The address is 0.0.0.0 and the port is 10389.
I ...
1
vote
0
answers
149
views
What is the time correspondence between PHP and Apache logs?
Say I have this PHP error log:
$ cat php_logs
[20-Sep-2019 03:05:03 Europe/Rome] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 2621464 bytes) in /www/hello....
-1
votes
2
answers
434
views
got ERR_NAME_NOT_RESOLVED error for my website
well I didn't do anything I mean any changes to my website. yesterday when I try to open my website which is https://www.maket.ir I got This site can’t be reached maket.ir’s server IP address could ...
0
votes
1
answer
264
views
Apache can't save files to mounted directory
I have bought WD myCloud storage and I have mount it to centos 7 by adding this line to fstab
\\wd_mycloud_ip_address\shared_folder /backup cifs rw,suid,username=shared_folder_username,password=...
0
votes
1
answer
116
views
Apache random 403 errors
We are using php 5.4 and a custom php page .
When there is concurrent 300 users for some of the requests it throws 403 forbidden. This page does not use db connection .
The apache maxclients is set ...
3
votes
0
answers
516
views
Have apache run a script before handling request
I want to have Apache run a script every time it gets a request. To be clear I want apache to serve the actual file and just have this script called right before Apache handles the request (I have my ...
1
vote
1
answer
3k
views
`GLIBCXX_3.4.20' not found Centos7
while starting deepstream output show like this how can i resolve this issue. I installed the latest version which is not available in yum repo by using rpm file and i can't remove this package too.....
0
votes
0
answers
288
views
Passing PHP headers to NGinx Proxy
I have nginx setup as a proxy in front of APACHE, which in turn talks to PHP-FPM.
It turns out, nginx is cutting out (or better to say not passing through) headers that are set directly in PHP via ...
1
vote
0
answers
84
views
Very long TTFB and high CPU on VPS after Hypervisor Migration
I manage a VPS for my company with a small e-commerce website and a few low-usage Wordpress blogs and the like.
My Service Provider migrated me to a different Hypervisor last Thursday, and since then ...
0
votes
1
answer
40
views
My PHP Site code structure is visible to my clients when they request a directory
A folder in My Site
I use apache web server
PHP on the back end
apache is running under the user www-data
Permission for my folders are 755
When users request a php page all is well, but when they ...
-4
votes
1
answer
36
views
directory protection in Ubuntu 14.04 Server [closed]
I want to run the following on a single ubuntu 14.04 server
- Asterisk
- PHP/Apache/ MySQL
This server will be offline at customer's location.
I want to protect these folders in a way that if my ...
0
votes
0
answers
2k
views
Automatically ban IP addressed using rule based on GET request
I'm setting up my first website on Ubuntu 18.04 using Apache and I've noticed the following in my apache error log on a daily basis:
94.102.49.125 - - [07/Feb/2019:11:32:55 +0000] "GET /muieblackcat ...
0
votes
1
answer
2k
views
'File not found.' after switching to php fpm (apache, ubuntu server 18.04 LTS)
I know this question has already been answered mutiple times, but the answers are almost all diffrent and are sorta confusing. I have tried alot of answers but none of them work.
I follow the answer ...
1
vote
1
answer
63
views
give apache ID permissions to list and CRUD files as OS users
I wasn't sure if this question belongs here or on SO. I can move it there if needed.
In any decent Apache configuration, Apache will run as its own ID; www-data for example. And this ID will not have ...
0
votes
0
answers
35
views
Security Scan causing weird logs
So some time ago, I coded a website(PHP) and wanted to check for common web security vulnerability. I used Nessus and Burp Suite to scan for vulnerabilities in my website. The scan result showed no ...
0
votes
1
answer
211
views
php apache_note with mpm_event
I'm wanting to switch to mpm_event to be able to serve a higher rate of requests. My initial testing showed that the server can serve a higher rate of requests when using mpm event. The server is ...
0
votes
1
answer
297
views
Apache/PHP Undefined function - occurs sometimes - fix by apache restart
I'm facing a really strange problem
My website sometimes starting to serve errors like
2018/09/25 09:13:33 [error] [php] Call to undefined function @=Q<C6>+V(). File: /var/www/xxxx/MainModule....
1
vote
2
answers
1k
views
WordPress admin pages timeout, or take 30s to load on Elastic Beanstalk, PHP 5.6, Apache, RDS, and CloudFlare
I recently migrated a WordPress website I inherited over to AWS from Rackspace and am experiencing large performance decreases. I'm pretty new to the whole DevOps thing so I'm not sure where to start ...
0
votes
1
answer
614
views
Installing Apache2 / PHP on AL2
I've installed Apache2 and PHP as follows:
sudo yum install -y httpd.x86_64
sudo amazon-linux-extras install php7.2
I'm not able to find a libphp7.so module to load within Apache2. I loaded the ...
-2
votes
1
answer
849
views
uploaded files by php owned by apache cannot be moved from /tmp [closed]
I am using Apache/2.0.52 (Red Hat) & php4 to upload files via browser from local computer. The files arrive in /tmp looking like this:
-rw------- 1 apache apache 18668 Jun 27 02:56 phpi8g4LS
...