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

learn more… | top users | synonyms

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
20 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, ...
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
52 views

understanding LAMP: linux apache mysql and php [on hold]

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 ...
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
2answers
54 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){ ...
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
2answers
36 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 ...
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
32 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
52 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 ...
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
1answer
73 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
171 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 * ...
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 ...
2
votes
1answer
30 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 ...
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 ...
0
votes
1answer
44 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 ...
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
40 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
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 - ...
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
278 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
128 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). ...
0
votes
1answer
114 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 ...
0
votes
1answer
52 views

why is my php script slower on debian than freebsd?

We moved a web-based application to a new server recently, but the new server seems to run slower than the old one. The old server was FreeBSD 7 with Apache 2.2, mod_php 5.3, and mySQL 5.1. The new ...
0
votes
1answer
29 views

How to get cron to delete files with names starting with foo and file extensions ending with bar? - done with php script

I'm sorry to post such a question but honestly, I've spent hours reading posts and still it doesn't work... Also if this should be posted else where but this felt like the right place. I have a ...
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 ...
1
vote
2answers
206 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: ...
2
votes
1answer
80 views

kill process in script while writing file behavior

in my php script which runs as a cron job, I have foreach($sites as $site) { exec('./wkhtmltoimage-amd64 ' . $site . ' somefile.png'); exec('./zopflipng -y somefile.png somefile.png'); } ...
1
vote
0answers
136 views

Can't Install ImageMagick on Centos using Yum

I am trying to install ImageMagick on my dedicated-virtual Centos server for use with PHP. I first ran the following commands successfully: # yum install gcc php-devel php-pear # yum install ...
1
vote
0answers
58 views

Mail server broken my LAMP installation

I was installing mail server, postfix/sendmail I suppose. Then I had no need to use it anymore so I removed it. But now when I type localhost in my browser it redirects me to https://mail.example.com. ...
1
vote
1answer
67 views

Running cron jobs under php ver. 5.4

My hosting company switched me to php version 5.4. I run a Drupal site (D7.) They say: You'll want to make sure your crons use "/usr/php/54/usr/bin/php" instead, as otherwise it will use PHP 5.2. ...
0
votes
1answer
75 views

Wordpress won't recognize the MySQL database

I want to install Wordpress on Archlinux but I have this error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. I un-commented this line in ...
1
vote
2answers
368 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
0
votes
1answer
33 views

Notify-send not working when run from apache [duplicate]

I have the following script (alert.sh) which has been setuid'd: DISPLAY=:0.0 notify-send --urgency=low -i python "The job has finished" and the following PHP file alert.php: <?php echo ...
2
votes
1answer
29 views

compiling PHP fails cause of libpcre

I'm trying to compile PHP myself as I want to use PHPBrew to switch between multiple versions of PHP. I already solved a ton of problems in the process, but with this particular one I can't get any ...
2
votes
1answer
154 views

nginx php-fpm index.php doesn't load

I have a quite simple setup with nginx and php-fpm, howsoever when I try to access my website with my-website.com I get a 403 forbidden error, If I access my-website.com/index.php everything works ...
1
vote
1answer
250 views

Securest way to authenticate users against /etc/shadow using PHP?

This question became important to me, since I'm setting up a Horde environment and want to use the system accounts. Doing some search I found mainly 4 ways of doing that, which all seem to have some ...
0
votes
0answers
33 views

Help required for LAMP Stack fail-over Configuration

I am using cloud servers of digital ocean for last some months. Recently One of my cloud servers disappeared from panel with backups @ ubiquity, the server co guys put it back after 1 day. However my ...
1
vote
0answers
641 views

How to install PHP 5.2.4 in CentOS release 6.5 (Final)?

Folks I need to install PHP 5.2.4 in CentOS release 6.5 (Final). My souces list are: # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of ...
0
votes
1answer
112 views

Downgrade php version on debian

I have a big problem with my sites after I migrated to a new server. The only difference is the php version. On the old server I have 5.3.3-7+squeeze15 and on the new server there is ...
1
vote
0answers
28 views

rpmbuild library register for 'requires'

Big Picture: I am building an in-house rpm for a customized php. I build an rpm which works, but generate library requirements that I can't seem to meet without using 'nodeps', which I want to avoid ...