Skip to content

Setup Webapp

dhtml edited this page Apr 9, 2023 · 3 revisions

Setting up your web application

This section guides you on how to setup regular HTML5 applications, PHP-only applications, PHP/MySQL applications, Frameworks like Laravel, CMSes like wordpress.

Table of Contents

  1. Setup your Webdirectory Files

  2. Setting up mysql database

  3. Retrieving mysql port

  4. Setting up sqlite database

  5. Running composer commands

  6. Setting up wordpress

  7. Setting up laravel

  8. Setting up other frameworks

1. Setup your Webdirectory Files

You can put your files inside the www folder.

Supported extensions for your starting page are:

  • index.php
  • index.html
  • index.htm
  • default.php
  • home.php

This means you can run regular HTML5 applications with this without necessarily using PHP.

2. Setting up mysql database

To setup your database, you need to have mysql service running. This can be achieved in two ways:

  • First is by starting phpbrowserbox, this will ensure that all the services are running
  • Second is by using the bbcpanel to start the server

Now that you have the server up and running, there are different means of setting up your database

  • Method 1: use phpmyadmin - you can launch phpmyadmin from the bbcpanel or try guessing the URL e.g. http://localhost/phpmyadmin

  • Method 2: Using the console - launch the console from bbcpanel (or locate it inside bin\bbshell).

Access the console with:
c:\>mysql -u root
CREATE DATABASE laravel;
exit;

Import your database with:
c:\> mysql -u root laravel < laravel.sql

3. Retrieving mysql port

PHP is automatically set to detect the current mysql port being used. But if you wish to retrieve the current port being used, you can get it from the following:

  • Method 1: from bbcpanel, it usually display the ports
  • Method 2: from inside php code:
//retrieve mysql port
echo $_SERVER['PHPBB_MYSQL_PORT'];
//retrieve apache port
echo $_SERVER['PHPBB_APACHE_PORT'];

4. Setting up sqlite database

Ensure you have phpbrowser server running:

There are many ways to do this, however you might want to try these two methods:

And carry out your operations from there.

5. Running composer commands

Launch the console from bbcpanel (or locate it inside bin\bbshell).

The console should automatically navigate to the www directory by default.

You can run your composer commands from there:

c:\> composer --version
c:\> composer install

6. Setting up wordpress

There is no special preparation for setting up wordpress, but you can do the following:

  • Step 1: copy the wordpress files inside the www directory
  • Step 2: start bbcpanel
  • Step 3: start server from bbcpanel
  • Step 4: launch phpmyadmin from the bbcpanel to create your database
  • step 5: click on "Home page" from bbcpanel to launch your browser to finish setting up wordpress inside
  • step 6: start phpbrowserbox normally

7. Setting up laravel

There is no special preparation for setting up laravel, but you can do the following:

  • Step 1: copy the wordpress files inside the www directory
  • Step 2: start bbcpanel
  • Step 3: start server from bbcpanel
  • Step 4: launch phpmyadmin from the bbcpanel to create your database
  • Step 5: Run composer install. see running composer.
  • step 6: click on "Home page" from bbcpanel to launch your browser to finish setting up wordpress inside
  • step 7: start phpbrowserbox normally

8. Setting up other frameworks

This is a combination of all the above. So far as the framework support php, mysql or sqlite, it should be possible to configure it to work. PHP version 5.5 to 8.2, it should work just fine with a few tweaks and stunts.