Questions tagged as ['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.
Score: 0
novapack avatar
How to I setup default php-fpm service if I have two versions of php
sd flag

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.sock php8.1-fpm.sock php-fpm.sock

I expected that running systemctl status php-fpm without the PHP version number would be running the default version PHP. but the service is not even there. I get this message Unit php-fpm. ...

Score: 0
Cannot connect to FileMaker Server through Wireguard VPN tunnel
de flag

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. I can also SSH into the FMS box from the VPS so the logical conclusion is the VPN tunnel is working.

However the front end website (php api based) on the VPS cannot connect to the LAN based FMS datab ...

Score: 0
snuffleupagus yelling about disabled functions in phpmyadmin setup
in flag

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 everything phpMyAdmin was complaining about, compared to the recommended default.

I am not entirely sure why phpMyAdmin complains about these defaults but I have also tried a brief installation of matomo and ...

Score: 0
Reason for servers slow response time?
us flag

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 etc.. This is a stable production environment doing 10Ks/hits per min normally and works flawlessly. We recently had peaks of X3 normal traffic and the servers started to have slow response time.

New  ...

Score: 0
Isac Freire Bezerra avatar
403 Forbidden - Nginx
br flag

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 I access a specific file in the URL, Nginx manages to run the code in PHP. Is there any way I can resolve this? When nginx.conf was in the previous configuration, this was not the case. This is the current  ...

Score: 0
Redis & HAProxy issue
in flag

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 to refresh the same page 10~30 times to see that issue. If we restart Haproxy, it seems to be working again. But, we don't want our client to experience the same issue every couple weeks.

We basical ...

Score: 0
Programming Farmer avatar
Apache2 on Ubuntu EC2 goes down and does not restart
cn flag


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, migration was done since Bluehost itself had outages and we wanted more reliable hosting.


Since the migration the Page is randomly going down completely. Trying to restart apache2 with:

sudo servi ...
Score: 0
bilogic avatar
Why does `apt-get -y install php8.0-dev` installs PHP 8.1
cn flag

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 which replaced my PHP 8.0

I find this behavior puzzling, any idea why php8.0-dev relies on php8.1-phpdbg?? Thank you!

PHP 8.1.6 (cli) (built: May 17 2022 16:46:54) (NTS)
Copyright (c) The PHP Group
Zend E ...
Score: 1
How can I use Ubuntu 22.04 with OpenSSL 3 and PHP sites? Getting errors due to a conflict
us flag

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:0A000126:SSL routines::unexpected eof while reading

Searching for answers just tells me there's a bug with PHP 8.1 and OpenSSL3 on a Laravel app. So, how is anybody hosing PHP apps on Ubuntu 22.04?

Score: 0
Easy Tech  avatar
Server error happens in web browsers content not load after refresh
gp flag

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 am a web developer i have to do work on the websites so it is very disturbing i usually think it is a fault of my code. but many times i encounter the mistakes done by the server issue itself...

Score: 0
mohammd salehi avatar
High load and file descriptors but idle cup usage
de flag

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 server at around 50 (the server has 8 cores!), but CPU usage has not changed. I troubleshoot and change the NFS mount to the correct one ( in screenshots when load stays at 50 and file descriptor goes down). B ...

Score: 0
How to force SSL on Nginx & Varnish
cn flag

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 {
    listen  443 ssl http2 default_server;
    listen  [::]:443 ssl http2;
    port_in_redirect off;

    ssl on;
    ssl_certificate /etc/nginx/ssl/afrim_com_crt. ...
Score: 0
Yeak avatar
Handler for application/x-httpd-ea-php73 returned invalid result code 70007
in flag

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 result code 70007 

I noticed that this happens when API calls are being made to me and also when i am trying to do a CURL call and even when trying to do a SOAP call. Hostgator cant seem to figure it out fas ...

Score: 0
Orsu avatar
OmekaS (php cms) can't copy to a folder, but empty files are created
ph flag

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 regenerated wouldn’t work.

In my error logs, i would get

 Thumbnails creation failed for media 2086: Failed to copy /var/www/Limunata_litteraria/files/original/93128024e4e53cfa9b7d4d0d12c69290410ba4c4 to / ...
Score: 0
InterLinked avatar
Force non-empty MAIL FROM for outgoing email
br flag

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 but email to "normal" individual email addresses goes through just fine.

I've been informed this is due to an empty MAIL FROM, since that typically indicates a bounce or a spammer, which mailing lists ...

Score: 0
Leo avatar
Random unexpected connection errors while fetching data
pw flag

I am having a really weird problem with my VPS (Centos 7) for the last 2 days. I have an application where I fetch data from dozens of 3rd party websites. For the past 2 years everything was working fine - until 2 days ago. I noticed that suddenly (some) outbound connections started failing. I started receiving "Connection timed out" or "HTTP connection failed" type of errors. This is a server-wide issu ...

Score: 0
php files downloading instead of executing nginx
cn flag

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 and dbuser. This is so we gain experience in linux.

I need to install wordpress on the webserver, however php files are not executing on the website. html files do work.

I've googled all day, asked my teache ...

Score: 0
user2839913 avatar
NGINX Web server shows index.php but no other subcontents like admin panel
in flag

My website loads fine its index.php website

I enter user name and password, and gets redirected to url:

Nginx will fail showing this: 404 Not Found nginx/1.18.0 (Ubuntu)

This is my nginx server block configuration for this website:

server {
    listen 877;
    listen [::]:877;
    root /wbs/carpool/www;
    index index.php index.html ind ...
Score: 0
Ben avatar
Add to mysql db instead of restore
ru flag

*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 is removed/overwritten.

This will occur once per day, when the rpi is on the same wifi network

ORIGINAL I have an automatic backup of a database (server1), which is then sent to another server(sever2). My requir ...

Score: 0
Jordan Williamson avatar
I've set sendmail_path in PHP.ini, and it works fine on the command line, but not when the same script is called from an Apache server?
cn flag

So I'm trying to do a simple test of some email functions in a PHP (Magento) application, but I'm running into an issue. All I want to do is to store the output from calls to the built-in mail() function into a local file instead of sending it through an SMTP server. I do know how and have setup SMTP access for this application in the past, but it takes some time and I figured it couldn't be that har ...

Score: 0
Mail is not sent via php mail() on CentOS7 DirecAdmin Exim php fcgi
cl flag

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.


  • CentOS7
  • DirecAdmin with CustomBuild 2.0.0
  • Exim 4
  • php fcgi (5.6 ... 7.4)

It is noteworthy that through the console mail is sent normaly, like:

echo "Subject: test" | / usr / sbin / sendmail -v
Score: 0
Adam avatar
PHP File Permissions and Running HTML Files as PHP
kw flag

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 Codeanywhere.

When I upload a PHP file using SFPT with Filezilla the permissions are 664. When I create a PHP file with Codeanywhere the permissions are 644. Notice they are slightly different! Both files w ...

Score: 0
samtech avatar
Security Headers X-XSS-Protection issue
us flag

Is there any issues coming from adding 'Strict-Transport-Security' and 'X-XSS-Protection' headers ?

Header set Strict-Transport-Security "max-age=10886400;
Header set X-XSS-Protection "1; mode=block"

I didn't put 'include Subdomains' for the HSTS header because I wasn't sure if we always want those over HTTPS. Specifically I could see this causing issues with HubSpot and/or CDN pages (slowing down ...

Score: 0
Santosh Baruah avatar
Group Creation Function
co flag

I have Created a Linux function that will create developers, my requirement is to take the developer's first name and create a linux user and development environment. It should run something like the below commands:

adduser $1
usermod -a -G devs $1
mkdir /home/$1/.ssh
chmod 700 /home/$1/.ssh
touch /home/$1/.ssh/authorized_keys
chmod 600 /home/$1/.ssh/authorized_keys
mkdir /var/www/html/$1-dev.mysi ...
Score: 0
Robert Grubba avatar
Debian: how to put two versions of libcurl on one system?
jp flag

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 libcurl v4

Firstly I've installed php5.6-curl, and when I tried to install php8.1-curl - apt throws notification that The following packages have unmet dependencies: php8.1-curl : Depends: libcurl4 (& ...

Score: 0
Teo76 avatar
Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource
in flag

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 is configured on an internal network with a self-signed certificate for development purposes.

I've done it with virtualmin so far, but now I want to get used to it ... I bought the configuration basics from t ...

Score: 0
samtech avatar
Access Denied with IAM Update
us flag

In my scenario I have created a new policy to grant access to a server in our instance but it doesn't appear to have taken effect. We granted read and list permissions with arn:aws:iam::657644469569:role/XyzServer but we are still getting 403s from i-0215c9ea7f43cfb58.I've added an inline policy to the "XyzServer" role to allow read and list permissions on that instance (i-0215c9ea7f43cfb58 (Xyz-configu ...

Score: 0
Marcel avatar
debian phpfmp chroot and imagemagick - NoDecodeDelegateForThisImageFormat / supported formats:0
cn flag


I've setup a chroot-jail with nginx and phpfpm 7.4 from as usual (on Debian 5.10.103-1 bullseye).

Imagemagick fails:

  <?php $im=new Imagick(__DIR__ . '/image.png');

Uncaught ImagickException: NoDecodeDelegateForThisImageFormat `PNG' @ error/constitute.c/ReadImage/575

<?php phpinfo()

"ImageMagick number of supported formats: 0"

Installed version: php7.4-imag ...

Score: 0
kryz avatar
Hosting a script from CodeCanyon on my own server. How can the original developer see my script?
es flag

I bought a PHP script on CodeCanyon from a well reviewed user and a 5-star script and installed it on my own server with the intention of modifying it for my own use (complies with the license). However I ran into an issue and contacted support. They asked for my purchase code, which is fine, they want to verify I bought the script. However they mentioned that they saw that my script has been modified a ...

Score: 0
zippy-flop avatar
php config - generate hashed password manually
ke flag

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 that plain password into a hashed password.

Is that possible and if so, how can I achieve that?

Do I have to update the MariaDB database as well when changing the php conf and using a hashed password?