Jump to content
  • 0
JaxSite

Installation Error: BLESTA_VERSION Undefined

Question

I am attempting to install the latest version of Blesta 4.1.2 for development and testing. I first tried to install locally on my Mac but was unsuccessful. I knew there were differences in my local AMPPS setup vs my production server, so I opted to try and install on the production server in another subdomain/folder. This production server runs my main instance of Blesta. I just recently upgraded it from 3.x to 4.1.2 without problems.

During installation, it tells me I meet the minimum and recommended requirements, etc. I fill out my database info and click INSTALL. The progress bar gets about 80% complete then routes me to ../admin/login/setup and the page is blank. I've checked Chrome Dev tools and nothing is returned. It does return a 200 OK. I've dropped the database tables, removed the code, and tried again with the same result. Upon checking my error log, it showed the following:

Quote

Use of undefined constant BLESTA_VERSION - assumed 'BLESTA_VERSION' {"code":8,"message":"Use of undefined constant BLESTA_VERSION - assumed 'BLESTA_VERSION'","file":"/home/user/subdomain/dev/app/models/license.php","line":0}

Based on the post here I modified my MySQL my.cnf file with the following and restarted mysqld but still get the same error.

wait_timeout=2400 
connect_timeout=360

Any ideas or help would be much appreciated.

 

Regards,

Jonathan | JaxSite

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Do you have special characters in your MySQL password? You may need to escape them in the /config/blesta.php config file with back slashes \ or use a password that does not have special characters.  You should be able to correct the issue by updating your config file, and then you can complete the setup.

Share this post


Link to post
Share on other sites
  • 0

Did you re-upload your /config/blesta-new.php config file and delete blesta.php? Try re-uploading all the files as well, you may have missed something.

What version of PHP are you running?

Share this post


Link to post
Share on other sites
  • 0

Paul,

Thanks for the response and suggestions. I've tried re-uploading several times. Based on your suggestion, I also re-uploaded blesta-new.php and deleted blesta.php. Re-ran install and still same result.

PHP - 5.6
MySQL - 5.6.38

 

-Jonathan

 

Share this post


Link to post
Share on other sites
  • 0

Are you able to attempt the install via CLI? php ./index.php install

If you are getting a /config/blesta.php config file, you can enable error reporting and debugging and try accessing the /admin/login/setup screen again and see if any errors are output. Here's how to enable error reporting and debugging:

Quote

To enable error reporting, edit /config/blesta.php and change Configure::errorReporting(0); to Configure::errorReporting(-1); You may also wish to enable System Debug. To do so, change Configure::set("System.debug", false); to Configure::set("System.debug", true);

Be sure to change these settings back when you are done.

 

Share this post


Link to post
Share on other sites
  • 0

Paul,

I ran the installation via command line and it showed everything completed. It told me to go to /admin/login/ in browser and then I get the same blank screen. So I turned on errors and this is what I got:

Quote

SQLSTATE[HY000] [1045] Access denied for user 'jaxsite_blesta_d'@'localhost' (using password: YES) on line 74 in /home/jaxsite/bd.jaxsite.com/core/ServiceProviders/MinphpBridge.php

The installation connected to the database just fine because it creates all the tables.

 

-Jonathan

blesta-install-error.png

Share this post


Link to post
Share on other sites
  • 0

Yes I use a dollar sign like this:

////////////////////////////////////////////////////////////////////////////////
// Database
////////////////////////////////////////////////////////////////////////////////
// Database connection information
Configure::set(
    'Blesta.database_info',
    [
        'driver' => 'mysql',
        'host' => 'localhost',
        //'port' => "8889",
        'database' => 'some_database',
        'user' => 'some_user',
        'pass' => 'SomePassword1234\$',
        'persistent' => false,
        'charset_query' => "SET NAMES 'utf8'",
        'sqlmode_query' => "SET sql_mode='TRADITIONAL'",
        'options' => []
    ]
);

 

-Jonathan

Share this post


Link to post
Share on other sites
  • 0

Another cool update. So this whole thing started when I tried to install Blesta locally on my MacBook Pro running AMPPS. I shifted to installing it on my production server via another subdomain. Thanks to your help Paul, I was able to get it running. So I went back to my laptop and turned on error reporting and debugging. It turns out I was getting a "Session already started..." error. AMPPS default setting in php.ini was session.auto_start = 1. I set that to 0 and everything works locally now too!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×