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
55 views

URL Shows 404 but adding .php at the end displays

I have set up this website and it's working perfectly, however, extensions such as domain.com/dashboard will display a 404 but when I add .PHP at the back -> domain.com/dashboard.php it displays. ...
0 votes
1 answer
906 views

WordPress with Nginx + PHP-FPM sometimes slow where slowlog pointing to wp-config.php (PHP 8.1)

I have a recent WordPress 6 installation with MariaDB and PHP 8 FPM running on Docker. Sometimes, request on the frontend have a slow response time on the main HTML document. In this example, one of ...
  • 496
0 votes
0 answers
72 views

Blank page with 500.0 response for index.php when loging it

The page will work normally but as soon as you press login or sign-up, goes to a blank page and in element inspect you can see a 500 response from the server I've tried many different login/sign-up ...
0 votes
0 answers
168 views

nginx site returns 302 but works if I restart nginx & php-fpm

I have a site on a remote Ubuntu server that uses nginx and php-fpm. If I restart both with these commands; sudo service nginx stop sudo service php7.3-fpm stop sudo service php7.3-fpm start sudo ...
  • 133
0 votes
0 answers
24 views

Two same pages www.example.com and www.example.com/index.php

Can someone help me how to fix this problem, seobility shows me that i have two same pages www.example.com and www.example.com/index.php
0 votes
0 answers
43 views

Cannot start google cloud instance with GPU since 2 weeks => 'BACKEND_ERROR'

Since 2 weeks, I am experiencing many errors when I want to start my VM (with 1 GPU, NVidia P100) on GCP (eu-west1). When I start the server manualy (by clicking the start button on the interface) OR ...
0 votes
0 answers
60 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 ...
0 votes
0 answers
21 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 ...
0 votes
1 answer
523 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 ...
0 votes
1 answer
980 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-...
  • 101
0 votes
1 answer
397 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 ...
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 ...
0 votes
0 answers
78 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 ...
1 vote
0 answers
455 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 ...
0 votes
0 answers
187 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 ...
0 votes
0 answers
182 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 ...
0 votes
1 answer
93 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 ...
0 votes
1 answer
3k 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 ...
  • 1
0 votes
3 answers
1k 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?...
  • 5,651
0 votes
0 answers
92 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 ...
0 votes
1 answer
551 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 ...
0 votes
1 answer
1k 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-...
0 votes
0 answers
21 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 ...
0 votes
1 answer
45 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?
  • 11
0 votes
0 answers
202 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 ...
0 votes
0 answers
199 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'); ...
0 votes
0 answers
161 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 ...
  • 101
0 votes
1 answer
260 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 ...
0 votes
0 answers
453 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 ...
0 votes
2 answers
189 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'...
0 votes
0 answers
384 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?...
  • 351
0 votes
1 answer
220 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 ...
0 votes
1 answer
2k 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 ...
0 votes
1 answer
1k 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 ...
0 votes
0 answers
112 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 - ...
0 votes
0 answers
976 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....
  • 101
0 votes
0 answers
64 views

Cannot connect to FileMaker Server through Wireguard VPN tunnel

I have setup a Wireguard VPN tunnel between a hosted VPS (running Ubuntu 20.0.4) and a FileMaker Server box on my Home LAN. From the VPS in the ping the FMS box via the command line and a php script. ...
1 vote
0 answers
681 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 ...
  • 1,391
0 votes
0 answers
138 views

Redis & HAProxy issue

We just switched one of our PHP projects to use Redis/Haproxy as a solution for storing sessions. The issue we are facing is once in one or two months, the project will randomly lose sessions. We have ...
0 votes
0 answers
64 views

snuffleupagus yelling about disabled functions in phpmyadmin setup

What I am working on is a self setup arch with a LAMP stack, onto which I also want to add phpMyAdmin, and it is complaining about some disabled functions. Here is the file after I have commented out ...
0 votes
0 answers
483 views

403 Forbidden - Nginx

I set my nginx.conf to my /home because PHPStorm was not editing a file inside /usr/share/nginx/html. However, I have a new problem. When I access a URL via folder it returns a 403 Forbidden But when ...
user avatar
0 votes
0 answers
415 views

Apache2 on Ubuntu EC2 goes down and does not restart

History: We moved a Codeigniter 3 Installation from Bluehost to a T3.2xlarge. That single instance is hosting apache2 and a mysql server as a local database. On Bluehost, the instance was running fine,...
0 votes
2 answers
393 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 ...
  • 133
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:...
0 votes
0 answers
17 views

Server error happens in web browsers content not load after refresh

Please help me when i do refresh my web browser donot attempt to load new content and when i press ctrl + f5 it loads fresh content but after doing it 3 to 4 times. Basically it is very disturbing i ...
0 votes
0 answers
41 views

High load and file descriptors but idle cup usage

I have a problem with NFS & PHP. I changed the NFS mount on some of my servers using Ansible, but I forgot to change the NFS mount on this server. After 4-5 days, I saw the system load on this ...
0 votes
2 answers
501 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 { ...
  • 1
0 votes
0 answers
64 views

Handler for application/x-httpd-ea-php73 returned invalid result code 70007

I have a dedicated server with hostgator and they had outages a few days ago and since then iv been seeing this error show up in my logs Handler for application/x-httpd-ea-php73 returned invalid ...
  • 101
0 votes
0 answers
21 views

OmekaS (php cms) can't copy to a folder, but empty files are created

I am trying to fix a thumbnailer problem on my omekaS (a php cms, that uses laminas framework), I realized that new thumbnails weren’t being generated on my system, and that even forcing them to be ...
  • 101
0 votes
0 answers
54 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 ...