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.

learn more… | top users | synonyms

0
votes
2answers
12 views

find composer global install path as root

I have some php packages installed globally using php composer within a script sudo -u me composer global require "phpmd/phpmd" I want to find the path of these globally installed php packages. ...
0
votes
0answers
9 views

How to install old PHP version 5.2.17 package using yum?

I am trying to update php 5.2.9 to 5.2.17 as it is a bridge version to upgrade client's existing CMS. Is there a way to install this specific version using yum?
1
vote
0answers
13 views

PHP does not use MySQL default sockets

I am having a hard time understanding why PHP cannot connect with localhost as a host. I can connect by doing: mysql -uroot -p And also, through Sequel Pro I can connect with localhost as a host. ...
-1
votes
0answers
13 views

Ubuntu Linux - PHP Cron doesn't work

I have a Ubuntu webserver that should execute a PHP script to cache a bunch of data every 5 minutes using a Cron job. I configured the Cron using Webmin entering the command: /usr/bin/php -q ...
0
votes
1answer
35 views

Data from python script to website

This involves a raspberry pi and apache2 so I thought the question would be good to go here.. have never used web sockets and things like that before so I'm pretty lost and hoping for some ...
0
votes
0answers
58 views

Installing mysqlnd for php 5.6 on CentOs 7

I get php warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50547 Library:50624 Also I read that I need to install mysqlnd to my server. I tried do it using: ...
0
votes
0answers
23 views

NGINX and PHP Pools

We host quite a few client sites, and I've inherited a shared hosting ecosystem on DigitalOcean. We run a LEMP stack, and all sites were at the same permission access level as eachother. We are now ...
0
votes
0answers
43 views

How do I use php-fpm on RHEL 7.2?

I've already asked this on Stack Overflow but received no response, so I'm trying my luck here. I'm new to configuring Apache and I'm trying to optimize my Apache server. Reading through the ...
-2
votes
0answers
6 views

remember checkbox value if its checked array name in a form php [migrated]

lets say we have this: echo '<form method="post"> <div class="form-group"> <table class="table table-bordered table-hover table-striped" style="width:auto"> ...
-1
votes
1answer
33 views

Where I have to move a file in order to have it not be accessible via my webserver? [closed]

I have a connection php file with my database password on it. It resides in includes directory for my paypal store on my site. Trying to work out where I can move that folder and file so no-one can ...
0
votes
1answer
16 views

Circular dependencies that cannot be fulfilled. PHP packages on CentOS 7 to support Drupal 8

I am trying to install Drupal 8.0.5 on Apache 2.4.6 on CentOS 7, with PHP 5.6.19. I get an error that PHP extensions are disabled. The detail I get is that it pertains to "gd." I have installed, ...
-1
votes
1answer
47 views

Unable to execute shell from web server

When ever I am trying to execute php script from web server, it fails: cat test.sh echo "Hello World" [root@yumserver ~]# I am trying to build a button on webpage through which I can push the ...
0
votes
0answers
74 views

Installing older PHP versions on Debian Jessie

I need to conduct some testing on older version of PHP, and I want to use my laptop running Debian Jessie. At the moment, I've got PHP5.6 installed on it, which I tried to delete with apt-get remove ...
1
vote
0answers
47 views

php curl script working in cli but not on crontab [closed]

I have set the following on crontab */1 * * * * /opt/php-5.3/bin/php -f /var/httpd/appliance/appliance/docs/vip_dashboard_script.php >> /tmp/vip.log 2>&1 the contents of my script. ...
1
vote
2answers
24 views

How extract under linux some capturing groups using command line in a php/preg fashion?

Given in linux environment exists lot of packages for manipulating strings (grep, awk, sed, ...), I would like a software to extract a capturing group in a php/preg like syntax. Maybe the most close ...
1
vote
0answers
24 views

php links against system libxml instead of version specified by ./configure --with-libxml-dir

I'm trying to build php-5.5.33 from source on a Debian 8 system; configure and make both run successfully, but when I run make install I get the following error: Installing PEAR environment: ...
0
votes
0answers
27 views

How to make a text file readable for only a local PHP file on server — not to everyone on web?

I have a PHP script that takes some sensitive data, hashes it, and then compares it against hashes in a text file on the server. Both the text file containing hashes and the PHP script are located in ...
0
votes
2answers
62 views

Apache shows Blank page for PHP

I've installed a fresh version of Centos 7,I'm new to Linux. I installed Apache using yum -y install httpd and i can open the test page and everything is ok with it. after that i installed ...
1
vote
2answers
130 views

httpd (apache2) server doesn't parse *.php files but displays them as text with installed php-module on arch-linux

I'm trying to set up my httpd (apache2) server on archlinux. Everything works now except for the parsing of my php files. I followed this article: ...
0
votes
0answers
14 views

Is there one-line command to update php from 5.4 to whatever higher on CentOS 7.1?

Suprisingly, this task became interesting and annoying at the same time. So, I'm asking you how to prevent such situation in future? First I tried just yum install php And it said everything is ...
1
vote
1answer
132 views

Bash to Call PHP, Wait for PHP Process to finish?

Here is my bash script #!/bin/bash timestamp() { date +"%T" } pushd 'httpdocs/DIR1/DIR2'; file="Lock3.key" if [ -f "$file" ] then echo "$file found, Session is already in progress" $(date) ...
0
votes
0answers
17 views

Setup vhost for subdomain

I am new to Linux and vhost, so I am sorry in advance if this question is stupid :D. I am trying to make vhost, but it is kinda semi working. I am able to run the index.php and load home page, but ...
0
votes
0answers
29 views

Workaround for running privileged commands from www-data user

I would like to append a string to a file located in /tmp/ from a php script. The command I would like to execute is: sudo sed -e 's/$/,yes/' -i /tmp/a.csv The Problem I can't run a sudo command ...
0
votes
0answers
86 views

Apache2 uses wrong php version even tho it isn't installed

I am having a strange problem with PHP on a raspberry Pi lately. It occurred as i tried to run the "password_hash" function and wonderd why it didn't work. The script didn't even throw an error or ...
0
votes
1answer
66 views

Install php-pecl-memcached

I'm trying to install php-pecl-memcached in php v5.4.45 and Centos v6.5. My command is following. yum --enablerepo=remi install php-pecl-memcached However I encountered the following error. ...
1
vote
0answers
49 views

How to use wget to process a html file before downloading a file [closed]

I'm trying to write a bash script to download a certain file. In order to download the file, you need to be logged in, first to access he file, secondly because the file is generated with you ...
1
vote
1answer
41 views

Locating PHP extension folder using bash

I'm trying to build a bash script to install the Source Guardian PHP extension however the destination directory is different on every subsequent release of Ubuntu. Installing PHP5 on Ubuntu 14.04 ...
2
votes
1answer
42 views

Expect PECL for PHP 7

I just upgraded to PHP 7.0.3, but there is no support for expect. Does anyone know if is it possible to bypass the installation issue? It says: root@portal:/home# pecl install expect-0.3.3.tgz ...
0
votes
1answer
226 views

php ./configure error: DBA: Could not find necessary header file(s)

