Welcome Guest, Not a member yet? Register   Sign In
Deploying Codeigniter 4 Website on LAN server
#8

(07-30-2021, 02:29 AM)Chroma Wrote: That looks like the end part of the index.php file.

Have you made any changes to the index.php file that would break the PHP? such as a punctuation character?

On my system running 4.1.3, that is part of line 27, so it seems that up until line 27 all was fine, then it had a problem.

Can you check that and if it all looks good, show the full index.php file here.

Hello,

I have checked.

I did make some change but it was on line 20 on "FCPATH......"

and it did work on the development machine, but not on the ubuntu server

here is the index.php
PHP Code:
<?php

// Path to the front controller (this file)
define('FCPATH'__DIR__ DIRECTORY_SEPARATOR);

/*
 *---------------------------------------------------------------
 * BOOTSTRAP THE APPLICATION
 *---------------------------------------------------------------
 * This process sets up the path constants, loads and registers
 * our autoloader, along with Composer's, loads our constants
 * and fires up an environment-specific bootstrapping.
 */

// Ensure the current directory is pointing to the front controller's directory
chdir(__DIR__);

// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
$pathsConfig FCPATH '/codetent/app/Config/Paths.php';
// ^^^ Change this if you move your application folder
require realpath($pathsConfig) ?: $pathsConfig;

$paths = new Config\Paths();

// Location of the framework bootstrap file.
$bootstrap rtrim($paths->systemDirectory'\\/ ') . DIRECTORY_SEPARATOR 'bootstrap.php';
$app      = require realpath($bootstrap) ?: $bootstrap;

/*
 *---------------------------------------------------------------
 * LAUNCH THE APPLICATION
 *---------------------------------------------------------------
 * Now that everything is setup, it's time to actually fire
 * up the engines and make this app do its thang.
 */
$app->run(); 
Reply


Messages In This Thread
RE: Deploying Codeigniter 4 Website on LAN server - by Tromturk - 07-31-2021, 11:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB