Questions tagged [php]

PHP is a widely-used, general-purpose scripting language that is especially suited for web development. Use this tag when you are dealing with a PHP script, installing PHP, or configuring a PHP installation.

Filter by
Sorted by
Tagged with
0
votes
2answers
29 views

How to install PHP on CentOS has preinstalled Apache HTTPD?

I'm using CentOS 7. I wanted to install PHP 7 so I used remi-php (latest PHP version of yum is 5.4). Since the HTTPD version of yum is too old, I compiled the latest HTTPD version from the source code....
1
vote
1answer
23 views

php exec/shell_exec behavior CLI vs CGI

I am trying to use php to run some system commands and am getting a behaviour that I don't fully understand. If the php script is run from the command line I get the results I expect. But running it ...
1
vote
0answers
13 views

Restart php-fpm in “d” state using systemd

I have a php-fpm pool serving files from network attached file systems, so sometimes I see messages like this in my dmesg logs: [Sat Jul 10 01:51:56 2021] INFO: task php-fpm:2260874 blocked for more ...
1
vote
1answer
26 views

php build error: please reinstall BZip2 distribution

I tried to build PHP v8.0.0 from its source but after running ./configure it says: ... checking for BZip2... not found configure: error: please reinstall BZip2 distribution But I have bzip2 installed ...
0
votes
2answers
49 views

Execute an shell script with php in a safe way

I'm working on a technically breakthrough for a web interface (php) to process audio files with a separation module (spleeter https://github.com/deezer/spleeter). My demo app didn't work. See below. ...
1
vote
0answers
26 views

Error in installing php on debian

I am installing Passbolt on debian system. While installing, I am getting the below error- Reading state information... E: Unable to locate package php7.0-intl E: Couldn't find any package by glob '...
1
vote
1answer
37 views

Error when Deploy PHP to Azure Web App using Jenkins Pipeline

I'm stuck at the jenkins stage to deploy from github repo to azure web app. stage('Deployment to Staging') { azureWebAppPublish appName: 'app1', azureCredentialsId: 'cred1', ...
0
votes
0answers
11 views

Need help about PHP 7.4.19 with Apache 2.4.46 on RHEL 7.2 - PHP missing intl extention

It's me again. After I finished installing Apache 2.4.46 with PHP 7.4.19. I then access my own web with local IP. The PHP modules loaded fine and I could access phpinfo.php. However, when I accessed ...
0
votes
0answers
12 views

Process gets killed nohup

I am running a Nohup script as a Module of another PHP Script. It does Actions for 5 min then sleeps for around an hour and does actions again after the sleep time. My Problem is that it gets killed ...
1
vote
0answers
14 views

Download file from URL with redirection, completely automatic at the CLI, replacing browser operation

I have asked Download file from URL with redirection, "?" and other symbols, from the command line curl -L did not get the correct file right away. A couple of comments pointed to a way ...
0
votes
0answers
24 views

Enable pulseaudio for all users ubuntu 18.04

I am trying to call a gstreamer pipeline with pulsesrc in a php script. THe pipeline runs with no errors in commandline but wont run when called from php script. It gives an error. Below is the ...
1
vote
1answer
28 views

PHP shell_exec() Command not found

I need to execute a program using php, the file in question is ClustalW (clustalw2). My apache user is http using fish shell, so I moved clustalw2 to /srv/http/Clustal and added the dir to fish path. ...
0
votes
1answer
44 views

Visudo permission in file execute script

I'm trying to run a shell script via php but I'm getting a permission error, however I'm trying to add permission to my www-data user to use the sudo command without a password, but it's not working, ...
0
votes
1answer
34 views

Why does changing Nextcloud snap's http port to 81 add many php-fpm processes?

I recently installed Nextcloud as a snap on a Debian 10 VPS. I want this instance to be served with Apache via a reverse proxy at nextcloud.mysite.com. I have a website being served on ports 80 and ...
0
votes
1answer
35 views

PHP getting linux file without permission?

I have a PHP code, that list files and folders, using shell_exec("sudo ls /home/user"); (www-data has sudo NOPASSWD access to ls. ) Now I need to read the file, where there is no guarantee, ...
1
vote
0answers
35 views

www-data user cannot access USB drive mounted in /var/www/html/folder

I have an Raspberry Pi with mounted USB external drive. I've mounted this USB (/dev/sda1) to /var/www/html/owncloud/data/drive as I want to be able to access it from my PHP applications (precisely: ...
0
votes
0answers
14 views

