# PHP for Xojo Programmers - 0000 - Running PHP Code

**URL:** <https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728>\
**Category:** PHP\
**Tags:** php, tutorials\
**Created:** [8 May 2021 19:33 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728 "2021-05-08T19:33:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HalGumbert](https://ifnotnil.com/user_avatar/ifnotnil.com/halgumbert/32/2198_2.png) [@HalGumbert](https://ifnotnil.com/u/HalGumbert)\
**Post date:** [8 May 2021 19:33 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/1 "2021-05-08T19:33:24Z")

</div>

# Running PHP Code

There are lots of ways to run php, but the easiest is via a website hosting account. Make a folder, maybe name it “phpstuff” and then upload your HTML and PHP files into that folder. Then load “[https://foo.com/phpstuff/index.php](https://foo.com/phpstuff/index.php)”.

There are ways to install PHP on Mac, Windows, and Linux, but I haven’t found an easier way.

If you have a favorite way post below!

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [8 May 2021 20:05 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/2 "2021-05-08T20:05:16Z")

</div>

MAMP is not so bad and you can play with Apache or NGINX and run 100% locally

---

<div class="post-metadata">

**Author:** ![Rick.A](https://ifnotnil.com/user_avatar/ifnotnil.com/rick.a/32/217_2.png) [@Rick.A](https://ifnotnil.com/u/Rick.A)\
**Post date:** [8 May 2021 20:30 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/3 "2021-05-08T20:30:24Z")

</div>

A local VM with Linux, bridge mode, for everything I want to emulate/adjust/test before uploading to a VM on the cloud. A VirtualBox solve it.

Here is a recipe needing some adjustments for someone’s personal use, to install Nginx, Php, PhpMyAdmin, MariaDB, Postgressql and PhpPgAdmin

> <https://gist.github.com/paneru-rajan/66994f5d3bd6cad7401de949d9dd4acf>

---

<div class="post-metadata">

**Author:** ![ivan](https://ifnotnil.com/letter_avatar_proxy/v4/letter/i/df788c/32.png) [@ivan](https://ifnotnil.com/u/ivan)\
**Post date:** [8 May 2021 21:32 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/4 "2021-05-08T21:32:14Z")

</div>

> [@HalGumbert](#):
>
> There are ways to install PHP on Mac, Windows, and Linux, but I haven’t found an easier way.

For windows I allways used XAMPP

> **[XAMPP Installers and Downloads for Apache Friends](https://www.apachefriends.org/es/index.html)**
>
> XAMPP is an easy to install Apache distribution containing MariaDB, PHP and Perl.

---

<div class="post-metadata">

**Author:** ![Rick.A](https://ifnotnil.com/user_avatar/ifnotnil.com/rick.a/32/217_2.png) [@Rick.A](https://ifnotnil.com/u/Rick.A)\
**Post date:** [8 May 2021 22:58 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/5 "2021-05-08T22:58:08Z")

</div>

I do use a VM with Linux in WINDOWS and/or MAC. Optionally, you can even add docker there for an extra level of abstraction, but most of the time I just use a pure VM.

---

<div class="post-metadata">

**Author:** ![Tim](https://ifnotnil.com/user_avatar/ifnotnil.com/tim/32/13_2.png) [@Tim](https://ifnotnil.com/u/Tim)\
**Post date:** [9 May 2021 15:21 UTC](https://ifnotnil.com/t/php-for-xojo-programmers-0000-running-php-code/1728/6 "2021-05-09T15:21:57Z")

</div>

`<plug>`  
[Lifeboat](https://strawberrysw.com/lifeboat) will install PHP on your remote Linux server, it makes setup a one click install 😉  
`</plug>`
