Magento 2 SessionHandler is trying to read data from a directory belonging to a different cpanel account after duplicating account for a staging site - magento

I followed the steps in this tutorial to duplicate a cPanel account containing our live Magento 2 site. I had to do this to retroactively create a staging site, as it would take months to set up a copy of our production site.
Tutorial: https://bobcares.com/blog/cpanel-duplicate-account/
This process involved renaming the cPanel account which changed the database name and usernames, it changed the directory name, and I assume it changed the name in tons of other places as well. However somewhere I believe it forgot to change the username from the old ABC username, to the new ABCSTAGING username, and so it is still trying to access files from within our production account, which of course results in a permission denied error.
The solution would be to find what is causing this, instead of actually giving it permission, as of course we don't want the staging site to do anything with our production site.
Here's the full exception code:
Warning: SessionHandler::read(): open(/home/abc/tmp/sess_n8ii2c5ek61s7icaogcjckl087, O_RDWR) failed: Permission denied (13) in /home/abcstaging/public_html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22
Any advice or help will be greatly appreciated.

Related

I changed Joomla FTP password.... access denied

So, I changed my FTP password from my hosting panel.
And I've no idea what the old password was.
And now my website displays "Access denied." on every page.
It's a Joomla website.
Thank you for your help !
Edit: When I try to login on the admnistrator page, here is what I get :
Warning: include_once(/home/clients/6a0b43a5add26c536570d4cb7062e046/web/libraries/fof/config/provider.php): failed to open stream: Permission denied in /home/clients/6a0b43a5add26c536570d4cb7062e046/web/libraries/fof/autoloader/fof.php on line 87
Warning: include_once(): Failed opening '/home/clients/6a0b43a5add26c536570d4cb7062e046/web/libraries/fof/config/provider.php' for inclusion (include_path='.:/opt/php5.6/lib/php') in /home/clients/6a0b43a5add26c536570d4cb7062e046/web/libraries/fof/autoloader/fof.php on line 87
Fatal error: Class 'FOFConfigProvider' not found in /home/clients/6a0b43a5add26c536570d4cb7062e046/web/libraries/fof/model/model.php on line 570
Then I cant get back to the administrator page, it keeps saying that error message.
Stefan
It sounds like you may have unintentionally changed the credentials that Joomla uses to connect to its database.
You'll need to know the username and password that your hosting account uses to connect to the Joomla database. If you don't know what these are you'll be able to find the username in your cPanel and you should be able to reset the password.
Then using either an FTP client or your cPanel file manager,
- open the configuration.php file in the root of your site
- locate the lines that start with public $user and public $password
- as precaution first copy and save the vales on these two lines
- then change their values to what you noted above, eg
public $password = "my_database_password";
That should do it.
The name of your Joomla database is set in the same configuration file on the line public $db. I think it's unlikely that you could have unintentionally changed this, though you could double check if updating your username and password doesn't work.
Good luck!
The FTP section you see at the Joomla! admin is for handling FTP jobs between your website and the server and it can't manage the server's FTP account.
In any case, you can bring your site back by disabling FTP like what it was before. Since you have no access to the website, you can do it via FTP or cPanel. Go to root folder of the Joomla! site and open configuration.php file. Then change the value of public $ftp_enable = '1'; to public $ftp_enable = '0';. It'll disable it again and you'll be able to see the website again.

Need to change DB password in Joomla

The DB password was recently change for a website I'm working on (for reasons I won't get into). As such, Joomla is no longer able to connect to the DB, prompting the error message: Database connection error (2): Could not connect to MySQL.
Fortunately, I do know that I need to simply update the password in the configuration.php file to use the new password, but all of my attempts at making the change have failed. For security reasons I'm sure, I am completely unable to upload my modified configuration.php file. Normally I'd be happy to hear that the configuration file can't be modified, but in this one instance I need to modify it.
How would I go about modifying the file?
You options would be:
Upload new configuration.php via FTP file with new DB password value, however as you mentioned, you're unable to upload it.
Login to your hosting control panel and upload the configuration.php file via the built-in File Manager
Login to and change the password back to it's original value
Get in contact with your hosting provider and find out as to why you're unable to upload the config file.
One of the above options should work, however if all else fails, your last resort will be to contact the person who changed the DB password and ask them to change it back.
Being unable to upload / modify the configuration file, smells like a permissions issue. Maybe the file has permissions set to 444. Many FTP clients allow manipulation of the file permissions. You can set them to 644 for the config. file and then save it. If you can't do this through the FTP client, then try it within the cPanel.

