Stack Exchange Network

Stack Exchange network consists of 175 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
0answers
23 views

Shell script to execute other script not spawning other scripts

I have a shell script running in a while loop. The script accepts a number as an argument so in ps you would see something like /path/to/script.sh 2. Every 180 seconds, it should be spawning a PHP ...
0
votes
2answers
28 views

403 frobidden when trying access apache / directory

I am trying to run my first PHP code on my desktop Linux. I installed httpd on my pc and changed these things: Changed document root to /home/MyUserName/httpd/www Changed default port to 8080 I ...
-1
votes
0answers
28 views

How to configure apache webserver to run php?

Specifically, how do I arrange the PHP files, and their associated css and javascript (js) so that the inclusion statements in each resolve to something that the apache webserver can handle? If there ...
0
votes
0answers
25 views

Nginx + php7.1-fpm - connection using Firefox returns php file instead of result of its execution

I have nginx (1.10.3-1+deb9u2) on Debian 9.6. I have installed php7.1-fpm from external repository (sury.org). I have simple php file executing phpinfo() function (and nothing more), simply to see if ...
1
vote
0answers
23 views

How to install PHP 7.2 on AIX 7.2 machine? [closed]

My application is running inPHP 7.2. First step is to install RPMs from the .deps file. In this website, http://www.perzl.org/aix/index.php?n=FAQs.FAQs#rpm-dependency-hell under A solution to the RPM ...
0
votes
1answer
24 views

The following packages have unmet dependencies: lsphp72 : Depends: > libjpeg62-turbo (>= 1.3.1) but it is not installable

I'd like to install PHP for Litespeed on Linux Mint. After I run: sudo apt install lsphp72 lsphp72-curl lsphp72-imap lsphp72-mysql lsphp72-intl lsphp72-pgsql lsphp72-sqlite3 lsphp72-tidy lsphp72-snmp ...
0
votes
0answers
13 views

How can we find customer's real IP address in vagrant?

I'm trying to get customer's real IP address with php's var $_SERVER in web page hosted in vagrant. But it's not showing actual address. I can only see private IPs as below. [SERVER_ADDR] => ...
0
votes
0answers
1k views

Wordpress site hosted on Digital Ocean - 100% CPU usage

TL;DR - when there's traffic (around 900) our sites' CPU reaches 100%, slow down and crush. INTRODUCTION Our company holds more than 40 content websites, hosted on Digital Ocean, using Wordpress CMS....
0
votes
0answers
19 views

Remove section from XML files through scheduled script

-<decsub:invoices> <decsub:invoiceSeqNo>1</decsub:invoiceSeqNo> <deccm:invoiceCost>6431.000</deccm:invoiceCost> <deccm:invoiceCurrency>410</deccm:invoiceCurrency&...
1
vote
1answer
55 views

Is there any difference to run a process in the background with an & vs when it has --daemonize option?

Some program has --daemonize option to run itself in background, e.g. php-fpm. I was wondering is there any difference between using --daemonize or just use the old & way to run the process in ...
1
vote
1answer
33 views

Confusion on apt-cache policy: same origin but different versions?

Background: I have a Debian container that installs libapache2-mod-php and is running PHP 7.2 server. It has been set up half a year ago and is running fine. Problem: This week I've been trying to ...
0
votes
1answer
18 views

Install php extension if PHP is already installed

Is it possible to install a php extension if PHP is already installed without having to rebuild PHP? I need to install the calendar extension but I don't like to build PHP, I just installed it with ...
1
vote
0answers
18 views

installing memcached in debian with lemp 7 jetware

im trying to install memcached with the following command : curl -L https://jetware.io/appliances/jetware/memcached14-170503/file/installer:nub_tgz/setup | sh I get this error : ERROR Destination ...
0
votes
0answers
16 views

How can I reinstall php and apache on mac? I deleted some important php folders

How can I reinstall php on mac? I think deleted some important php folders. I can't find the great solution with even google. It's showing like this. macui-MacBookPro:~ mac$ sudo apachectl start ...
0
votes
1answer
79 views

Running Multiple Versions of PHP Using Apache on Gentoo