Installed php extensions gone after closing the ssh connection

Not an expert in Unix/Linux. Know some commands. I'm actually a Wordpress dev. For one my clients, needed something using Laravel. Tried to setup the php and its extensions on the server. I think I've ...
0
votes
0answers
22 views

How can I block access to sub URLs (/cc and /login) and files (index.php) in my code? I can block only URL but files (index.php) are accessible

When I block access to mysite.com/blockedurl, the user can open this link as mysite.com/blockedurl/index.php. I can only block URL but index.php is not blocked. When I hide index.php then users can ...
0
votes
1answer
59 views

Execute an shell script with sudo inside from php

I want to execute a command line command as root from a php file. In my case I want to view the crontab file in my php page. Running the sudo command in php is not recommended and on my raspberry pi ...
-2
votes
1answer
25 views

send mail from php

<?php $to = "Istiakshovon011@gmail.com"; $subject = "My subject"; $txt = "Hello world!"; $headers = "From: Istiakshovon011@gmail.com"; ...
0
votes
0answers
15 views

Ubuntu php service

this is my myapp.service file [Unit] Description=My PHP Daemon Service #May your script needs MySQL or other services to run, eg. MySQL Memcached Requires=mysql.service After=mysql.service [Service] ...
1
vote
1answer
20 views

whole data isn't showing on POST sql injection

sqlmap -u "http://192.168.0.106/get_method/get_data_login/" --data="name=name&password=pass" -D get_method -T user --dump Output : [11:27:40] [INFO] the back-end DBMS is ...
0
votes
1answer
40 views

How to setup SMTP authentication for a backend-frontend contact form in a Linux environment (CentOS)?

On a CentOS-Bash shared hosting environment I host a website with a simple backend-frontend contact form with the PHP mail() function. Test emails can reach my Gmail account but if they do reach it at ...
0
votes
0answers
292 views

Apache 2.4.37 Will Not Load PHP 7.4.16 module on CentOS 8

I can not get the PHP 7.4 module to load In Apache 2.4. I see nothing of revelvence in the error log: Sat Mar 20 14:22:05.406772 2021] [mpm_event:notice] [pid 5853:tid 140053828258112] AH00492: ...
0
votes
1answer
12 views

Remove exact specific code across multiple php files

