PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

learn more… | top users | synonyms

1
vote
0answers
11 views

phpcurl not able to install on terminal

I am not able to install packages php and curl. But its gives dependencies error, please check below curl : Depends: libcurl3 (= 7.29.0-1ubuntu3.4) but 7.32.0-1ubuntu1 is to be installed ...
0
votes
0answers
7 views

stripe configuration issue [migrated]

I'm getting the following error when using Stripe (PHP Library) for Checkout. (https://stripe.com/docs/checkout/guides/php): Fatal error: Class 'Stripe_Customer' not found in /var/www/charge.php on ...
1
vote
0answers
21 views

how to resolve yum replace php-common --replace-with=php55w-common error? [on hold]

How to resolve yum replace php-common --replace-with=php55w-common error on CentOS 6.5? root@server [~]# yum replace php-common --replace-with=php55w-common Loaded plugins: fastestmirror, replace, ...
0
votes
2answers
803 views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
2
votes
2answers
268 views

How to open process substituted file from php?

Here's what I tried to do myself: $ type 1.sh #!/bin/bash -eu php -r 'var_dump(file_get_contents($_SERVER["argv"][1]));' -- <(echo 1) $ ./1.sh PHP Warning: file_get_contents(/dev/fd/63): failed ...
1
vote
2answers
50 views

wget - corrupted directories

I am using wget to create an HTML mirror of a php templated site on localhost. I am encountering a problem with some directories being mirrored as extensionless documents. What could be causing this ...
1
vote
1answer
53 views

understanding LAMP: linux apache mysql and php [closed]

I have multiple questions and I am confused. Few months back, I was installing a software locally ~/bin. Tools got installed successfully and running fine till date. In installation it automatically ...
4
votes
3answers
807 views

Use start-stop-daemon for a PHP server

I'm working on a socket server written in PHP. This part of the work is done but now I need to run it as a daemon. For this I've tried to use start-stop-daemon but it doesn't work. My server is ...
1
vote
2answers
209 views

Using sudoers to allow php to run command

I am trying to get my php page to run this command: shell_exec("sudo /home/xbian/433Utils/RPi_utils/codesend {$num}"); So I added this entry to my sudoers file with visudo: www-data ALL=NOPASSWD: ...
0
votes
0answers
140 views

php Mails not send with in domain

My setup : Our current server 90.0.0.50 [example] which is containing domain testdom.com. testdom.com's MX record points to Google mail. Due to some issues we need to host our domain on some other ...
0
votes
1answer
280 views

Multiple PHP Versions / cPanel with mod_fcgid

I'm trying to get multiple PHP versions working on a cPanel server which was compiled with mod_fcgid and PHP 5.3. Below is the PHP config generated by cPanel. AddHandler fcgid-script .php5 .php4 ...
0
votes
0answers
15 views

Why does SPACE sometimes not work with more (or less)

Usually with |more I press space to get another screenful. But with some commands space just does nothing, and I need to actually keep doing SPACE-ENTER to scroll forward a screen at a time. Both more ...
1
vote
1answer
666 views

Backtrack php5-cURL

I am trying to install a program called Glype on my computer for a proxy. I am using Backtrack 5 R3 and I have the latest version of Apache running on it. The problem I have is that Glype needs cURL ...
2
votes
1answer
309 views

suexec with chrooted environment

I'm trying to get a chrooted Apache environment working running mod_fcgid with suexec. Looking at suexec log inside jail, the wrapper scripts are being executed with no problems, however, when I look ...
1
vote
2answers
55 views

shell script to find the combination of the array elements

I have a shell script in which I have defined an array. The array contains more than 2 elements. I need to find the combination of all the elements in my array. Suppose, if my array has the elements, ...
0
votes
2answers
37 views

Make Ubuntu acknowledge that a custom built version of PHP is installed

I'm trying to install PHP from source code on my Ubuntu 12.04 VPS. I'm installing PHP like this: Download the latest version from the php.net website. Configure it using the parameters below. ...
0
votes
1answer
32 views

WordPress installation with Docker

