Questions tagged [php]

PHP is a widely-used, general-purpose scripting language that is especially suited for web development. Use this tag when you are dealing with a PHP script, installing PHP, or configuring a PHP installation.

Filter by
Sorted by
Tagged with
0 votes
2 answers
76 views

I lose permission every day at midnight

I require a file at the top of my PHP scripts. The file just has connection object for MySQL: $c->new mysqli('host','usr','pass','db') The file has 400 permission: -r-------- and I keep it in /etc/...
bungee1980's user avatar
1 vote
0 answers
30 views

Apache/PHP gets stuck although there are enough resources

The server has a 4C/8T CPU and 32GB RAM. OS: Debian 12. Apache/PHP becomes unresponsive after ~500MB usage. I tried PHP8.2 and PHP8.1, but the result is the same. If I restart PHP, Apache starts ...
doraemon's user avatar
  • 111
0 votes
1 answer
27 views

Force Postfix' /usr/sbin/sendmail to use SMTP

I have written a tool in PHP (on Linux) sendmail mails via mail() (unfortuenately PHPMailer is not an option due do missing support for some required stuff). PHP ignores all SMTP settings on linux so ...
Schubi Duah's user avatar
0 votes
2 answers
76 views

Install PHP 8.0 Yaml extension on Ubuntu 18.04

I wrote a simple php based on the fisrt example. https://www.php.net/manual/es/function.yaml-parse.php I got... Fatal error: Uncaught Error: Call to undefined function yaml_parse() in /var/www/html/p....
icalvete's user avatar
  • 101
2 votes
1 answer
77 views

apache mpm_prefork limited to 306 connections, yet server limit set to 1000, AH00159 Unable to fork new process

Running Virualmin, still got about 1GB free mem apache log is full of: [mpm_prefork:error] [pid 119747] (11)Resource temporarily unavailable: AH00159: fork: Unable to fork new process <IfModule ...
Hayden Thring's user avatar
0 votes
1 answer
171 views

How to install PHP obtained from remi's repo and created local repository?

Here is my question, I am trying (forced) to install PHP 8.2 into almalinux 8.6, but in a weird way. The idea is to be able to install it without internet, but with some local repositories which ...
coyote's user avatar
  • 1
0 votes
2 answers
54 views

How netstat is able to read route tables?

For my php containers if I need to detect the ip where ide listens to. I run: ip=$(netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10) And I get the gateway IP. But for that I need ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
38 views

Asterisk pbx agi php script with imagick imaging on the fly not working

Problem description: Generate an image with an ASTERISK AGI PHP script that is displayed on a phone (Yealnk) using imagick. installed:php-imagick/oldstable,now 3.4.4+php8.0+3.4. The AGI PHP script ...
Edderpet's user avatar
0 votes
0 answers
51 views

SETUID not executing the script as owner when executed via PHP script

I have a sh file (with setuid) that I want specific web users to be able to execute from an endpoint: -rwsr-xr-x 1 root root 59 Sep 11 09:47 restart-workers.sh The content of this file is ...
Jaquarh's user avatar
  • 101
0 votes
0 answers
13 views

PHP-FPM - "IntlException thrown"

I have correctly installed php-8.1.23, php-fpm and php-intl-8.1.23 on OpenBSD 7.3 When I create a file locally with the following code and run it with PHP $example_var = new Collate('en_US'); it ...
prmethus's user avatar
0 votes
0 answers
33 views

After web server move my simple PHP script stopped working

Here is what I'm having trouble with: I've had the below script running for years and it's been fine. But my web host moved / upgraded servers a couple of weeks ago and ever since the script has ...
Rik's user avatar
  • 1
1 vote
1 answer
135 views

install php 8.1 manjaro

i am trying to install php 8.1 in manjaro but i am getting errors. This I am doing: [home_the_archphp_arch] Server = https://download.opensuse.org/repositories/home:/el:/archphp/Arch/$arch key=$(curl ...
Santiago Martinez's user avatar
0 votes
0 answers
16 views

Set cache-control in .user.ini

I have a new AlmaLinux 9 installation with apache and php installed. I am converting my .htaccess files to .user.ini Although going well, I can't figure out the user.ini equivalent of the following:...
TSG's user avatar
  • 1,674
0 votes
0 answers
21 views

Solution to phpMyAdmin login problem seems unsafe

I had trouble logging into my myPhpAdmin web interface, so after finding numerous posts suggesting I added my un/pw to the config file like this: $cfg['Servers'][$i]['user'] = 'root'; //mysql username ...
TSG's user avatar
  • 1,674
0 votes
0 answers
353 views

RUN apt-get update is not running

FROM php:7.3.33-apache-bullseye RUN docker-php-ext-install -j$(nproc) mysqli opcache RUN docker-php-ext-install pdo_mysql RUN docker-php-ext-install sockets # Instalar ifconfig RUN apt-get update &...
Carlos Fernandez Deus's user avatar
0 votes
0 answers
68 views

php artisan commands not working for jailed user

