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

How to upgrade ubuntu with security fixes without updating PHP with new major version?

On my web servers I run ubuntu 16.04 with php7.2. I would like to be able to run periodically cron task to install system security fixes and updates (something like apt-get upgrade) but I don't want ...
1
vote
0answers
34 views

Good system for Ajax to send keepalives every N seconds to PHP without overloading server

I have a website in which Javascript sends HTTP POST Ajax requests every 5 seconds to a PHP script on a CentOS server. If I check netstat, I see lots of connections in TIME_WAIT state (mostly between ...
0
votes
1answer
65 views

PHP script to calculate bandwidth per directory on a server?

I am tasked with figuring out the bandwidth used per directory on a parent directory in a linux server. We are hosting 10+ different client sites in 10+ different directories, and want to figure out ...
0
votes
2answers
141 views

can't send email from php-fpm

I can send emails from the command line using sendmail, I can call a php script ( php -f sendmail.php ) from the command line and the mail sends successfully, but if I call the exact same script ...
0
votes
0answers
13 views

How to connect Php web app in Linux (Centos) TO Oracle 11g (Database) in Windows Server?

Situation: I am New in linux and deploying projects on servers. I have a server on which i have installed ESXI 6.7. Now i have two Virtual Machines on it. One machine is linux(Centos-8) and the Second ...
0
votes
0answers
28 views

website scripts download to PC rather than to browser

I have a few websites on a co-located system. I am certain that they are running WAMP. My scripts are certainly php. Since this morning, when users access the URL address of any my websites none of ...
0
votes
0answers
36 views

Php files beiing downloaded instead of executed

New server Debian 10 with php 7.3 and Apache 2.4 First virtualhost created works perfectly (Wordpress) Second one all php files are beeing downloaded instead of executed Phpmyadmin shows php file ...
0
votes
0answers
96 views

Error connecting to SQL Server.PDOException Object (Azure)

i'm trying to connect to my Azure SQL db using PHP that is run by my other server every night at 00:00 via cronjob. When it runs shows this error in logs: Error connecting to SQL Server.PDOException ...
0
votes
0answers
25 views

Apache supplying OR PHP return false (different) IP address

I am using $_SERVER["REMOTE_ADDR"] to get the client IP address and give my web app access to some specific IP addresses. But the $_SERVER["REMOTE_ADDR"] variable return the false (Different) client ...
1
vote
0answers
154 views

Ways to integrate incoming and outgoing mail webhook in Postfix

I am trying to build an application in PHP which will be able to create a Ticket whenever a new mail arrives on a specific account and whenever a reply is done for that email, the application will ...
1
vote
2answers
57 views

Best practice for alerts if webpage returns white page?

We're trying to setup monitoring (zabbix), for webapps that return white page of death. Apps are PHP based. From what I know, white screen of death can be caused by number of issues, memory issues, ...
0
votes
0answers
15 views

Wordpress/Woocommerce memory_limit for new VPS

I just moved my Wordpress/Woocommerce site to my own VPS with two v-cores and 8GB RAM and 200GB SSD Storage. Before my memory_limit was set to 384 MB as this was the maximum with the old hosting. I ...
0
votes
1answer
61 views

Something overriding PHP.ini setting, not htaccess. Need suggestion

I'm struggling to find where a specific PHP.ini setting is being overridden in my AWS Linux 2 instance with PHP 7.3.11 and httpd 2.4. I am trying to set mysqli.allow_local_infile = On I have set ...
0
votes
1answer
381 views

mysqli.cache_size in php.ini | how to use it?

My company has an Apache server running PHP 5.4. My task is to update it to PHP 7.4. The old php.ini file includes a mysqli.cache_size property. I can't find any documentation on this property. Does ...
1
vote
0answers
26 views

Docker machine of Nginx with PHP is crushing every few requests

I have a docker with PHP and Nginx. The code deployed is not depending on external service. Every 5 minutes (50-100 requests) I get an error (see the image below) and PHP + Nginx gets restarted. ...
1
vote
1answer
127 views

Composer crashes

When I run composer update I get this error: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Question\Question::__construct() must be of the type string, array ...
0
votes
2answers
64 views

How to terminate backend PHP scripts invoked by Apache webserver?

I'm invoking some PHP backend scripts on Apache webserver that are programmed to run for a few days. The trouble is that I cannot figure out a way to stop these scripts (except restarting the server ...
0
votes
1answer
66 views

Huge Difference On Connecting to Local and Remote MySQL DB in Same Machine

I have a rest-full php 7 web service app in a centos 7 vm and mariadb 10.4 as database. I have to seperate database to another vm beside main vm on same machine, my question is why diffrence of ...
0
votes
2answers
80 views

SELinux port type to reserve port for user PHP in-built webserver

I am trying to get an application running which uses the PHP inbuilt webserver. It gives permission denied because of SELinux running on the system. There is no policy for the PHP inbuilt webserver as ...
0
votes
1answer
214 views

IIS 10.0 Detailed Error - 405.0 - Method Not Allowed on Windows Server 2016

I am using PHP version 7.2.7 on IIS. Everything was working fine until I started getting this error about a week ago: IIS 10.0 Detailed Error - 405.0 - Method Not Allowed This is using a POST ...
0
votes
0answers
69 views

XAMPP url rewriting redirects to path (C:\xampp\htdocs…)

I just experimented with url rewriting with xampp because i need it for a project and now im stuck with the following problem: I wanted to repace http://localhost/page/search.php?item=test to http://...
1
vote
2answers
945 views

Where is the Redis module for PHP on CentOS 8 (php-pecl-redis)?

I can't find the package php-pecl-redis on CentOS 8 with EPEL repository enabled. Apparently EPEL no longer provides it. I've only found it on REMI repository, but I would have to replace my entire ...
2
votes
0answers
71 views

Cannot delete php/sessions folder

I could really use some help. I have a Ubuntu 14.04.6 account with DigitalOcean and am encountering some errors related to lack of space. When I ssh into the account and do a tab-completion at the ...
1
vote
1answer
106 views

Apache2 / PHP 7.4-fpm not downloading files but displaying them in browser

Apache2 using PHP 7.4-fpm is not downloading files but displaying them in browser Take a look here https://www.files.olokos.pl/wl/?id=MCeDihTf5XvHq8RCqbh81rlRoAACLIL8 I am not sure what happened as ...
2
votes
1answer
315 views

Azure MySQL in-app: Only one usage of each socket address is normally permitted

I'm running an app-service on Azure with a PHP application and a MySQL in-app database on it. This app service has a lot of small requests coming in (i.e. to get or update a leaderboard for a game). ...
3
votes
2answers
101 views

Slow queries when switching from GoDaddy to AWS

A coworker of mine just migrated our server and DB to AWS and since then a handful of queries are going extremely slow. Our code is largely PHP and we're using a MySQL database. Based on some ...
0
votes
0answers
35 views

security - deny all direct php request from nginx

After some (failed it seems, can't be sure since if someone actually got access can erase the trails) hack attempts during last few days over one of my servers I decided to tighten the security a bit. ...
0
votes
0answers
126 views

Apache disabling mpm_prefork error: The following modules depend on mpm_prefork and need to be disabled first: php7.3

I have a 8GB droplet on digitalocean. We launched our site today and we got intense traffic, we have about 3000 concurrent users. I tried to raise the ammount of concurrent connections (with the ...
0
votes
1answer
123 views

How to point composer to the right PHP version?

I have several versions of PHP installed on my server, and I use FastCGI to select the one to use for a certain setup. I am trying to install PIMCore and it has a Composer project for that. I have ...
0
votes
0answers
55 views

Configure Apache with a specific php-fpm pool based on http request method

I'm working with Apache/2.4.41 in a CentOS 7.6 box. I have two different php-fpm pools running and listening on different ports and I'm trying Apache to send the POST, PUT and DELETE requests to one ...
0
votes
0answers
208 views

apache2 and php7.X

Enabling php7.x under Ubuntu18 and apache2.4 gives some warnings: Considering dependency mpm_prefork for php7.3: Considering conflict mpm_event for mpm_prefork: Considering conflict mpm_worker for ...
1
vote
0answers
41 views

Kerberos on NameBased vhosts with SSL

Im trying to figure out how to implement kerberos for SSO on sites that are using name based vhosts on apache ( linux server) e.g. Lets say that I have domains a.com and b.com. Both are set as ...
1
vote
1answer
129 views

Why is Apache creating so many internal dummy connections? CPU usage issues affecting server performance

Trying to get on top of some CPU usage issues and investigate possible malicious activity. As part of this I am curious about lots of dummy connections in the Apache logs. What is the origin of these ...
0
votes
2answers
540 views

Why is there a mysterious page redirection on localhost? [closed]

I migrated this question from https://stackoverflow.com/questions/59259672/why-is-there-a-mysterious-page-redirection-on-localhost on StackOverflow I am seeing something extremely weird that I have ...
1
vote
1answer
196 views

/usr/bin/php vs /bin/php vs php in bash [closed]

We are running a php client command. php xx yy zz run just fine but not its counter parts (/usr/bin/php and /bin/php) which give very weird error. I am so confused row, given that : command -v php |...
0
votes
0answers
545 views

PHP error_log not working

I'm using slim framework and I've added error_reporting(E_ALL); to the first line of my public/index.php file. I'm using apache2 and Ubuntu 18. This is conf file <VirtualHost *:80> ...
0
votes
0answers
134 views

php.ini not applying in phpinfo()

I have a website running on CentOS. I have a problem where changes in my php.ini file aren't reflected in phpinfo(). More concretely, I set allow_url_fopen = Off So I checked these lines: ...
1
vote
0answers
81 views

MySQL server has gone away

MySQL is running on Ubuntu 18.04. We have many databases running on this single server and many sites running from those databases. All sites working fine except one site. That site frequently goes ...
0
votes
0answers
83 views

Install PHP 4 in Wamp, UwAmp or Apache

I'm .Net developer, and I found in company a physical RedHat server with a lot applications in PHP and I need to create a local server to start translate this PHP apps to .NET, but I need install PHP ...
2
votes
2answers
199 views

Php ignores file upload limits

I am running a bookstack instance in php under nginx. Unfortunately i can't upload any file bigger than 2M. And this is my problem for today. File upload attempt results in HTTP/1.1 422 ...
0
votes
3answers
24 views

File is re-creating automatically on change [duplicate]

I have a weird problem on server after the attack. In the web folder I have the index.php with malicious content. When I try to delete, rename it or change its content it is re-created somehow. I ...
0
votes
1answer
278 views

Simplest way to setup a failover web server

So I have a simple web app (LAMP) , minus (MySQL) , that stores user generated data into files (think photos, audio etc). I want to setup a failover webserver what's the easiest way to do this? ...
0
votes
1answer
184 views

Wordpress installation fails Ubuntu, PHP-FPM and Nginx

Wordpress installs without any issues. No error log in FPM, Nginx and WP-Debug. However it is not working. I believe the issue is related with FPM. When I carry all the WP code (no-change) into ...
1
vote
1answer
47 views

Nginx configuration for domain and subdomain

I'm new to Nginx. My main goal was to host two Websites for one Domain. I wanted a subdomain hosted separately from the main domain, such as: example.com is served from /home/user/Documents/...
2
votes
0answers
375 views

Apache/PHP: Internal server error. Untraceable! How is that even possible?

I have a Nextcloud server running NextCloudPi (NCP) on a Raspberry Pi 3. NCP is Raspbian/Apache2/PHP/MariaDB stack so to speak. It's run reliably for years. But recently my Nextcloud died! All it does ...
0
votes
0answers
32 views

How many requests can a PHP web server handle per second? [duplicate]

Given the following: I have an AWS EC2 t3.small instance. The instance uses the most recent Ubuntu LTS as its operating system. The instance has 2GB RAM and 2 CPU cores available. I have installed ...
0
votes
1answer
52 views

Can undefined variables and notices cause a cpu spike?

We're running centos 6.7, PHP 5 and MySQL 5.5 and Apache 2.2.15. Sometimes we see high CPU usage, mainly caused by MySQL so we take all the logs we can get. We're addressing MySQL optimization ...
0
votes
0answers
222 views

Install PHP Calendar Extention

How do I install/enable php calendar in the server ? I came upto https://www.php.net/manual/en/calendar.installation.php , but could not move more that that. What is the full command, and do I have ...
0
votes
1answer
67 views

Existing PHP Session Assigned to other client

I have a 64RAM, 32vCPU VPS with Apache and Nginx as reverse proxy. Suddenly after a traffic increase some of the clients everything works perfect. Traffic is being handled decently, the problem is ...
0
votes
0answers
89 views

Installation failing when installing PAM via PECL

I've been setting up Roundcube on Debian 10 with PHP 7.3, and so far everything has been alright. However, I'm using PAM for the email database, and when trying to install the password plugin I ...

1
3 4
5
6 7
149