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

Why returns apache a http 500 but does not log any errors?

On a 12 year old (web) server is still 1 old (custom) PHP application hosted. We want to shutdown this server and remove it from the rack. Unfortunately we still need the application, is not actively ...
8
votes
5answers
83k views

mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in

I'm trying to run PHP 5.4.1 ( compiled from source ) but when i try to connect on mysql i get: Warning: mysql_connect(): The server requested authentication method unknown to the client [...
0
votes
1answer
36 views

Can't set open files limit for user www-data and process PHP in ubuntu 16.04

I am having trouble setting the open files limit for user www-data and process PHP in Ubuntu 16.04. I have set all the following to 65535: /proc/sys/fs/file-max /etc/sysctl.conf /etc/security/limits....
0
votes
1answer
53 views

How can I “spy” on an Apache web server's response to server-side code like PHP or JavaScript?

I'm trying to debug a problem with a file upload strategy and don't know whether there's an issue with directory permissions / ownership or the scripts. ... I've tried both PHP and JavaScript and can'...
0
votes
1answer
1k views

IIS | Block execution of files in directory

I am dealing with user uploads via a PHP application. I want to secure the server so no exploits are available to the user, such as uploading a php shell and executing it. I have set it so all ...
0
votes
1answer
4k views

How To Fix Padding Oracle (CVE-2016-2107) On Ubuntu/Apache/PHP

I am trying to fix CVE-2016-2107. I consulted several sites, which do not seem to provide a clear answer for all cases: I use Apache2 2.4.12 with PHP 5.5.26. I ran: apt-get install openssl libssl-...
0
votes
0answers
41 views

How to configure Apache to work with current version of PHP?

The problem can be simply shown. My goal is to overcome this error message: http://jfknumbers-forum.org/phpBB3/ Error Message from phpBB application I made a HUGE mistake attempting to build Apache ...
0
votes
3answers
24k views

phpMyAdmin AuthType=config: mysqli_real_connect(): (HY000/2002): No such file or directory

When I attempt to load phpMyAdmin 4.8.0 using AuthType=config I get an error: Cannot connect: invalid settings. mysqli_real_connect(): (HY000/2002): No such file or directory phpMyAdmin tried ...
0
votes
1answer
2k views

php unable to connect to MySQL via SSH tunnel

I have executed both commands via SSH with no error and than when I try to connect to the MySQL server via SSH tunnel I get no results even if I do a simple query like select * from table. I get no ...
1
vote
2answers
5k views

Upgrading PHP 5.3 to 7.x on CentOS 6.10 (final) - Unmet Dependencies

I am a bit rusty these days and could use some help. I've cracked opened a few old servers and have started the process of dusting them off. In the process I'm updating things like PHP. I regret to ...
2
votes
1answer
4k views

Secure PHP on IIS 8.5

I'm using IIS 8.5 on Windows Server 2012 R2 to host ASP.NET and also PHP-Applications. Because there are a few different PHP-Apps, I want to restrict the access by using open_basedir. The problem: ...
1
vote
1answer
13 views

php geoip not working on ubuntu 18.04

I can't get the GeoIP PHP extension working on Ubuntu 18.04 with PHP 7.2 i have intalled it by the cli: sudo apt-get install -y php7.2-geoip Its enabled in system but not working: php7.2 -i | grep ...
0
votes
0answers
24 views

Azure PHP Linux app - URL rewrite issue

We recently deployed an Azure App Service as code, in a Linux environment with a PHP stack. So far everything worked fine but as often required the web developers wanted to enable URL rewrite for the ...
0
votes
0answers
22 views

Premature end of script headers: ea-php73 - cPanel

Whenever I'm POSTing really large request body through a form, my hosting webserver throws 500 internal server error. Upon checking the apache logs I get this: [Thu Aug 06 06:57:28.280888 2020] [cgi:...
0
votes
0answers
31 views

js files occasionally failing to load

We have a newly configured php7 16cpu 32gb RAM Linux server. Plenty of power for what we need. We have a basic form on a page that requires a login. However, sometimes when a user lands on the page, ...
0
votes
1answer
18 views

Two php-fpm processes running after trying to update php version. Wordpress using the wrong one

My Server is running on Google Cloud Platoform: Linux INSTANCE_NAME 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux I installed php 7.3 but in wordpress it still says ...
3
votes
4answers
5k views

.htaccess send requests to a subfolder's index.php

