5
votes
1answer
21 views

PHP version for super user is fcgi instead of cli

I have a strange problem with PHP version when using CLI. When I login as root and use: php -v I get an info that php is running in CLI mode which is fine, but as soon as I use sudo php -v I get ...
1
vote
1answer
81 views

How to execute a php file from a bash file?

My goal is to make a script that I can execute through a cron job. The script needs to find several killstat.php files in multiple directories and execute them. This is what I have so far: ...
1
vote
1answer
65 views

Adding sudoer for all but root

Here is the base of my problem: I would like to add sudo rights to a user, but not to use it as root for security reasons. I have a PHP script needing to run a command (drush) through exec(). ...
0
votes
1answer
48 views

GREP for multiple strings with wildcard

I am trying to copy lines from a log file from certain days. Here's an example of what they look like. 2014-05-01T15:53:16+00:00 DEBUG (7): 2014-04-301T11:08:10+00:00 DEBUG (7): This GREP ...
1
vote
1answer
38 views

why would running apache as a service produce different results when simply starting it from the command line

I have a .php script that produces different results when apache is launched as a service, as compared to when apache is simply started from the command line with httpd.exe. I have checked things ...
0
votes
0answers
67 views

nohup process commands to detect if process is still running and if not, re-run process in lamp stack

I am running nohup to keep a php script running in the background. Is there anyway to ensure the process keeps running? Is there a command that can check to see if the process is still running and if ...
2
votes
1answer
175 views

PHP won't run on command line Linux

I think I may just be missing something simple, but I can not get PHP to run anything on the command line. I'm using Linux Ubuntu. All the exact same files run as expected via the web. I have tried ...
0
votes
0answers
59 views

Killing a process which ran for a lot of time or is using a lot of memory

I am not sure whether this question belong to Stack Overflow or here, but here we go. I am designing a online 'C' compiler, which will compile and invoke the program if compilation succeeded. So ...
3
votes
1answer
191 views

CLI stopped working when running php artisan serve - Laravel 4 Win7

I added a path to my environment variables : C:\wamp\bin\php When I run the command php artisan serve it says Laravel development server started on `http://localhost:8000` But after that a dialog ...
1
vote
1answer
778 views

PHP warnings after Mavericks upgrade

After upgrading my Mac to Mavericks I've had a few small issues with machine, most of which I've resolved, however when I try to run PHP scripts at the command line I'm not getting these warnings... ...
1
vote
1answer
57 views

Mediawiki extension error

I'm running the latest version of mediawiki using MoWeS Portable II from my desktop. I just installed this extension on the wiki http://www.mediawiki.org/wiki/Extension:MsUpload It adds an option to ...
0
votes
1answer
260 views

Laravel Command Line Stuck

This might seem like a dumb question, but I’m pretty new to the command line work. I’m on mac and when I type in “php artisan serve” everything runs great, the server starts, I get a message telling ...
2
votes
0answers
242 views

Error 10053 using composer

I need to use Composer in my wamp server on a windows 7 machine but I keep on getting a 10053 error. For example when I try to install laravel I get the following message: ...
1
vote
1answer
429 views

PHP external program call

My setup is as follows: Windows 7, XAMPP with Apache and PHP enabled I have a PHP script in which I call an external program to do run a conversion. This external program is an EXE file, which ...
2
votes
2answers
233 views

Imagick Convert Append 2 pdf pages

I am using the following code to make a single pdf file with multiple pages in one jpg file I am using Imagick library and PHP tcpdf convert -append path1.pdf path2.jpg Now what i need to do is to ...
0
votes
1answer
382 views

Map `php` at the command line to point to `/usr/bin/php`?

For some reason using php at the command line references /usr/local/bin/php instead of /usr/bin/php. How can I make $ php script.php the equivalent of running $ /usr/bin/php script.php? Current ...
1
vote
0answers
94 views

repeat command until process start or timeout unix

Is there anyway to check the number of file in a directory, if the number of files is correct, say 5 files, zip the files with zip -r total.zip. If the number of files is wrong, wait 3 seconds, and ...
0
votes
1answer
84 views

Keep cmd open for period of time

