For several days I have been trying to install PHP. It is version 8.1.2. I download the zip file from www.php.net. Unpack the zip file to where I want it, and open the php folder. No matter which .exe file I click to open, the installation will not start. The closest I get to the installation will start is that if I click on php.exe, a window will pop up for a few seconds, then it will be just as quiet. What am I doing wrong?
Do you have an http server installed?
Yes. Laragon 5.
I wrote wrong the first time. When I click php.exe, cmd (black window) comes up and stays there. It does not close as I said in the first place.
If you’re using Laragon, you shouldn’t need to run php.exe, that will be done when you (re)start Laragon.
That was what I thought too. I read the problem is actually bigger than first described. Both Laragon and VS code are installed. The problem is not that I can not open my developed .php pages locally. I can do that without any problems. The problem is when I should use PHP Debugger in VS Code from Xdebug. Then I get an error message that it does not find php, that … I paste the error messages below. It’s easier.
“PHP executable not found. Install PHP 7.4.0 or higher and add it to your PATH or set the php.executablePath setting”.
After many different attempts, I finally thought that I could just copy or extract the entire directory over to the bin directory of PHP to get mapping up / installed the newest PHP version in Laragon so I can get the latest php version there. The old php version in Laragon also does not work with PHP Debugger in VS Code. Then there is this with the path to php that is asked for. I no longer have any idea what to try. I have uninstalled and reinstalled, tried most things, but debugger in VSC will not work, and I can not get PHP to install from what I have downloaded from www.php. But something I must have done correctly. I can open .php websites locally in web browsers, but to get VS Code and .php to work together, it seems impossible.
I have done nothing but copy the PHP directory of the bin directory to C: \ laragon \ bin \ php \ php-8.1.2-nts-Win32-vs16-x64
This is where I extract or paste the files to PHP 8.1.2 in. THEN php-8.1.2-nts-Win32-vs16-x64 comes up in LAragon under Menu-> PHP-> Version (look at the picture attached.
So if it had not been for the fact that I want PHP Debug in VSC to work, I would have given the FUCK. For my .php pages open in the browser.
That’s why I want to install PHP outside of the one in VSC’s bin directory. Understand that whoever can, it will not work. So you in here are my last hope.
I know nothing about PHP debugger or VS code, but you need to install PHP where Laragon can find it. I assume you followed the instructions here?
However, you seem to have installed the non-thread safe version. You need the thread safe version
I see no attachment.
No, I did not follow that description, but that’s how I have done it. And as you have probably read and perceived in my previous posts, I have no direct problem with Laragon and PHP. I get access to .php files via my browser. It is when Visual Studio Code and a debugging exrension that doesent find the PHP engine. But since you don’t have knowledge about VSC or the PHP debugger extension to VSC named Xdebug, I cant get any further. I give up and try another editor that got all I need inclusive. Thanks for trying.
I have changed the title to be closer to your actual problem.
I see no attachment.
Sorry, here it is:
And I will try what you suggested, and download thread safe version
php-8.1.2-Win32-vs16-x64, the one without “nts” in the filename.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.