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.
1,998
questions
2
votes
1
answer
23
views
Replace text surrounding a wildcard in Notepad++
So, many years ago when I started writing PHP code, I learned to format information sent from a form as such:
$_POST[itemnamehere];
Whether that was right or wrong at the time, it worked. However, ...
0
votes
0
answers
21
views
PHP-FPM on Apache log issue
I am having trouble finding the cause of my php-fpm process logging its error output to the same location as the script result.
I have an Apache server which passes requests to the php-fpm process ...
0
votes
0
answers
90
views
Nextcloud AIO - How to persist modifications to php.ini in a docker container that frequently reboots
I’m running the Nextcloud AIO docker container. This consists of a master container that then runs the other containers such as the apache, and sql server containers. With this working I want to ...
0
votes
1
answer
68
views
How to upgrade ICU on Debian 12 for PHP Intl?
Ever since running into this timezone related bug in PHP, I've been trying to solve it by updating the ICU system library.
On my Fedora 39 workstation, as of this writing, version 73.2 is installed (...
-1
votes
1
answer
50
views
passthru background process sudo multiple commands
Have problem running the command in background. Below is configuration of code.
1] Using php passthru running a command as a different user than current
2] The command has multiple commands to run ...
1
vote
0
answers
57
views
PHP 5.4 yum dependency issue on AWS Linux 2
I am running PHP 8.1 on AWS Linux 2. When I run yum updates I get the following error:
> Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-46.amzn2.0.3 ...
-1
votes
1
answer
40
views
Start .bat file via php
I'm using
system('START C:\[address]\refresh.bat');
but when I start this I get:
C:\[address]>git fetch
'git' is not recognized as an internal or external command,
operable program or batch file.
...
0
votes
2
answers
62
views
Running “php -f file.php” prints the file contents instead of executing it
I have new freshly installed Ubuntu Unity (23.10) OS, where I installed PHP.
Now I want to run a PHP file from the terminal, but instead of executing it, it just print it contents. (The PHP file is ...
0
votes
1
answer
72
views
Cron job does not execute according to time schedule
Consider the following cron job:
* 22-23 * * * /usr/bin/curl -u username:paswword http://api.example.com/api/test2.php
Now, according to this, the cron job must run every minute starting from 22h00 (...
0
votes
0
answers
19
views
Error while trying to create module page on MediaWiki
I tried to create a Module page on my MediaWiki but I've been getting the following error:
Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted
I'm ...
0
votes
1
answer
58
views
How recover php-fpm conf.d files?
I'm trying to upgrade PHP with php-fpm from 8.1 to 8.2.
By mistake, I've deleted the files inside /etc/php/8.2/fpm/conf.d
I've tried to restart php8.2-fpm and Apache2 server, re-install php-fpm, but ...
0
votes
1
answer
56
views
How to publish a php website privately so I can make tests?
I want to publish my website as http secure connection but I want to keep it private so only I can view it. I want to prepare and test its security before its official release.
Is there any service ...
0
votes
1
answer
83
views
php-fpm and nginx security isolation not working....or may be my understanding is not correct
I followed the following tutorial to do isolation of my two websites.
https://www.vultr.com/docs/use-php-fpm-pools-to-secure-multiple-web-sites/
Here is what I did:
Created two users and then ...
0
votes
1
answer
186
views
How to serve html and php from multiple folders under the same host in nginx?
I want to serve two folders with nginx: a folder with generated html files, and a folder with static html and php scripts, take this folder structure as an example:
├─/var/www
│ ├─generated
│ │ ├─...
2
votes
1
answer
193
views
Can I reload php.ini without stopping and starting IIS? [duplicate]
I have a few websites running with IIS 10 that use the same php.ini, and I now changed a value in the php.ini file which cannot be set via the ini_set() method in PHP.
Is there any way to reload the ...
0
votes
1
answer
292
views
Error Installing OCI8 on Ubuntu 23.10 PHP 8.2
I'm running Apache 2.4 on a Ubuntu 23.10 server with PHP 8.2 and I can't install the OCI8 extension in order to connect to Oracle.
I previously had a PHP 5.6 built from a makefile which I recently ...
0
votes
0
answers
40
views
mod_remoteip not showing true IP of the visitor
I am trying to get the real IP behind Cloudflare.
I did as I found on Google, installed mod_remoteip then configure it as following:
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-...
0
votes
1
answer
100
views
Why is 'mime.types' required in Apaches' 'conf' directory?
I have been running Apache for around 5 years now and am going through a streamlining of my site scripts.
In this process I removed all directories and files I didn't know a use of. In my server root ...
0
votes
1
answer
116
views
Issue addressing MODBUS via RS485 and PHP on Windows
I have a USB to RS485 adapter connected to an RS485 relay board which I am able to correctly address using some software called sscom. Via sscom I can enable/disable the relays on the relay board. So ...
1
vote
0
answers
59
views
firewall vs Soap (electronic billing API)
This is a complex question since it includes configuration and programming at the same time, but neither Sophos support nor the electronic billing service (consumer API) have given me an answer.
...
0
votes
1
answer
71
views
Ubuntu Server 14.04 upgraded 18.04 causing PHP7.2-fpm service to time out
I have a DigitalOcean droplet which experienced a variety of issues after a dist-upgrade. Most recently I tried reinstalling php7.2fpm and was greeted with this output:
invoke-rc.d: initscript php7.2-...
0
votes
1
answer
521
views
How can I give to RoundCube the login credentials through HTTP so the user will not require to enter them?
Well, I have a dedicated hosting server service and it has a Plesk panel for its administration, as many will know Plesk comes with RoundCube as the default service for webmail access.
My issue is ...
0
votes
1
answer
50
views
Using MacPorts build of PHP causes Apache to SEGV
I have successfully added PHP to the built-in Apache on Mac OS Ventura (on Intel), however it's an old build of PHP 7. My problem is that when I try to use the latest version as built using MacPorts ...
1
vote
1
answer
1k
views
OOM killing my PHP FPM after upgrading LTS Ubuntu version
Yesterday I performed a release upgrade which included the upgrade from PHP 7.4 to 8.2.
At first, I thought that the problem could come from the PHP version (because was php8.2-fpm the service that ...
0
votes
0
answers
87
views
nginx rewrite overlapped with Swagger body
Here's my nginx.conf:
server {
charset utf-8;
client_max_body_size 512M;
listen 80;
listen 443 ssl http2 default_server;
server_name app;
set $base_root /app;
root $...
0
votes
1
answer
50
views
Laravel to operate device HHC-N8I8O
I have purchased this device HHC-N8I8O.
I want to know if we can give direct commands from laravel to turn on or off a relay?
i have got the manual and some software, it works from software with ip ...
0
votes
2
answers
4k
views
PHP file_put_contents: Failed to open stream: Permission denied
I want to store images using PHP, so I am using the following code:
$encodedCard = isset($_POST["card"])? $_POST["card"] : null;
$name = isset($_POST["fn"]) ? $...
0
votes
0
answers
58
views
Add new folder to yii2 with nginx
I got yii2 advanced template , but need to change the structure as below :
app
--backend
--common
--v1
--config
--main.php
--controller
--SiteController.php
--web
--index.php
...
0
votes
0
answers
50
views
RoundCube not displaying mails with attachments over certain size
The setup is fairly simple, it's Windows Server 2019, with hMailServer as a mailserver, and IIS hosting RoundCube, and of course, PHP.
Sending mails work fine, but when the attachment gets over like ...
1
vote
1
answer
28
views
Geany 1.36,PHP variable highlight dollar sign on double-click
In Geany, when you double-click on a php variable $example, it highlights the word 'example' without highlighting the dollar sign ($).
How do I make geany highlight the dollar sign too?
0
votes
0
answers
232
views
Trouble with PHPMailer and iCloud SMTP Authentication
I'm currently facing an issue with PHPMailer while trying to send emails using iCloud SMTP for my WordPress blog. I have followed the steps to configure PHPMailer with app-specific passwords provided ...
0
votes
0
answers
93
views
How is Windows 11 Apache php 8 Apache manual setup different from the php 7 on windows 10
I have read previous post on the setup of Apache php MySQL manual installation and the all seems to follow the same steps. Please what would be the constant k in all the different different versions ...
4
votes
1
answer
62
views
Is PHP actually ported to AmigaOS?
I have long had the thought about what it would be like to have PHP running on an Amiga (I mean a real one), and have tried to search and ask about this.
It's ambiguous as to whether or not it really ...
2
votes
1
answer
111
views
How can I enable streaming (flush/ob_flush) in CentOS 8 stream with PHP-FPM?
I have a new install of CentOS 8 Stream with Apache and PHP-FPM setup using all defaults (this defaults to PHP 7.2.24 FPM/FastCGI).
My application uses Server Sent events using JavaScripts EventSource ...
0
votes
0
answers
57
views
How to access the local files to restore in remotely accessed PgAdmin4 in centos 8
I have one Web Server with PHP and one Database Server with PostgreSQL 15. Both with Cent OS 8. I have installed pgadmin4 in the web server to access the Remote Database server through browser and it'...
0
votes
0
answers
361
views
Can I completely disable Anonymous authentication for internal system with AD users?
I have an internal system that has login form with username and password.
But recently I needed to get some more information about the user who tries to log in (in case of a failed login attempt for ...
1
vote
0
answers
686
views
Is there a repo for php5-gd for debian 12?
I am planning an upgrade of a debian 11.7 server to debian 12.
When asking for a full upgrade, Debian warns me about is to remove php5-gd
The following packages will be REMOVED:
libpng12-0 php5-gd
...
0
votes
0
answers
40
views
How to start an external program on the Linux computer on which WWW-PHP is running, from non-CLI PHP?
I used to use Windows, with nginx and PHP. A localhost-only webserver for my own use. In my web "control panel", I had various very time-saving shortcuts. For example, I was able to click on ...
-4
votes
1
answer
99
views
How to run website locally? [closed]
Windows 10 OS
basically I want to run a php website offline, in my PC-locally, so that i can use it without internet.
Is it possible, to run locally as an offline-app
please tell me basic steps to ...
0
votes
0
answers
87
views
Macports service start order
I'm using MacPorts version of apache2 and php82 on Mac Os Catalina (10.15.7). The services load at the start, but I can't find a way to start them in the correct order, PHP and then apache. Sometimes ...
0
votes
0
answers
90
views
Can I install PHP libraries with Composer and is it a best practice?
A few years back I used to install PHP libraries on my Debian system this way:
apt install php-mbstring php-gettext php-cli php-mysql
Can I install these and other PHP libraries with Composer and is ...
1
vote
0
answers
397
views
Why does CPU usage increase fourfold after upgrading PHP on Ubuntu
We have a portal that attracts high traffic. Since ubuntu's 18 has come to the end of its life, we have upgraded the servers running php 7.4 on ubuntu 18. The average load of servers running Ubuntu 18 ...
0
votes
0
answers
393
views
IIS + PHP - Configuration File (php.ini) Path - no value
I have a few PHP apps on IIS 10.
I set each app the right PHP version for it, and it works correctly, and the Loaded Configuration File shows the right path for each, however, only the apps using one ...
0
votes
0
answers
98
views
Ajax query throws server error 500 if over 16384 bytes
I'm getting Server error 500 when updating pages in Wordpress as soon as content length goes over 16384 bytes, regardless of the editor used (built in or Elementor). This only started after updating ...
1
vote
1
answer
523
views
How to disable unlisted file name extensions but make the PHP app work?
I was adviced to untick the "Allow unlisted file name extensions" option in the Request Filtering in IIS. But now the PHP app is not working, I get:
HTTP Error 404.7 - Not Found
The request ...
2
votes
0
answers
179
views
How does IIS "know" which website uses which PHP version?
I have 2 websites on the same application pool with IIS 10.
One of them is a PHP app using PHP 7.3, and the second app is the updated version of the same app using PHP 8.1.
Now I just copied the newer ...
0
votes
0
answers
60
views
Orangescrum says "Wrong database information. Please try with correct information." even though I've provided correct credentials
I'm entering correct database credentials. I've seen similar post in stackoverflow, which was left unanswered. Hoping for replies here.
0
votes
1
answer
488
views
WSL2 is not handling file permissions properly, unable to write files from PHP
I am running nginx, mariadb and php8.2-fpm on my WSL2 Ubuntu server successfully, all running as user www-data just fine, however, I cannot upload files from the web interface. When I attempt to, the ...
0
votes
0
answers
236
views
What is the command to enable a .ini file in PHP like we do with Apache2 (i.e. equivalent to a2enconf for php)?
When one of my packages adds a new configuration file to Apache2, another package postinst script can enable it with a command such as:
a2enmod --quiet authz_host
(The --quiet is useful to avoid ...
-1
votes
1
answer
635
views
Apache having problems with PHP
This on W10.
I've been trying to replace a dysfunctional Apache-PHP setup.
I installed (i.e. decompressed) Apache2.4.57 under D:\apps.
I have a php version at D:\apps\php\php7.4.33.
httpd.conf ends ...