Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
50 views

RewriteRule is not working when index.php is clicked

RewriteRule is not working when index.php is clicked. Below is my code : RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^home$ /index.php [L] ...
1
vote
0answers
28 views

glusterfs for wordpress hosting

I've seen many tutorials recommending glusterfs for distributed web application hosting. Is this really the best practice for small scale load balancing? It seems the latency issue is slowing us ...
0
votes
0answers
26 views

Automatically ban IP addressed using rule based on GET request

I'm setting up my first website on Ubuntu 18.04 using Apache and I've noticed the following in my apache error log on a daily basis: 94.102.49.125 - - [07/Feb/2019:11:32:55 +0000] "GET /muieblackcat ...
0
votes
0answers
25 views

Couldn't understanding the following trace

We have a number of Android app works on different APIs from our main domain.They all are images apps. Recently after spike in app traffic, our APIs are going down frequently, I though it was my ...
0
votes
1answer
66 views

PHP FPM .conf per site vs server PHP pool performance tunning

I saw this article how to tune the PHP FPM https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534 this article shows Excel sheet to calculate ...
2
votes
1answer
44 views

Multiple RewriteRule in htaccess not working

I am very well aware that such type questions have already been asked many times but I think mine is a different one. I am a newbee to .htaccess. RewriteEngine On RewriteBase / RewriteCond %{...
1
vote
0answers
48 views

Nginx: how to rewrite HTTP_HOST keeping the original URL unchanged

A bit of background: When abc.mywebsite.com (or xyz.mywebsite.com and so on) is requested, it received by haproxy, which replaces the Host header with main.company.net and also adds the X-Custom-...
0
votes
1answer
50 views

Apache-PHP slow page in one virtual host causes performance degradation or timeout on other

I have multiple PHP applications running under different virtual host on an Apache server. Each application uses MySQL as backend. Each application uses different MySQL servers in the same data center....
0
votes
0answers
40 views

NGINX Proxy Pass with Login - Not Basic Auth

I am running NGINX with a proxy pass and basic authentication. The problem: The proxy pass is forwarding to an AppDaemon that is running a custom application that I am unable to modify. I would like ...
0
votes
2answers
63 views

CentOS 7 can't install php module

I have installed php 7.2 on centos 7. I tried to install the module redis but it seems id doesn't want to download. Here is the error of the command yum install php-pecl-redis : I tried installing it ...
1
vote
0answers
59 views

AppEngine - Client closed keepalive connection

I have deployed my Symfony 4 app to Google App Engine (Flexible environment). The build seems to have worked, but loading the app on in Chrome results in error: Oops! An Error Occurred The server ...
0
votes
1answer
12 views

unixODBC in Apache broken after enabling Kerberos on Centos7

Had unixODBC working very well. Decided that we wanted to implement Kerberos authentication to lock down different sites in Apache to certain user groups. Once this got enabled, connecting to the ...
2
votes
0answers
27 views

CentOS phpMyAdmin connecting from external ip?

I'm trying to connect to phpMyAdmin which is running on my CentOS server from my pc with the following phpMyAdmin.conf: <Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <...
0
votes
0answers
17 views

Python “alternate malfunction”

I have a web application that runs over a Centos Server. It was written in php and python. Suddenly without modification something starts to works in alternate and randomly way (one time fileB.php is ...
0
votes
1answer
29 views

Migrate legacy PHP to PHP-FPM

I wonder if I could have some feedback from some people that did the migration from php to PHP-FPM. The issue I have is that I have lots of scripts on the service. Some written by customers and I cant ...
0
votes
1answer
38 views

Best way to restrict/manage PHP apps to use my postfix?

I want to allow PHP apps to send mail but under very restricted conditions. And I don't want to allow sendmail-like command for PHP apps (I'm using chrooted PHP and it's too much headache), thus I ...
1
vote
2answers
176 views

Installation of pecl_http on PHP 7.3 / Debian 9 Stretch fails

I am trying to install pecl_http in PHP 7.3, however, there is an error: root@dev:/etc/php/7.3/mods-available# pecl install pecl_http downloading pecl_http-3.2.0.tgz ... Starting to download ...
0
votes
0answers
31 views

Exclude folder with deployer.php

I have a symfony project that every time I make a change I use the deploy. Now I need to add a wordpress project in the web folder and I do not want it to be affected by the deploy. I wanna exclude ...
0
votes
1answer
220 views

Install or Upgrade to PHP 7.2 from 7.0 on Debian 9

I am trying to install or upgrade whatever suits best from PHP 7.0 to 7.2. I'm facing below while running sudo apt-get update. Would appreciate if someone could let me know how to proceed with this. ...
0
votes
0answers
16 views

What is the most important hardware spec with PHP's readfile function? [duplicate]

I have a PHP script that serves files via the readfile() function on an Ubuntu server with PHP5. I would like to speed up the process, but I am not sure which system requirement will help me to ...
1
vote
0answers
36 views

MBString Segfault with apache2 ubuntu 18.04 Laravel 5.7

I am working on a script API with Laravel 5.7. When I try and run a command on the API, I get the following segfault segfault at 7ffc466e9ee8 ip 00007f2adb4144ed sp 00007ffc466e9ef0 error 6 in ...
0
votes
2answers
27 views

PHP Upload_max_filesize for different domains?

I have various domains hosted on one server - however they all seem to load from the same PHP.ini. I want the different domains to be able to upload different filesizes, for instance, our public ...
1
vote
1answer
37 views

Should I add `/dev/urandom` into PHP `open_basedir`?

My system is centos 7.4,with Apache 2.4.6 and PHP 5.4. I have following setting in /etc/php.ini open_basedir =.:/tmp/:/var/lib/php/session/ session.save_path = "/var/lib/php/session" session....
0
votes
1answer
32 views

Is there any security issue when I set `apache` as the only owner of websites files and folders? [duplicate]

My server is centos 7,with php 5.4,apache 2.4. My website locate in /var/www. As for apache is the only one user read or write in /var/www,I set all files and folders owner and group to apache: ...
0
votes
1answer
86 views

remove php extension on url

I have tried many ways to remove my php extension but unable to do so, here is what I'm trying to achieve. https://google.com/users/login.php > https://google.com/users/login Sounds easy but I can't ...
-1
votes
1answer
36 views

NGINX location block to fastcgi process URL segments as URL parameters. How?

I am trying to understand how to get this location block to work as desired. ## TESTING MOD REWITE FROM APACHE... location /beta9/projects/project/ { try_files $uri $uri/ /beta9/projects/project/...
0
votes
0answers
23 views

nginx save every request every made including headers

I want to set up a nginx rule that will log every request ever made on my site including cookies. For example for a single php script I can get the full request body with this code: print_r($_SERVER);...
0
votes
0answers
66 views

NextCloud slow behind Proxy/ReverseProxy

I have only one public IP, so I ProxyPass a Subdomain from my Webserver (Apache @ Ubuntu) to my NextCloud-Server (Apache @ Ubuntu). Everything works fine, except it's very slow (for example on my ...
0
votes
1answer
91 views

'File not found.' after switching to php fpm (apache, ubuntu server 18.04 LTS)

I know this question has already been answered mutiple times, but the answers are almost all diffrent and are sorta confusing. I have tried alot of answers but none of them work. I follow the answer ...
1
vote
0answers
17 views

PHP - Soapclient - Basic Auth -> SERVER->REMOTE_USER

We use a PHP Soap-Webservice on a 1und1-Server. If i call the Service like $client = new SoapClient('https://server.com/test.wsdl', array('login' => "tuser", 'password' => "tpass", '...
-3
votes
1answer
198 views

How to install multiple PHP versions in Virtualmin 6, Debian 9 [closed]

By default Debian 9 comes with PHP 7, but I was interested in PHP 5 for older websites as well. I tried following/adapting this guide (not virtualmin specific) https://pehapkari.cz/blog/2017/03/27/...
1
vote
1answer
31 views

Encrypting LAN http traffic

I have two droplets at digitalocean. Both servers are LEMP, however one is completely blocked (http & https) with a firewall. I want to make HTTP requests between the two servers, however there is ...
1
vote
0answers
34 views

Install Zend Debugger or Xdebug for PHP 7.0 on RedHat 6.10 (64bit)

I'm trying to install Zend Debugger or Xdebug on RedHat 6.10 for PHP 7.0. I have tried the Zend Debugger extension for PHP 7.0 provided by Zend.com at http://www.zend.com/en/products/studio/downloads-...
0
votes
1answer
30 views

Webserver error 503 Troubleshooting

I have a nice VPS with 4 cores, 180ssd, 8gb of ram. My website is a custom website, that autogenerates from a database, and on the first run it is cached in memory using redis. The issue that I am ...
0
votes
0answers
15 views

Conflicts between htaccess rules [duplicate]

I'm trying to use the url_rewrite system for php but, as i'm a rookie i have a conflict problem (i suppose) between rules. I have these three htaccess rules. The first two are working, the last one ...
1
vote
0answers
101 views

Can't load SQLsrv due to “zval_ptr_dtor” error

I am trying to install the PHP MSSQL Driver following this guide: https://serverpilot.io/docs/how-to-install-the-php-sqlsrv-extension But I keep running into this error after the installation (no ...
0
votes
1answer
176 views

php-mcrypt (remi) error while upgrading from php 5.4 to 5.6 on CentOS 7

I'm trying to upgrade php on CentOS 7 from 5.4 to 5.6. When I run yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo I get this dependency error. There ...
0
votes
1answer
31 views

Magento 2 install hangs with no errors or information

I am trying to install Magento 2.3 on a windows server (IIS with PHP installed - No XAMP), but the installation seems to hang. The wizard progress shows the following: (And has been for hours) ...
0
votes
0answers
11 views

Apache: Dynamic multiple URLs to point to the same content

I am in a situation where I need to have multiple different urls point to the same content/code. Basically there is a super admin that manages multiple projects. Each project has to have a different ...
1
vote
0answers
18 views

PhP Session Destruction not as eXpected

I have added this code to the top of my page and it is executed when a user login. <?php $lifetime=86400;session_start();setcookie(session_name(),session_id(),time()+$lifetime,"/","","TRUE","...
0
votes
1answer
47 views

Why does switching to secure folder (httpsdocs) break the PHP file upload function

Server version: Apache/2.4.34 (Unix) I'm trying to utilize an existing SSL certificate for several sub-directories of a domain, but the architecture for the domain separates out two directories for ...
0
votes
0answers
10 views

Nfs serveur slowed down after php code timed out

As stated in the title, I have an Debian9 nfs server that has presented some odd behaviour recently. We have a php application where all the app code, image, cache... is in an NFS. The NFS is running ...
-2
votes
1answer
42 views

LAMP stack with AWS performance [duplicate]

I am planning to move my LAMP stack to AWS as the number of users increases. Current estimations suggest, that the Server has to handle roughly 100.000 users accessing the static landing page, out of ...
0
votes
0answers
19 views

php-fpm status shows listen queue 0 when it is delaying requests

I have a php-fpm server running on a high-traffic website (behind nginx). It is frequently reaching a point where the active processes are equal to the maximum number of processes, which is the most ...
0
votes
0answers
12 views

All UNexisting files and folders redirecting except for those with php extension

I use the following directive for my application: location / { root "C:/Program Files (x86)/EasyPHP-Devserver-17/eds-www"; index index.php index.html index.htm; autoindex on; ...
0
votes
1answer
153 views

PHP upgrade 5.6 to 7.2 result in segfault

I upgrade one of my Ubuntu 16.04.5 LTS server from PHP 5.6 to 7.2. I use Ondrej PPA : https://launchpad.net/~ondrej/+archive/ubuntu/php After the upgrade, I found some segmentation fault with ...
0
votes
1answer
52 views

Change http_host fastcgi param with nginx

Context: I've got an application that run under a given domain. But in some cases I need to run it under another domain than the domain it expect (I also change potentially the port). I'm trying to ...
0
votes
0answers
8 views

Tell extension and zend_extension apart

We've been using staticly linked extensions in our php builds for years without any problems, so I never had to wonder, but trying to switch to dynamic (--enable-mysqlnd=shared for example) I have two ...
0
votes
0answers
40 views

stderr: “Primary script unknown”, request: “GET /data HTTP/2.0”, upstream: “fastcgi://127.0.0.1:9000”, “File not found from” while access from the web

When trying to access through the web I getting "File not found" Nginx with php7.2-fpm on Centos 7 The full error from /var/log/nginx/nginx.error is: 2018/12/31 10:20:01 [error] 27963#0: *6478 ...
1
vote
0answers
50 views

Banning IP addresses after repeated login attempts to specific URL

I have a few questions regarding banning IP addresses after x many login attempts to a certain url on my website. Mostly, what would be the recommended or most efficient way? Example URL: https://...