I have to migrate my WordPress installation to my own server in order to get SSL working properly. (It was originally on GoDaddy shared hosting, which doesn't allow for external SSL cert ...
1
vote
2answers
27 views

Tracking from httpd instance to PHP script when PHP is a module

I'm trying to figure out exactly what's going on that kicks CPU usage in random httpd workers so high but I'm having a little hard of a time figuring out what PHP page is being requested so that I can ...
3
votes
0answers
42 views

Why does the php 'date' function returns a wrong time (off by ~24 seconds)? [migrated]

I have the following small php snippet running on a gentoo Linux (php version 5.2.10-pl0-gentoo): #!/usr/bin/php5 <? class TestDaemon { public function __construct(){ while (TRUE){ ...
2
votes
2answers
234 views

I can not remove folder from server

Accidentall I created the folder on remotely server (Server OS is Linux) using php: mkdir("folder_name",0); Now I can not delete this folder from server. I think this is from permission, because 0 is ...
1
vote
1answer
123 views

Package php5-json breaks firephp

Background Recently I upgraded php to version 5.5. Within this upgrade module for json was moved out from php5 package into a new package php5-json. So I installed it. Now the connection with ...
1
vote
2answers
39 views

PHP+FastCGI+nginx on Debian

I new with Debian. I want to use php on Debian. I do: apt-get install php5-cli php5-cgi spawn-fcgi Create file /usr/bin/php-fastcgi: #! /bin/sh PHP_FCGI_CHILDREN=3 PHP_FCGI_MAX_REQUESTS=1000 exec ...
1
vote
0answers
19 views

How can I list all the dependencies necessary to install PHP-Soap?

I have a server running Centos 5.10 with no internet access that I control remotely on which I'd like to install PHP-Soap. I also have an identical box in the office which is a clone of the remote ...
1
vote
1answer
213 views

Executing commands with PHP: using normal user, but its home directory is /root

I'm using a custom compiled installation of Apache + PHP, listening on port 80. Apache is configured to run as a normal user, with the proper settings User and Group of the httpd.conf file. After ...
1
vote
0answers
8 views

Bash in php exec don't color png and mp3 files on Linux [duplicate]

I have code like this: header("Content-Type: text/plain"); exec("/bin/bash -c 'ls --color=always'", $result); echo implode("\n", $result); and I've got result: Makefile README Yann Tiersen - ...
0
votes
0answers
12 views

How to concatenate an echoed string to include literal single quotes around a value pulled from MySQL? [migrated]

I've run into a slight dilemma when I try to contain a value from an array of data pulled from MySQL inside single quotes. This would normally be a no brainer, but I run into issues since it's inside ...
0
votes
0answers
33 views

Reading apache error logs from php

I have apache2 logs at :/var/log/apache2/error.log which has permission: -rw-r----- 1 root adm 127140 Mar 20 12:54 /var/log/apache2/error.log for the sake of accessing from php I changed the ...
1
vote
1answer
259 views

ERROR: could not find driver after changing from mysql to mariadb

mysql was working fine but I wanted to give mariadb a try on a new server I have going. However I am having an issue where all my php websites seem to have issues communicating with mariadb. Webmin ...
1
vote
1answer
173 views

Compile IMAP with certain PHP API version for MAMP

I've installed MAMP on Mac OS X (where PHP 5.3.15 with API version 20090626 is installed), but IMAP there is without SSL support. As long as MAMP using PHP v5.4.4 (API version 20100525) I've ...
1
vote
1answer
55 views

Can not execute some shell command from php

I want to execute phpcs commands from phpcode using shell_exec function. During execution it gives error /usr/bin/php: relocation error: /usr/bin/php: symbol X509_free, version OPENSSL_1.0.0 not ...
1
vote
2answers
644 views

PHP exec command has the result 0 even if an error occurs

I have this PHP code: $execout=exec('ssh root@xxx.xxx.xxx.xx "sudo /etc/init.d/smokeping reload"',$output1,$result); if($result !=0){ echo"that can't reload"; } else{ echo "successfully ...
3
votes
2answers
42 views

Changing default permissions for wget?

I'm using a PHP script to call shell_exec and execute wget to download some files to /var/www/dir/. (Internal tool, so security isn't much of an issue) The directory has 777 permissions. But when I ...
1
vote
2answers
456 views

Nginx + PHP + FTP - user permission issue

I have a wordpress copy installed on /home/username/public_html/site, and now the problem is : Nginx running PHP with "www-data" identity The site folder owner and group are "username", not ...
1
vote
1answer
74 views

Pass bash script arguments in double quotes to php cli script

I am trying to pass arguments to a bash script and then to a php script, I have literally looked at 30+ links, and tried over a dozen examples, and I for whatever reason have not been able to get the ...
1
vote
1answer
40 views

cannot locate cacti files under /srv/www/cacti

I am installing cacti on SLES-11-SP2 following instructions on Open Suse Cacti guide but I cannot locate the cacti files under /srv/www/cacti after the installation. Do you have any idea where they ...
1
vote
1answer
180 views

-bash: phpize: command not found on Centos 6

When I try to run phpize I get -bash: phpize: command not found I have run yum -y install php-devel but that returns: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * ...
1
vote
3answers
850 views

install php5 with readline support on debian wheezy

php5-cli does not come with readline support on debian wheezy. this means that the interactive php shell (run as $ php -a) does not have a prompt (php >), instead it just says Interactive mode ...
0
votes
1answer
17 views

Can't terminate PHP daemon process

I've started a PHP daemon process via SSH with php ./my-script.php --daemon Now I want to quit this process, but I can't. It's still active in the foreground of my shell and I've hit CTRL + C ...
0
votes
1answer
115 views

Depsolving for php-pecl-zip

I'm having trouble getting rid of my depsolving errors, and I've been left to figure this one out on my own. It all started when I wanted to upgrade from PHP 5.2 to PHP 5.3 (heaven forbid), and I was ...
2
votes
1answer
31 views

Nginx not available from localhost, but available by network

Have server with installed nginx and php-fpm. Some sctript need access to part of site via curl. But it fails. I tried to run curl on server : curl -v -i alexcoder.info * About to connect() to ...
0
votes
1answer
45 views

Compiling ImageMagick with special path to librairies

I have been compiling ImageMagick 3.1.2 with the following options ./configure --prefix=/usr/local/imagick-3.1.2/ --with-php-config=/usr/local/php-5.3.13/bin/php-config ...
0
votes
1answer
33 views

libphp4 Not Found?

I'm using CentOS 6.5 and Apache 2.2.15 I've installed PHP 4.3.11 by download: wget http://museum.php.net/php4/php-4.3.11.tar.gz tar zxvf php-4.3.11.tar.gz cd php-4.3.11 ./configure make make install ...
1
vote
1answer
52 views

Program acting differently depending on user

I am trying to control an RC transmitter from a PHP site. The command works fine as user "xbian" in the command line: sudo /home/xbian/433Utils/RPi_utils/codesend 34832404 for example, and it works ...
0
votes
1answer
18 views

Why dircolors don't return enything for bash called from php

I have this code in php: header("Content-Type: text/plain"); exec("/bin/bash -c 'dircolors -b'", $result); echo implode("\n", $result); but it return LS_COLORS=''; export LS_COLORS Why I'm not ...
0
votes
3answers
41 views

Bash in php exec in webpage don't colors for png and mp3 files on Linux

I have code like this in php: header("Content-Type: text/plain"); exec("/bin/bash -c 'ls --color=always'", $result); echo implode("\n", $result); and I've got result (escape is not visible) ...
1
vote
1answer
45 views

impact of allowing Apache to execute some commands on the server

I have an Ubuntu 12 web server running apache2, I developed a graphic interface using PHP to make users able to create their own email account by themselves ( exec() function), so I used visudo to ...
0
votes
0answers
27 views

How To Install PHP on CentOS by download packages?

I'm using CentOS 6.5 and I need to install PHP 4.3.11 i can't use "yum install php" because it'll install the latest version of PHP. So i use these command: wget ...
0
votes
0answers
71 views

php --enable-calendar=shared

I have on my Arch linux system, php compiled with --enable-calendar=shared, what does that mean? I couldn't find any relevant information on that topic on the web. Problem is, that I have to ...
1
vote
3answers
290 views

php shell_exec() permission on Linux Ubuntu

I'm developing a php application using Linux server. My problem is executing shell_exec() to call some exe file is not work(actually not exe, it's kind of linux executable file) echo ...
0
votes
1answer
134 views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...