I have a Gentoo Linux web server that serves a few PHP-based web applications using Apache. Most of the applications will run on the latest version of PHP (i.e. 7.2); however, one application needs to ...
2
votes
1answer
308 views

Who is eating data? Xargs?

I am trying to parse a recursive directory of PHP files using the built in PHP linter, which works like this: $ php -l good.php No syntax errors detected in good.php $ php -l bad.php PHP Parse error:...
0
votes
0answers
32 views

phpPgAdmin 5.6 for Debian

I saw phpPgAdmin 5.6 for PostgreSQL is released, but I can only install the 5.1 on Debian 9. I look for the package: apt search phppgadmin And just get: phppgadmin/stable,now 5.1+ds-2 all web-...
0
votes
0answers
25 views

execute scp command as wwwrun

i would like to copy files using scp with ssh-keys after a php script is run in a browser. So the user executing the scp command is wwwrun.
1
vote
1answer
284 views

apt: What's the difference between “apt install php” and “apt install php-defaults”?

What's the difference between apt install php and apt install php-defaults? In a first glimpse I would theorize that php should include everything default for a (latest) php program. I ask this as a ...
2
votes
1answer
98 views

SELinux is preventing /usr/sbin/php-fpm from lock access on the file cert9.db

I have an selinux alert for the file /var/cache/nginx/.pki/nssdb/cert9.db., but I don't know what label I should give to it. The selinux report suggests hundreds of labels, but which is the correct ...
2
votes
1answer
111 views

apt: Install latest stable php and all its extensions

