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
272 views

zend_mm_heap corrupted PHP Fatal error: Cannot redeclare composerRequire

We have a webserver where besides normal requests large files are being uploaded. Some requests (such as 1/10) are dropped. We than see following errors in the error log. ==> /var/log/apache2/...
1
vote
0answers
83 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
2
votes
1answer
231 views

Why may AWS t3.micro in Singapore respond slower than t2.nano in N. Virginia from Bangladesh?

I have a t2.nano instance running in North-Virginia availability zone (us-east-1) for almost 1 year. In hope of reducing latency, I just have deployed the created AMI of that instance to a t3.micro ...
0
votes
1answer
156 views

Can't set session.save_handler to memcache

NGINX + PHP-FPM 5.7.12 I'm trying to set my session handler to memcache, so I installed the module php-memcache, opened /etc/php.ini and changed the following lines: session.save_handler = memcache ...
1
vote
1answer
42 views

give apache ID permissions to list and CRUD files as OS users

I wasn't sure if this question belongs here or on SO. I can move it there if needed. In any decent Apache configuration, Apache will run as its own ID; www-data for example. And this ID will not have ...
1
vote
2answers
81 views

Using SQLite through PHP without completely disabling SELinux

I'm trying to access an SQLite file on a CentOS7 box using PHP and the PDO library. I was getting read-only errors just like this question - https://stackoverflow.com/questions/3319112/sqlite-read-...
0
votes
0answers
228 views

How to rate limit with an api key (Apache/nginx)

I have an API in PHP and want to rate limit it into various tiers, with different tiers having different rates. Each user will be assigned a tier, and an API key for use in the URL. So for example ...
0
votes
1answer
121 views

404 error on Apache server [closed]

I have installed Apache, PHP5, and MySQL on my new Linux Lite install for my laptop. I have edited <Directory /> in apache2.conf to look like this: <Directory /> Options Indexes ...
1
vote
0answers
19 views

Nginx serving PHP file as download [duplicate]

I have a website with an index.php file (rhys.ddns.net/php/index.php). Whenever I try to access said file in my browser it is getting served as a download. I have checked my sites-enabled/default file ...
0
votes
0answers
27 views

Security Scan causing weird logs

So some time ago, I coded a website(PHP) and wanted to check for common web security vulnerability. I used Nessus and Burp Suite to scan for vulnerabilities in my website. The scan result showed no ...
0
votes
0answers
11 views

On a 504 - does the process continue?

I've got a PHP script that does a particular job (sends a bunch of emails) when a browser visits it. Every now and again that job takes quite a while and it times out. Last time this happened, it ...
1
vote
0answers
210 views

Trying to update PHP servers to PHP7-cgi (7.2)

I'm Trying to update PHP servers to php7-cgi (7.2) in my .htaccess file. Just not sure how exactly to edit the code, haven't been able to get it to work. Here is the code in the .htaccess file: ...
0
votes
0answers
52 views

php performance issues between two servers

I know this question might be too broad but I'm desperate. Prenote: Here I'm testing php with CLI but same difference occurs with Apache+PHP too. But to avoid Apache caching and other stuff I used ...
0
votes
3answers
60 views

How to setup website across multiple web servers (with load balancer)?

I am trying to use two web servers to run my website (as opposed to the one I use now). I can easily create another LEMP stack on my hosting provider (Digital Ocean) and setup a load balancer to ...
0
votes
1answer
486 views

DNS lookup failure for:

I installed my server with virtualmin, and I am using apache with php fpm. When I try to open my website I have this error : Proxy Error The proxy server received an invalid response from an ...
0
votes
1answer
52 views

invisible php process on linux

I have a php script running in an endless loop on my Linux server. I know it's running because it's the only script that does X, and X is definitely happening. However, it's not listed in crontab, and ...
0
votes
1answer
405 views

Load balance PHP-FPM with HAProxy resulting in service unavailable

I need to load balance PHP-FPM with two backend servers with HAProxy (with Apache running on those backend servers as well). I have this frontend: frontend fr_fpm bind *:9000 mode tcp ...
0
votes
1answer
1k views

Nginx says 404 not found, no error log