I have searched StackOverflow for my answer, but nothing that I have seen seems to work. I have a framework that sends all requests to an index.php file. Everything works when I install it in the root ...
3
votes
1answer
5k views

IIS 7.5 returns 404 on existing PHP file

Module IIS Web Core Notification MapRequestHandler Handler PHP54_via_FastCGI Error Code 0x80070002 Requested URL http://localhost:80/phpinfo.php Physical Path C:\inetpub\wwwroot\phpinfo.php ...
0
votes
1answer
4k views

Let php PDO work with newest version of PostgreSQL (Debian/Ubuntu)

I installed PostgreSQL and the php PDO driver on my 14.04 Ubuntu like this: sudo apt-get install postgresql postgresql-contrib sudo apt-get install php5-pgsql Which installed PostgreSQL 9.3 and ...
0
votes
2answers
1k views

2 php versions on same server

Is it possible to install 2 php versions on same server. I have some old sites on my local system which supports php5. But latest CMS and framework supports php5.3 . I don't want to change my old ...
1
vote
1answer
1k views

How to configure Nginx to support PHP-FPM on Mac OS X

I am making a website with a contact form, and I want to use PHP. The website is hosted on my simple local server using NGINX. I know NGINX uses FastCGI and PHP-FPM, but being new to this, I'm not ...
0
votes
2answers
1k views

Apache2 PHP Notice errors logged

My /var/log/apache2/error.log is filling up about 1GB per hour with PHP Notice errors. I've tried adding this: /apache2.conf php_value error_log none And in my /cgi/php.ini: error_reporting = ...
0
votes
1answer
1k views

How can I get Laravel app routing to work in a sub-folder of a WordPress site?

I've got an existing WordPress site and I need to get a Laravel app to work in a sub-folder called 'api'. This is an nginx site, so .htaccess redirects will not work, and the best solution if it needs ...
0
votes
0answers
44 views

Number of MySQL connections spikes, but no spike in number of queries

I am running LAMP stack with CakePHP and MySQL compatible AWS Aurora instance. The Aurora instance is set up with a writer and read replica. Using CakePHP request routing, the read replica is only set ...
0
votes
1answer
1k views

Nginx and Apache, how to configure proxy_cache?

I have Nginx installed as a front end proxy for Apache, where Apache is servicing PHP and Nginx is servicing static files. I'm having a problem configuring Nginx to cache the output from PHP into a ...
0
votes
2answers
1k views

PHP as FastCGI: Custom php.ini not working

I'm running PHP as FastCGI (I needed multiple versions of PHP). .htaccess AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php-5.2.17.fcgi cgi-bin/php-5.2.17.fcgi #!/bin/sh PHP_CGI=/usr/...
2
votes
1answer
1k views

Varnish + Pound on Apache 503 Errors

I'm getting a lot of seemingly random 503 Service Unavailable errors on my Varnish + Pound setup on Apache. I have no idea where to start or what the problem is. I've searched the web a ton and all ...
1
vote
1answer
400 views

Debian: Cannot install php7.4-curl — depends not installable

I recently upgraded from debian9 (stretch) to debian10 (buster). Which also includes upgrading to php7.4. For some reason php-curl cannot install. I run apt install php7.4-curl and the error I get ...
0
votes
2answers
1k views

Apache rejecting connections (for high number of connections from the same ip)

I'm doing some load test over a LAMP server, but for very high load (high number of connections) tests the it stats to refuse the connections. What I must do for allow all the incoming connections ...
0
votes
1answer
1k views

PHP FastCGI - How PHPRC works

I have a weird situation here in my configuration of Apache. I have decided to use FastCGI and multiple versions of PHP. Below are my configuration files. If I check phpinfo(); I can see that on ...
0
votes
0answers
48 views

Apache + PHP : End of script output before headers

I was getting the following error occasionally. I've search through stackoverflow but all are due to other issue (either cgi or permission) If i can load the following page occassionally (about ...
2
votes
1answer
1k views

Apache returns invalid Content-Length for gzip compressed 204 response

