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
1
vote
1answer
28 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
26 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
36 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
9 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
36 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
0answers
55 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
14 views

how do acess the apache webserver main page in your brower? [closed]

am using linux centos 8 VM, installed httpd, php and mysql on my virtual machine the packages work well and httpd is active and running but when connect to my browser by entering http://your_server_ip ...
0
votes
0answers
8 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: ...
0
votes
0answers
27 views

Create cron job or schedule jobs using calendar

On my project, I need to run my script at a specific time. My script: 1.stop_instance_001.sh 2.change_instance001_m5.2xlarge.sh 3.start_instance_001.sh Example: I use fullcalendar web app to ...
0
votes
0answers
19 views

How important is it to call mysqli_free_result()? [migrated]

In a web serving environment (Apache) where my calls to mysqli from a particlar php file either just select a couple of fields from one row or else delete, update or insert one row, how important is ...
0
votes
0answers
30 views

Running a Python script with the PyMySQL module via PHP exec()

I have a PHP script that calls a Python script using exec(). The Python script uses a non-native module, PyMySQL. To test it, I executed the script in the terminal as an anonymous web user, using user ...
0
votes
0answers
23 views

PHP Zip module doesn't load

I use PHP 7.4 and Nginx 1.16.1 and i want to enable php-zip in my server because a wordpress plugin required it: I installed zip module (php-pecl-zip-1.19.1-1.el7.remi.7.4.x86_64). If i type php --...
0
votes
1answer
92 views

Problem with installing PHP 7.4 on Ubuntu 14.04 LTS

I'm on Ubuntu 14.04 and PHP 7.0. I need to update PHP to PHP 7.4. I added ppa:ondrej/php repository. Still, it says Unable to locate package php7.4 when trying to update PHP. $ sudo add-apt-repository ...
0
votes
0answers
26 views

How to have .html files pass through the PHP preprocessor?

I would like to configure an Apache webserver 2.4.37 to hide the fact that it is serving PHP files. For this, I renamed all .php files to .html and inserted the following directive: AddType ...
0
votes
1answer
22 views

how to kill processes in shared host by automatically?

in shared hosting which allows maximum 25 processes. as it reaches 25 processes , site goes to 500 internal error. in cpanel i manually kill the process one by one . Which script can work to kill all ...
0
votes
0answers
17 views

how to kill PHP PID processes?

i have shared hosting which allows maximum 25 processes. after it reaches 25, site shows 500 internal error. in cpanel i manually kill the process. Which script can work to kill all php PID processes ...
0
votes
1answer
26 views

Identify Raid Failed Drive “serial number” and “Mount name” export to txt

I want to write bash script or php file to export output file status.txt of failed raid (hard disk serial no) and (mount name) or "OK" I tried some code below far from finish desired 2 ...
0
votes
1answer
14 views

Try to install php 73 but it installs php 74

I had php 7.4.10 in my centos 7 server but I want to downgrade to php 7.3 I uninstalled the php 7.4 and tried this code. wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ...
1
vote
1answer
9 views

Pi Nginx php 7 - where are syntax errors shown?

I have loaded phpinfo, seen the location of the ini file ( /etc/php/7.0/fpm/php.ini ), then went sudo nano /etc/php/7.0/fpm/php.ini , and changed error_log to read /var/log/php_errors.log. Next opened ...
0
votes
1answer
17 views

Will path code in php work the same from cron?

Will php code which includes paths to files ( in a sub folder at the same location as the php script ) still work when the php script is run from a crontab ? My php code reads a text file from the '...
1
vote
1answer
11 views

Pi cron php not running

I can't get this cron to run. being new to linux, I really don't know my way around. Pi 3B+ Debian 9 Stretch PHP 7.0.33 Nginx 1.10.3 Pi has OpenMediaVault ( OMV ) running. Used OMV to create a ...
1
vote
1answer
115 views

PHP-FPM creating files as root when configured as www-data

In a multiple-container Docker application deployed with docker-compose I have a container built from alpine running PHP-FPM. That container is used both for providing PHP to the Nginx container, but ...
0
votes
1answer
13 views

Upgrade outdated PHP Modules

If I execute php -i then I get this at the top: PHP Warning: PHP Startup: curl: Unable to initialize module Module compiled with module API=20170718 PHP compiled with module API=20180731 How can ...
0
votes
0answers
8 views

How to find out how many PHP processes are running?

I have to set the configuration value max_concurrency for redis. I have to know the number of PHP processes to calculate the right value with this formula. max_concurrency = countPhpProcesses() * 0.1 ...
0
votes
0answers
6 views

Swiftmailer to send mail via Squid Proxy to AWS SES

I'm on CentOS 8 and we have a laravel application that uses Swiftmailer to send mails to AWS SES. The thing is that this application server is using a Squid proxy (with authentication) to connect to ...
-3
votes
1answer
29 views

Some Apache configuration issues [closed]

