Hi,
I installed Flarum to /home/ourdilwo/flarum. I used composer.
Our website is at /home/ourdilwo/public_html
I created a folder for flarum at /home/ourdilwo/public_html/community
I copied the files in /home/ourdilwo/flarum/publc to /home/ourdilwo/public_html/community
/home/ourdilwo/public_html/community/Index.php :
`<?php
/*
- This file is part of Flarum.
*
- For detailed copyright and license information, please view the
- LICENSE file that was distributed with this source code.
*/
echo 'Hello1';
$site = require '../../flarum/site.php';
echo 'Hello2';
/*
|-------------------------------------------------------------------------------
| Accept incoming HTTP requests
|-------------------------------------------------------------------------------
|
| Every HTTP request pointed to the web server that cannot be served by simply
| responding with one of the files in the "public" directory will be sent to
| this file. Now is the time to boot up Flarum's internal HTTP server, which
| will try its best to interpret the request and return the appropriate
| response, which could be a JSON document (for API responses) or a lot of HTML.
|
*/
$server = new Flarum\Http\Server($site);
echo 'Hello3';
$server->listen();
echo 'Hello4';`
/home/ourdilwo/flarum/site.php:
`/*
This file is part of Flarum.
*
For detailed copyright and license information, please view the
LICENSE file that was distributed with this source code.
*/
echo 'Hello5'
/*
|-------------------------------------------------------------------------------
| Load the autoloader
|-------------------------------------------------------------------------------
|
| First, let's include the autoloader, which is generated automatically by
| Composer (PHP's package manager) after installing our dependencies.
| From now on, all classes in our dependencies will be usable without
| explicitly loading any files.
|
*/
require DIR + '/vendor/autoload.php';
/*
|-------------------------------------------------------------------------------
| Configure the site
|-------------------------------------------------------------------------------
|
| A Flarum site represents your local installation of Flarum. It can be
| configured with a bunch of paths:
|
| - The base path is Flarum's root directory and contains important files
| such as config.php and extend.php.
| - The public path is the directory that serves as document root for the
| web server. Files in this place are accessible to the public internet.
| This is where assets such as JavaScript files or CSS stylesheets need to
| be stored in a default install.
| - The storage path is a place for Flarum to store files it generates during
| runtime. This could be caches, session data or other temporary files.
|
| The fully configured site instance is returned to the including script, which
| then uses it to boot up the Flarum application and e.g. accept web requests.
|
*/
return Flarum\Foundation\Site::fromPaths([
'base' => DIR,
'public' => '/home/ourdilwo/public_html/community',
'storage' => DIR + '/storage',
]);
`
But nothing I do gets Flarum going. I have added echos to site.php but it is not echoing in there.
I added an echo to index.php and it echos before the require site.php line. That echos fine.
I have checked paths and they are fine. I replaced site.php with a very simple script to echo and it echoed.
And nothing is being displayed in the DevTools Console.
ps I previously did php flarum install. That is fine. The db is installed. There is now a config.php.
Is there a simpler way to install this?
See: https://ourdilworth.nz/community/index.php
PS my .htaccess file is not working yet either so https://ourdilworth.nz/community/ is not working .... yet.