Skip to content

MattKuhn123/kjm-prayers-php

Repository files navigation

kjm prayer board (php)

how to run locally

how to configure local environment

  1. download thread safe executable
  2. extract to c:\php
  3. create test.php as <?php echo phpInfo() ?>
  4. execute php .\test.php
  5. paste output here and follow instructions from there

how to run locally

  1. add api_key environment variable in php.ini
  2. uncomment (delete the semicolon) extension=openssl in php.ini
  3. uncomment (delete the semicolon) extension=mysqli in php.ini
  4. set the properties under [MySQLi]
    1. mysqli.default_host =localhost
    2. mysqli.default_user =....
    3. mysqli.default_pw =........
  5. execute php -S localhost:8000

recommended vs code extensions

  1. PHP Intelephense

launch.json

{
    // 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"
            }
        }
    ]
}

how to run on server

reference

how to configure server environment

  1. download thread safe executable

  2. extract to c:\php

  3. download apache lounge

  4. extract Apache24 to c:\Apache24

  5. (may not be needed, but:) download vc_redist_x64

  6. edit httpd.conf, add lines

    # PHP8 module
    PHPIniDir "C:/php"
    LoadModule php_module "C:/php/php8apache2_4.dll"
    AddType application/x-httpd-php .php
  7. edit httpd.conf

    <!-- change -->
    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>
    <!-- to -->
    <IfModule dir_module>
        DirectoryIndex index.php index.html
    </IfModule>
  8. add api_key environment variable in php.ini

  9. uncomment (delete the semicolon) extension=openssl in php.ini

  10. uncomment (delete the semicolon) extension=mysqli in php.ini

  11. set the properties under [MySQLi]

    1. mysqli.default_host =localhost
    2. mysqli.default_user =....
    3. mysqli.default_pw =........

how to deploy to server

  1. copy files to htdocs\

how to run server

  1. navigate to C:\Apache24\bin and execute httpd

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •