Welcome Guest, Not a member yet? Register   Sign In
Cannot install CI4 on 2 different cpanel shared hosting servers and configs with PHP7
#1

Hello

Dear all, while it's a lot of time that I'm using Codeigniter, it's my first time posting on the forums.

The problem is I cannot install Codeigniter on 2 different cpanel servers with different configurations, but both with PHP7.

In both of the error logs, I see the same error:


Code:
[Sun Apr 02 14:51:03 2017] [alert] [client XXX] /home/XXX/public/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration

Any ideas, friends? Rolleyes
Reply
#2

0 relation to CI.
Reply
#3

Try googling "Invalid command 'SetEnv'" maybe?
Reply
#4

Thank you for the help.

I'm following up the problem with my server provider.

Have a nice time
Reply
#5

(This post was last modified: 04-02-2017, 02:28 PM by smhnaji.)

According to https://bcit-ci.github.io/CodeIgniter4/g...ments.html that says

Quote:   This server variable can be set in your .htaccess file, or Apache config using SetEnv.


I have now commented out
Code:
SetEnv CI_ENV development
in .htaccess file and have defined the constant in my public/index.php file:

PHP Code:
define('ENVIRONMENT''development'); 


But I see the following error:


Code:
Fatal error: Default value for parameters with a class type hint can only be NULL in /home/XXX/system/Common.php on line 139


I think it shouldn't happen, should it?
Reply
#6

That sounds like you're not running PHP 7. Please verify that you're host is actually running that for this domain.
Reply
#7

Yes, you are right @kilishan, thank you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB