Welcome Guest, Not a member yet? Register   Sign In
Error with apache execution.
#1

(This post was last modified: 04-08-2023, 11:35 AM by defg.)

Host the project with apache and php 8.2 or 7.4. Config de root folder to public/ and install libaapache-mod but still getting this error.
PHP Code:
systemDirectory'\\/ ') . DIRECTORY_SEPARATOR 'bootstrap.php'// Load environment settings from .env files into $_SERVER and $_ENV require_once SYSTEMPATH . 'Config/DotEnv.php'; (new CodeIgniter\Config\DotEnv(ROOTPATH))->load(); /* * --------------------------------------------------------------- * GRAB OUR CODEIGNITER INSTANCE * --------------------------------------------------------------- * * The CodeIgniter class contains the core functionality to make * the application run, and does all of the dirty work to get * the pieces all working together. */ $app = Config\Services::codeigniter(); $app->initialize(); $context = is_cli() ? 'php-cli' : 'web'; $app->setContext($context); /* *--------------------------------------------------------------- * 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();  

get back part of the index.php code on html. The first part are correctly read by php but when get the "->" on the line : require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstr> happen that
Reply
#2

What’s the error?
Reply
#3

(04-08-2023, 12:13 PM)JustJohnQ Wrote: What’s the error?

php not interprete that, and i prube every solution on internet.
Reply
#4

Edit your .env and add this to check your error.

Code:
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

# CI_ENVIRONMENT = production
CI_ENVIRONMENT = development
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(04-08-2023, 11:25 PM)InsiteFX Wrote: Edit your .env and add this to check your error.

Code:
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

# CI_ENVIRONMENT = production
CI_ENVIRONMENT = development

Nop, check that at start of deploy.
Reply
#6

Can you load any php file? For example:

PHP Code:
<?php
phpinfo
(); 
Reply
#7

(04-09-2023, 04:56 AM)JustJohnQ Wrote: Can you load any php file? For example:

PHP Code:
<?php
phpinfo
();

no i get back like html comment. <!--- phpinfo() ---!> 
Reply
#8

Looks like PHP isn't loaded.
Reply
#9

Based on the code snippet you provided, it seems that you are encountering an error when accessing the require statement with the "->" arrow notation. This might indicate a syntax issue or an error in the code itself.

To better understand the problem and provide a solution, it would be helpful to have more context and the specific error message you are receiving. Additionally, please make sure that your Apache server is properly configured to run PHP scripts and that the required modules, such as libapache-mod, are installed correctly.

If you can provide more details about the error message or any relevant logs, it would assist in diagnosing the issue and providing a more accurate solution.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB