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

php files serving blank pages except for the login page on nginx

I have a project that has the root directory ed_v001 and all the includes and settings are in a directory ed_v001/includes. When i open it in a browser it displays the login page properly but when you ...
Kudzai Chikomwe's user avatar
0 votes
1 answer
4k views

SSL error "unexpected eof while reading" on same server as the originating request

First, I'm aware of the SSL Library Error: error:0A000126:SSL routines::unexpected eof while reading error stemming from OpenSSL 3 reintroducing a feature to prevent truncation attacks. The question I ...
oucil's user avatar
  • 537
0 votes
0 answers
248 views

Can't enable the PHP DOM extension

I have a server that has PHP 7.4.3 installed, but it doesn't load PHP-DOM. It's not listed in php -m or php -i, nor when I load PHP on a page. Here's what I tried so far: Ran sudo apt-get install php-...
lastnoob's user avatar
  • 101
0 votes
0 answers
47 views

Laravel in php-fpm is not connection to new mysql pods in service of k8s in digitalocean

I have a k8s cluster running in digitalocean. Within this cluster we have several pods running php-fpm (7.4) with a laravel application (v8.18) connected to a number of mysql database replica's. When ...
Bram's user avatar
  • 101
0 votes
1 answer
932 views

How to upgrade to php 8.1 on RHEL 8.7?

How to upgrade to php8.1 in RHEL 8.7, I went through various guides and ended up installing php:remi-8.1 which is desirable however, php-gd is not willing to be installed cause of missing libraries. ...
Alimba's user avatar
  • 101
1 vote
0 answers
108 views

Curl 'Expect: 100-continue' and empty response on some clients

