Skip to main content

All Questions

Tagged with
0 votes
2 answers
12k views

Modify the contents of php.ini in my Dockerfile

I'm using containers which run php environments and in my Dockerfile I set php.ini from the development template cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini then once the ...
maja's user avatar
  • 329
0 votes
1 answer
115 views

Is there some way that my PHP CLI scripts could possibly detect that the Windows machine is about to be rebooted/shut down?

I have an advanced, ever-running system of PHP CLI scripts running which do all kinds of work, and communicate with my local PostgreSQL database. Windows 10. I never use the start menu to shut down or ...
Luise's user avatar
  • 1
2 votes
1 answer
3k views

What is the relation between php.exe, php-win.exe and cmd.exe on Windows?

For all my years running PHP CLI on Windows, I have started my scripts with .bat files like this: php test.php php resolves to C:\PHP\php.exe due to my PATH. No problems with this. Except they always ...
Adner's user avatar
  • 21
0 votes
1 answer
2k views

Kill a process after a time limit is reached, or let it run till completion, whichever is faster

The following posts teach us how to run a process for some time: What is a simple way to let a command run for 5 minutes? Kill process after it's been allowed to run for some time I particularly ...
forgodsakehold's user avatar
3 votes
1 answer
1k views

MacOS Mojave - remove PHP installation from php-osx.liip.ch

I followed this tutorial https://php-osx.liip.ch/ and installed the php 7.3 version on MacOSX Mojave, running curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 But now I changed my mind and I ...
Riccardo De Contardi's user avatar
1 vote
0 answers
113 views

Unresponsive server along with virtual machine after high load on database

I faced the problem that while running resource consuming command and opening a page I got both the server and virtual machine unresponsive. I am using standard server pack for PHP 7.2: apache, php-...
FreeLightman's user avatar
1 vote
1 answer
271 views

Why does start command in cmd windows10 put another start in the newly opened window with php?

What I was trying to do is, I want to run a local php server and then open http://localhost:8000 in chrome. I made a bat file in my windows 10 OS for this. Here's my first attempt: php -S localhost:...
user31782's user avatar
  • 113
0 votes
1 answer
1k views

Is there some way to bring a command prompt/terminal "to the front" (focus) from PHP CLI?

I often launch "background scripts" from my PHP CLI scripts. That is, a cmd.exe window starting minimized (grouped). However, I sometimes want to programmatically "bring it to the front", for example ...
sumfink's user avatar
0 votes
1 answer
2k views

php curl not returning bash result

I have a file on the remote server called test.sh which returns two lines when called from the command line with './test.sh'. So far so good. I also have a php file with a curl command called result....
George Feichter's user avatar
1 vote
1 answer
314 views

PHP ffmpeg trying to include a variable but it's not executing at all

I have the following variables set in PHP: $ffmpeg = ffmpeg.exe; $VideoFilename = "C:/Videos/VideoFile_1.mp4"; $CroppedVideoFilename= "C:/Videos/VideoFile_1_Cropped.mp4"; I have ...
ax.falcon's user avatar
1 vote
0 answers
2k views

How do I link to a specific line number with "file:///" URLs?

The manual for Notepad++ says that you can use the command line argument -n123 to jump to the 123rd line of the specified file. What about when the file is not opened from a command line, such as: ...
IAmAGuest's user avatar
0 votes
1 answer
614 views

View php 7.2 memory_limit for Apache 2 in the command line

Currently when I do the following command in the command line for ubunutu: php -i I get the php cli memory_limit, but how do I output the apache2 memory_limit in the command line? I know I can make ...
Patoshi パトシ's user avatar
3 votes
2 answers
3k views

“php -f” doesn’t run code but only shows file contents

Running Debian 9 and PHP 7.3, trying to execute a file with the php -f hello.php command. Instead of echoing hello it outputs the source code. The full code is #!/usr/bin/php <? echo 'hello'; ?>...
Lid's user avatar
  • 55
0 votes
1 answer
76 views

PHP 5.6 (xampp) is showing warnings instead of throwing ArgumentCountError

I am running some php scripts from cli. I use xampp installation for php with path var /c/xampp/php. I tend to swap versions around by renaming installed xampp folders when I want to switch between ...
Bradley Hayes's user avatar
0 votes
1 answer
714 views

How to integrate cURL on my public_html?

I do have this folder structure for my website: \index.html \php\some-php-files.php \js\some-js-files.js What I want to do is, I want to use a cURL command, which I usually use it on the terminal/...
Baku Bakar's user avatar

15 30 50 per page
1
2 3 4 5