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
Jamesthe1 avatar
Why does IIS PHP not recognize PhpRedis when it exists and is added correctly?
us flag

Before you read:

I currently have ...

Score: 0
Tần Quảng avatar
How to install PHP on CentOS has preinstalled Apache HTTPD?
pk flag

I'm using CentOS 7. I wanted to install PHP 7 so I used remi-php (latest PHP version of yum is 5.4). Since the HTTPD version of yum is too old, I compiled the latest HTTPD version from the source code.

HTTPD compilation goes perfectly, however, when I try to install remi-php using the following command:

yum --enablerepo=remi-php71 install php php-cli php-intl php-mbstring php-mcrypt php-mysqlnd
Score: 0
Confused GCP user avatar
Errors blocking WP admin access and when attempting debugging in host Google Cloud Platform
cn flag

Wordpress VM instance site in Google Cloud Platform is showing an error message which links to debug information, tried the steps in SDK from a tutorial, but not working, not experienced enough to understand. The message I get is ...

-bash: syntax error near unexpected token `'WP_DEBUG','

No idea what this is. Cannot access WP admin or site at all. I received an email (with a recovery link that doesn' ...

Score: 0
Chris Ostmo avatar
Large tmp file transfer hangs in nginx php-fpm proxy
cn flag

We have a server that's running a WordPress site with a serverpilot-installed nginx stack on Ubuntu 20 LTS.

Very large uploads appear to get stuck in the handoff between the nginx proxy and PHP, and I have come to the end of what I know how to troubleshoot without just poking at it to see what happens (which is rarely a good use of time or way to move forward). So far as I can tell, I have increa ...

Score: 0
ajax1515 avatar
Mail server set up for inbound mail on a subdomain to trigger php script
cm flag

I'm trying to set my company server up to be able to receive emails to a certain account on a subdomain of our main domain i.e.:

Those incoming mailers should trigger a php script that will handle some content processing.

I'm running Ubuntu Server 20.0.4, Postfix is installed, Dovecot is installed, I also tried using courier so that's there too, but I couldn't get that ...

Score: 0
wpcpremium80 avatar
“No input file specified” - Laravel project on CentOS
pk flag

I've have VM with CentOS installed where I want to host Laravel project. I've put it on /var/www/html/project

But when I access via URL of this project like I get tree of document. When I enter public directory it shows me a message: "No input file specified.".

What I need to do to solve this problem? I've edited httpd.conf file(added V-host). Welcome page of Apache works good.

This ...

Score: 0
Mike Hermary avatar
How to correctly enable Imagick in PHP-FPM on Ubuntu 20.04 and Apache
in flag

I have PHP-FPM setup on my Ubuntu 20.04 server and have installed Imagick, but I cannot get it to be recognized by PHP 7.4. I tried following these steps, but step one returns the following error in Terminal.

-bash: /etc/php/7.4/mods-available/imagick.ini: Permission denied
  1. sudo echo > /etc/php/7.4/mods-available/imagick.ini
  2. sudo ln -s /etc/php/7.4/mods-available/imagick.i ...
Score: 1
Owen avatar
How to enable HTTPS for my marketplace
de flag

I'm building a marketplace platform that enables many merchants to sell to their customers. At the moment I serve stores on my own domain like so or (I'm able to use the subdomain to distinguish which store is to be served). However, I'd like to enable my merchants to use their own domains on my platform whilst being able to secure the site o ...

Score: 0
CoinAnalyzer avatar
Can't Get ProxyPass User IP Address
cn flag


websocket = new WebSocket("wss://");


$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
echo "Received [$input] ($size bytes) from IP $ipaddress Port $port\n";


ProxyPass /game_play/ ws://
ProxyPassReverse /game_play/ ws://


Score: 0
dcron avatar
Not able to install drivers for sql server on CENTOS
fr flag

I am new at Linux OS but successfully installed apache, PHPMyAdmin, and MariaDB.

All works fine, but I have an issue and am not able to resolve it. My issue is establishing a connection to the SQL Express server which runs on WIndows machine on the same network. My script to sql ex

I was working with Windows environment with XAMPP installed I had no issues drivers for SQL express server were working ...

Score: 0
Supras avatar
Apache2 timeout
jp flag

For several weeks now, I've been experiencing timeout problems with Apache2 making my application inacessible. It's an e-commerce website developed in PHP (stack : PHP7.2-FPM, PostgreSQL, Apache2.4.25, Debian 9). When the site does not respond, it takes a good twenty seconds before displaying the timeout on the browser side. The service status are all good: apache2, database and I have no logs that coul ...

Score: 2
amir shariflou avatar
used colons for url htaccess http://localhost/1:1
cn flag

I have a problem with the colons used in url

this my url


this my htaccess

RewriteEngine On
RewriteRule ^/(.*):(.*) index.php/$1:$2

this error show Forbidden You don't have permission to access /1:1 on this server.

# Virtual Hosts
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/" ...
Score: 1
Riwaj Chalise avatar
Not able to install PECL for php 7.3 in ubuntu 20.04 LTS
cn flag

I have a laravel project that uses firebase and I am not able to install PECL for php7.3. I tried this When I tried the following command

sudo apt-get install autoconf zlib1g-dev php-dev php-pear

it doesn't install Packages for 7.3 but for 8.0 which is not my requirement. I also tried.

sudo apt-get install autoconf zlib1g-dev php7.3-dev php7.3-pear

But it says it ...

Score: 2
Jordan Baron avatar
Too many redirected error with Nginx on PHP
in flag

I have 2 node apps running on different ports and a PHP app. When I visit the node apps I get no errors but if I try to go to the PHP app (on /sourcebans) I get This site redirected you too many times How can I fix this?

My config

server {
  return 301$request_uri;

#server {
#  server_name;
#  return 301$reques ...
Score: 2
Tim avatar
Does slow file IO impact networking?
cn flag

We are using php7, php-fpm, nginx on gke, services communicated by clusterIP.

In php7, we found out that occasionally writing the log needed to take 1~2 seconds to complete, it usually took less than 1ms.

And there is latency between our services, when frontend service communicate to backend by clusterIP (frontend php7 curl to backend nginx), it occasionally takes 1~2 seconds, but backend nginx's ac ...

Score: 0
alebal avatar
How to remove apcu and memcached from centos?
id flag

I've always installed apcu and memcached on my server, but I'm not sure how useful they are. Mostly 2-3 pages per visit are visited on my sites. And I'm not even sure if having them is a good thing or a bad thing, whether it's talking about SEO or consuming or saving server resources.

I would like to try to remove them and see what happens... But I find tons of guides on how to install them and n ...

Score: 0
install multple php version on centos 8
cn flag

I have a server running on centos 8 PHP 7 is installed already and I'm new to centos 8.

I used to use centos 7 and I use the 2 PHP versions 7 and 5 I am using the php5 for some older scripts until I upgrade them when I moved to centos 8.

I found that it doesn't support The Software Collections ( SCL ) Repository, where I found tutorials about how to use, it to install multiple PHP versions on centos ...

Score: 0
remy_e avatar
How to disable caching in Google Cloud (php, magento, app.yaml?)
kr flag

i'm new with google cloud and here is my problem:

I have a magento/bitnami installation in gcc and i have to run some php files for updating the product database

After the execution of a php file, the cloud (i suppose!) is caching the php-file for about 24 hours (Changes in the file will only occur after 24 hours min) In the documentation they are talking about only 10 minutes caching in the default ...

Score: 0
Sentry with PHP and nginx: errors do not occur in sentry dashboard anymore
gb flag

I am stuck with my nginx (nginx/1.14.2) configuration for a php (php-7.4) App that would normally send error notifications to sentry.

I moved a php application from an apache to nginx server and now my sentry errors are not reported anymore ... what did I do wrong?

here is my nginx config:

server {

    root /var/www/services/some-sesrvice;

    index index.php;

    server_name *****.com;

     access_l ...
Score: 0
Krydos avatar
Multipart text/html email from Invision Community not parsing correctly
jp flag

First of all, yes I have contacted Invision Community support. Yes, I am a paying user with an active license. We went back and forth for several hours and all they have to say is there's nothing wrong with their software, and I need to fix my server.

I'm using CentOS 7.9.2009, PHP 8.0.7, Apache 2.4.6, and Exim 4.94.2.

When Invision Communtiy sends emails the From: value says Apache or Root instead  ...

Score: 1
blond_viper avatar
Can I install php8.0 on Ubutnu 16.04
cn flag

I'm trying to install php8 on Ubuntu 16.04.5 LTS. Here is the list of commands and output that I ran:

apt-get update
apt install software-properties-common

--- these commands went fine when ran

add-apt-repository ppa:ondrej/php


 Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP ( for  ...
Score: 0
Barry Ralphs avatar
Can't get Imagick PHP Extension to load when building PHP from source
br flag

I've built PHP 7.4 from source, and installed ImageMagick via yum.
When I run convert --version i got Version: ImageMagick 6.9.10-68 Q16 x86_64 2021-02-24

Then I ran pecl install imagick and it says
Build process completed successfully. Installing '/usr/lib64/php/modules/'

I've also added to my /usr/local/php/lib/php.ini file & restarted Apache.

When I run php - ...

Score: 0
0diseus avatar
NGINX - WORDPRESS - PHP-FPM: Query parameters (GET) not passing in subfolders
cn flag

I have a wordpress site running with NGINX (and Php-fpm) with 4 virtualhosts, everything works fine, except if i want to pass a query string. Look, it works if i do:

But it doesn't if i try

Here is my /nginx/snippets/wordpress.conf:

location = /favicon.ico {
    log_not_found off;
    access_log off;

location ...
Score: 2
Barry Ralphs avatar
Built PHP from source with custom DataDirect ODBC drivers, but can't auto start with systemd
br flag

I need to build PHP from source in order to use this customer ODBC drivers. I've followed these inspections: and everything (including the ODBC driver) works fine when I manually start apache with /usr/local/apache2/bin/apachectl start But when I try to start apache with systemd, the ODBC drivers no longer works.

I've created this file: /usr/lib/system ...

Score: 0
luky avatar
slow php (php-fpm) (long apache php waiting)
co flag

I have an apache with PHP-FPM module, 8 CPU cores. Average CPU all together load is around 75% CPU mainly due MySQL see the screen.

It is actually little bit smaller load now than usually.

enter image description here

But problem is, when I open homepage the load is randomly around 1s (time to first byte i guess).

I thought it could be waiting due mysql connection etc, but it seems the extra time for waiting is the time, before  ...

Score: 0
Erdss4 avatar
What is the correct way to enable PHP extentions, manually or via mods-available?
ng flag

I am used to enabling PHP extensions by manually adding them into my php.ini file, for example: But today I learned that one PHP extension failed to load because putting the fails because some extensions are loaded after the php.ini is contacted.

The solution I found was to use phpenmod and create a extension.ini file within /etc/php/7.4/mods-available. This solved my probl ...

Score: 0
twhitney avatar
Need to add older version of IUS repo in order to install specific PHP 7.2 packages
pl flag

The Issue:

Without unnecessary detail, I have two servers that are nearly identical. However one has its yum repos configured such that php 7.2 packages imagick and sodium are available for install, whereas the other doesn't.

Same exact kernel version:

CentOS Linux release 7.5.1804 (Core)

Similar PHP versions:

Server A:

PHP 7.2.18 (cli)

Server B:

PHP 7.2.20 (cli)

Server A:

$ sudo yum search sodium  ...
Score: 0
PHP website not working as expected in NGINX but working in Apache
cn flag

Hi I just created a link shortening app. But when I try to redirect a shorten link to the full URL which is shared on Facebook it is not working as expected. for example : this link is working fine but if i share the link in Facebook and and the link will be like this This link is not re ...

Score: 0
SvenTUM avatar
Multiple session ID headers sent by Apache HTTPD serving PHP
zw flag


I get a multiple equal HTTP headers in responses of a web application. Sometimes it's dozens of replications depending on the script called.


It's a large and very old PHP based application. It's delivered using Apache HTTPD 2.4 (Debian) using the php7_module module.

The application has some library code that handles the session information. In this code it wraps handling with sessio ...

Score: 0
jsjw avatar
PHP OpCache on Amazon EFS
mc flag

Looking for some validation of my thought process here. I don't have the stats to hand to back up my claims, but have enough experience with web hosting with and without EFS to be comfortbale in making it.

A Joomla or WordPress PHP site being served entirely from EFS (e.g. the document root is in EFS) - making use of Apache and PHP-FPM will be slower than one that is served from EBS. This is beca ...