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.

-1
votes
1answer
28 views

How to make file_get_contents() working?

I am trying to use a basic example from https://www.geeksforgeeks.org/php-file_get_contents-function/ e.g. the following code: <?php // reading contents from the // geeksforgeeks homepage $...
-2
votes
0answers
10 views

Cacti Server v1.2.3 PHP error Timezone on CentOS

Why do I get this PHP timezone error?
0
votes
1answer
33 views

echo return an empty variable $

I have this command echo "<?php $x=$_GET['x']; echo $x;?>" > x.php the output file x.php is: <?php =['x']; echo ;?> Has that any relation to the $ variable? and how do I avoid ???, ...
-1
votes
0answers
22 views

Uninstalled version that I cannot reinstall

I'm running nextcloudPlus on a raspberry pi 3 B. I decided to try some stuff out and I uninstalled curl and a bit later reinstalled it. This is the apt history log: Start-Date: 2019-06-04 18:04:26 ...
0
votes
2answers
24 views

Node.js and PHP on port 80 on same server

I have a node.js site running on port 8080 of my Linux server. I also have, on the same sarver, a PHP site (bugzilla) running on port 80. So my current configuration is: http://example.com:8080 (node....
0
votes
1answer
23 views

Updating CentOS php version [on hold]

I recently bought a VPS to host a Laravel website. The problem I have is that the VPS has PHP version 5.3.3 and my Laravel project is created in PHP 7.3. I tried yum update but it says that everything ...
0
votes
0answers
18 views

Binary Output from Curl [duplicate]

When I executed the command: curl https://piwik.openstreetmap.org/piwik.php?idsite=1 I received a warning that binary output can mess up my terminal, which, yes it did having ignored the warning, so ...
0
votes
0answers
7 views

Can I create a Eclipse or Intellij project via a weblink?

I'm looking for a way to create a new Eclipse or IntelliJ project via a link or a button on a website. So for example a link where I can pass a pre-defined name for the project and all that stuff. Is ...
1
vote
0answers
16 views

How to enable ZipArchive PHP class

Recently I have installed a PHP on Amazon Linux to run Chevereto. It's an image hosting service. When I wanted to install it on my EC2 instance, I got the following error: Aw, Snap! Your web ...
0
votes
0answers
25 views

Why allow_url_include is Disabled? Kali DVWA

I have a problem with DVWA on Kali Linux. Errors: PHP function allow_url_include: Disabled reCAPTCHA key: Missing I installed according to the following commands: curl -fsSL https://download....
0
votes
0answers
8 views

Can't run composer update in a subdomain because the php version is lower that required

I have to run a Laravel command from SSH to install packages (the command is 'composer update') and when I run it puts an error that the php version is 7.0.3 and that it requires 7.1.3 The command is ...
1
vote
1answer
29 views

cronjob [ -x /usr/lib/php5/sessionclean ] returns command not found

I'm running PHP 5.6 on an Debian 8 machine and hence there is a cronjob running as root for cleaning up session data: 09,39 * * * * root [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/...
0
votes
1answer
138 views

How to install PHP 5.6 on CentOS 7?

I am using CentOS 7, Nginx 1.12.2 . Base on article https://www.svnlabs.com/blogs/install-apache-mysql-php-5-6-on-centos-7/ , I try rpm -Uvh http://vault.centos.org/7.0.1406/extras/x86_64/Packages/...
0
votes
0answers
18 views

Installing LAMP to Mint 19 (Cinammon)

I am using Linux Mint 19, anyway my problem is: I was installing LAMP but I can't seem to start Apache every time I run sudo service apache2 start This is what I get in return Job for apache2....
0
votes
1answer
31 views

Centos 7 how to install php7.3 from official sources?

I am coming from the debian world and I struggle for a while now understand Centos and to install php7.3 on Centos 7. Tutorials like this https://tecadmin.net/install-php7-on-centos7/ tell me to ...
0
votes
1answer
17 views

Change version of PHP which CLI uses on CloudLinux VPS

I have a CloudLinux VPS where accounts are running ea-php72. I am trying to install Drupal using Composer, which requires the php extension fileinfo. The extension is installed, confirmed as ...
0
votes
1answer
12 views

How install Phpmyadmin on linux lite (ubuntu based)?

I tried: sudo apt-get install phpmyadmin Didn't work -- it doesn't find the package. What repository do I need? I added: ppa:ondrej/php I searched on "synaptic package manager" too, and nothing!
0
votes
1answer
81 views

configure: error: mcrypt.h not found. Please reinstall libmcrypt

I'm trying to compile php on Suse 10.2. When I run the configure script with --with-mcrypt I receive this message: configure: error: mcrypt.h not found. Please reinstall libmcrypt
0
votes
2answers
22 views

Executing shell command on ubuntu using php from remote machine

On a web page I would like to have a button that launches a python script on a remote machine. Is there a way to do that in php? More specifically I would like this shell command to be executed on the ...
0
votes
1answer
28 views

Sendmail issue with “localhost.localdomain”

I have a DigitalOcean server which runs Ubuntu 14.04. I am having problems with sending emails from the PHP mail() function (which uses sendmail internally). I think the issue may be related to my ...
0
votes
0answers
24 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
38 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 ...
0
votes
0answers
55 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
41 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
62 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
14 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
70 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
70 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
26 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
27 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
20 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
140 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
314 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
76 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
34 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
296 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
162 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
125 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
56 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
65 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
114 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
199 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
63 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
248 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
100 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 ...