I am getting a 404 not found at nginx page, i get no error in nginx error log file too. server { listen 6269; server_name (domain); root /home/temp; index /_h5ai/public/index.php; ...
0
votes
0answers
147 views

Proxmox LXC networking

We have 5 physical machines hosted at OVH. Each of them have Proxmox 5.2-10 installed Machines are inside of OVH vRack. we have separate LXC for database, separate LXC with loadbalancer and several ...
0
votes
1answer
720 views

Cannot find php-fpm to for PHP 7.2 to install on Centos 7.5

Have created a new VM server for a project, it is running Centos 7.5. After following a large number of different articles online to try and get nginx and PHP 7.2 running on this box I cannot get the ...
0
votes
1answer
25 views

PHP Gateway Login Management Systen

Situation: Creating self hosted web services to share with friends on Linux machine. E.g. wiki, ownCloud, etc. Problem: Every web service requires individual logins. Troublesome. Question: Is there ...
2
votes
0answers
56 views

Connecting to a external exchange server via linux/php?

We have an SMTP relay available that we are using on windows servers. [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = email.relay.url ; http://php.net/smtp-port smtp_port = 25 ...
-1
votes
2answers
1k views

BASH-create a 'www-data' crontab that runs a PHP file

I need to get this to run in a cron file in /etc/cron.d/: */15 * * * * php -f /var/www/nextcloud/cron.php ...but, my scripts don't run. It's permissions are set to 644 and I need to create it with a ...
0
votes
1answer
686 views

nginx stopped serving index publicly after installing php

Nginx was serving a index.html fine from /var/www/test/html/ from within the server and also when I curl'd the ip and port like some-ip:8889. Then I installed php because I was going to try serving a ...
0
votes
1answer
281 views

Laravel Forge: Unable to create AWS EC2 instance in London Region

When I try to create a server on Laravel Forge for AWS in the London region I get the following error message: Whoops! There were some problems with your input. The server provider was unable ...
0
votes
2answers
133 views

changes in php.ini file being ignored

I am having a hard time with this. I am trying to increase post_max_size = 90M upload_max_filesize = 50M but my info.php is still showing default values 20M I am editing 100% correct file which is ...
0
votes
0answers
139 views

PHP-FPM pools of a domain are working non stop

My server OS is centOS. I use Apache for httpd. Every site runs PHP by own user. One of my sites (let's say that 504domain.com) gives 504 gateway error constantly. Restarting Apache makes the site ...
0
votes
0answers
22 views

Limit php to a site's directory in apache

My server has multiple vhosts. I would like to isolate php running in a vhost folder to that vhost's files. Each host has a directory in /www matching its domain name. So if a php script is invoked ...
0
votes
1answer
62 views

make docker container to listen requests from just another docker container

I have 3 docker containers (FrontEnd, Database, and ApachePhp) within the same Docker network. ApachePhp will be a web server (Apache + PHP) that I need to make visible only through the FrontEnd i.e. ...
0
votes
1answer
186 views

Apache24u / phpinfo: still showing old version

Ive upgraded the server from default apache 2.4.6 to the apache24u (https://centos.pkgs.org/7/ius-x86_64/httpd24u-2.4.34-1.ius.centos7.x86_64.rpm.html). when I check it via shell, I get the correct ...
0
votes
0answers
173 views

Basic Auth header params does not exist depending on url

Forgive me ahead of time for my lack of knowledge on this topic When I send a basic auth request (via header) to my url https://www.mywebsite.com, the PHP server variables such as "PHP_AUTH_PW" and "...
0
votes
1answer
136 views

Nginx config for symfony on ubuntu

I want to setup symfony with nginx and this config is working fine server { listen 80; root /src/web; location / { # try to serve file directly, fallback to app.php ...
0
votes
1answer
166 views

ubuntu 18.04 lamp stack installed in root partition taking full space

I have a problem on my dedicated server. I wrongly configured it at the beginning, today I got a php error saying that there was no space left on the device. I checked my directories and saw that /dev/...
0
votes
1answer
3k views

Unable to locate package php7.2-gd

I'm trying to install php7.2-gd on my production server. I have 2 servers -- one for dev and one for prod. When I run this installation in our dev server, everything is fine. When I tried doing this ...
1
vote
1answer
302 views

php-fpm fails after X requests

I using nginx to serve out a PHP CMS (Grav) so I've been using php-fpm. Everything works fine in the beginning, but after about 20 or so requests, some of the pages will return a 502 error. I don't ...
0
votes
1answer
72 views

ODBC connections stop working under load

All We have a system running Windows Server 2016 with IIS 10 and PHP 7.1.16. The scripts connect to a SQL Server database through ODBC. It works very well during normal conditions, however we get a ...
1
vote
2answers
819 views

SQLSTATE[HY000] [2002] No such file or directory, google cloud app engine flexible

I am trying to connect cloud sql with google cloud app engine flexible. My code is as bellow: $dsn = getenv('MYSQL_DSN'); $user = getenv('MYSQL_USER'); $password = getenv('MYSQL_PASSWORD'); try { ...
0
votes
1answer
2k views

Update from PHP 5.6 to PHP 7.3 [closed]

I am trying to update from PHP 5.6 to PHP 7.3 I installed: php7.0-fpm php7.0-mysql and I have the 2 services raised but Nginx only recognizes PHP 5.6. If I stop the service, I get the error 502 Bad ...
1
vote
1answer
51 views

How do I serve all paths under a SUBDIRECTORY to a single PHP file using nginx?

I have the following structure /var/www/lsl/generalmedia subcontent1/ picture.jpg subcontent2/ subsub1/ picture.jpg subsub2/ index.php Accessible ...
1
vote
1answer
29 views

console PHP produces opcode output

I have PHP running on WSL on windows along with nginx+php-fpm. The web component is running php OK, but console PHP produces opcode output for some reason. For example i have such PHP file: ?php ...
1
vote
1answer
240 views

Nginx to redirect to specific PHP

I wanted to rewrite the url path to point to certain PHP. Here is the flow: User Login https://admin.abc.com After they logged in, the system will pass url to be redirected https://admin.abc.com/...
0
votes
0answers
40 views

Nginx pass my request to default or local address

There is two issue with NGINX configurations. I tried to setup prestashop on CentOS 7 with Nginx according to this instrument that I found similar this in Prestashop forums . the nginx.config file ...
0
votes
0answers
15 views

Quick php upgrade on nginx webserver

I need to do a php version upgrade on clients production server. (current is 7.0 need to upgrade to 7.2). Since this is production environment, I need as little downtime as possible. What would be the ...
0
votes
1answer
56 views

ec2 out of memory from apache random spike

Over the past year, we had consistently random spikes which caused apache to use all the memory and swap out. Server Uptime I have an example of the latest crash (5:30AM - 12:00PM UTC). OOM Kernel ...
0
votes
0answers
126 views

Migrating existing site to Azure is slow

I am migrating a site to Azure. However the site is now running unacceptably slow. The setup is as follows: Azure standard Linux apps service plan MySQL on Azure standard instance Here's some of the ...
0
votes
0answers
48 views

Missing php-redis repository in docker debian stretch image

I'm missing the repository that includes the php-redis package. Inside my debian 9/stretch docker container I run the following: root@dcc82d674095 [19:36:46] [/var/www/html] -> # apt-get install ...
0
votes
0answers
46 views

Configuring Apache for a static site built with PHP; Getting 404 Not found

So I inherited a static site built in PHP. Upon trying to go to the alias I created, It's pointing instead to my index.html file in my Users/antonio-pacivevac-ortiz/Sites/ Here are some config files (...
0
votes
1answer
32 views

What does the following statement on nginx config mean?

I am seeing a statement on nginx config but can't figure out what it does. this works when I am at the main directory under path; however, when I try to access files in subdirectories, it doesn't ...
0
votes
1answer
93 views

php apache_note with mpm_event

I'm wanting to switch to mpm_event to be able to serve a higher rate of requests. My initial testing showed that the server can serve a higher rate of requests when using mpm event. The server is ...
0
votes
1answer
67 views

PHP app under subdomain of Gitlab's nginx

I have set up Gitlab using Omnibus. It has embedded nginx. It works fine on ports 80 and 443. On 8083 I also have installed VestaCP. VestaCP has Softaculous. Using Softaculous I have installed a PHP ...