I have a php script which is communicating with an external API via curl requests. Suddenly last week some requests got an empty response from the server, instead of the requested data (although the ...
TmCrafz's user avatar
  • 139
1 vote
0 answers
405 views

Apache2 server is down - AH00170

I have been having problems for several weeks on my Apache2 server with Ubuntu 22.04.1 + PHP 7.4 For no apparent reason, the server goes down on its own and the web is still under construction so it ...
Cristian Rodríguez's user avatar
0 votes
0 answers
105 views

AmazonLinux 2022 Fails to Run PHP Scripts - Error AH02454

I am attempting to run basic PHP scripts on an Amazon Linux 2022 or Amazon Linux 2023 server instance. I followed the directions here and when I request index.html it serves a static page fine. ...
Steve's user avatar
  • 125
0 votes
0 answers
149 views

Cannot start the php-fpm service in Alma 9

I've compiled php 8.2.3 on Alma Linux 9 but fails php-fpm fails to start. I was previously using Centos 7 with a slightly older php version and didn't have any issues. The php-fpm conf file is also ...
Asa Carter's user avatar
1 vote
1 answer
617 views

Nginx returning 404 on new installation

On Linux Mint 20.3 I had working setup for my local development of website: server { listen 80; listen [::]:80; server_name cbp.local; root /home/gacek/html/cbp/public; index ...
Gacek's user avatar
  • 85
-2 votes
1 answer
30 views

Server with scalability for real-time collaboration and editing [closed]

I am here, to ask for absolute input. I have setup a local Apache Server with PHP 7.2 (currently), I am aware newer PHP exists. I know PHP and Python, I also know Node.js (server/back-end). With Node....
Alix Blaine's user avatar
0 votes
0 answers
82 views

How to fix speed optimization of Laravel website?

I have developed a website in PHP Laravel. It is working fine but there is some core web vitals issues. I have tried to fix it but it has not done all. LCP, FCP INP (interaction to next paint) and ...
victoriaviolet's user avatar
0 votes
0 answers
25 views

Apache RewriteRule losing one slash of the https://

On my apache server, I need to pass full URLs as parameters to a php function. However, when I use something like: RewriteRule ^(.*)$ ../image.php?url=$1 $1 ends up losing one of the slashes of the ...
user59067's user avatar
  • 205
0 votes
0 answers
135 views

Poor server performance on Linux Ubuntu 20.04 with PHP-FPM, MySQL, and Redis Server installed

My client’s server has recently started having performance issues. The single website hosted on the server loads very slowly. It is built with WordPress using a custom theme. There are a minimum ...
Mike Hermary's user avatar
0 votes
0 answers
50 views

Configure xenforo 1.2.9 Using phpmyadmin 4.x with php 5.6.4 on IIS 10, Windows Server 2019

Versions/Programs: xenforo 1.2.9, phpmyadmin 4.x, php 5.6.4, MySQL 8.0.32 IIS 10, Windows Server 2019 I am trying to host a local server for tinkering on an old computer I have. This server will be ...
Fictor's user avatar
  • 1
1 vote
3 answers
446 views

Why doesn't the timezonedb extension have the latest data?

I've created a Dockerfile, and I use the wordpress:php7.4-apache. I've tried to install the timezonedb extension using 3 different methods separately. Method 1. RUN docker-php-source extract \ &...
Budianto IP's user avatar
0 votes
1 answer
273 views

Is it possible to retrieve session values within the nginx config file?

just a quick question. I have a php webapp that sets a session cookie with values for username, isAdmin, etc. Is there any way that I could extract that information in the nginx config file? ...
Filisimus's user avatar
0 votes
1 answer
91 views

phpinfo not showing mysql, pages that require mysql connection is giving HTTP 500

I am running php 5.4.16 on a rhel 7.9 webserver (httpd 2.4.6). When doing phpinfo(), there is no mysql section. Php pages that require a connection to the mysql database are giving error 500. Example ...
demiglace's user avatar
  • 101
1 vote
0 answers
114 views

Nginx - Server dead when received many requests

we have a large Woocommerce website hosted on Google VM servers (E2 4vCPU + 32 GB RAM + 100 GB SSD Storage), recently we created a mobile application using flutter and WordPress -Woocommerce- API, but ...
mohammad's user avatar
0 votes
1 answer
151 views

PHP exec(iptables --help) works but exec(iptables --command) doesn't work

In PHP 7.3.33 and Apache 2.4 I want to run iptables from PHP (web server enviroment) in order to block/unblock IPs, from command line, this works fine: /usr/sbin/iptables --insert INPUT --source ...
adrianTNT's user avatar
  • 1,077
-2 votes
1 answer
275 views

libphp.so is missing in the oracle linux 9, is there any alternative to let httpd handle php page? [duplicate]

I do find a lot similar problems on CentOS in this forum, and I tried to follow any suggestions mentioned in their answer, however, none solves my problem. Therefore I’m opening this question for ...
jimmymcheung's user avatar
0 votes
0 answers
227 views

'combination of host and port requires TLS' when running Tomcat application

0 I had an Apache configured to run on HTTPS. Also a Tomcat application running without the 8080 port and in HTTPS. Everything perfect since I had to install Drupal 10 (using composer) that needed a ...
user1249791's user avatar
0 votes
0 answers
63 views

Calling API from Https website to AWS

I have a website with https consider https://example.com which wants to call an API from an AWS EC2 instance consider http://ec2.##.##.##/get-users. I am getting Connection Refused when I do so but in ...
Rajat Patil's user avatar
0 votes
0 answers
113 views

in_array and isset are not working as expected

i tried to make an api like https://blackbox.ipinfo.app/lookup/127.0.0.1 but it always outputs N when i access httpexampledomain.com/?ip=127.0.0.1 even though if i access httpexampledomain.com/?ip=...
Dims's user avatar
  • 1
0 votes
0 answers
110 views

Tunneling between VPN server and shared web host

Is there any way to connect to VPN/proxy server by web shared host ip ? Clients >>> shared host >>> x-ray trojan proxy configed on VPS server _ Shared host support's : Apache PHP And....
Sm Dn's user avatar
  • 1
0 votes
0 answers
154 views

WampServer and error 404

Having just installed Wampserver on my system in order to test a PHP form I have created via Dreamweaver, I'm continually getting the Error 404 message on my screen despite following the installation ...
SimplyTheMighty's user avatar
0 votes
1 answer
23 views

Using old web application with outdated PHP version behind .htaccess folder protection

I probably need a web server with an outdated PHP Version (7.2.34) for an older HTML/PHP/MySQL based web application. Since it's for a manageable closed user group, I exceptionally considered using a ...
eggbert1305's user avatar
0 votes
0 answers
32 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&...
adrianTNT's user avatar
  • 1,077
1 vote
1 answer
1k views

How do I install php-memcached for php 8.x on Amazon Linux 2 aarch64?

I'm migrating our website from an older Centos server to a new EC2 instance (Amazon Linux 2, aarch64). I'd like to install both the LAMP stack and memcached on the EC2 instance stack; which is the ...
Arth's user avatar
  • 365
1 vote
1 answer
303 views

How to override Nginx response headers in PHP

I want to apply a default CSP header in nginx - basically a catch all. However, I also want to be able to override the CSP header via PHP in certain scripts. So far I've been unable to find a way to ...
Praemon's user avatar
  • 123
0 votes
0 answers
55 views

PHP - Session Upload Progress produces 503 error

I've just migrated from APC to using Session Upload Progress (https://www.php.net/manual/en/session.upload-progress.php). All was going swimmingly until some forms were mysteriously throwing up Access-...
Kline's user avatar
  • 247
0 votes
0 answers
59 views

Podman rootless mode to install multiple php_cli versions on a server

I have a Debian server with multiple users. I would like to enable them to use multiple versions of PHP-CLI. I know I could use ondrej PPA, but I am not very comfortable adding unofficial apt sources. ...
nulll's user avatar
  • 505
0 votes
0 answers
81 views

PHP to use specific SQLite version

Default PHP 8.2.1 on Centos includes SQLite 3.7.17. I am able to upgrade it to the latest SQLite with the aid of this article. The problem is now this is a production server I wouldn't want to change ...
Michael Chourdakis's user avatar
4 votes
1 answer
466 views

How to make get_current_user() return the same user as $_SERVER['AUTH_USER']?

I have a PHP app that uses LDAP for logging in. The app is served on Windows Server with IIS. In the past, I was using $_SERVER['AUTH_USER'] to get the remote Windows user that was using the app: $...
Stackerito's user avatar
0 votes
1 answer
73 views

cgi/fastcgi 0% CPU and N% Memory?

I have php wordpress website hosted on IIS, have been using FastCGI, below is my fastCGI configuration Below is screenshot of task manager There are many fastCGI processes that are using 0% CPU but ...
user3782114's user avatar
0 votes
1 answer
106 views

Sudden spike in PHP-FPM process CPU usage. How to track down?

I have a magento2 store(with 10609 products) running on an ec2 instance(ubuntu 20.04, 16core and 32GB ram). It is a shared server with staging and live on the same instance. A few days ago, I got an ...
Kingdom venus's user avatar
1 vote
1 answer
94 views

Upgrade PHP and keep extensions and config changes

I would like to install PHP 8.2 but keep all the packages and config changes from 8.1 In a perfect world I would run one script an this would work again for 8.3 next year. Steps: Get all packages/...
PiTheNumber's user avatar
12 votes
4 answers
3k views

Is this a good practice to upload files to a folder outside the public www folder?

I have a web site where users can upload files. I do not want those files to be accessible by anyone. I have seen that some people create a folder (say my_secret_folder) at the same level of the www ...
2WFR's user avatar
  • 135
0 votes
0 answers
22 views

Many enabled FastCGI modules for the same site in Handler Mappings - which one is in use?

I went to check for some issue in the test server which was configured in the past. I noticed that for that specific site in Handler Mappings, there are a lot of PHP FastCgiModules enabled. So there ...
Stackerito's user avatar
1 vote
1 answer
36 views

Error 20080078:BIO routines:bio_write_intern: uninitialized

My php test script for SSL connection to the LDAP server crashes. When I run it from command line CLI crashes. The message from the LDAP logging shows this before the crash: Error 20080078:BIO ...
Stackerito's user avatar
1 vote
2 answers
2k views

Configuring PHP-FPM in Apache

I installed Apache/2.4.54, PHP72-FPM, PHP74-FPM and some other versions of PHP-FPM on Arch Linux. Apparently there is some misconfiguration in httpd.conf, PHP can`t interpret anything and browser ...
Phree's user avatar
  • 13
0 votes
2 answers
161 views

NGINX config for the subdirectory app using Slim Framework

Need help editing the config below. I have main site in / and another app (api) in the folder /api. I'm using Slim Framework, so it has accesible index.php file in /api/public. Now, I'm trying to be ...
tonyAndr's user avatar
0 votes
2 answers
293 views

Stuck on php8.1 when downgrading to php7.4

I upgraded the php version on my Apache server running on Debian (buster) from 7.3 to 8.1. Due to an older Nextcloud installation I had to downgrade to php7.4. The downgrade worked well following ...
droid001's user avatar
0 votes
0 answers
394 views

Oracle Instant Client setup specific version in Dockerfile

Currently I'm having an issue where with php-oci8. when enabling the module it shows and error saying Problem: module php-oci8:21c:8060020221011134100:34611983.x86_64 requires module(php:8.0), but ...
Vincent Dapiton's user avatar
0 votes
1 answer
3k views

How to install PHP Sodium on Ubuntu 22.04

I'm running a Google Cloud server running Ubuntu 22.04. It's a typical LAMP stack (PHP is version 8.1.2). Some of the websites on the server are using Laravel 8. I recently upgraded one of the ...
Adam's user avatar
  • 3
0 votes
1 answer
98 views

Apache not serving local hosts

I have set up an Apache Server on an a VMWare hosted Linux Mint 21 Server, I have followed the instructions at this blog to run multiple PHP versions (7.4 and 8.1). Apache is running fine and serving ...
deep64blue's user avatar
0 votes
0 answers
28 views

Two application installations from APS catalog fails on Plesk for Windows Server: The 'mysql' extension was not found

Please excuse, if this is the wrong place to post this question, I didn't know better. I'm using Windows Server 2022 and Plesk Obsidian Version 18.0.48. I try to install two applications via Plesk ...
Albrecht's user avatar
0 votes
3 answers
341 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 ...
QF0's user avatar
  • 81
0 votes
1 answer
302 views

Unable to connect to server following phpMyAdmin upgrade from 5.1 to 5.2

Not sure to post on the right StackExchange forum. If not, let me know! Working environment: OpenSUSE Leap 15.4 MariaDB : mariadb Ver 15.1 Distrib 10.7.7-MariaDB PHP 8.0.25 (cli) (built: Oct 31 2022 ...
wiltomap's user avatar
0 votes
1 answer
664 views

PHP8.1 FPM Crashes everyday after 12AM

From the last two to three days I noticed that my PHP8.1-FPM process crashes after around 12:00 AM-12:30 AM at night. My server has highest traffic in morning and lowest in night. But FPM process runs ...
Future King's user avatar