- download thread safe executable
- extract to
c:\php
- create
test.php
as<?php echo phpInfo() ?>
- execute
php .\test.php
- paste output here and follow instructions from there
- add
api_key
environment variable inphp.ini
- uncomment (delete the semicolon)
extension=openssl
inphp.ini
- uncomment (delete the semicolon)
extension=mysqli
inphp.ini
- set the properties under
[MySQLi]
- mysqli.default_host =localhost
- mysqli.default_user =....
- mysqli.default_pw =........
- execute
php -S localhost:8000
- PHP Intelephense
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
-
extract to
c:\php
-
extract Apache24 to
c:\Apache24
-
(may not be needed, but:) download vc_redist_x64
-
edit
httpd.conf
, add lines# PHP8 module PHPIniDir "C:/php" LoadModule php_module "C:/php/php8apache2_4.dll" AddType application/x-httpd-php .php
-
edit
httpd.conf
<!-- change --> <IfModule dir_module> DirectoryIndex index.html </IfModule>
<!-- to --> <IfModule dir_module> DirectoryIndex index.php index.html </IfModule>
-
add
api_key
environment variable inphp.ini
-
uncomment (delete the semicolon)
extension=openssl
inphp.ini
-
uncomment (delete the semicolon)
extension=mysqli
inphp.ini
-
set the properties under
[MySQLi]
- mysqli.default_host =localhost
- mysqli.default_user =....
- mysqli.default_pw =........
- copy files to
htdocs\
- navigate to
C:\Apache24\bin
and executehttpd