Jump to content
  • 0

Installation Error: BLESTA_VERSION Undefined


Question

Posted

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

9 answers to this question

Recommended Posts

  • 0
Posted

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?

  • 0
Posted

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

 

  • 0
Posted

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.

 

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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!

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...