Osclass Support Forums

General osclass questions => Report bug => Topic started by: ANON on January 28, 2021, 09:59:01 PM

Title: Install Problem
Post 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.
Title: Re: Install Problem
Post by: MB Themes on January 28, 2021, 10:30:34 PM
Script was not installed properly and config file was not created.
Use different hosting.
Title: Re: Install Problem
Post by: ANON on January 29, 2021, 11:19:45 PM
It's good  :) (problem php8)
Thanks.
Title: Re: Install Problem
Post by: moneybagg on March 19, 2021, 10:40:13 AM
how did you sort it out, i am experiencing the sam problem
Title: Re: Install Problem
Post by: MB Themes on March 19, 2021, 10:43:35 AM
Solution is in article above:
It's good  :) (problem php8)
Thanks.

Reinstall script on proper PHP version.
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 06:23:49 AM
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?
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 08:06:57 AM
WEB_PATH constant is essential, check your config.php
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 11:18:51 AM
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.
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 11:28:36 AM
No idea, we are running on php 8 for several months
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 11:52:45 AM
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.
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 01:37:46 PM
I reviewed config.php, essential file, and you have there that constant:
Code: [Select]
define('WEB_PATH', 'your url');
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 03:20:25 PM
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?
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 03:41:22 PM
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.
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 04:55:44 PM
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.
Title: Re: Install Problem
Post by: SonnyT on April 16, 2021, 05:10:36 PM
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.
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 05:34:14 PM
Fact it does not work on your localhost with php 8 is hardly proof thayt osclass does not work with php 8 ;)
Title: Re: Install Problem
Post by: MB Themes on April 16, 2021, 05:58:33 PM
@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.
Title: Re: Install Problem
Post by: MB Themes on April 23, 2021, 08:54:32 AM
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 ;)