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
0 answers
13 views

Apache - How to compress (gzip) only specific calls

I have PHP application served with Apache 2.4 I need the apache to compress (mod_deflate - gzip) calls for specific users. So the application should decides dynamically which calls gets gzipped. I was ...
Niro's user avatar
  • 1,431
0 votes
0 answers
26 views

Start and stop PHP when nginx as a Windows service is started or stopped [closed]

I installed nginx using Chocolatey and it's installed as a Windows service. I want nginx to start PHP when it's started and stop the PHP program when it's stopped. Are there ways for nginx to run ...
Sandah Aung's user avatar
-2 votes
1 answer
46 views

Unable to move uploaded files with php (Apache 2.4) - Permission denied

In my project I can't use move_uploaded_file PHP function because of: Notice: PHP Request Startup: file created in the system's temporary directory in Unknown on line 0 Warning: move_uploaded_file(.....
MHSarmadi's user avatar
0 votes
1 answer
38 views

installed homebrew openssl library not found when building MongoDb PHP driver on Mac

Similar to this questioner, due to a 502 Bad Gateway error, following the PHP docs I am attempting to build the PHP Mongo driver from scratch, using a modified ./config step ./configure --with-mongodb-...
wonder95's user avatar
  • 123
0 votes
0 answers
21 views

Track down PHP crash running in lighttpd - no logs

0 Just recently I've started to see seemingly random crashes on a web server that has been stable for quite some time. I think PHP is crashing, but there are no crash logs so I'm only assuming that's ...
QldRobbo's user avatar
0 votes
0 answers
28 views

All .PHP pages give 5x error in nginx

I followed this guide to install Nginx and PHP on a CentOS server. I am able to do things like php --version and even use the interactive shell. But inside of /usr/share/nginx/html/, I make a PHP file ...
super15's user avatar
1 vote
1 answer
60 views

How to enable executing php files in Fedora Apache?

I installed httpd and php v8.2.11 on my Linux Fedora. But Apache can't execute .php files. (Responses "Access denied.") I tried to use chmod shell command to enable executing and add AddType ...
MHSarmadi's user avatar
0 votes
0 answers
51 views

SELinux silently blocking PHP process listing

I have a system where we use PHP to run some rudimentary health checks on the server. When hitting a status page, it verifies that certain processes are running, and returns an error message if ...
Jared's user avatar
  • 383
0 votes
0 answers
35 views

php-fpm - How to log `NOTICE`s to stdout, everything else (`E_ALL`) to stderr?

As far as I understood the configuration docs, it is only possible to enable/disable specific log levels: # ini, E_NOTICE disabled entirely. error_reporting=E_ALL & ~E_NOTICE display_errors=stderr ...
goulashsoup's user avatar
0 votes
2 answers
54 views

Backup server for several servers with yesterday's files

There are several servers under CentOS with PHP projects, and the task is to make a server (or servers) for them to store yesterday's versions of uncompressed files of all projects from all servers, ...
Dmitry's user avatar
  • 23
0 votes
0 answers
40 views

/usr/lib/apache2/modules/libphp5.6.so is missing on Ubuntu 18

I installed PHP 5.6 with: apt install php5.6 Then I added a -s link in /etc/apache2/mods-enabled for php5.6.conf and php5.6.load When I restarted apache2 I got this error that wasn't there before: ...
PHP Guru's user avatar
  • 101
0 votes
0 answers
30 views

Updated upload_max_filesize and post_max_size in php.ini but still cant upload large files

I am using a Laravel based app on Ubuntu 22.04, Nginx, php8.2-fpm. I have deployed the same app on 2 other servers but they use Ubuntu 20.04 and php8.1-fpm. In each case I updated the php.ini of both ...
andygozindy's user avatar
0 votes
0 answers
16 views

What's the ODBC SparkSQL Source Format for Connecting with PHP ODBC & Spark?

What's the ODBC SparkSQL Source Format for Connecting with PHP ODBC & Spark? Here's the code I need to edit: $conn = odbc_pconnect("CData ODBC SparkSQL Source","user","...
Neo's user avatar
  • 1
0 votes
2 answers
68 views

How to switch PHP versions in Nginx if fastcgi_pass is pointing to a TCP socket

My question is simple (I hope). Everywhere on the internet I read that if I want to change PHP versions in Nginx, I need to change the UNIX socket of the fastcgi_pass parameter. But my fastcgi_pass ...
Daan van den Bergh's user avatar
0 votes
1 answer
74 views

502 Bad Gateway nginx 1.20.1

I know why is this coming. But I don't know how to fix it. I was installing osticket following this article. https://www.vultr.com/docs/how-to-install-osticket-on-centos-7/ Turns out current osticket ...
achhainsan's user avatar
2 votes
0 answers
96 views

Docker nginx + php performance

I am using docker-compose to run an nginx container and a PHP container. I have a performance issue, where each 4th or 5th request to a simple PHP script takes several seconds (normally <<1s). I ...
Joaquim d'Souza's user avatar
1 vote
1 answer
71 views

How to serve php files from a folder outside of web root folder in nginx

When i go to url www.example.gr i want to load a form where i will be able to submit it to www.example.gr/php/mail.php. My files and folders structure is like this root folder ( /var/www/html/app/ ) ...
chris tsironis's user avatar
0 votes
1 answer
86 views

htaccess rewrite rule to a specific PHP page doesn't work

I have the following code in my .htaccess file, placed in the root of my Ubuntu 22.04 instance: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...
Frank Eno's user avatar
  • 101
0 votes
0 answers
18 views

spawn process from php in windows that does not wait for command to complete

How can i spawn a process from PHP 5.6.40 running on Windows IIS7 that returns immediately ? I've tried the following but it waits for the command to complete : exec("start ping -n 3 127.0.0.1 &...
Barny's user avatar
  • 23
0 votes
1 answer
95 views

PHP Fatal Error: Cannot open /dev/urandom: No such file or directory when calling session_start() with manually built PHP

Problem I built PHP8.4 manually in Ubuntu 14.04 since the OS is out of support with no ppa package available. I tested for phpinfo() web page showed correct information while adding session_start() at ...
NeNe's user avatar
  • 3
0 votes
0 answers
297 views

[Microsoft][ODBC Driver 17 for SQL Server] SSL Provider: [error:0A000102:SSL routines::unsupported protocol] in PHP Laravel on macOS using Brew

I'm encountering an issue while trying to connect to a SQL Server database using PHP Laravel on macOS with Brew. I'm receiving the following error message: [Microsoft][ODBC Driver 17 for SQL Server] ...
Ainz Ooal Gown's user avatar
0 votes
1 answer
31 views

PHP reinfect issue, creates random php and dot files [duplicate]

We are using a godaddy shared hosting package and running a few wordpress sites on this shared space. of late wordfence scanner detected malicious files within wp-includes and wp-content. Also some of ...
Desper's user avatar
  • 1
0 votes
0 answers
21 views

Installing PHP 7.3 on RHEL 7 - Angular/PHP files don't process

I've been tasked with setting up an old application on a RHEL 7 server. It has an Angular front-end (I'm unsure of the version, but it's old) with a PHP backend. However, in the browser console I can ...
DysonC's user avatar
  • 1
0 votes
1 answer
78 views

503 Service Unavailable or Empty Response on specific pages over PHP (PHP-FPM) on MacOS

I've got a strange problem here involving some versions of PHP installed in my local machine (MacOS Ventura 13.5). Certain pages (two at this moment) doesn't load in some versions of PHP. It's loads ...
Luiz Otávio's user avatar
0 votes
0 answers
69 views

Laravel: Logging messages generated by "error_log(...)" to terminal, while running app in Apache server

The issue is this one: When I run a Laravel app from PHP server, that's it, with php artisan serve, I could see every message generated by "error_log(...)" printed in the terminal, like this:...
Leandro Caplan's user avatar
0 votes
0 answers
116 views

Cannot connect to LDAP server ERRNO=0

I have a php application (apache,redhat with selinux disabled) and I am struggling with ldap configuration. I am trying to connect to a ldap server and I am getting this error in apache logs: ...
el sparrow's user avatar
0 votes
0 answers
130 views

SOAP-ERROR: failed to load external entity - cURL: connection refused

I run my server with ubuntu 18.4 with openlitespeed installed, i'm making some php code to call a web service with SOAP, however, on my production server i'm facing some issues: There is the code i ...
squarefighter's user avatar
0 votes
0 answers
107 views

My PHP sites do not work with mysql router

I recently set up a mysql innodb cluster, and have configured mysqlrouter to sit in front of it. On my PHP applications, if I change the port from 3306 to 6446, the application hangs when it tries to ...
elyograg's user avatar
  • 239
0 votes
0 answers
33 views

MacOS MySQL Client Gets Stuck on Query That is a Certain Size

My MySQL client gets stuck on a query when the output is a certain size. When it's small enough, the query will successfully output. The client is connecting to a remote server (Ubuntu 18.04). When I ...
Grant Gordinier's user avatar
0 votes
0 answers
28 views

NGINX- different web paths to different folders

I need to redirect different web paths to different folders on server. http://test.local/site1/ => /srv/site_1/src/public http://test.local/site2/ => /srv/site_2 tried such config, but it does ...
holden321's user avatar
  • 107
0 votes
1 answer
75 views

Running php and django on two subdomains

My friends and I have made a project which is made out of two parts. One is made in Django and other one is made in php language. We have just one server so we want to use 2 subdomains. My question is ...
Mehan Alavi's user avatar
0 votes
1 answer
118 views

Issue with Web Server running PHP thru Reverse Proxy

I'm using an NGINX reverse proxy, with wild card certs installed on the reverse proxy. Routing the NGINX reverse proxy traffic to standard web servers that are running Apache2 and NGINX Web services ...
Surfingjoe's user avatar
-3 votes
2 answers
91 views

Creating/Configuring a DNS server with runtime configuration [closed]

I have a big Windows video/audio application that may be controlled remotely over a web server. For that, I can listen to a local port in a, say, 192.168.1.10 system to port 8000, forward the port via ...
Michael Chourdakis's user avatar
0 votes
0 answers
45 views

system load spikes causing php-fpm pools to fill and cause micro outages

kind of at my wits end at this point and looking for some help. 2 physical Web servers CentOS NGINX PHP5 php-fpm 2 physical DB Servers CentOS NGINX elastic search zookeeper couchbase as user load ...
John Bell's user avatar
0 votes
1 answer
94 views

How does Php-fpm access filesystem, or does it?

Background: My server has become too old to upgrade. Some software will only work on PHP 5.6 and is incompatible with newer versions of PHP. New server hosting packages do not support PHP 5.6 as it ...
David Newcomb's user avatar
1 vote
1 answer
114 views

Memory consumption on virtual server too large for applications being run

I have a Linux Ubuntu virtual server at Digital Ocean with the following specs: 1 vCPU, 2GB of memory, and 25GB of SSD storage. The server is running a single WordPress website with around 400 unique ...
Mike Hermary's user avatar
0 votes
1 answer
242 views

After upgrading Debian Bullseye to Bookworm, problems with Wordpress and PHP

OS: Debian Bookworm, WordPress: 6.2, PHP: 8.2 I upgraded my webserver from Debian Bullseye to Bookworm today. Everything worked - except all Wordpress sites. When visiting such a site (on my server), ...
Zippy1970's user avatar
  • 259
0 votes
2 answers
844 views

Install Zip module in PHP8.2

I am trying to install the zip module in PHP 8.2, in Amazon Linux 2023. However, either the module is not available or it is a different name than the previous ones. I have tried. sudo yum install ...
mb87's user avatar
  • 23
2 votes
0 answers
99 views

Apache creates ~3x as many threads as MaxRequestWorkers

I'm hosting a non-profit community wiki for the upcoming video game Baldur's Gate 3. Since it looks like the game is likely to have millions of players, we started worrying about server capacity. I'm ...
TaylanKammer's user avatar
0 votes
0 answers
75 views

Limit requests in a particular time from the same IP

I found that there is a bug in a library of an app that sends requests to my server. It sends sporadically twice the same requests instead of one in the same time. It makes the app working incorrectly....
forsberg's user avatar
  • 101
0 votes
3 answers
79 views

File hosting on multiple servers? [closed]

I have a PHP website for file hosting (like Dropbox) on a Debian server with Apache, but I'm running out of disk space. Is there a way to add another server in the network and somehow make Apache use ...
user avatar
0 votes
0 answers
44 views

Web server returning high number of 502 and 504s

We have a web application (LAMP stack) with traefik as a reverse proxy that is suddenly giving HTTP 502 and 504 errors on >50% of requests, both for static files and php scripts. In the traefik ...
bkane521's user avatar
  • 101
0 votes
0 answers
179 views

Package 'php-pear' has no installation candidate

I am trying to install apt install php-pear and I get this error message: Reading package lists... Done Building dependency tree Reading state information... Done Package php-pear is not ...
user1996496's user avatar
0 votes
1 answer
118 views

Remote MySQL server returning: MySQL server has gone away / Error while sending QUERY packet

I have 2 servers (both running Ubuntu 12.04) APP server running apache2, PHP7.2 and a CakePHP 2.0 APP DATABASE server running mysql 5.7 When I'am trying to insert into the database a big blob (...
updevs's user avatar
  • 1
0 votes
0 answers
31 views

PHP Error waiting on socket

I'm getting problems with ssh2 and fread php function that started on a few days. On the apache error log show: ssh2_connect(): Error starting up SSH connection(-9): Error waiting on socket fread(): ...
user1505698's user avatar
0 votes
2 answers
144 views

telnet to port 80 (nginx), with forward to apache2 at port 8080, fails with 'connection closed by foreign host' and no explanations seemingly anywhere

i'm running an Kubuntu 22.04 server, and want to shuttle LAN-only traffic from port 80, served as far as i can tell by nginx, to port 8080 served by apache2 (for PHP purposes). but i'm getting this &...
Rene Veerman's user avatar
0 votes
1 answer
304 views

PHPMyAdmin Fresh Install Error 500 Nginx

I've just done a fresh install of phpmyadmin on nginx and ubuntu 22.04, however navigating to the index page is returning HTTP 500. My error.log: 2023/06/24 22:52:55 [error] 1448200#1448200: *1 ...
Finbar's user avatar
  • 101
0 votes
1 answer
148 views

Clear gettext cache of PHP-Apache Server to apply .mo updates

Although many questions on SO already relate to this, they're A) pretty old and B) I felt that it's better to ask about this here, as it seems to be related to some server-level, and not programming-...
DevelJoe's user avatar
  • 187
1 vote
0 answers
56 views

gsutil fails with "OSError: Operation not permitted" when running from cron

I have a php script that does backups. The backups have been failing, because one of the first commands throws an error and stops the script. When I run the script in the terminal, it works just fine. ...
Kenny Wyland's user avatar
0 votes
1 answer
263 views

Can not compile php-curl ext with custom curl

I have libcurl installed here: /usr/local/curl-7.88.1/ I want to compile php-curl extension: # cd /usr/src/php-8.1.12/ext/curl/ # /usr/local/php81/bin/phpize Configuring for: PHP Api Version: ...
Nick's user avatar
  • 826

1
2 3 4 5
158