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
0answers
36 views

asterisk AGI PHP Ignored

I have written exten= 6001,1,AGI(pk.php) content is : (and i tried other samples) #!/usr/bin/php -q <php? set_time_limit(30); require('include/phpagi.php'); error_reporting(E_ALL); $agi = ...
-1
votes
1answer
22 views

How two different applications should get served using one single apache2 virtualhost configuration

Just for assumption here testsite.com which is my php application and testsite.com/project is python application I have following settings in my apache site config file /etc/apache2/sites-available/...
0
votes
0answers
214 views

nginx return file not found with nginx-proxy

I'm using nginx-proxy to run multiple sites/app on a single nginx instance. So far, I was able to run a static site and a nodejs application without problems but I'm facing an issue with a php ...
-3
votes
2answers
302 views

PHP files displayed as plain text in browser [duplicate]

I have an ubuntu server installed with apache2 service. but when I run the index.php file its displays as it is. it means .php files are not executing
0
votes
0answers
29 views

PHP: Class 'PragmaRX\Google2FA\Google2FA' not found

I'm trying to use Class 'PragmaRX\Google2FA\Google2FA' with the "use" command in PHP, but I keep getting not found, even though the file is in /usr/share/php. CentOS 7. I've yum uninstalled ...
-2
votes
1answer
68 views

PHP 7.4 with last version of sqlite3

CentOS8 is distributed with sqlite3 version 3.26. I would like to build a php 7.4 RPM with the version 3.35 of sqlite3. Do you any advice to do so ?
1
vote
2answers
190 views

Is the ppa:ondrej/php repository safe?

I installed the ppa:ondrej/php repository for php and performed an apt-get upgrade. Little did I know it had a lot of libraries packages installed that I have no idea about, so I was wondering if they ...
0
votes
1answer
464 views

Getting libssl abd libcrypto conflict warning while compiling php on RHEL 7.8

I m getting following warning messages while compiling php on RHEL7.8 I am able to successfully compile and install php but I am not sure what will be the side effect of these warnings. Is there any ...
0
votes
0answers
51 views

Php send mail from Cron (postfix + sendmail)

I have a PHP script that I run from cron. I never get emails. maillog: postfix/sendmail[2223187]: fatal: execv /usr/libexec/postfix/smtpd: Permission denied Command-line: * * * * * root /usr/bin/php /...
1
vote
1answer
49 views

HTTP 500 Error After Trying To Set Up Error Reporting on Google Cloud Console

I tried the following code on SSH to try and set up Error Reporting on a Wordpress Bitnami vm-instance on Google Cloud Console: sudo -i sudo nano /opt/bitnami/php/etc/php.ini auto_prepend_file="/...
1
vote
1answer
84 views

Laravel/PHP process on debian 10 only ever using one of two CPU threads