I jailed a user using jail-shell from github (https://github.com/pymumu/jail-shell). The user has php binaries. So the php command works. But when I execute php artisan commands like 'php artisan ...
jay's user avatar
  • 31
4 votes
1 answer
108 views

Can't enable error messages for PHP on my web server

I'm trying to disable error messages for PHP on my Apache2 web server, but it's not working. I have enabled it in the php.ini file. error_reporting = E_ALL I deliberately introduced errors in my test....
Jasmin's user avatar
  • 41
2 votes
1 answer
229 views

How to understand which libapache2-mod-php am I using now?

Listing packages # apt list libapache2-mod-php* Listing... Done libapache2-mod-php5/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.29 amd64 [installed,automatic] libapache2-mod-php5.6/now 5.6....
realtebo's user avatar
  • 849
0 votes
1 answer
85 views

apache, php-fpm and mod_fcgid - unable to write to file

I have install apache, php-fpm and mod_fcgid, and trying to write to file. I have created PHP pools, here's the config files: [test.internal.innovisage.com] ... user = test group = test ... listen....
supmethods's user avatar
1 vote
1 answer
113 views

php_value settings in .htaccess

I am in the process of migrating an Apache WordPress site from CentOS7 to AlmaLinux9. I installed standard LAMP stuff on the AlamLinux9 system, and restored the MySQL and copied over the html ...
TexasTim's user avatar
0 votes
1 answer
280 views

PHP was compiled with zlib module, but phpinfo() show it's disabled

In order to use Joomla! 4.3.1, I've compiled PHP 8.2 in an Oracle Linux 8.6 Server, with support for zlib compression: # php --ri zlib zlib ZLib Support => enabled Stream Wrapper => compress....
Juliano B. Nequirito's user avatar
0 votes
1 answer
46 views

Ubuntu - Always use certain php version for certain directory

I have multiple PHPs (8.1 and 7.3). If I execute php -v then I get 7.3. I need to execute some command with PHP for magento 2 e.g. php bin/magento cache:flush, but I need to call it with php 8.1 for a ...
Black's user avatar
  • 2,039
0 votes
0 answers
69 views

'unicode/ucnv.h' file not found when cross compiling PHP for Android

I'm trying to cross compile PHP to Android. After i ran ./configure --host=$TARGET --enable-static --without-iconv all went fine. But when i run make CFLAGS=-I/usr/include/unicode i get following ...
kpwn Apps's user avatar
0 votes
0 answers
344 views

Failed to fetch debian packages while building dockerfile from php:7.3.29-fpm-stretch

Dockerfile: FROM php:7.3.29-fpm-stretch WORKDIR /var/www/html RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list RUN sed -i s/deb.archive.debian.org/...
Jaime Gonzalez's user avatar
0 votes
0 answers
87 views

Firefox is already running, but is not responding. VSCODE PHP Server

I'm using VSCode php server extension to load a .php web page into the local browser. It works fine with other browsers but with firefox developer edition I always receive this error whenever I reload ...
Dumidu's user avatar
  • 1
1 vote
4 answers
703 views

Install memcache for Wordpress on debian with php-fpm

The install instructions for memcache are not really up-to date. How do I install on Debian using php-fpm and nginx? I tried this: apt install memcache zlib1g-dev php-dev pecl install memcache This ...
rubo77's user avatar
  • 28.2k
1 vote
0 answers
272 views

getting php readline extension to work in php 8 xampp installation

i have a fresh install of linux mint 21.1 as well as the latest version of xampp which comes with php 8.2.4. i added export PATH=$PATH:/opt/lampp/bin to .bashrc to access php from the terminal. it ...
bungee1980's user avatar
0 votes
1 answer
78 views

My file is reinfected as soon as I chown back to user:psacln

I can turn off write permissions on the directory and remove the file using rm -v filename. I can recreate the file using touch filename and even add contents using nano filename. But, as soon as I ...
David Davis Jr.'s user avatar
0 votes
1 answer
1k views

upgrade to php 8.* version on centos 7.9

I have a Centos 7.9 with PHP 7.4.33 pre installed. followed this command steps for upgrading the php version to 8.1: sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo ...
Pooya Behravesh's user avatar
0 votes
0 answers
163 views

RHEL 9.1 - SELinux is preventing /usr/local/bin/php from read access on the file /web/inc/init_db.inc.php

i want to solve this problem what SELinux says. SELinux is preventing /usr/local/bin/php from read access on the file /web/inc/init_db.inc.php. output from console is: [root@rhel ~]# ausearch -c 'php'...
ArchMatt's user avatar
0 votes
2 answers
92 views

Where is this php directive being overriden

The error message AH01071: Got error 'PHP message: PHP Warning: POST Content-Length of 17826104 bytes exceeds the limit of 8388608 bytes in Unknown is normally fixed by changing the pair of related ...
VagrantPaladin's user avatar
0 votes
0 answers
526 views

Start nginx without host container being available

For local development, I have a suite of 5 sites. Each site runs in its own php-fpm container. All sites are served by a single nginx container, which contains .conf files for all the sites. They ...
amacrobert's user avatar
0 votes
0 answers
10k views

How to 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
60 views

Giving www-data access to i2c

I have a light sensor that uses I2C for data transmision. Now I want to display that data on a Website. The problem is www-data can't access I2C. I use a Python script that gets run by PHP (I know it'...
Bhasim's user avatar
  • 1
0 votes
1 answer
793 views

Updating PHP from 8.0.x to 8.0.28 using dnf

Will this update PHP 8.0.25 to PHP 8.0.28? dnf module reset php dnf module enable php:remi-8.0 dnf update php\*
anjanesh's user avatar
  • 103
0 votes
1 answer
611 views

Install phpMyAdmin 5.2.1 with apt on Debian 11 with php8.1

apt install phpmyadmin on Debian 11 installs the old versin 5.0.4 that is not php8.1 compatible. How do I install the latest version via apt?
rubo77's user avatar
  • 28.2k
0 votes
1 answer
398 views

No update-alternatives in AlmaLinux 8 for PHP

I run the command update-alternatives --config php and nothing shows up. I checked for the binaries and they are executables in the /usr/bin folder. Installed PHP versions are 7.4 from the AppStream ...
supmethods's user avatar
0 votes
0 answers
379 views

PHP extension_dir changes after updates

I am advising a client who is catching up on updates, and has recently updated Ubuntu from 18.04LTs to v20.04LTS along with packages. They are using the PHP 7.2 (7.2.34-38+ubuntu18.04.1+deb.sury.org+1)...
John Brandenburg's user avatar
0 votes
0 answers
381 views

Install a php module for a specific php version as a target

Envoirment: Webserver // Debian 9.13 Stretch // ISPConfig: 3.2.8p1 // apache 2.4.25 I'm trying to install the module php-redis. I need it for a cache plugin. My redis server works, I just need the php ...
Dnz's user avatar
  • 1
0 votes
1 answer
51 views

could not find driver QueryException

Had this problem where my website couldn't load, and it was throwing an error: could not find driver QueryException Most answers hinted at uncommenting the ;extension=pdo_mysql.so line in the php.ini ...
Aseli Paul's user avatar
0 votes
1 answer
150 views

PHP code cannot be executed

My php code doesn't work, the code is displayed in the browser instead of being executed, the apache is going up normally, the info.php doesn't work either, any idea what to do or install I'm using ...
Keviny Oliveira's user avatar
0 votes
0 answers
128 views

how to install php_mysqli for php 7.3 with yum

I am setting up my server which is an EC2 (fedora) instance. I have php version 7.3.30. When I run my web I get the error: Fatal error: Uncaught Error: Call to undefined function mysqli_connect() It ...
Jorge Palacios Zaratiegui's user avatar
0 votes
0 answers
31 views

Specific email sender address for website vhosts

I have Ubuntu 20.04 LTS server, with Apache2 (mpm_event), PHP 7.4 FPM, postfix (as a relay) installed. This server hosts several sites (WordPress). The problem is that the sites are sending by default ...
NukDokPlex's user avatar
1 vote
0 answers
272 views

unattended-upgrade of only security fixes for Sury PHP?

I installed PHP 8.1 on a Debian 10 server by adding the PHP Sury repository as an apt source at /etc/apt/sources.list.d/php-sury.list. That all works fine. I have unattended-upgrades installed and ...
Don't Panic's user avatar
0 votes
1 answer
639 views

Server is slow even though there are enough resources

I'm running about 450 simple webistes using Wordpress Multisite on a VPS with Debian 10. Here are some data about the resources: root@hr711523385:~# free -mh total used ...
Sami's user avatar
  • 275
1 vote
2 answers
1k views

Unable to install php-oci8 in oracle linux 9 via remi repository

I have installed remi repository but I was unable to install php. So, instead I have installed php via stream with the following command which seems that uses remi repo. dnf module install php:8.1 Now,...
Rea K.'s user avatar
  • 37
0 votes
1 answer
330 views

Change owning user and group on file creation

I have an issue where I want to connect a very old system (UNIX) to a new machine. This old machine logs in by scp using a hardcoded oldsystemaccess user and copies a file into a subdirectory of the ...
siryx's user avatar
  • 95
0 votes
1 answer
4k views

FastCGI sent in stderr: "Primary script unknown "

I'm running a nodejs project with nginx and wordpress in /blog subdirectory with aapanel control panel. When I want to access example.com/blog there is a "File not found." error. Here is ...
miBra's user avatar
  • 21
0 votes
1 answer
513 views

daloRADIUS php scripts try to load files in webroot?

I have just installed FreeRADIUS Version 3.0.21 on a Debian 11 server, as well as daloRADIUS, which is installed in /var/www/html/daloradius; the Apache version is 2.4.54. When I try to access the web ...
j4nd3r53n's user avatar
  • 591
0 votes
0 answers
899 views

bWAPP php files display blank pages

Currently trying to setup a locally hosted bWAPP server for my own personal use on an Acer Aspire running ParrotOS. I currently have Apache set up and am able to load in the http://localhost/ address. ...
HornedAccomplice's user avatar

1
2 3 4 5
20