I have a Centos 7 machine. I decided to install apache, mysql, and php from source. I already installed (from source) the apache & mysql packages (requirements: with apr (source), apr-util ...
2
votes
1answer
25 views

Which PHP ini file

When I execute the bash command php --ini to find the location of the php.ini file, the loaded one is: Loaded Configuration File: /etc/php5/cli/php.ini But when I run a php.info on my ...
0
votes
2answers
66 views

PECL - Installing PThreads offline

I am not familiar with pecl command but is it possible to convert the command below to an offline version? pecl install channel://pecl.php.net/pthreads-0.0.44 I want to install PThreads on CentOS ...
0
votes
2answers
57 views

Run this PHP file via Cron Job

Here is the script: <?php //Create back files? define('CREATE_BACKUPS', FALSE); if (!is_dir($argv[1])) { echo "You must enter a valid path such as /home/apresv/public_html or ...
1
vote
1answer
53 views

How do I upgrade PHP on CentOS 6.7 for CiviCRM 4.7 / WordPress?

Is there any kind of "official" repo for upgrading PHP beyond the stock PHP 5.3.3 found in CentOS 6.7? I'm trying to utilize the SCL repo's, but finding all sorts of peculiarities that seem to point ...
0
votes
1answer
52 views

Exceeding memory issues on server using PHP

PHP has memory limits set at a global level in the PHP.ini file. I also know that they can be configured at the local level. Our memory limit for a query is set to 132MB, but we keeping getting ...
0
votes
2answers
28 views

Using Screens with a PHP Script

I found an external developer to make me a PHP script to 'snipe' Mineraft usernames. In order for it to operate, I have to start the script from the command line using this: php -f sniper.php > ...
0
votes
3answers
67 views

Debian 7.0 failed to install package php5-dev

While trying to install in debian, shows libssl-dev dependency needed apt-get install php5-dev Reading package lists... Done Building dependency tree Reading state information... Done Some ...
1
vote
0answers
146 views

Permissions on nginx log files

I have a PHP/nginx environment on OS X which is deployed to an Ubuntu server. On OS X, nginx is set up with Homebrew, thus my user ("joe") owns the files, whereas on Ubuntu nginx is installed with ...
0
votes
0answers
66 views

Unable to upgrade PHP 5.3.3 to 5.6 on centOS 6.3

I got a problem with upgrading PHP 5.3.3 to 5.6 on linux centOS 6.3. I've already search it on the net and got answers including here (Since it's a classic problem), but still not able to solve it. I ...
0
votes
0answers
46 views

Process being stopped randomly

I made a script to manage a TS3 server. The script runs 'cd '.$ts3location.';/bin/bash '.$ts3script.' status' where $ts3location is the full directory to the server and $ts3script is ...
0
votes
2answers
1k views

How to install php7 modules in archlinux?

I have the following php version installed: PHP 7.0.2 (cli) (built: Jan 6 2016 11:50:59) ( NTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies ...
0
votes
1answer
518 views

Installing oci8 php extension

On a CentOS 7 server, I have installed PHP from remi repository. I need to connect to Oracle 9.2 on a remove machine. Installing oci8 via yum install oci8 results OCI8 Version 2.1.0 which is not ...
2
votes
2answers
53 views

Restarting httpd kills scripts executed from PHP

My game server has a custom PHP administration interface, which can run the server manually by running the start shell script with exec and sudo -E. However, if I restart httpd using service httpd ...
1
vote
1answer
38 views

How to Load data to one table from Multiple excel files?

I have to load data from multiple excel file into one table , Please help me to achieve the solution. We are getting excel file from different retail shop which contain multiple column , each file is ...
0
votes
2answers
189 views

How to remove a script tag from a text file with sed

I have a number of header.php files that have a malicious script tag contained within them (don't ask). I've written a not-so-elegant shell script to replace these with blank space. I had initially ...
1
vote
2answers
77 views

Complex sed Command with AND/OR/NOT

I have a bunch of php files which have many select commands. In each query i want to insert a coloumn variable admin_id = '$admin_id' i.e. if the query is select * from users where abc='xyz' and ...
0
votes
0answers
160 views

PHP5.6.x on CentOS 6 with extensions

I have installed Bright Game Panel on my CentOS 6 x64 VPS. However, there is an issue when it comes to fulfilling the software's requirements. It requires three additional PHP extensions, MBSTRING ...
1
vote
0answers
81 views

PHP app crashes: child pid exits with Illegal instruction (4)

I have a CentOS 6 server with Apache and PHP. I run some application and can constantly reproduce this crash. After some sequential action the app dies and the only trace I found is the following ...
4
votes
1answer
1k views

php 7 install throws “Cannot load Zend OPcache - it was already loaded” error

I am using salt to provision my servers, and I just tried to upgrade to php 7 and although everything is installing correctly, anytime I run php -v or run any php anything it throw this at the head of ...
0
votes
2answers
361 views

How to install lampp (php7) on Manjaro?

I Tried following this guide, didn't work and it's the only guide I can find. I have php7-apache, apache, php7, mariadb, php7-mcrypt, all installed, either through pacman or yaourt, all have their ...
4
votes
2answers
2k views

Installing PHP7.0 from sid on jessie

I'd like to try PHP7.0 on Debian Jessie and am trying to install it from sid. However, php7.0 depends on php7.0-common which depends on php-common > 18 while php-common in sid is at 17. Does this ...