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
48 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
2k 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
75 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
47 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
98 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
34 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
342 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
47 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
25 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
228 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
361 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
59 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
452 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
32 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
121 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
88 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
309 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
455 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
199 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
16 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
25 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
15 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 ...
-1
votes
1answer
60 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
33 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
15 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
223 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
246 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
56 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
56 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://...
0
votes
0answers
40 views

How to point apache to the php binary used by the php docker image

I'm trying to use the php docker image to set up an apache web server: FROM php:7-alpine3.8 apk add apache2 php7-apache2 When I print phpinfo() from the webserver I see that it is running with the ...
0
votes
1answer
231 views

Incorrect timezone in PHP error logs

The timestamps in my PHP error log are being displayed in UTC. I want them to display in my local timezone. The date.timezone property in my php.ini file is set to the correct timezone. The output of ...
-1
votes
1answer
37 views

Prove traffic when I own the server

I work for the goverment and one project targets employees that might apply something from their employer, for example a vacation period. They login with username and password. I want to record their ...
1
vote
1answer
578 views

What is the best way to run cronjob in AWS ECS?

I have a web app powered by Laravel that is set up on AWS ECS. I would need to run an artisan command as a cronjob. I'm looking at "Scheduled Tasks" in ECS Cluster configuration. I can launch new ...
0
votes
0answers
179 views

Require all denied, with require ip is blocking all connections

I am facing a weird situation where i couldn't find a proper answer to. I am using some kind of an API where i can send responses to certain requests from the same root domain. My api is in a ...
0
votes
1answer
531 views

Unable to enable mpm-event in httpd | centos 7

I am kind of new to mpm and all so please don't mind. I have a web server running 8 websites (php based) on it. And my RAM usage goes over 90 % and the swap usage goes over 80 %. And when i check ...
0
votes
2answers
313 views

Using deny from all inside htaccess in a subdomain restrict access to itself

I am facing a strange situation where i couldn't find a proper answer to. I am using some kind of an API where i can send responses to certain requests from the same root domain. My api is in a ...
0
votes
1answer
193 views

Change in php.ini not reflecting PHP Memory_Limit Master Value

I am trying to install a composer package for AWS S3 integration and came across the Composer Out of Memory issue. Upon checking phpinfo() I could see the loaded php configuration file is /etc/php....
1
vote
1answer
3k views

Debian 9 stretch with PHP 7.2: unable to install PDO PHP Extension

I have installed PHP 7.2 on a Debian 9 server (a docker container actually) and installed some php modules. But when I get to gd and pdo/mysql apt is unable to find any packages: $apt install php-...
-2
votes
2answers
24 views

How to remove connection time out links form RHEL

I want uninstall LAMP from my REDHAT virtual server and reinstall back it again but i don't have internet access on my server and when i uninstall mysql from my server i getting below error please ...
0
votes
1answer
285 views

How to detect Apache LimitRequestLine from PHP?

Is there a way to get current Apache settings from a PHP script? All happens on the same server. I have tried running apache2ctl -DDUMP_CONFIG | grep LimitRequestLine from within PHP. It kind of ...
0
votes
0answers
228 views

Cron PHP sessionclean hangs invoking oom-killer

This morning one of our Linodes (18.04.1 LTS (GNU/Linux 4.18.16-x86_64-linode118 x86_64)) crashed. From the syslog I can see that cron task PHP cleansession got stuck around 36 hours ago: Dec 15 23:...
-1
votes
1answer
255 views

[alert]: fastcgi request record is too big -Fastcgi receives an error message that the get request is too long

Recently, the program encounter ed a problem, LNMP environment, because PHP in the program spliced GET request uri parameter is too long, resulting in an error, nginx processing uri is too long ...
0
votes
1answer
221 views

Nginx proxy_pass to Wordpress site for site.com/blog to blog.site.com

I'm trying to get my Wordpress site to serve from example.com/blog with an Nginx web server proxy_pass to a Wordpress site (apache) hosted on another server at blog.site.com. With my current Nginx ...
1
vote
1answer
25 views

How to prevent PHP on a virtualhost/website from writing to another virtualhost's/website's directory on the same Apache server?

I want to prevent virtualhost #1 from writing or reading to virtualhost #2 without losing writing access to the www-data at all (because the applications need to write to the directory). My current ...
0
votes
1answer
81 views

Forward mail using qmail to multiple recipients dynamically

I am trying to forward an incoming mail to multiple recipients. The recipient's addresses are stored inside a mysql database, so I need to call a script to get the addresses before forwarding the mail....
0
votes
1answer
40 views

How to setup a PHP API to work over HTTPS?

I use a simple API with PHP to get some values in JSON format, it is working fine in web browser over HTTP. I enabled SSL in mariadb with the certificates, but when I try my API using HTTPS, it says ...