Magento crashed after adding new website

I already have a Magento site running, & was trying to create a new website from within this installation. I added a code name of 'tb_new' and hit save. And my live site has crashed. It may be that Magneto does not like the new code name with an _.
UPDATE: On checking the error logs, it seems the problem is because the initial installation of Magento is under a specific user on my server, whereas the live site is running under a different user. Here's the error:
a:4:{i:0;s:96:"SQLSTATE[28000] [1045] Access denied for user 'tomharris'#'64.111.114.232' >(using password: YES)";i:1;s:2672:"#0 >/home/anotheruser/domainname.com/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): >Zend_Db_Adapter_Pdo_Abstract->_connect()
How best do I quickly get my site running?

Move working Joomla 2.5 site from subdomain to root now 500 errors at logout

I created a Working Joomla 2.5 website in a sub domain. When I moved the site to the root and out of the sub domain folder I get the following error when I log out. Fatal error: Call to a member function init() on a non-object in /directory/templates/rt_clarion/error.php on line 20
The build works fine in the sub domain but not in the root. I've tried the stock Joomla Templates and I still get an error at logout. I tried disabling the Joomla SEF, nothing. Anyone have any ideas what might be?
The site was moved by using akeeba backup and restoring it in the root directory.
I'm using Joomla 2.5.4, K2 v2.5.7, Rockettheme Template Clarion v1.2. Again the build works flawlessly in the subdomain.
First step find out what is causing the server to throw a 500 error - check your servers log file. It may be a simple as a permissions problem, eg. most servers are configure to throw a 500 error if the destination has permissions of 777.
After moving a Joomla! installation from a sub-domain you may need to update the Global Configuration - you can either do this through the Admin screens or by directly editing configuration.php. This often happens when people create the Joomla! site in a sub-directory and the move the site and delete the sub-directory.
The things you need to check are the paths to things like log & tmp directories, e.g.
public $log_path = '/host/public_html/asite/sub-directory/logs';
public $tmp_path = '/host/public_html/asite/sub-directory/tmp';
May need to be changed to:
public $log_path = '/host/public_html/asite/logs';
public $tmp_path = '/host/public_html/asite/tmp';
I'd suggest renaming the template directory and reinstalling that template since that is where the error is occurring, unless you're comfortable exploring the configuration/options for re_clarion
1) Switch to the default template: If you still have errors, the problem is coming from new installation. If not, it's your template (go step 2).
2) Backup your Clarion template folder on your HDD and uninstall it from your backend.
3) Install it again and check for errors. If everythings is OK, overwrite your Clarion folder with backuped data.

Magento Access denied for user error

I decided to give a try to Magento. I have used my hosting providerĀ“s service Simple Scripts to install it in a subdomain. After succesfull install a have tried to go to home page but this error has occured:
SQLSTATE[00000] [1045] Access denied for user: 'testing_1303#10.10.29.3' (Using password: YES)
I have searched google but found nothing. I have checked my data in app/etc/local.xml file. host, user, password, dbname everything is OK. I also checked minimal requirements with magento script and a I have passed all requirements.
Do you have any sugestions?
One more clue: I have renamed local.xml file to force Magento to install again, but it does not start the instalation. My browser throw this error: Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
SOLUTION:
And here is the solution with help of my hosting provider:
In the local.xml file put this as a host:
<host><![CDATA[127:0:0:1:/tmp/mysql50.sock]]></host>
This is almost definitely not an issue with Magento.
If you are sure your database credentials are correct then the problem probably lies in the fact that you are trying to connect to a non-local database server and the server does not allow remote connections.
SOLUTION: And here is the solution with help of my hosting provider: In the local.xml file put this as a host:
<host><![CDATA[127:0:0:1:/tmp/mysql50.sock]]></host>
Try emptying the var/ folder. Maybe it's a cache issue.

Resources