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
2 answers
2k views

error installing php dependencies on ubuntu

I have a vps with linux ubuntu 20.04 LTS installed, I also installed the lamp stack to upload my web projects, php with version 7.4, now I need to install some more php libraries for example: php-gd ...
FeRcHo's user avatar
  • 103
0 votes
0 answers
190 views

Php and shell_exec are a good way to process many detached process on a CentOs server?

During execution of a php webservice, i need to detach a "time consuming function" to maintain a quick response to the user. That's an example of the flow : I know that php does not manage ...
user31929's user avatar
  • 101
0 votes
0 answers
276 views

Ubuntu: How to lock php to certain version?

A client running Ubuntu 18.04 wants to update php from 7.2.24-0ubuntu0.18.04.17 (cli) to the latest 7.4 version, and lock it there (the software he uses does not work with php8). I have seen other ...
timppu's user avatar
  • 21
0 votes
0 answers
37 views

What is overriding shared objects' dynamic library search paths?

Building PHP from source on macOS (Ventura) I've installed ICU in a non-standard location and built the intl extension as a shared library. I can run this by setting my non-standard location with an ...
Tim's user avatar
  • 584
0 votes
0 answers
131 views

PHP configuration file path has no value on IIS

When I output phpinfo() it shows that PHP configuration file path has no value. It does however have a loaded configuration file path, but whenever I edit the file there nothing gets updated, so maybe ...
pileup's user avatar
  • 229
0 votes
0 answers
145 views

Azure PHP8 exposing php code

My website runs fine BUT when i add ".PHP" in uppercase to my URL e.g. www.example.com/test.PHP my php code is exposed on the website source code. I'm running PHP8 on azure. My NGIX config ...
Max Thorley's user avatar
0 votes
0 answers
57 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
2 votes
1 answer
13k 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
  • 587
0 votes
0 answers
622 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
61 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
2k 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
207 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
2 votes
1 answer
838 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
255 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
308 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
2k 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
37 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
152 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
31 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
206 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
72 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
755 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
789 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
136 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
143 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
280 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,127
-2 votes
1 answer
557 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
384 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
87 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
196 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
269 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
254 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 ...
Hunktydunkaty's user avatar
0 votes
1 answer
32 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
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&...
adrianTNT's user avatar
  • 1,127
1 vote
1 answer
3k 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
  • 385
1 vote
1 answer
520 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
95 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
1 answer
104 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
151 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
835 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: $...
pileup's user avatar
  • 229
0 votes
1 answer
96 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 ...
utsav's user avatar
  • 117
0 votes
1 answer
236 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
2 votes
1 answer
335 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
4k 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
38 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 ...
pileup's user avatar
  • 229
1 vote
1 answer
57 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 ...
pileup's user avatar
  • 229
1 vote
2 answers
5k 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
  • 11
0 votes
2 answers
249 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
397 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
577 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