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
1 answer
63 views

Frequent server downtime and suspicious server hits to access random Pdf files

Our Server hosting PHP web application is facing frequent downtime Server Information [Nginx, FreeBSD] Web application [PHP 5.6, MYsql 5.7] I have gone through the Nginx logs and below are my findings ...
Ekky's user avatar
  • 101
0 votes
0 answers
10 views

php sqlsrv error TCP Provider: Error code 0x271D

when i run php script from browser sqlsrv mssql connection working. but when i execute php script via ssh command "/opt/alt/php-fpm70/usr/bin/php path/to/script.php" sqlsrv_connect give this ...
Gökhan G.'s user avatar
0 votes
0 answers
16 views

Error 500: Internal server error deploying Symfony 6 application on shared hosting (Apache)

I have successfully deployed my application to a remote host using Deployer. I'm on shared hosting and I don't have access to the Apache configuration. The application is deployed in a directory ...
A. Cedano's user avatar
  • 101
0 votes
1 answer
29 views

Code Changes for Apache Server Upgrade [closed]

The security team found a loophole in Apache version 2.4.23 so we need to upgrade Apache to version at least 2.4.56 or later. However, the developers told me it required a lot of code changes (around ...
IT_Guy's user avatar
  • 1
0 votes
0 answers
40 views

PHP-FPM unable to find or access status shared memory

I am running a busy magento 2 load balanced web server with 3 back-end PHP-FPM servers and a shared EFS network filesystem on AWS cloud. There are lots of concurrent users and everything works fine ...
Bursuc Sergiu's user avatar
0 votes
0 answers
12 views

AWS WAF create custom rules

Attackers are repeatedly using the same off-the-shelf exploit to attack my server. It doesn't work because my server is patched and I have some server side modules to prevent the exploit. However I ...
Huw Evans's user avatar
  • 101
1 vote
1 answer
34 views

Two PHP sites under Docker + nginx cant communicate with each other

I am using Docker + NGINX to host two PHP sites. The sites are accessible from the outside but the problem arises when I try to access one site from another using cURL or file_get_contents. The ...
Rahat's user avatar
  • 11
0 votes
1 answer
14 views

NGINX proxy fails to disconnect sessions on target Apache server

I have a PHP script running on an Apache server which is responsible for disconnecting all user sessions. For that, it makes a loop that identifies itself as the session that should be disconnected ...
Tom's user avatar
  • 269
0 votes
1 answer
31 views

Cannot execute PHP binary as non-root user in Plesk server (Linux)

I am running Plesk 18.0.44 on my Debian 9.13 server. It has multiple subscriptions and hence different users for these vhosts. I was always able to run /opt/plesk/php/7.4/bin/php -v as a vhost user (...
Johnny's user avatar
  • 101
0 votes
0 answers
16 views

I want to add a custom 404 to all my URLs following a relevant pattern using .htaccess file

Hello, Google is currently indexing query string URLs of my website. Google has currently indexed almost 112k URLs that all of are duplicate versions of other URLs causing my website to slow down and ...
mehtab fatima's user avatar
0 votes
0 answers
55 views

NGINX + PHP + ASDF: asdf plugin is using PHP 5.6 instead of 7.4

Goal: I need to load a PHP website (7.4) running NGINX using ASDF plugin. (Mac OS, M2 processor, NGINX and ASDF installed) issue: when I load the website via nginx I get this: Fatal error: Composer ...
w3jimmy's user avatar
  • 143
0 votes
1 answer
55 views

which memory limit applies when php performs a MySQL query

If I run php as FPM, I can set my memory limit in php.ini or .user.ini. PHP can perform a MySQL query, and I can set memory limits in /etc/my.cnf for for instance the innodb buffer pool. If PHP runs ...
Guido Goluke's user avatar
0 votes
0 answers
12 views

Moved app to Default Application Pool with ApplicationPoolIdentity and there are permission errors

Running a PHP 8.2 app. I changed the app to use the Default Application Pool under the user ApplicationPoolIdentity instead of the previous Custom pool and custom account, but now I get: The stream ...
B.D Liroy's user avatar
  • 103
0 votes
1 answer
29 views

How is php-fpm socket folder ({/var,}/run/php-fpm) created on Linux?

I am setting up multiple php versions on CentOS7 (native and from remi repos). As installed, the native php-fpm ( is setup on a unix socket, while the (remi) php74-php-fpm would listen on a TCP socket....
Alien Life Form's user avatar
0 votes
0 answers
22 views

Secure location of PHP files used in LAMP stack

I'm setting up a LAMP stack on Ubuntu 20.04, and had this recent discussion with a colleague about the fact that it's better to not keep the PHP scripts of all of your stack (classes, API Controllers ...
DevelJoe's user avatar
  • 155
0 votes
1 answer
58 views

Why does curl inside Docker to a subdomain in the same Host use private IP address?

Consider I have docker-subdomain.mydomain.com pointing to a website in a Docker container, and host-subdomain.mydomain.com pointing to a website in the Host itself. Both these websites are in the same ...
Nuno's user avatar
  • 533
0 votes
0 answers
58 views

How was apache2 able to use 8+GB ram "in idle"? (oom-killer)

I bought a vps in Contabo, using ubuntu22, installed apache2, php, mariadb.Sometimes the apache2 uses all of my memory. Literally all. At idle, not really anything was running. A php process was ...
szlev's user avatar
  • 1
0 votes
1 answer
51 views

Do not log access to some php scripts

I would like to exclude from access.log access to some php scripts. To do this, I did the following: location ~ ^/lib/exe/(jquery|taskrunner|css|js)\.php$ { access_log off; #...
Evgeny's user avatar
  • 1
1 vote
1 answer
42 views

Find what paths are required for open_basedir?

We have a server (running PHP-FPM 7.4 on Apache) that hosts various scripts, frameworks and applications like DokuWiki. It's grown to a pretty complex beast. We would like to apply an open_basedir ...
xebeche's user avatar
  • 361
1 vote
1 answer
33 views

What determines the name of Apache PHP Handlers?

When configuring an Apache server to use a Handler to run PHP code, I'm familiar with adding a line similar to below in httpd.conf or .htaccess: AddHandler application/x-httpd-php81 .php This tells ...
frumious's user avatar
  • 123
0 votes
0 answers
13 views

Isolating a WordPress wesbite within a sub-directory of another

Is it possible to isolate a website within a sub-directory of another on a WHM server? And by isolate, I mean in the event that website within the sub-directory is compromised any malware is contained ...
Levi Cole's user avatar
  • 101
0 votes
0 answers
20 views

Stripe Custom PHP & JavaScript Stripe Integrations: form refuses to load

I'm attempting to create a webpage for my startup, which is subscription-based. We have Stripe in live mode, and are essentially storing cards for future use, allowing us to have different payment ...
JimmyP624's user avatar
0 votes
0 answers
31 views

nginx as reverse proxy for different PHP backends

I maintain two Debian Linux servers, A and B. A is rather old and runs a old PHP installation (5.4), while B runs a newer (7.2). Both run Apache as a web server. Server A uses PHP as a module, while ...
Vasilis Lourdas's user avatar
1 vote
0 answers
71 views

MAMP Websites taking more than 20-25 secs to load, but sometimes

I'm using MAMP Pro on my Mac (Monterrey) and since a couple weeks I've been having a strange problem. After several tests I've been unable to find out where the problem is, but this is what happens. ...
Arturo's user avatar
  • 11
0 votes
0 answers
13 views

php.ini file setting being ignored - tring to change upload_max_filesize

Running php8.2 with fpm - I have rebooted server, I have restarted both php8.2-fpm and apache2. I am 100% certain I've changed the correct php.ini file - infact I have changed all 3, apache2, cli and ...
Michael T's user avatar
  • 121
0 votes
2 answers
69 views

CPU Usage 98% /usr/sbin/mysqld and server down

How to solve this issue. php codeigniter framwork Everyday our server goes down because of these issue. CPU usage 98 % Ram used 21 083 MB /usr/sbin/mysqld
majid lateef's user avatar
0 votes
0 answers
16 views

PHP 7.4 FPM under Nginx serves wrong class from cache

We have a Linux environment serving a few different applications, all written in PHP 7.4. They are served out of a single Nginx web server using virtual hosts, and are all using FPM. In our code we ...
Henrik Schultz's user avatar
0 votes
0 answers
15 views

Getting error while sending mail from postfix admin

I am getting below error while sending mail from postfix admin. [error] 8842#8842: *183397 FastCGI sent in stderr: "PHP message: fsockopen failed - errno: 111 - errstr: Connection refused" ...
dhanu gulati's user avatar
0 votes
0 answers
40 views

Nginx 502 Bad Gateway CentOS7, PHP 7.3.33 FPM

I am new on CentOS 7. Trying to install Postfix on centOS7 with Nginx. I am following a tutorial, but I get an error message. I have a 502 Bad Gateway on my server, http://domainname.com , how do I ...
dhanu gulati's user avatar
0 votes
0 answers
12 views

Integrated Windows Authentication with Apache on Windows [duplicate]

I'm using XAMPP and I want to use my app on my intranet, because of this I don't want to create another login page and I want to use the authentication from windows and to work with the username ...
Mega's user avatar
  • 1
0 votes
0 answers
25 views

How to configure Lychee server? apache error 500

os AlmaLinux 9.1 Apache/2.4.53 PHP 8.2.4 try to install Lychee with postgreesql my httpd.conf ServerRoot "/etc/httpd" Listen 0.0.0.0:80 Include conf.modules.d/*.conf User apache Group ...
Andrey Starkov's user avatar
0 votes
0 answers
50 views

I'm dockerizing my website setup. What is the best approach to send mails by PHP-FPM in a container?

So i've seen a couple of questions about setting up notifications for PHP-based websites, so i'd like to ask you for the best approach. For that, I have: a WordPress website with custom PHP packages ...
Radosław Serba's user avatar
1 vote
1 answer
173 views

Simple PHP calling Python script - Call not working

I've got a simple localhost website with a php page that has some buttons on it that call python scripts. I can run it locally and the output works so standalone the scrip is fine. The issue is with ...
eezetee's user avatar
  • 11
0 votes
1 answer
120 views

Diagnosing mySQL Random CPU Spikes

Our organization has a fairly advanced (as in many moving pieces) web application that's been working great up until recently, yet no noticeable changes have been made. There is the Apache Web Server, ...
Johnathan Martin's user avatar
1 vote
1 answer
64 views

PHP-FPM static max_children amount doesn't seem to matter much during stress tests

I've been stress testing PHP-FPM set up as static using wrk, with NGINX running on Ubuntu Server 22.04 for the past few days, writing down results for every scenario. When I look at them, it seems to ...
Medito Di Terra's user avatar
-1 votes
1 answer
23 views

Trouble Formatting Nginx Server Block

So I'm trying to set it up where my subdomain: "forum.project-freedom.net" visits the directory of /var/www/forum/ on my server. I'd like the main URL, "project-freedom.net" to be ...
Michael Griffith's user avatar
0 votes
0 answers
70 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 ...
eezetee's user avatar
  • 11
0 votes
1 answer
85 views

Nginx header HTTPOnly closing user sessions

I'm using an Nginx server to host an PHP web application, and tried to upgrade its security by using some security headers, I've tested it on a staging environment and it works fine, so I've decided ...
Murilo Melo's user avatar
1 vote
0 answers
30 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=...
Bvc...'s user avatar
  • 111
0 votes
1 answer
65 views

Trying to install Horde with php8.0/php7.4

AlmaLinux 9, LAMP up-to-date. Acouple of weeks ago I tried to install Horde webmail but I gave up after “install failed”. That time I followed pre requisites ++. Now I am trying it again. I created a ...
Daniel Franco's user avatar
0 votes
0 answers
18 views

GCP Cloud Build installation of composer fails because checksums don't match

The build of my Laravel 9 app is broken. During the deploy the build stage always fails because the installation of composer fails due to unmathing checksums. Build logs: === PHP - Composer - Install (...
Antonin Welvart's user avatar
0 votes
1 answer
42 views

WordPress > bbPress > Search > PHP Fatal error: Allowed memory size exhausted

CentOS Linux 7.9.2009 (Core) Plesk Obsidian 18.0.51 PHP 8.1.17 (up-to-date) WordPress 6.2 (up-to-date) X Theme 10.1.10 (up-to-date) php.ini memory_limit 512M (confirmed by checking the phpinfo() page) ...
stevland's user avatar
  • 155
0 votes
0 answers
213 views

Apache/httpd not loading php-zts.so after PHP upgrade to 8

After an upgrade to PHP 8, I can only use non-threaded PHP instead of threaded (ZTS) PHP. The server is CentOS 7, running Apache. The Server API is Apache 2.0 Handler. I used Remi's RMP Repository ...
SMich's user avatar
  • 1
0 votes
2 answers
179 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
42 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
83 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
9 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
78 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 ...
Stackerito's user avatar
0 votes
0 answers
58 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
34 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

1
2 3 4 5
158