The following question is a follow up to this question. Each time I create a Debian server environment to host my own websites on I install latest yet stable php with different extensions (...
1
vote
2answers
51 views

apt: Install all php packages whatsoever

I'm quite fed up with tracking packages of PHP extensions that are needed for some GUIs like PHPMyAdmin or some CMSs like Drupal. For example, I once did: apt upgrade php-{cli,curl,mbstring,mcrypt,...
0
votes
1answer
53 views

Cleaning infected site files from malicious code

I got 750 files that have injected by malicious code, and here is the code : var _0x6eea=["\x56\x79\x7A\x43\x6B\x63\x4B\x65\x77\x37\x67\x39\x64\x43\x6C\x36\x77\x70\x6E\x43\x6F\x63\x4F\x57\x51\x38\...
0
votes
0answers
36 views

PHP shell_exec to run debian system service

I'm trying to control a system service with PHP's shell_exec function : shell_exec('sudo /usr/sbin/service icecast2 stop'); But the only way I can get it to work is by allowing ALL users root access ...
0
votes
1answer
71 views

Running Bash Script in a Browser Even with Apache Permissions Set

I have a program that sits in a Docker container. I want to be able to go to a browser page and run the Docker container so the program will start. So, I created a bash script that runs the Docker ...
0
votes
0answers
20 views

MariaDB 10 unstable work on Debian 9 [duplicate]

I installed debian9 with vesta control panel, it comes with 10.1.37-MariaDB-0+deb9u1 Debian 9.6 and php7. I need php5.6, so I found instruction on how to install PHP-fpm. Everything went well and ...
0
votes
0answers
50 views

calling wget from a browser using php

My httpd is running with a daemon user. I want to do a wget using php from FTP server. When I run the php from linux server, the same downloads the required file from FTP. But when I call the same php ...
-1
votes
1answer
21 views

crond php server crash

My CentOS server crashed with 100% memory with swapping, after running fine for a week. Investigating the /var/log/messages shows me the following: https://pastebin.com/CSF8DDzX Basically, alot of the ...
0
votes
1answer
17 views

Automating a php-info file creation and deletion process

How can one automate the creation and deletion process of a php info file? Automatic deletion is good in case one wants to be covered from cases it forgets to delete the file and then the file is ...
0
votes
1answer
128 views

The value 'buster' is invalid for APT::Default-Release as such a release is not available in the sources

I am planing on hosting my laravel application on my RaspberryPi that's connected locally. I have my DynDns domain setup and everything. Now i just need to get PHP7.2 on my raspberry and from what i'...
0
votes
0answers
60 views

How to use PHP CGI instead of PHP-FPM with APache2

My Drupal 7 site works fine on a Debian6 with PHP 5.3.7 as native package. The configuration file of Apache2 is oriented to use CGI. I exported the same site on a Debian9 with Php7.x as native ...
1
vote
1answer
154 views

How to install multiple PHP versions in Virtualmin 6, Debian 9

By default Debian 9 comes with PHP 7, but I was interested in PHP 5 for older websites as well. I tried following/adapting this guide (not virtualmin specific). But this is the error I was getting (...
1
vote
1answer
91 views

PhpMyadmin times out with small SQL file

I am trying to upload bump to phpmyadmin, which has has only 2MB but it has 12 thousand lines. I always get this error: Service Unavailable The server is temporarily unable to service your request ...
0
votes
1answer
664 views

How to get PHP 7.1 to use libreadline.so.8?

After an update of my Manjaro system, my PHP server stopped working, with the error "php: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or ...
0
votes
1answer
390 views

PHP-FPM: 'No such file or directory' error from nginx/error.log. Path or permissions issue? [closed]

I am getting a "FastCGI sent in stderr: "Unable to open primary script: /var/www/mediawiki/index.php (No such file or directory)"" error when I enter my wiki address in a browser bar. Here is my PHP-...
0
votes
1answer
72 views

Is a php file with SGID bit and read-only & execute a security problem? [duplicate]

I find php files with SGID bit and read-only & execute. The group is root. Is this a problem? Because a user will need to run the php interpreter with their our account, could it led to privilege ...
0
votes
1answer
96 views

Arch: Some very-common PHP packages missing in repo

When I establish LAMP environments on Debian, I install some PHP extensions: apt install php-{cli,curl,mbstring,mcrypt,gd} From the above, besides php-gd, all packages are missing in Arch. What are ...
0
votes
1answer
136 views

access forbidden (403) for localhost/adminer with apache

By trying to get adminer running under archlinux, I got into this problem. When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access ...
2
votes
0answers
92 views

PHP Curl when accessing SSL slows down connection. How to correct?

After migrating to a new server, our scripts slowed down dramatically. Some troubleshooting showed that the slowdown occurred during Curl connections as the server was trying to load the SSL cert. ...
0
votes
0answers
29 views

unable to load oci8 extension to compiled php

I compiled php-5.6.36: ./configure \ --prefix=/opt/php/php-5.6.39 \ --with-config-file-path=/opt/php-5.6.39/etc \ --enable-shared \ --enable-mbstring \ --with-curl \ --with-gd \ --with-zlib \ --...
0
votes
0answers
19 views

Executing bash script through PHP to connect to AWS fails

I am trying to initiate an AWS instance through a bash script. This bash script is invoked by a PHP script. My example php script: <?php exec("sh /var/www/html/pushDatToAWS.sh >> $...
0
votes
1answer
151 views

Error installing Gearman on Alpine Linux

I've tried to install Gearman from source on Alpine, but it's gives an error: configure: error: Please install libgearman I tried to apk search libgearman, with no result, but in Ubuntu there is ...
0
votes
1answer
20 views

What are the basic files (dirs and regular file) in Ansible-Galaxy roles? [closed]

I have an Ansible playbook for establishing LAMP environments on remote machines. Part of this playbook deals with installing Composer: - name: Install Composer get_url: url: https://...
2
votes
1answer
98 views

Is it a best practice to use Ansible-Galaxy roles in playbooks instead ansible-modules in playbooks? [closed]

I have an Ansible playbook for establishing LAMP environments on remote machines. Part of this playbook deals with installing Composer: - name: Install Composer get_url: url: https://...
0
votes
1answer
56 views

Changing PHP's post_max_size and upload_max_filesize with Ansible

Is there a way to change the two famous PHP variables post_max_size and upload_max_filesize in php.ini in a version-agnostic way with Ansible? I didn't find any literature covering this and it seems ...
0
votes
1answer
135 views

How to install Composer with Ansible?

In Bash I usually install Composer this way: curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer I tried to read ...
0
votes
0answers
63 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
20 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?
0
votes
1answer
117 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
2answers
230 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: ...