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

learn more… | top users | synonyms

18
votes
2answers
49k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
0
votes
1answer
1k views

Difficulty installing PHP from source to CentOS 6.4

The problem: After installing PHP from source, functionality is not present - my phpinfo test page does not work. If I use yum to install from the repository functionality is restored. Why am I ...
1
vote
3answers
268 views

Using nohup to keep a script running indefinitely

I am very new to Linux and I've only been using it to SSH to my web server using Putty. The issue I am having is this: Basically I've got 2 php scripts. One get_tweets.php constantly listens for ...
4
votes
1answer
1k views

Does segfaults mean bad memory

This is a brand new server with a new install and fresh compile of Apache/PHP with nothing crazy. Just a WordPress site hosted and I get the following. Could this just mean bad RAM? If so how can I ...
3
votes
3answers
1k views

Trying to update php on CentOS 5.7

Apologies in advance - I'm not a good Linux user by any stretch of the imagination. I have a CentOS 5.7 dedicated server on which I host a few websites. I currently have php 5.2.10 installed, but ...
3
votes
2answers
1k views

Find out screen id

I want to start a program with SSH using PHP, which works fine, but now I want to kill the screen with PHP, but the only thing I know is the name of the screen. How do I find out the screen ID ...
2
votes
2answers
475 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 ...
2
votes
2answers
2k views

Fixing debian installer

I have a VPS with Debian GNU/Linux on it. I'm trying to install a PHP file manager so that people could access it and download stuff into a directory. I don't have anything in my /bin about PHP so ...
1
vote
0answers
2k views

mysqld dead but pid file exists

Webserver was running fine for weeks then suddenly: I can access, but I am unable to log into Webmin I can access Magento, a php-based storefront application, but I am no longer able to log in and ...
1
vote
2answers
424 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, ...
1
vote
3answers
523 views

Why does Crontab give me an error with my PHP script when running it from the terminal does not?

I'm having some problems with running the Crontab with PHP files. I have this same php scripts running in the Crontab for more than 6 months but some days ago mysteriously they stopped to execute the ...
0
votes
1answer
196 views

building php-5.3 on arch linux

I'm trying to build php-5.3 on arch linux using phpenv + php-build. The problem is bison is too new: $ phpenv install 5.3.29 [Info]: Loaded apc Plugin. [Info]: Loaded pyrus Plugin. [Info]: Loaded ...
0
votes
1answer
31 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
204 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) ...
0
votes
1answer
507 views

How to start a GUI program with PHP from website

My firm has some Ubuntu 12.04 running where there is no display attached and that are behind different firewalls. The visitor on local websites on that servers should be able to start a GUI program ...
-3
votes
1answer
229 views

Best Linux for a small Web server [closed]

I'm currently planning my business servers and I would like to know what's the best Linux distro for these needs: Nginx + MySQL + PHP 5.4 Zimbra Collaboration - Open Source Node.js w/ Forever I ...