Osclass Support Forums
General osclass questions => Report bug => Topic started by: ANON on January 28, 2021, 09:59:01 PM
-
Hello
I would like to test osclass on my web server but I have an apache error:
PHP Fatal error: Uncaught Error: Undefined constant "WEB_PATH"
Do you have a solution ?
Thanks.
-
Script was not installed properly and config file was not created.
Use different hosting.
-
It's good :) (problem php8)
Thanks.
-
how did you sort it out, i am experiencing the sam problem
-
Solution is in article above:
It's good :) (problem php8)
Thanks.
Reinstall script on proper PHP version.
-
I get the same error.
Changelog states that osclass is compatible with php 8.
Not a good answer from "MB Themes".
Please try again and tell us what might be wrong when you get the following error:
Fatal error: Uncaught Error: Undefined constant "WEB_PATH" in oc-includes / osclass / default-constants.php: 37
Or is it that osclass is not compatible with php 8?
-
WEB_PATH constant is essential, check your config.php
-
That's probably true but why does it work with php7.4 but not with php8?
It is osclass-v4.3.2 that I downloaded.
-
No idea, we are running on php 8 for several months
-
Okay,
I will do an installation on a local server so I will see if there is any difference.
Right now I have done the installation on amazon.
I will return when I have tested.
-
I reviewed config.php, essential file, and you have there that constant:
define('WEB_PATH', 'your url');
-
Well I agree with that but,
This is a new installation, empty computer only nginx and php8.
When I start up, I should do nothing but go to the first page that says "Welcome to Osclass Installation" and then click install?
Or do I have to create config.php? I thought the installer handles this?
-
Well, you will probably install osclass first.
Check installation videos or guides.
Cannot help you on localhost as it often cause problems due to localhost incorrect setup.
-
If I install osclass with php7.4, it can be installed.
If I install osclass with php8.0 then it is not possible to install. The installation stops with an error message:
Fatal error: Uncaught Error: Undefined constant "WEB_PATH" in /srv/www/osclass/oc-includes/osclass/default-constants.php:37 Stack trace: # 0 / srv / www / osclass / oc-includes / osclass / install.php (50): require_once () # 1 {main} thrown in /srv/www/osclass/oc-includes/osclass/default-constants.php on line 37
What do you think I would benefit from installation videos?
What do you mean by "problems due to localhost incorrect setup"?
Feel free to find out why osclass can be installed with php7.4 but not with php8.0.
If you think there is an incorrect basic configuration in the server I am using then maybe you can tell what is the configuration that is wrong in the server that makes php8.0 not work with osclass.
-
It is quite clear that osclass does NOT work with php8.0
Not even if I switch to php8 after installing osclass with php7.4.
Feel free to contact me when you have a solution. As it is now, you need to make a correction in changelog that it is php7.4 that applies right now.
There is nothing to hinder the function as long as you run php7.4 so it is not a showstopper.
-
Fact it does not work on your localhost with php 8 is hardly proof thayt osclass does not work with php 8 ;)
-
@SonnyT
Demo is running on PHP 8.0 and Osclass 4.3.2 as well, no problems:
https://demo.osclasspoint.com/
Anyway, I will be doing some tests next week with clean installation on PHP 8.0 so will see how it goes.
-
I get the same error.
Changelog states that osclass is compatible with php 8.
Not a good answer from "MB Themes".
Please try again and tell us what might be wrong when you get the following error:
Fatal error: Uncaught Error: Undefined constant "WEB_PATH" in oc-includes / osclass / default-constants.php: 37
Or is it that osclass is not compatible with php 8?
I was able to reproduce your issue and will be fixed in 4.4.0, there was another issue with built-in database connection class that might cause issues during installation.
Thanks for bringing up this problem ;)