When apache returns a gzip compressed response with 204 response code and empty body server returns invalid header Content-Length: 20 instead of Content-Length: 0. Without gzip compression (without ...
1
vote
1answer
27 views

Simple deployment to Ec2

I have a fairly simple PHP application (CakePhp) that has been moved to the clients EC2 account. I'd now like to set up a simple deployment process for it. These are the steps I want: Deploy changes ...
0
votes
3answers
1k views

restart php5-fpm from php script

Ok, this is a tricky one (I think) I need to reload php5-fpm from a php script The obvious issue is that once the reload command is executed, the current script is disturbed, I tried to delay the ...
0
votes
1answer
45 views

Restarting Apache with PHP

How would I go about restarting Apache with a PHP script while keeping correct security measures on a production server? This is because restarting Apache requires the use of sudo or root privileges, ...
0
votes
2answers
70 views

Why a PHP module is not loaded into PHP?

Showing my case how to debug the problem, that a PHP module is not loaded into PHP. I use OpenSUSE v42.2 Linux OS, with Apache webserver, PHP v7.1, Mysql. Because it does not provide PHP v7.1 I need, ...
0
votes
1answer
110 views

Centos 6 PHP 5.3.29 from IUS with httpd 2.4. from IUS too

I have old depracated linux Centos6 machines for old SW. We need PHP 5.3. for customers. I'd like use this machines for newer versions PHP with FPM - and migrate to htpd 2.4. and FPM for PHP 5.3 too. ...
0
votes
0answers
10 views

Moving from PHP-FPM ondemand to dynamic [duplicate]

current FPM dashboard pool PS process manager ondemand start time 25/Jul/2020:18:25:24 +0100 start since 332382 accepted conn 2981219 ...
0
votes
1answer
1k views

phpMyAdmin new user can't connect to database

I created a user in phpMyAdmin and I only want to allow query, insert and update operations, and in my php file I am trying to connect to the MySQL database but always get the error Warning: mysqli::...
0
votes
0answers
29 views

Can't execute PHP via browser on Centos 8

I already installed Apache 2.4 and PHP 7.4 on Centos 8, which is running on Google Cloud Platform. Apache: ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd....
0
votes
1answer
18 views

nginx + php 5.6 serving empty pages, can't find error log

I have accidentally hosed a VPS which was hosting a website using nginx and PHP 5.6, and I'm attempting to recreate things on a new server running Ubuntu 18.04 (previous one was 12.04 - upgrade failed ...
0
votes
1answer
1k views

Apache 2.2, worker mpm, mod_fcgid and PHP: Can't apply process slot

We're having an issue on an apache server where every 15 to 20 minutes it stops serving PHP requests entirely. On occasions it will return a 503 error, other times it will recover enough to serve the ...
2
votes
2answers
1k views

Apache segfaults on Wordpress admin page

I can access the frontend of a new Wordpress setup without issue. I can also log in with a user account without issue. However, if I try to log in with an admin account I get a 500 error about 70-80% ...
1
vote
0answers
50 views

proxy_fcgi:error AH01071: Got error 'Primary script unknown, Apache + PHP 7.3.2

I'm using my companies Docker Template to try and connect to Localhost, but I get the message "File not found" when inputting localhost:8888 into chromes URL bar. After running the command &...
0
votes
1answer
2k views

PHP script gives “failed to open stream: Permission denied” unless permissions allow public write

I have a php script in a directory called /manager. In it, I open and write to a file in the directory above /manager. However, if the permissions are set to allow owner write, I get "failed to open ...
10
votes
6answers
75k views

Temporary failure in name resolution : Host name lookup failure [closed]

I've got a script in PHP that's been running fine for months. It recently stopped working. This script connects to gmail to send out an email to my customers. Recently, I started getting this error ...
1
vote
1answer
2k views

php_soap not working on NGinx

We have moved our websites from Apache 2.4 to NGinx and ever since our Soap operations are not working. We use PHP 5.6 on a Centos 6 server, I have installed php_soap by: yum install php_soap ...
1
vote
1answer
1k views

fastcgi cache how-to cache for logged-in users and make it custom for each user

Currently I'm doing cache using fastcgi_cache for non-logged-in users, and using ( if + fastcgi_no_cache + fastcgi_cache_bypass ) to pass logged-in users directly to backend which is PHP-FPM. this ...
0
votes
1answer
1k views

Php fatal error loading 'Mail/mimeDecode' even with php-pear install

I have centos machine where I have install using yum install php-pear. So I tried this in my php page require_once 'Mail/RFC822.php'; require_once 'Mail/mimeDecode.php'; I get this error "Warning: ...
0
votes
1answer
1k views

NGINX redirect attempts download instead of rendering image

I've got a PHP page that renders a dynamic image /scripts/oem-image.php?brand=$1&sku=$2 break; I'm trying to do a background redirect (keep the original url) from a .jpg link. For instance, if ...

1
2 3 4 5
149