Welcome Guest, Not a member yet? Register   Sign In
Tutorial first app issues when not installed in doc root
#3
Big Grin 

OK, many thanks!  Really appreciate the quick response!
I got it working with the following changes as you suggested:

Moved everything up one directory from public into /pub/comwww/soaringtools/ci-news
Code:
[soaringtools@torch ci-news]$ pwd
/pub/comwww/soaringtools/ci-news

[soaringtools@torch ci-news]$ dir
app/     composer.json  favicon.ico  license.txt  phpunit.xml.dist  README.md   spark*  vendor/
builds*  composer.lock  index.php    notes.txt    public.old/       robots.txt  tests/  writable/

[soaringtools@torch ci-news]$ git status

#       renamed:    public/.htaccess -> .htaccess
#       renamed:    public/favicon.ico -> favicon.ico
#       renamed:    public/index.php -> index.php
#       renamed:    public/robots.txt -> robots.txt

You were correct, I had missed part of the path needed in the overview.php, but I also had to change it to './news/'

Code:
[soaringtools@torch ci-news]$ git diff
diff --git a/app/Views/news/overview.php b/app/Views/news/overview.php
index 73be033..6ca74fe 100644
--- a/app/Views/news/overview.php
+++ b/app/Views/news/overview.php
-        <p><a href="<?= esc($news_item['slug'], 'url'); ?>">View article</a></p>
+        <p><a href="./news/<?= esc($news_item['slug'], 'url'); ?>">View article</a></p>

Also made the change to the index.php, slightly different path, matches dir contents:
Code:
--- a/index.php
+++ b/index.php
-$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');
+$pathsPath = realpath(FCPATH . './app/Config/Paths.php');

All now works well!:

https://www.soaringtools.org/ci-news/about
https://www.soaringtools.org/ci-news/news   -- and the links to the messages work great!
Reply


Messages In This Thread
RE: Tutorial first app issues when not installed in doc root - by jmurtari - 05-05-2020, 11:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB