Hello,
I recently moved a client EE site to a new hosting server (Nexcess), and my temporary address is http://englishc.nextmp.net. I’m running PHP 5.3.24, which is just above the minimum requirements for EE3, I believe.
Just now, I followed the instructions of the official upgrade page from EE2 to EE3 (https://docs.expressionengine.com/v3/installation/upgrade_from_2.x.html) and upgraded from EE2.5.3 to EE3.5.17.
Now I’m getting the following error on the upgrade (admin.php) page (please note that my “/system” folder is renamed “/[Redacted]” and I have that alternate path changed in both my index.php and admin.php pages):
Parse error: syntax error, unexpected '[' in /chroot/home/englishc/englishcompass.org/path/to/system/ee/EllisLab/ExpressionEngine/Library/Filesystem/Filesystem.php on line 568
When I got to that specific line in that specific file, I see the following code:
$contents_array = [];
Could someone please help me know what next troubleshooting step I should be taking? My eventual goal is to continue the upgrade to EE4.
Thank you very much in advance! Robert
Hmm…. I thought I was on a better road and solution for my client when I changed hosting plans that would allow me to upgrade to newer versions of EE. But after no replies to my thread yesterday, and now noticing that there are hardly any replies to anyone else, I’m wondering if this forum is basically unvisited.
Anyone able to help?
Hi rfuste; it’s the holiday season and many devs prefer hanging out in Slack since it has a dedicated app.
You will need to be moved to a more modern server. I’d ask Nexcess for one of their PHP 7+ environments. ExpressionEngine 3 (which is no longer supported as of this month) required at least PHP 5.4. ExpressionEngine 5 requires at least PHP 5.6 (which PHP will stop supporting in a couple days). So the writing on the wall is: jump to PHP 7+, it’s long overdue and will provide not only compatibility but better performance. Hope that helps!
Hello Derek,
Thank you for your feedback! I apologize if I was a bit impatient - I was simply unclear as to whether this forum was still viable, or if I was supposed to look elsewhere. So thank you for the tip on Slack, I’ll write there as well.
Indeed, once I updated the php version of my Nexcess hosting plan to version 7+, I started getting proper feedback from Expression Engine about the update I’m trying to do. Again, a reminder that I’m doing a simultaneous change of hosting companies (new hosting is Nexcess, they imported over my files, database, etc.) and updating from EE2 to EE3.
I’m encountering an error, and I’m pretty sure it’s related to trying to connect to the database after the migration. Here’s the order I followed:
When trying to run the update again (http://…nextmp.net/[Redacted].php), I get the following error:
Error While Installing 3.5.17 Stopped
Oops, there was an error
Unable to connect to your database using the configuration settings found in the following file: config/config.php file. Please correct the settings so that the update can proceed.
When exploring about this error, I was pointed to run the Expression Engine Wizard. When I ran it, I get the following feedback:
Exception Caught
You must define the following database parameters: database
ee/EllisLab/ExpressionEngine/Service/Database/DBConfig.php:157
Stack Trace:
#0 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(151): EllisLab\ExpressionEngine\Service\Database\DBConfig->getGroupConfig()
#1 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(84): EllisLab\ExpressionEngine\Service\Database\Database->newConnection()
#2 ee/EllisLab/ExpressionEngine/Service/Database/Database.php(51): EllisLab\ExpressionEngine\Service\Database\Database->getConnection()
#3 ee/legacy/database/DB.php(48): EllisLab\ExpressionEngine\Service\Database\Database->newQuery()
#4 ee/legacy/core/Loader.php(381): DB('')
#5 ee/legacy/libraries/Core.php(107): EE_Loader->database()
#6 ee/legacy/core/Controller.php(88): EE_Core->bootstrap()
#7 ee/EllisLab/ExpressionEngine/Core/Core.php(187): EE_Controller->__construct()
#8 ee/EllisLab/ExpressionEngine/Core/Core.php(94): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#9 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#10 index.php(175): require_once('...')
#10 index.php(175): require_once('...')
So I went to my database connection file (/[system]/user/config/database.php), and realized that there were a number of parameters that probably needed to be changed from the previous hosting company after the migration. I’ve changed the top four parameters below (hostname, username, password, database), and I’ve reached out to the hosting company to ask if any other parameters need to be updated.
But I’m pretty sure that the last one, cache directory, must be a new path name given the update from EE2 to EE3, even though the upgrade instructions simply state to copy over the database.php file into the EE3 files before uploading to server.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$active_group = 'expressionengine';
$active_record = TRUE;
$db['expressionengine']['hostname'] = "localhost";
$db['expressionengine']['username'] = "[Redacted]";
$db['expressionengine']['password'] = "...";
$db['expressionengine']['database'] = "[Redacted]";
$db['expressionengine']['dbdriver'] = "mysql";
$db['expressionengine']['dbprefix'] = "exp_";
$db['expressionengine']['pconnect'] = FALSE;
$db['expressionengine']['swap_pre'] = "exp_";
$db['expressionengine']['db_debug'] = TRUE;
$db['expressionengine']['cache_on'] = FALSE;
$db['expressionengine']['autoinit'] = FALSE;
$db['expressionengine']['char_set'] = "utf8";
$db['expressionengine']['dbcollat'] = "utf8_general_ci";
$db['expressionengine']['cachedir'] = "/www/path/to/public_html/[system]/expressionengine/cache/db_cache/";
Could you please help me know what the proper cache directory path is for EE3, and if there are any other parameteres that should also be updated for a successful database connection?
Or am I interpreting the EE server wizard correctly in terms of what is wrong? Is there something else altogether that I should be fixing?
Thank you very much for your help!
Robert
Hi Robert,
No, you don’t need to modify anything but the host, user, password, and database for your new host, the updater will migrate everything for you. When you get that error, what does your config.php file look like? Please do not include your password or encryption keys. I’ve edited that along with your control panel URL out of your post above.
That said, I’m surprised it worked with mysql
as the dbdriver in PHP 7, since PHP dropped that protocol (in favor of mysqli
), and most of the time you have to update that before you can run a v2 upgrade on a modern environment.
Last thing would be to download the compatibility wizard, which should let you test your new database settings on the new environment to verify that they are correct.
Hi Derek,
Thanks for the quick response! And thank you for the note about password and encryption keys - I’ll do better next time.
Thank you for confirming that those four variables of host, user, password, and database are the only things needed to change on the /system/user/config/database.php file, as part of the update. This is further confirmed by the hosting company who also got back to me, stating they were able to successfully connect to the database (in some other way besides the front-facing pages I’m working with) themselves given my new credentials.
Currently I’m seeing different error messages on different pages - let me include them all for more context:
Homepage: http://englishc.nextmp.net/
Admin page (for trying to update ver 2 to ver 3): [Redacted]
Server Wizard page (I included error message in my previous post): http://englishc.nextmp.net/ee_server_wizard/
$config['cp_url'] = "http://[Redacted]";
and
$config['base_url'] = "http://englishc.nextmp.net/";
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine. The rest of
| the config items are for use with CodeIgniter.
|
*/
$config['app_version'] = "253";
$config['install_lock'] = "";
$config['license_number'] = "[Redacted]";
$config['debug'] = '1';
$config['cp_url'] = "...";
$config['doc_url'] = "http://expressionengine.com/user_guide/";
$config['is_system_on'] = "y";
$config['site_label'] = 'English Compass - bringing christian fellowship to korean americans';
$config['cookie_prefix'] = '';
$config['forum_is_installed'] = "y";
$config['allow_extensions'] = "y";
// END EE config items
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
*/
$config['base_url'] = "http://englishc.nextmp.net/";
Thank you so much for your help! Robert
http://englishc.nextmp.net/ee_server_wizard/
is not the server wizard, that is a front end ExpressionEngine request.
I would also edit out your control panel URL from your above post. You don’t want that linked from a public forum, it’ll get hammered by bots and search engines.
Thank you - I’ve edited out the control panel URL.
I’ve deleted the ee_server_wizard folder I sent a link for before, re-downloaded the compatability wizard located at the link you provided (https://docs.expressionengine.com/v3/installation/requirements.html#server-compatibility-wizard), direct link is https://ellislab.com/asset/file/ee_server_wizard.zip, and uploaded it, this time at the URL of http://englishc.nextmp.net/ee_wizard/
Unfortunately, it continues to give the same error message.
What else do you suggest I do?
Thank you!
Looks like your .htaccess or similar web server config is not allowing access to that directory. It’s shoving every request to your ExpressionEngine index.php script. Note how you get the same error when trying to access a static file, that should be present if you uploaded that folder.
http://englishc.nextmp.net/ee_wizard/asset/css/wizard.css
Feel free to check out our support options and our team of engineers would be more than happy to diagnose and fix the issue right on your server for you.
Hi Derek,
I really appreciate all the help you’ve provided thus far, and I realize I could look into signing up for a support plan. The basic plan is a bit steep given the budget I was given by my client to do these upgrades in the first place. So I’m wondering if you’d be willing to help me out just a little more, as I’m guessing we’re pretty close to figuring out. Thank you for your patience.
You’re right - .htaccess was set to specifically allow certain folders. I changed that, and it shows everything looks good on the server end.
Screenshot of wizard results: https://drive.google.com/file/d/1bIFMhPPmymLR5LkF5KGoBRHrGU4VI_Va/view?usp=sharing
You didn’t mention anything regarding the config.php file code in my previous post, so I’m assuming that the error message I get from the installer folder (http://englishc.nextmp.net/[system]/) isn’t super relevant.
So then, following the error message on the homepage (http://englishc.nextmp.net/) instead, when I go to ee/EllisLab/ExpressionEngine/Service/Database/DBConfig.php, I see there’s a section near the top with database settings. Am I supposed to update those to the new database settings as well? I thought I only needed to do it in one place (/admin/user/config/database.php).
Thanks for all your help! Rob
No, never touch anything in system/ee or themes/ee. Think of those as the app’s stuff. All of your stuff is in system/user and themes/user. It just means it’s not picking up your database settings from your config. The config file you posted is from 2.5.3, I was asking to see the state of your system/user/config.php file when you get that error. Whoever is debugging it will need to see it after you’ve tried to update and get the error, and not a partial file, but the full thing. That’s especially important when debugging remotely, as you can see we are both spending an inordinate amount of time going back and forth on small details like a game of telephone. That’s why I offered a support option. There are free community based support options available as well, via here, Slack, and Stack Exchange.
Hi Derek,
Unfortunately, I don’t see a
/system/user/config.php
file in my file/folder structure, and the
/system/user/config/config.php
file that I’ve tried to show is after I’ve attempted the update.
I agree that this particular issue is getting more complicated than I expected, so I’ve gone ahead and followed your advice and purchased a monthly support plan.
What is the best way to carry over what we’ve learned from this conversation to the official paid support area? Is there a way to convert this forum thread into a support ticket? Or do I simply try my best to summarize in a new ticket?
Thanks for all your help in this process! Robert
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.