As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
74 views

Why nginx return 200 status code?

I have two servers (test and production), nginx configuration is the same, CMS joomla. On the test server everything works correctly. For some reason the production is returning a 200 code when it ...
Андрей Курочкин's user avatar
0 votes
0 answers
22 views

reverse proxy example.com/cn to cn.example.com

I have one joomla website on amazon linux2 with apache and php 7.4 as example.com and i am managing languages with plugin, like if i open example.com/cn it opens in chinese language and example.com/fr ...
Sukhjinder Singh's user avatar
0 votes
1 answer
1k views

nginx php file auto download instead execution on http and 404 Not Found on https

problem 1 : i trying to access my site under ip local address using http, everytime i access that, it will download php file meaning not execute. problem 2: i trying access my site under my domain ...
Media Posternet1's user avatar
0 votes
1 answer
1k views

How to install mcrypt for PHP 7.4 on Aws Linux 2?

I'm trying to install mcrypt with yum install php-mcrypt but run into this dependency error: Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel) Requires: php(api) = 20100412-64 installed: php-...
Xander's user avatar
  • 101
0 votes
1 answer
494 views

Building PHP 8.1.8 with open SSL, failing unable to find package. Lambda Layer

I'm trying to build a PHP8.1.8 lambda layer however i was following https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/ And just using the correct version, so the ...
Martin Barker's user avatar
1 vote
1 answer
39 views

Php Server Side Security

I try to code new application. User's uploading their php script and all scripts stored in 1 folder like that; Some folder Another System Folder Projects Folder project 1 index.php project 2 ...
Ömer Faruk Demirel's user avatar
0 votes
0 answers
86 views

Can php-fpm and swoole coexist on the same virtual host /server block

I have been searching for days, and apart from this unanswered question os Stack Overflow no info whatsoever has appeared, a big zero. So I wonder if the wise people around here might know of a ...
jmcollantes's user avatar
1 vote
0 answers
492 views

IIS 10 - Setting up PHP Application behind Reverse Proxy

I am currently struggling to get the right config in IIS, as I am normally using Unix servers and nginx. I have a reverse proxy (nginx) that forwards all requests to subdomain.domain.com/xxx to my IIS ...
T.Bremkes's user avatar
0 votes
0 answers
201 views

apache changing file/directory permissions from www-data to root

I'm trying to write custom PHP logs to a file that I tried to store at /var/logs/apache2/custom.log also tried to create a new directory /var/logs/custom/custom.log and /tmp/custom.log . But somehow ...
Mark Davydov's user avatar
0 votes
0 answers
226 views

Understanding slow queries from mysqldumpslow

I'm maintaining a system which sporadically (no exact time) but only at night causes the entire server to crash for a few seconds and the users seeing "Error Connection Refused" until the ...
Marcus Christiansen's user avatar
0 votes
1 answer
100 views

Cannot get FFMPEG in SNAP to convert videos to MP4

I recently installed FFMPEG with SNAP. For some reason, the regular ffmpeg install isn't working on this particular server. The file path that I have been using with my previous ffmpeg installation is ...
Charlie's user avatar
1 vote
2 answers
5k views

Unable to bind to server: Can't contact LDAP server

Environment: LDAP Server Type: ActiveDirectory LdapRecord-Laravel Major Version: v2.5 PHP Version: 8.0 I'm using ldaprecord and I'm getting "ldap_bind(): Unable to bind to server: Can't contact ...
ZOHBOU's user avatar
  • 11
0 votes
3 answers
2k views

Performance tuning PHP-FPM: How to tune the number of child processes

pm = dynamic pm.max_children = 20 pm.start_servers = 10 pm.min_spare_servers = 2 pm.max_spare_servers = 4 pm.max_requests = 1000 Assume using above configuration. Is it possible to know the following?...
Ryan's user avatar
  • 5,711
0 votes
0 answers
103 views

Is there a way to solve Apache HTTP Server Source Code Disclosure?

I have just received an Acunetix report from the network security section for my Apache server on 64-bit Windows 10, with Moodle 4.0 installed. Such issue is only observed in the Windows version of ...
Jacky Wu's user avatar
0 votes
1 answer
677 views

Nginx reverse proxy issue in redirection without trailing slash

I am running an nginx reverse proxy with apache as a backend server. I have multiple applications running without any problems, but some php-js websites fails to redirect properly. when I sent a ...
A. Bader's user avatar
0 votes
1 answer
2k views

centos 7 php https port 443 Connection refused

centos 7 php https port 443 Connection refused i try to open port 443 https on my centos vps i have open port in firewall-cmd but on i open url https port 443 i have error Connection refused firewall-...
smo zain's user avatar
0 votes
0 answers
27 views

Apache2 htaccess issues when using vhost_alias

I have the vhost_alias module set up and loaded, and have the following in a host file inside sites-enabled UseCanonicalName Off <VirtualHost *:80> ServerName vhosts.local ...
designermonkey's user avatar
0 votes
1 answer
47 views

