I do have a strange problem. I’m trying to get around output buffering in PHP to run system() calls and get instant output. It works very well, but for some strange reason, the ping command on “test.de” isn’t presenting instant output as the ping on google.de does. I do see the first l…
Tag: php
Shell script executed from php, but commands in sh script wont run
I’m making a PHP page with the purpose of creating and activating Apache VirtualHost files. The pages generates the files and places it in /etc/apache2/sites-available/. After that a shell script is called by with: shell_exec(“/bin/sh /usr/local/bin/myscript.sh”); myscript.sh: The script see…
PHP Calling shell_exec on a bash script running a background process times out
I have a bash script with a few lines similar to the following Then I call that from a PHP script return shell_exec(“/path/to/bash/script arguments”); Now, when I do that, the command is run successfully, and outputfile.txt contains “Ran Command”. However, the PHP script times out afte…
Composer & Linux production server – autoload not working
I have already tried searching for this question and seen a couple of answers, but no luck… I have composer installed with Slim Framework v3. I am using autoload for my files using PSR-4 in the composer.json file like this: And this is my folder structure: I am running it on a localhost Mac OS X El-Capi…
Execute GIT command from PHP and get error message back
When I try to execute something legitimate – it works, like returns me a list of available tags. But when I do something that should return error, like it returns me NULL, but not message fatal: could not create work tree dir ”.: No such file or directory that I would see in the console. How can I…
Can’t output Python Print in PHP
I’m really stuck on this one, but I am a python (and Raspberry Pi) newbie. All I want is to output the print output from my python script. The problem is (I believe) that a function in my python script takes half a second to execute and PHP misses the output. This is my php script: I’ve included t…
Error during insert with parameter(s) over 30 characters
Issue Performing an insert using prepared statements with PDO and an ODBC driver gives the following error when at least one of the parameters is over 30 characters: Inserts work for any bound string that is <= 30 characters in length. I have no issues with SELECT queries. Using INSERT with isql and sqlcmd…
PHP Xdebug Netbeans Breakpoints
After working fine, with no config changes for months xdebug/netbeans is now useless. I can create breakpoints but whenever it has ‘stepped in’ to a further scope its impossible to step thru and simply jumps out of the inner scope to the caller. There are no exceptions generated. Using tail -f xde…
PHP exec sudo script not working despite having sudo rights
My php script: my visudo line (I tripled checked every path) If i remove the ‘sudo’ in the exec() it will execute (i put a touch aaa at the start, with sudo the file isn’t even created so the script doesn’t even begin to execute). The script has exec rights for everyone. I can’t …
PHP Fpm process is killing my website: process is blocked with status D
After days of searching in the web, Stack Overflow, Google,. Everywhere, I can not understand what happens to PHP-fpm after hours of working normally. Description of the problem: I have an Ubuntu 16.04 VPS where I have installed PHP-FPM and Nginx and a small redis-server to store sessions. I have 4 websites r…