I have scheduled a taks on my windows 7 machine to run every 15 minutes and I have that working. The command is C:\wamp\bin\php\php5.3.5\php.exe -f "C:\wamp\www\vmstage.php" Still, all working. ...
0
votes
1answer
80 views

Apache/PHP installation on OSX differences?

I'm wanting to update the local version of PHP on my Mac.. i've been doing some digging and got a little confused. If i run php -i from the terminal it says: $ php -i phpinfo() PHP ...
1
vote
1answer
76 views

Windows: Run PHP via command line from htdocs

I'm trying to run PHP via the command line (Windows 7), however it's a pain tuping the full path to PHP every time. I tried using mklink mklink /D "c:\xampp\php\php" php however that doesn't seem ...
1
vote
1answer
3k views

php is not recognized as an internal or external command (windows 7)

I added php to the PATH environment var. Showing here my last three entries in the path input: C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\xampp\php\ Somehow when I run php ...
1
vote
2answers
524 views

Is there a browser based interface for running command line on your host?

I know I can manually run it through PHP's exec() command but I was hoping if there was a ready to download and deploy PHP-based system that could act as a bridge and terminal and you can run commands ...
2
votes
2answers
729 views

Setting pipefail for a single piped command

I need to execute a number of piped shell commands from a non-BASH script (namely PHP script) like these: command1 | command2 | command3 so that, if command1 fails with a non-zero exit code, each ...
1
vote
1answer
476 views

VP8 and WebM, not working in ffmpeg-php

I need a help with ffmpeg-php and Ffmpeg. Ffmpeg: ffmpeg version 1.0.git built on Oct 6 2012 01:54:50 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4) configuration: --enable-gpl --enable-libmp3lame ...
2
votes
2answers
1k views

ffmpeg works on terminal not with PHP exec

If I execute a ffmpeg command from terminal, I get the desired result: ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv Terminal's output ... video:3404kB audio:1038kB global ...
1
vote
1answer
4k views

What is a stopped process in linux?

So I had some PHP scripts running from the command line, and wanted to stop them running. I ran $ ps aux | grep php $ sudo kill 8754 $ sudo kill 8767 And then ran $ ps aux | grep php again to ...
0
votes
2answers
813 views

How do I run PHP scripts via CMD without typing “php”?

If I have a batch file called "program.bat"... and I'm on the command line... I can just type program to get the program to run. If I'm on the command line, how do I get program.php to run ...
0
votes
1answer
430 views

Running PHP as CLI, takes a long time

Whenever I need something doing, I write a PHP script to do it. I like PHP, it's simple, doesn't need compiling, and I can have a tool written in minutes. Trouble is, when I try running PHP in the ...
2
votes
3answers
135 views

Linux Web Server

I'm looking to set-up my own local web server using Linux, to allow me to run and develop PHP applications using Apache and MYSQL. Can anyone recommend the best distribution of Linux server to use. ...
0
votes
1answer
330 views

ImageMagick cannot use identify on remote image if it contains a port number

I am having trouble using exec identify on a remote image with imagemagick if the url contains a port number. So the url appears like this: http://isite.com:81/image.jpg If I remove the :81 it works. ...
1
vote
1answer
442 views

GeekTool won't run UNIX command that works in Terminal

Just to put an example, in the Terminal: php -f file.php Works perfectly, when I try to use this in GeekTool it just does not work. It works fine till: php -f Displaying the possible option, ...
1
vote
1answer
1k views

Run PHP from a command line in windows before starting up a software

I wish to use the following PHP code: http://code.google.com/p/todolistgcalsync/wiki/ToDoList And have it run in the beginning (and ending) of every time I start a particular software (specifically, ...
0
votes
1answer
369 views

Executing PHP script from command-line

It has been a while since I did any scripting with php. Now that I'm back at it, I find I'm missing something simple. Currently, the only way I am able to run my scripts is with the php command in ...
0
votes
4answers
684 views

Suggest a good Linux CLI torrent client to integrate into web application [closed]

Im looking for a decent CLI torrent client that will download a torrent file based on a .torrent URL that I feed into it(or copy to local drive, and then input into it), that will download to one dir, ...