CodeIgniter Forums

Full Version: Cannot install CI4 on 2 different cpanel shared hosting servers and configs with PHP7
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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:

[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
0 relation to CI.
Try googling "Invalid command 'SetEnv'" maybe?
Thank you for the help.

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

Have a nice time
According to that says

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

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

PHP Code:

But I see the following error:

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?
That sounds like you're not running PHP 7. Please verify that you're host is actually running that for this domain.
Yes, you are right @kilishan, thank you.