I have malware links at bottoms of all my WordPress footers. I need a better method to mass remove the following across multiple footer.php <?php /* Always have wp_footer() just before the ...
0
votes
0answers
10 views

Need Help HTML for Streamlabs Labels, i can read files but they wont update

Sorry for my bad English. Streamlabs has a program that writes your latest events to TXT files. example last donor, last follow, etc ... what I need is for it to read different files and update on ...
0
votes
1answer
26 views

user and group not getting set correctly for auto generated files

I am hosting a Magento 2 (onlineshop software) project on my dev machine. The user and group are set to this: user -> company group -> www-data In Magento 2 some files are getting auto ...
0
votes
0answers
12 views

openSuse - change PHP cli version

I have built PHP 7.3.27 from source like this: ./configure --with-config-file-path=/etc/php7/cli \ --with-config-file-scan-dir=/etc/php7/cli \ --with-openssl \ --with-bz2 \ --with-zlib \ --with-...
0
votes
0answers
11 views

PHP - Why do I get “zlib extension is required” even though I configured php with zlib?

I installed php 7.2.33 from source like this: ./configure --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7/cli --with-openssl --with-bz2 --with-zlib --with-curl --with-bz2 --...
0
votes
1answer
38 views

No package available on installing php_odbc on Centos7.9

I am trying to install php_odbc using yum install. But it shows me the following. Loaded plugins: fastestmirror, universal-hooks Determining fastest mirrors epel/x86_64/metalink ...
0
votes
1answer
1k views

“E: Unable to locate package php8.0-common” when trying to install, and after adding its ppa

I would like to install php8 on debian ( kali linux ) and use it for many years. There is a problem: when I run the following commands i cant find php8 just 7.4 the commands sudo add-apt-repository ...
2
votes
3answers
889 views

Upgrading PHP within a docker container

So I have a docker container running a PHP 7.2.34 service as follows:- docker-compose.yml version: '3' services: #PHP Service app: build: context: . dockerfile: Dockerfile image: ...
0
votes
1answer
183 views

How to give write permission to apache user

I am a beginner in server management. I am using the class.upload.php library so that users can upload files from my website. To this, I give a full path like: uploads/gifs/90/x.gif This path does not ...
0
votes
0answers
8 views

PHP logs for last 1 minute

I need last 1 minute logs of PHP-fpm for automating alert generation and to use webhooks on other applications. I have used below mentioned command awk -v d1="$(date --date '-60 min' '+%d-%b-%Y %...
0
votes
0answers
17 views

Use multiple PHP-FPM versions using FastCGI on same Debian/Apache server

I would like to use multiple PHP-FPM versions using FastCGI on same Debian/Apache server. Using: Debian v9.12, Apache v2.4.25, php5.6-fpm, php7.4-fpm, libapache2-mod-fcgid v1:2.3.9-1+b1, libapache2-...
0
votes
0answers
232 views

PHP creating .ZendSem files in /tmp even though it is directed to use different temp directory

I have PHP-FPM (version 5.6) running on Debian bullseye. According to AppArmor, the FPM daemon is creating temp files in /tmp despite all settings direct it to use different directory Excerpt from ...
0
votes
0answers
18 views

.htaccess issue

I have a script which I distribute into each folder per user. Each folder is identical in files apart from the /lib/config.ini.php file. I wish to let them all use the same 1 set of core files ...
0
votes
0answers
50 views

Pop!_OS + XAMPP user & PHP directory permissions

I'm using Pop! OS 20.10 & a LAMP stack (XAMPP). What I'm looking to accomplish: I need CodeIgniter PHP (daemon) user to be able to write files. I need my user (myuser) to be able to write files (...
0
votes
0answers
20 views

php extensions disappeared?

This is a weird one. I'm running a lamp setup on centos 7 with php 5.4 and mysql 8. Last night I was developing perfectly fine. When I woke up this morning I got errors of the database driver ...
0
votes
1answer
27 views

How do I know if an application is compatible with the OS?

I am on Centos 7.8 I wanted to know where I can find information (website or others) that will tell me if PHP 7.3 or 7.4 is compatible with my OS?
0
votes
0answers
19 views

How to check if OOUI PHP library is loaded?

In a FaaS-modeled hosting environment with some old CentOS and Bash 3.2.52(2) in which I can't broadly control I might have or not have the OOUI PHP library installed and loaded and I want to ...
2
votes
3answers
224 views

arguments limit php exec() to bash script

Testing how long will it take to pass 50000 arguments from php to a bash script, turns that I cannot pass even 1000 arguments from php to a bash script at once, unless I can? PHP: $array = ...
1
vote
1answer
31 views

Full feature Linux scheduler

The scheduler cron processes outputs of programs only sending them via mails or writing them in files. So these outputs can't be assigned for example to a PHP variable (see this StackOverflow question)...
1
vote
0answers
127 views

Problem upgrading PHP from 7.4.6 to 7.4.12 on Debian

I have PHP 7.4.6 running on Debian and want to upgrade to 7.4.12 I run this command sudo apt-get --only-upgrade install php7.4 I get Reading package lists... Done Building dependency tree Reading ...
1
vote
0answers
38 views

Tools cli script analysis [closed]

I work with MySQL based PHP scripts. I often encounter the problem of loading the application to the browsers. I use tools like → https://www.webpagetest.org. This gives me the overall picture, but I ...
0
votes
0answers
61 views

VS Code: No PHP executable is set: Local-by-Flywheel installation PHP

I am doing a WordPress course and using VS Code as text editor. The following notification keeps appearing "No PHP executable set". When I go to the indicated setting link, it requires the ...
0
votes
0answers
18 views

Showing random verses with PHP , what is the right approach please?

needing some advice please , want to display random verses from the bible book there are 66 books, 1,189 chapters, and 31,102 verses in total, we would like to use the numbers based on the numbers 3, ...
1
vote
1answer
44 views

Issues with bash script containing exigrep command when invoked from PHP webpage

I have a bash script to extract information from exim_mainlog. When the bash script is run from a putty command line (logged in as root), the extracted data is properly written to an output file. ...
0
votes
1answer
1k views

Arch Linux PHP 8 Do Not Upgrade

I understand how to ignore packages in pacman by editing the pacman.conf and addeding packages to the ignore list. My question is what packages do I need to include? I use Apache and mod-PHP on my ...
0
votes
0answers
42 views

gvm-script command run in terminal but when exec command in php(xamp) get error “command not found”

Hii, I have a gvm-script which works and give output in terminal, as shown below: But when I run this command in php using exec I get an error as "sh: 1: gvm-script: not found" The code is: ...

1
2 3 4 5
19