I have been playing around with my Apache config file for a while to get WSGI working for my Flask application. I was not able to get phpMyAdmin working though (localhost/phpmyadmin shows the php ...
0
votes
0answers
57 views

Apache + php-fpm: Proper permissions for per-pool, per-user projects?

What is the correct way to set up Apache virtualhosts and PHP-FPM pools with different users, one user per project, so that each user/project is independent from each other in file access projects ...
0
votes
1answer
131 views

How to make Apache use PHP 7.3 on server upgraded to Debian 10?

I am upgrading a server from Debian 9 (stretch) to Debian 10 (buster), and am aware (and intend) that this results in PHP being upgraded from PHP 7.0 to PHP 7.3. php -v does indeed show that PHP 7.3 ...
0
votes
1answer
29 views

ZoneMinder shows code instead of its control panel

Today I installed ZoneMinder (see GitHub and home page) by following some instructions (if you need to look at them, let me know).  Well, when I try to open the site, the panel doesn't open.  Some PHP ...
0
votes
0answers
117 views

Apache 2.4 + mod_php/PHP-FPM + suexec + userdir on Debian 10

I cannot find a working, modern configuration to resolve this. I'm using Debian 10 and installed Apache 2. I have dozens of users, so I enabled userdir. I do not want their code to run as www-data, so ...
0
votes
3answers
28 views

Making a user account for a friend on ubuntu server so he can run php/apache alongside my nginx install

I have a friend who is getting into web dev and he is currently developing on a php/apache setup. I use nginx and arbirtrary server languages which is what is currently running on my (ubuntu) server. ...
0
votes
2answers
108 views

How do i make a program run with elevated privileges but not as root?

I am testing CTF like thing in my laptop and i have option to upload a PHP file which when executed grants shell to uploader, (reverse shell), however there is a problem. When i do su - www-data cd /...
0
votes
0answers
5 views

AWS Cpu utilization Very High bcz of Nginx Procsess

My AWS Cpu Utilization is very high last 3 days some time only issue happen then i check with top command when cpu utilization is more than 90% that time too much nginx process are running so i thing ...
0
votes
1answer
22 views

seeking solution to avoid multiple execution of linux commands in php script

I have a PHP script which provides some output to angular. That script is useful to get the informations from the Perl script. I'm using exec() command to call the scripts in PHP. I'm getting what I ...
0
votes
1answer
86 views

Error: transaction check vs depsolve… php dependencies

I'm trying to run sudo dnf system-upgrade download --refresh --releasever=30 --allowerasing (from fedora 25) and hitting the following errors. Running transaction check Error: transaction check vs ...
0
votes
0answers
24 views

Can not access PHP-FPM site

Using OpenSUSE v15.2, Apache. Installed PHP-FPM with zypper. Followed instructions on this site: https://en.opensuse.org/SDB:Apache_FastCGI_and_PHP-FPM_configuration I restarted Apache and PHP-FPM. ...
0
votes
1answer
21 views

CentOS OpenLdap Apache PHP and MediaWiki

So I have been trying to setup a "Free" wiki that integrates with my "Free" version of Active Directory (aka. OpenLdap), so I can get a super simple setup together for a dev group, ...
0
votes
1answer
23 views

Why a PHP module is not loaded into PHP?

Showing my case how to debug the problem, that a PHP module is not loaded into PHP. I use OpenSUSE v42.2 Linux OS, with Apache webserver, PHP v7.1, Mysql. Because it does not provide PHP v7.1 I need, ...
0
votes
0answers
19 views

Unable to get proper installation of cacti on raspberry pi

I would like to run Cacti on my RPI to test the quality and stability of my internet connection. I ran through this tutorial, although outdated: https://community.spiceworks.com/how_to/105702-...
1
vote
2answers
41 views

PHP security updates in Debian after PHP version EOL

I got a quite stupid question I am afraid but I am kind of in need of written confirmation of my suspicion. Consider a Debian 9 with PHP from the official repositories. The PHP version shipped by ...
1
vote
1answer
19 views

PHPMYADMIN don't have permission to read file

I want to create a secure connection between PHP and MYSQL database. In order to do this, I need to store the DB infos in a separated file, with -r-------- permission (readonly for owner). But doing ...
1
vote
1answer
206 views

Apache 2.4 does not follow symlink and gives 403 Forbidden?

I have been trying to setup my project on localhost as symlink into /var/www/html, I can access normal files or directories placed inside html but when I create a symlink to some/other/path, it gives ...
1
vote
1answer
31 views

egrep ignores empty spaces when searching file contents

This is my syntax: egrep -lir --include="*.php" '<? ' > ./wrongtag.txt and I'm using it directly from the console / terminal (no scripts). A bit of fluff - the entire server with about ...
1
vote
1answer
40 views

Device mounted by apache not showing in shell, mtab, or proc/mounts

We're updating our product from Centos 6 to Centos 8 and have found a strange behavior when mounting volumes via apache. A web page provides a UI front end via apache/php to mount/unmount partitions. ...
5
votes
1answer
108 views

A chrooted/isolated SFTP user can still visit the whole filesystem with PHP

I'd like to give an isolated web hosting space to a friend of mine on my server. I did: useradd friend groupadd sftpusers mkdir /sftp mkdir /sftp/friend mkdir /sftp/friend/home mkdir /sftp/...
0
votes
1answer
263 views

openSuse - How to change apache php version? [duplicate]

I am currently on PHP 7.2.5 but I need 7.3.18. How can I update PHP for my Apache Webserver? OS (uname -a): Linux linuxphp7 4.12.14-lp150.12.82-default #1 SMP Tue Nov 12 16:32:38 UTC 2019 (c939e24) ...
0
votes
0answers
43 views

phpinfo still shows old PHP version after installing new version from source

I downloaded PHP 7.3.18 from php.net. Then I configured it, maked it and installed it from source. If I execute php -v then I get PHP 7.3.18 (cli) (built: Jun 17 2020 12:55:46) ( NTS ) Copyright (c) ...
0
votes
1answer
33 views

What do the dates at /usr/lib/php/ represent?

On a Debian system, PHP extension binaries reside in /usr/lib/php/. Inside are folders for each PHP version, like 7.2 and 7.3, as well as folders named after dates, like 20170718 and 20180731. ...
0
votes
1answer
57 views

“sudo ls -a1 /home” Permission Denied

I have a php script that will run exec("bash /path/to/list.sh $dir", $out); The contents of list.sh are... #!/bin/bash sudo /usr/bin/ls -a1 $@ 2>&1 I have given apache permission to run ls ...

1
2 3 4 5
18