Fedora mail does not arrive

I use PHP to send mail on Fedora 36. mail($email, $betreff, $content, $header); However the mail does not arrive. What could be the problem?
Dennis's user avatar
  • 11
0 votes
0 answers
241 views

Apache with variable subdomain in document root, but host and server name as domain

Is it possible in Apache to have multiple subdomains each have their own document root, but report the domain as their host and server name? The use case is using the subdomain the determine which PHP ...
Matthijs Steen's user avatar
0 votes
0 answers
261 views

php-fpm: execution of bash script from php-fpm

server: Debian 11, nginx, php8.1-fpm i want to execute this command from php but is not working, when i run from terminal (root)it works $output = shell_exec('/usr/bin/dos2unix /var/www/script.sh'); ...
wuqn yqow's user avatar
0 votes
0 answers
184 views

brotli on apache with proxy_fcgi for PHP-FPM is not used

I'm running an apache 2.4.54 with broti enabled. brotli configuration as seen below and loaded before default deflate configuration. $ cat /etc/apache2/mods-available/brotli.conf <IfModule ...
M Klein's user avatar
  • 101
0 votes
1 answer
443 views

RHEL8 HTTPD php missing "apache 2.0 handler"

How do I install PHP on RHEL8 so that it is using "Server API" "apache 2.0 handler" instead of PHP-FPM? I believe the PHP-FPM is causing issues, and I can't see the modules enabled ...
kellyredbook's user avatar
0 votes
0 answers
525 views

Disable usage of PHP-FPM pools on server

I originally setup my client's server to have PHP-FPM pools for each domain. I realize now this was not necessary and I am wondering what steps need to be taken to disable the pool functionality and ...
Mike Hermary's user avatar
0 votes
2 answers
236 views

How do I install PHP 5.5 on a new version of CentOS or Amazon Linux or Redhat or Ubuntu?

I just joined a new company. I've been asked to build a CI/CD pipeline for a Laravel app. It is very fragile. It was built for PHP 5.5 and it breaks when they've tried to upgrade to 5.6 or 7. They don'...
charlottesville's user avatar
0 votes
0 answers
465 views

How to disable "not found or unable to stat" logging?

The error log of apache2 (with php7.4 enabled) has many entries from script kiddies scanning for vulnerabilities. Is there a setting to prevent this from being logged, while still logging other errors?...
Victor's user avatar
  • 361
0 votes
1 answer
286 views

Single Signon best practice for phpMyAdmin across multiple servers

I run a small web development company and we run multiple production servers, each with their own MySQL database server. I'm trying to figure out the best way of giving access to these separate MySQL ...
james-geldart's user avatar
0 votes
1 answer
3k views

PHPMyAdmin with nginx in Docker proxy not working

I have a docker setup with PHP/MySQL and PHPMyAdmin running on nginx webserver I want to create a subdirectory on nginx /phpmyadmin which will proxy to the phpmyadmin container. Everything else should ...
Kristof Rado's user avatar
0 votes
1 answer
2k views

Apache2 server PHP access to files outside document root

I have a Raspberry Pi that I use to host a web server. I am using apache2 2.4.38, php8.1 and MariaDB 15.1 and I wanted to add a Nextcloud server to it. I am using the web installer version. I already ...
thijmer's user avatar
0 votes
0 answers
153 views

Http JSON Response of big size is trimmed

I'm running a php laravel backend on a docker swarm stack with some other services (including a reverse proxy). Some of the GET requests of large response size are responded to with a trimmed JSON - ...
HmanA6399's user avatar
0 votes
0 answers
1k views

How to I setup default php-fpm service if I have two versions of php

I am having two versions of PHP on an ubuntu server that is 8.1 and 7.4 I installed both PHP-fpm extensions and I have this in /var/run/php php7.4-fpm.pid php7.4-fpm.sock php8.1-fpm.pid php8.1-fpm....
novapack's user avatar
  • 101
1 vote
0 answers
759 views

Reason for servers slow response time?

I'm running Apache 2 with PHP 7.4.29 servers on Ubuntu 20.04 on AWS using AWS load balancer and auto scaling group. The servers connect to other AWS resources such as dynamodb, RDS (mysql), memcache ...
Niro's user avatar
  • 1,391
0 votes
2 answers
443 views

Why does `apt-get -y install php8.0-dev` installs PHP 8.1

On my ubuntu 22.04, I used the PPA from LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php I ran apt-get -y install php8.0-dev, which required php8.1-phpdbg and it went ahead and installed PHP 8.1 ...
bilogic's user avatar
  • 155
2 votes
1 answer
2k views

How can I use Ubuntu 22.04 with OpenSSL 3 and PHP sites? Getting errors due to a conflict

I have an Ubuntu 22.04 install and it is using OpenSSL 3. When I put my site on the server, I get this error: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:...
Chris Farrugia's user avatar
0 votes
2 answers
662 views