I am running a Debian 10 Buster server on a google VM with PHP 7.3 Apache2 and MySQL 8. On the server, I am running Laravel 8 as an API for two clients. I recently upgraded the VM to an n2-standard-2 (...
0
votes
0answers
17 views

Are "PHP workers" referred to the specific workers only triggered and controlled by "PHP-FPM" in the context of Nginx?

Are "PHP workers" referred to the specific workers triggered and controlled by "PHP-FPM" in the context of Nginx? What I'm especially lost with are: How do they interact with each ...
1
vote
1answer
45 views

Can't get origin/request IP address in php from KVM apache website in bridge mode

I have a apache webserver running on ubuntu 18.04 hosted on KVM This KVM is running on Linux Mint 20.1 host OS The networking is setup using bridge in KVM <network connections="1"> &...
1
vote
0answers
52 views

PHP mail function on Google Cloud Compute Engine?

I have a php website hosted on Google Cloud Compute Engine. I also have a paid Google Workspace account for my emails, etc. I would like to use the mail function in php to receive emails from my ...
1
vote
1answer
123 views

CLI php errors on FreeBSD Server

I manage a FreeBSD server running usual AMP setup. Apache, Mysql, Php-fmp Everything is working fine. In order to help out with speeding up a couple of Wordpress sites; we run php cli to run the ...
0
votes
0answers
102 views

Using BASH script workers for Beanstalkd

I want to have Beansalkd workers in BASH script, not in PHP like you usually see. Is that possible? Everywhere I look, the Beanstalkd workers are PHP scripts. So what I want is: after beanstalkd ...
0
votes
1answer
25 views

Server settings to improved Wordpress backend speed

You know how it is, caching plugins only make the front-end move faster but when you're logged in and browsing the wp-admin section, the Wordpress site grinds to a halt. I'm trying to increase some ...
-1
votes
1answer
65 views

PHP performance improvement for 32GB RAM

I have two EC2 instances. One with 1GB RAM and 1vCPU and the second with 32GB RAM and 12vCPU. I am running a script on cron job but I still have the same performance in both. I tried changing ...
0
votes
1answer
57 views

Wordpress Website is Broken When Migrating to NGINX

I recently migrated by wordpress website to NGINX, from apache2. I installed PHP-fpm, PHP-cli, and the other required php packages for NGINX. The site worked fine, but after clearing the cache (I use ...
0
votes
0answers
70 views

How to avoid many versions of PHP being installed with apt?

In December last year I had to move back from the standard PHP 7.4 to PHP 7.3 on an Ubuntu 20.04. I believe to have followed How to Install PHP on Ubuntu 20.04 to do so. So far so good. After a couple ...
0
votes
0answers
52 views

Drupel 9, GD not enabled

I have for hours been attempting to set up a Drupel database, but have been stumped on this error message: "PHP extensions Disabled Drupal requires you to enable the PHP extensions in the ...
0
votes
0answers
115 views

Apache+mod_php so slow

I have a problem setting up my Apache server with mod_php. I have a website whose index.php page is generated in ~200ms. But Apache serves it in about 1.5sec. Why is this slowdown taking place? If ...
1
vote
1answer
47 views

Why Docker PHP container works on Ubuntu host but not on Manjaro host [closed]

I setup my new laptop with Manjaro Xfce and love it but I cannot get my primary dev project to run on the new host. This project is used by more than 10 developers, 9 on Ubuntu and 1 on a Macbook. No ...
0
votes
1answer
48 views

Nginx isn't passing on the last forward slash of an arg to a script

Have an issue where nginx isn't passing on the last forward slash of an arg to a script Example https://xxxx.com/test_t/company/Default/icon_category/Hotel.png Rewrite: location / {​​ rewrite "^/(...
1
vote
0answers
24 views

Some PHP extensions available only for root user

I have installed PHP 7.4 (from remi) on CentOS 8 since I need that version on CLI. The issue is with extensions, when I check modules (php -m) as root user I for example have redis enabled there, but ...
0
votes
1answer
526 views

PHP-FPM using 100% CPU on a server that has 16 threads

I have a server that has 32 GB of RAM and 16 threads. This server has an API in PHP that receives many requests from other external APIs, I made a configuration in PHP-FPM to support all these ...
0
votes
2answers
169 views

domain name getting connection refused where as dynamic domain name website loading fine

I have an Ubuntu 20.04 Focal server running with ufw firewall, nginx running with php8.0-fpm, and all needed packages with MySQL server. It is all accessible from outside internal network using ...
0
votes
0answers
22 views

Why would my site return a 504 Gateway Error randomly

I have a site that I made in PHP. I've been making many updates to it through FTP for the past hour. However, just after editing and uploading HTML file, the whole site crashes and returns a 504 ...
0
votes
0answers
51 views

What could cause processes to not be active

Running linux and executing a bunch of PHP scripts. I noticed that our CPU usage was pretty low but many processes were sleeping, so started investigating. AWS EC2 with an S3 bucket. I can't seem to ...
2
votes
1answer
221 views

Wrong IP address on VPN with StrongSwan

I have server with Ubuntu 20.04 and installed and working IKEv2 VPN with Strongswan. And i have one php system (installed on the same server with the VPN), that is locked by IP. So i'm using my VPN to ...
0
votes
1answer
21 views

Laravel mass image serve

We have a Laravel application and imagine the following: We have a slider with a play button that will start showing images on a slideshow. These images arrived from web cameras so obviously there are ...
0
votes
1answer
256 views

How to allow PHP exec to reload NGINX

How can I allow these commands in PHP: $output = exec('sudo nginx -t 2>&1'); $output2 = exec('sudo /usr/sbin/service nginx reload 2>&1'); I've looked into sudo visudo in the terminal , ...
1
vote
0answers
17 views

What consumes server CPU? (HostGator)

So, I've had a site on HostGator that was being maintained by somebody else for a bunch of years and now I'm taking care of it, trying to learn how to maintain it and such. When trying to access the ...
0
votes
0answers
285 views

php returns error code 127 persistently from exec/shell_exec python script even though script file is found in php by ls-al

I'm using a CentOS x86-64 Linux server, trying to run a python script from a php script called by an html-script. This is a well-covered topic on the internet, however nothing of the instructions and ...
1
vote
0answers
24 views

How to enable MultiViews on Heroku?

I'm trying to enable MultiViews on an Heroku site, but I can't understand how to do it. When I do it on servers I control, I do it on the httpd.conf file, but here I have to use it in a Directory ...
0
votes
0answers
62 views

How to install php5.6-imagick extension on Debian 10?

I have a old cms and custom plugins and there is some parts that need a Imagick php extension. I've installed php5.6 correctly and some basic extensions (php5.6-mysqli, php5.6-gd) etc but I can't ...
0
votes
1answer
43 views

Tools for testing all aspects of service speed

We have some strange issues on our CentOS LAMP server where there are occasional severe 4-30 second delays in service despite the server being relatively low load at the time. Is there any tool for ...
0
votes
0answers
50 views

Allow user to edit some php.ini directives - Nginx + PHP-FPM

I am running Nginx + PHP7.4-FPM combo on my server. Every unix user with home in /home/example have access to respective domain name from Nginx (example.com) and his own FPM pool. My question is, if ...
0
votes
0answers
31 views

Trojan:PHP/Obfuse.AR!MSR Detection by Windows Defender [duplicate]

I have an AWS server running Windows 2016 Datacenter. From the past few days, Windows Defender has been reporting Trojan:PHP/Obfuse.AR!MSR pointing to random phpXXXX.tmp files inside C:\Windows\Temp ...
3
votes
1answer
227 views

Cannot Connect to Surry to get Php8

My system is Debian Buster: ~# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster I have run ...
0
votes
1answer
32 views

NGINX FastCGI "Primary script unknown" on every other image upload POST

I have a simple upload php script that accepts image jpg files and saves them to a screenshots directory then returns the link to the client. In pre-deployment testing, I am running into the nginx ...
0
votes
1answer
1k views

How to properly set specific PHP version used by Apache on Arch?

So it appears that after a recent Arch system upgrade, my NextCloud server no longer works, currently giving me "This version of Nextcloud is not compatible with > PHP 7.4. You are currently ...
0
votes
0answers
26 views

PHP mail() mail.log configured file stays empty

My environment is as following: nginx version: nginx/1.18.0 PHP 7.4.11 (cli) (built: Oct 21 2020 19:12:26) ( NTS ) I am trying to log any mail() operation into mail.log configured file. The Error msg ...
2
votes
1answer
35 views

How can I stop all files being read only to PHP?

I'm setting up a new Centos 7 server to run some legacy sites on PHP 5.6.40 through PHP-FPM with Nginx. However, I'm running into a problem that all files are appearing to be read only. PHP is running ...
0
votes
0answers
13 views

Passthru works in development server but not in apache

I'm trying to execute a Python script from a Laravel project in Ubuntu 20.04 using this code: passthru('/usr/bin/python3 /var/www/birra/public/setauto.py DB_D1 false'); $output = ob_get_clean(); ...
0
votes
1answer
2k views

Certificate problems when sending mail via smtp (tream_socket_enable_crypto(): SSL operation failed with code 1)

I am new on this board. I also posted the issue in the CraftCMS-board, but I think it is more related to this one. I hope it fits in here. I found some similar posts here, but unfortunately, but none ...
1
vote
1answer
179 views

Using multiple pools in PHP-FPM

When reading the article on the link below, I had some doubts, I will explain my scenario and talk about my doubt. https://dzone.com/articles/upstream-php-fpm-for-better-performance-1 I currently have ...
0
votes
1answer
247 views

Use multiple PHP-FPM versions using FastCGI on same Debian/Apache server

I would like to use multiple PHP-FPM versions using FastCGI on same Debian/Apache server. Using: Debian v9.12, Apache v2.4.25, php5.6-fpm, php7.4-fpm, libapache2-mod-fcgid v1:2.3.9-1+b1, libapache2-...
0
votes
1answer
416 views

How to set a command alias that will be respected in a shebang

I run multiple versions of PHP on my Linux server. I've added an alias in my bashrc to point the php command to a specific version alias php='/usr/bin/php7.3'. This works as expected when I execute a ...
1
vote
0answers
30 views

PHP Warning: Module 'apc' already loaded in Unknown on line 0 - Ubuntu/Nextcloud

I am seeing the following error when viewing the logs on my Ubuntu 18.04 server: PHP Warning: Module 'apc' already loaded in Unknown on line 0 How can I begin troubleshooting this? I am running php ...