CodeIgniter Forums
Error with apache execution. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Error with apache execution. (/showthread.php?tid=87339)



Error with apache execution. - defg - 04-08-2023

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


RE: Error with apache execution. - JustJohnQ - 04-08-2023

What’s the error?


RE: Error with apache execution. - defg - 04-08-2023

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

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



RE: Error with apache execution. - InsiteFX - 04-08-2023

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

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

# CI_ENVIRONMENT = production
CI_ENVIRONMENT = development



RE: Error with apache execution. - defg - 04-09-2023

(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.


RE: Error with apache execution. - JustJohnQ - 04-09-2023

Can you load any php file? For example:

PHP Code:
<?php
phpinfo
(); 



RE: Error with apache execution. - defg - 04-10-2023

(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() ---!> 



RE: Error with apache execution. - JustJohnQ - 04-10-2023

Looks like PHP isn't loaded.


RE: Error with apache execution. - HramayWasha - 06-01-2023

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.