2
votes
1answer
227 views

Despite #!/usr/bin/env php I need to call the file with php, why?

I'm trying to call the shell wrapper for phing phing ...but it doesn't recognize the env, I get a -bash: phing: command not found ...even though the file starts with: #!/usr/bin/env php ...
-2
votes
1answer
194 views

sh dev/null Permission denied apache

I am using Mac osx Mountain Lion for development. I am trying to execute a shell command in php using the 'exec' function. At the end of my command I am putting the output to > /dev/null 2>dev/null ...
1
vote
4answers
309 views

run php script in the background

is there a way to launch a php script and let it run on the server until it finishes? I use this php5-cgi /var/www/script.php -q & connecting via putty. When I close it (the session) the ...
0
votes
1answer
349 views

Do shell scripts wait for PHP commands to end before moving onto next line?

If I write a shell script something like this: php script1.php php script2.php What happens when I run it? Does shell wait until script1.php has finished before moving onto php script2.php or does ...
0
votes
3answers
94 views

Backing up server site as an automated process?

I am the web administrator for a small company. We host our website on our own server. The site runs on PHP and MySQL. I access the server via SSH. I am not very familiar with UNIX/LINUX commands, ...
0
votes
0answers
1k views

PHP cannot execute shell commands (CentOS 5.6, PHP 5.3.3)

Title says it all; I cannot run shell commands properly from PHP (CGI). Most commands (pwd and my own program) end with an exit code of 1 (permission denied). The command ls ends with an exit code of ...
2
votes
4answers
418 views

Why does my Linux Server not recognize “php” as a program?

I am in need of using PHP from the command line. When I type php .... The system says: -bash: php: command not found Now, I know for fact that PHP is up and running b/c it hosts my drupal ...
0
votes
1answer
441 views

getting error Too many open files in system

I am running a cron and output coming to my id and getting below as output: /bin/sh: /usr/bin/php: Too many open files in system Cron runs every 5 mins. Have checked /var/logs/cron and cron is ...
1
vote
3answers
127 views

How can I copy sites, scripts with default permissions from Linux to Linux

I have come across problems many times and still have not found a solution. I have websites running php joomla on one linux VPS with centos. Now as I install new extensions, there are some files and ...
2
votes
3answers
4k views

run shell command as other user called by PHP

I have a PHP script which is called by HTTP and not as command line script. This script should call a shell command as an other user than the current webserver user www-data. Example: <?php echo ...
1
vote
1answer
92 views

Create addon domains from web page

I have a VPS (CentOS) with CPanel and Suphp enabled. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.5 As ...
1
vote
5answers
1k views

How to execute with /bin/false shell

I am trying to setup per-user fastcgi scripts that will run each on a different port and with a different user. Here is example of my script: #!/bin/bash BIND=127.0.0.1:9001 USER=user ...
2
votes
5answers
2k views

Why shell command runs from command line but not from php script?

I'm writing a script that backup some files using s3cmd amazon s3 command line utility. When I run a s3cmd shell command from shell it backs up the file nicely. When I run the same command from PHP ...
0
votes
1answer
434 views

Compile PHP as CLI and not as CGI

I have multiple sites ruiing on my server with php 5.2.11 and it as CGI Now i want to install my source matrix and it needs PHP as CLI versions. CAn anyone guide me how to do that and will that ...
2
votes
3answers
2k views

CentOS 5 Start a PHP Script on startup

We have a CentOS 5 VPS over at slicehost. I have a couple of PHP scripts that operate email and stuff. I need a way to start these php scripts automatically on machine's reboots/startups and have ...
0
votes
3answers
182 views

track down source of shell command

In our apache error log (/usr/local/apache/logs/error_log) for one of our servers we are seeing a shell command running quite often which is throwing an error, it looks like this: sh: list_price: ...