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
22 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
17 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
30 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
12 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
39 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
33 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
32 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
21 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
18 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
3 views
Apache web server to connect html button to PHP file which runs python script when mousedown [migrated]
I have an Apache web server set up on my raspberry pi with PHP5 libraries installed.
I am trying to get the button to run a PHP script with contains instructions to run a python code (which in turn ...
0
votes
0answers
19 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
48 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
72 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
12 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
94 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
14 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
27 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
66 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
46 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
47 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
0answers
30 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 ...
1
vote
0answers
31 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
147 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
49 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
46 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
49 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
45 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
55 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
105 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
49 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
40 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
879 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
329 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
51 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
32 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
175 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
76 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
120 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
63 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
933 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
327 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
1k 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 ...
0
votes
0answers
60 views
PHP-FPM Permission denied on folders
I get read/write errors on a new CentOS + Nginx + PHP-FPM server, this is muy configuration
Nginx
user nginx;
[...]
fastcgi_pass 127.0.0.1:9000;
PHP-FPM
user = nginx
group = nginx
listen = ...
0
votes
0answers
195 views
How to install laravel on xampp?
I'm using the latest version of manjaro 64 bit and latest version of xampp. I want to install composer and laravel, tried many solutions on stackoverflow and askubuntu. Everytime I see a different ...
0
votes
0answers
140 views
nginx + php-fpm error: failed to ptrace(PEEKDATA) pid: Input/output error
I'm seeing a few of errors like the one below in the php-fpm-error.log. We're running a Fedora setup with nginx and php-fpm and I'm just wondering what it means. Any ideas?
ERROR: failed to ...
2
votes
0answers
31 views
Fatal error: Call to undefined function gzopen() in /etc/apache2/htdocs/sites/all/modules/smart_ip/includes/smart_ip.utility.inc on line 454
I'm using centos 6.7, http 2.4.17, mysql 5.1, php 5.5.30. web page is working fine but at bottom it is giving below error.
Fatal error: Call to undefined function gzopen() in ...
1
vote
3answers
84 views
How to add tag for xml from file exist using shell linux
xml1.xml
<app>
<bbb>
<jjj>test1</jjj>
</bbb>
<bbb>
<jjj>test2</jjj>
</bbb>
</app>
xml2.xml
file2 ...