How to force SSL on Nginx & Varnish

how can i redirect only to https in Nginx and varnish. I use varnish cache in port 80 and Nginx listening on 8080. Works fine in http, but i need to add SSL. my configuration is as follows server { ...
dalan's user avatar
  • 1
0 votes
0 answers
62 views

Force non-empty MAIL FROM for outgoing email

I am using postfix on a Debian server, primarily to send outgoing email for websites and notifications, and have run into an issue where outgoing email to a certain mailing list provider is rejected ...
InterLinked's user avatar
0 votes
0 answers
65 views

php files downloading instead of executing nginx

I am working on a project for a school assignment. We have to make a webserver with wordpress on it. There are some stuff we had to change think of changing the user of nginx and mariadb to webuser ...
VogelSpotter's user avatar
0 votes
2 answers
38 views

Add to mysql db instead of restore

*EDIT/UPDATE I have an RPI4 with mysql. I need to collect all the data from the "zm" database, and ADD it to another database of the same name on another server, so NO data on the 2nd server ...
Ben's user avatar
  • 23
0 votes
1 answer
114 views

Mail is not sent via php mail() on CentOS7 DirecAdmin Exim php fcgi

I spent the whole day trying to fix this problem, so I decided to share. Maybe it will save someone time) Problem: Mail is not sent via php mail(); The Exim log shows nothing. System: CentOS7 ...
White Crown's user avatar
0 votes
0 answers
147 views

PHP File Permissions and Running HTML Files as PHP

I am running a Linux server (a DV server with Media Temple). It's a pretty standard LAMP setup. I'm running PHP 7.4. I'm using two programs to upload files to the server: Filezilla and a tool called ...
Adam's user avatar
  • 3
0 votes
3 answers
385 views

Debian: how to put two versions of libcurl on one system?

I'm trying to migrate two web apps on single server(debian10), both require different versions of php, and both require cURL extensions to work properly. php5.6-curl uses libcurl v3 php8.1-curl uses ...
Robert Grubba's user avatar
1 vote
1 answer
3k views

Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource

I installed php8.1-fpm on Ubuntu 22.04. In principle, I set everything up, but still "403 Forbidden You do not have permission to access this resource "error message is displayed. The system ...
Teo76's user avatar
  • 11
0 votes
0 answers
36 views

php config - generate hashed password manually

I've created a php conf file, which include some user / password infos. For testing purposes I've added the password for the database in plain text. Since this can't be a good idea, I want to change ...
zippy-flop's user avatar
0 votes
3 answers
48 views

Mariadb legacy support

I have old version of php site, which uses unescaped 'row_number' column number in its sql queries. It seems in the new version of mariadb there has been new function called "row_number()" ...
tach's user avatar
  • 131
0 votes
0 answers
911 views

using virtual subdomains on nginx on localhost laragon server to be dynamic

i have this config file domain.beta.conf server { listen 80; listen 443 ssl; server_name ~^(www\.)?(?<version>(.+\.))?domain.beta$ domain.beta root "X:/xx/www/domain" ...
yvgwxgtyowvaiqndwo's user avatar
0 votes
1 answer
380 views

Forward HTTP (or TCP) request through NGINX using subdomain to a specific port

I want to expose a local web server through a remote webs server. The remote host has already an Nginx and a web application (webmail). The remote server works as a gateway for the local webserver who'...
ender.an27's user avatar
0 votes
0 answers
239 views

I need help about apache AWS server error

Here is my error log: [Sat Apr 09 00:00:02.545833 2022] [ssl:warn] [pid 1078:tid 139965531106176] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name ...
ManiGraphics Official's user avatar
0 votes
1 answer
2k views

Sail up for a cloned laravel project does not work

I have Windows 10, WSL2, and Docker. I've cloned a repository from GitHub, and when I try to sail up, I get this message: /usr/bin/env: ‘sh\r’: No such file or directory. The following is from the ...
r j's user avatar
  • 1
0 votes
1 answer
865 views

Why is my Laravel App having 3+ seconds TTFB in Production?

I've looked around but can't find a definitive answer on if things like Images affect TTFB which would be my best guess as to why my site is taking so long to load in production. After the page is ...
dan178's user avatar
  • 113
0 votes
2 answers
665 views

301 redirect url based off of a category in the url

Does anyone know how to redirect a url that contains a parent category of a product? Basically I want to redirect a ton of products to a simple landing page that I created, so instead of making ...
nightcrew's user avatar
1 vote
0 answers
88 views

PHP upgrade 7.2 to 8 is not recognized by Wordpress

I have a VPS with LAMP stack and I tried to upgrade to PHP 8. When I run php -v the version is 8.1, but WordPress tells me it is 7.2. So I created a php file <?php phpinfo(); ?> which tells me ...
gerdtf's user avatar
  • 111

1
3 4
5
6 7
158