Tag Archives: shell

How to run shell script with live feedback from PHP?

Questions: How would I execute a shell script from PHP while giving constant/live feedback to the browser? I understand from the system function documentation: The system() call also tries to automatically flush the web server’s output buffer after each line of output if PHP is running as a server module. I’m not clear on what… Read More »

shell_exec() timeout management & exec()

Questions: I’m running a third party script by using a wrapper class I’ve written which calls shell_exec() and pipes into a file I parse later using php code. I should mention that this is working, but I am trying to enhance the functionality, having encountered a use case I hadn’t thought of. How is it… Read More »

executing a Powershell script from php

Questions: I’m trying to execute a powershell script from PHP, but it does not seem to work. The script ‘newEvent.ps1’ creates an event on the Exchange server. $psPath = “powershell.exe”; $psDIR = “C:\\wamp\\www\\ant\\assets\\ps\\”; $psScript = “newEvent.ps1″; $runScript = $psDIR. $psScript; $runCMD = $psPath.” “.$runScript.” 2>&1″; echo “\$psPath $psPath <br>”; echo “\$psDIR $psDIR <br>”; echo “\$psScript… Read More »

Excel COM Object in PowerShell

Questions: SharePoint Online has a mostly undocumented method of populating a list of SharePoint Online sites that an administrator pushes out to its users. Based on the presence/values of some registry keys, the client workstation knows when to ask SharePoint Online for an updated list of the SharePoint sites. The problem I’m having is that… Read More »

Powershell paste data into existing sheet

Questions: I have a script that takes data from an existing .csv file and copies into an existing workbook (xlsx). The problem: It always creates a new sheet in the workbook. I would like to add the data to my current sheet and start at A5 instead of the top. Here is what I have… Read More »