All Questions
2,086
questions
0
votes
1
answer
89
views
502 Bad Gateway Error on wp-admin and wp-login.php with PHP 7.4 on High Traffic WordPress Site
I'm having some trouble with my server setup for a high-traffic WordPress site, which I configured without using any control panel. Everything seems to be working fine, except when I try to access wp-...
2
votes
1
answer
62
views
How to build same php extension for multiple versions on the same server with Ubuntu?
I have a server with Ubuntu 22.04 that has multiple versions of PHP installed using ondrej:ppa. I need to add oci8 extension to all supported versions. This is the procedure that I have been using:
...
0
votes
1
answer
39
views
Bash script not working when running in php page but works in terminal
Hey all I am trying to get a bash script to fire off when I visit my php page. I am using XAMPP that is hosting my php on my MacOS.
Here is my php code:
<?php
ob_implicit_flush(true);
...
-2
votes
1
answer
60
views
Write shell command to find long if statements within a directory of php files [closed]
I have a nested directory of files in php, some of them may have if and else conditions within them
if (condition) {
// ~100 lines of code
}
I want to quickly find those [files/start of if or else ...
0
votes
1
answer
30
views
Copy values from XML element to create a new element with combined new value
I have this XML with multiple products and I want to add a new element with the values of other elements. I want to add a new element to each titled . This should include the values of ProductOption, ...
0
votes
1
answer
66
views
Why can't tmux read the session file when ran from PHP?
I want to create a PHP site which can manage multiple sessions and read contents from them. So in order to realize this I decided to use tmux with the PHP exec() command.
The sessions will run under ...
0
votes
2
answers
427
views
Migrating from wordpress:php8.2-apache to wordpress:php8.3-fpm-alpine and nginx:stable-alpine as base image for wordpress applications
I am trying to migrate my Docker image which uses library/wordpress:php8.2-apache as base image to library/wordpress:php8.3-fpm-alpine and nginx:stable-alpine as base images. Here is my Dockerfile
# ...
1
vote
1
answer
335
views
Using wordpress:php8.3-fpm-alpine and nginx:stable-alpine as base image for wordPress applications
I am trying to migrate my Docker image which uses library/wordpress:php8.2-apache as base image to library/wordpress:php8.3-fpm-alpine and nginx:stable-alpine as base images.
Here is my Dockerfile
# ...
0
votes
3
answers
43
views
bash issue with variables containing a single quote
I'm trying to run a command at the command prompt and if one of the values includes a single quote it doesn't run correctly.
The command I'm using is :
lxc-attach -n test -- bash -c 'echo 'abcd1234' &...
-1
votes
1
answer
137
views
rtl_433 command output will not pipe to php script
I'm trying to get the output from the rtl_433 command into a php script.
If I run echo TEST | php sensors.php
I get
STARTING PHP SCRIPT
DATA FROM PHP SCRIPT IS: TEST
sensors.php is just this
<?php
...
2
votes
1
answer
1k
views
Syntax error near unexpected token `(' when running shell script from XAMPP
I'm trying to send a shell command directly from an index.php using the exec function as follows:
exec('shopt -s extglob && cd /opt/lampp/htdocs/testes/xml/ && rm !(*.xml)');
However ...
0
votes
1
answer
1k
views
Configure authentication - Google Analytics Data API (GA4) in PHP
I'm trying to locally authenticate the Google Data API for GA4.
On this document in Step 3: https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries the info ...
0
votes
1
answer
44
views
I am getting tonnes of errors relating to permissions - using WSL2 laravel project. The issue specifically relates to pdo_mysql
A bit of backstory -
I have a work laptop where my project works totally fine. I have quit my job to pursue expanding my own business, that has become large enough that I can no longer maintain a full ...
0
votes
0
answers
190
views
How to create phar files on Mac?
I would like to pack my folder -
phar pack -f result.phar /Users/me/FolderToPack/
But OSX returns the following error - Creating phar files is disabled by ini setting 'phar.readonly'.
I tried to ...
0
votes
1
answer
48
views
Call php function from bash script with array as an argument
I am trying to call a php function from bash script which takes arguments as an array
Here is the code i am trying
#!/bin/bash
myArray="'[\"0\",\"adm\",\"passw\",\&...