Opencart Forbidden access after swapping to previous database - opencart

Good day,
I had created my online store on a VPS, I opted to move the store to a web hosting package. After installing opecart using softalicioucs the default installation worked fine. I then edited the config files in both admin and public_html to change the database to the original backup of my VPS.
Once I do this, "You don't have permission to access this resource. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request".
If I go back to the installed default database its all good again. I have set the necessary permissions etc for the user to access the backup database.
Anyone knows what is going on? is there some table storing access information?

After disabling MODSECURE I realised that the new installation created tables with prefixes not as my original interfaces, hence the solution was to change the prefix in the config file.

Related

Magento 2 cannot login admin because form key invalid

I'm in a brain-breaking problem here. I've created a nice Magento 2.1.7 installation with two websites (two stores, two domains) and somehow after a while we are unable to login the backend of Magento.
Invalid Form Key. Please refresh the page.
Now, after trying a few options, still no success. Checked core_config_data, edit max_input_vars, nothing works. The strange thing is, on the front it's still possible to checkout and do your shopping.
Anyway, I'm stumped here. Why is this happening, and how can this be fixed. Any help is welcome.
I often get this error, clearing the cookies for that site, then opening the admin panel in a new tab will resolve this.
You can recreate this error message if you double click the login button after filling out your login information.
Here are a few other reasons you may experience this issue
The form key inputs are outside of the form, you should check the html on the admin panel to check these inputs and exists and have correct values
Make sure the link you use to get to the admin page does not already have a form key in the url
Does this issue generate anything in var/log/system.log ?
Eventually, nothing helped, but what did the trick was creating a new install, setup this new install with all necessary modules (fortunately there were only four), configure the fresh installment like the old one (long live GitHub) and compare your fresh installation to the old one in the database table core_config_data. Basically reproduce your entire setup without any products in it, but just create your stores and categories.
If you spot any differences between the new installment and the old one in the core_config_data, edit them in the old one to be the same as your new one.
Next, edit your env.php with the database credentials to the old database which you've compared and edited.
And the last step, recompile, flush/clean cache and reindex.
Oh, and word of advice, if you're going to use https for your store, setup magento on https. I think something went very wrong when we've changed the base url's from insecure to secure.

Can't get access to configuration.php Joomla 2.5

Got a site to make some changes. Unfortunately I can't get an access to www/root/configuration.php . Suppose the file was blocked by another user who had admin rights. Am I right?
I'm not clear exactly what you mean by 'can't get access' to the configuration file. Maybe it's permission related or maybe the site was customised and the configuration file is in a non-standard location.
Either way there are a couple of options you could try.
I presume you have access to the backend of the site and so you could make most changes from there via Site > Global Configuration.
You can also view almost all the details of the config file from Site > Sytem Information > Configuration File
If neither of these suggestions solved your problem, maybe you could instal a file management component like http://extensions.joomla.org/extension/extplorer and acces the config file that way.
Good luck!

ColdFusion cfselect binding not working on production server

I have a few related selects that work perfectly on a testing server with very loose security (basically just a simple default install of CF 10).
I have tried to implement the CF 10 lockdown guide on the production server and all seems well, except that related select don't work. That is, the first select in the chain doesn't populate and therefore, none of the related selects populate either.
I even recreated Ben Forta's art media example: perfect on the testing server, no triggering in production.
All other CFC functions seem to work: SELECT and INSERT queries are just fine. Only CFSELECTs with bindings are hosed. I pretty sure that the problem is a server configuration. The same pages worked just fine on our old CF 9 box. Any ideas would be helpful.
My advice to you would be to NOT use cfselect or any other UI stuff in ColdFsuion - It only causes more headaches than it gets rid of.
That being said, if you followed the lockdown guide, you should have limited access to the CFIDE directory - which is needed for any of the ColdFusion UI stuff. There is an option in CF Admin to use a 'custom' path for the scripts ColdFusion uses - it is on the main Settings page. Set this value and create a virtual directory in IIS with the same name pointing to the {cfroot}CFIDE/scripts directory.

Akeeba backup Joomla 2.5.14 & cpanel all files unwriteable

I uploaded a website that is working in the localhost using Akeeba backup. It is done by creating a new public_html at the host using its cpanel. Next i transfer the .jpa & the kickstart.php to this new folder. Finally i browse the kickstart.php and restore the website running on joomla 2.5.14.
Accessing the admin panel of Joomla, it reports all folders as WRITEABLE and site runs good. In cpanel all folders permission is set to 755 & files 644 as expected; i then change configuration.php to 444.
However when i try to edit the configuration.php in the host, i found i can't change the file permission or save any edit. This in fact affects all files. After informing the host, they change the file ownership setting, then in cpanel i CAN edit files BUT now Joomla reports all folders become UNWRITEABLE creating more problems eg cannot install new extension; some how Joomla no longer has edit rights to the folders.
More ... at this state, to make a folder WRITEABLE to Joomla, it must be set file permission to 777. It is unexpected & unacceptable; 775 is sufficient for Joomla to report as writeable ie if the host is doing the right thing for Joomla (as i found in another hosting site).
When i tell the host to change it back to the state after Akeeba restoration, they say that will mean they have to set the folders with ownership = nobody.
I would imagine ownership of folders & all its content can be made to be the cpanel user AND the joomla ie php/apache user. Can someone enlighten me this puzzle so that i can talk more intelligently with the host or point where i went wrong. I am getting no where with them.
PS: Latest Sharing Update
The solution is find a host that has Server API showing as cgi/fastcgi which mean that suPHP of Apache is enabled (sorry cannot post .jpg < 10 reputation)
With cgi, Joomla report all 755 folders as writeable.
Now the new question
If the host use Server API = Apache 2.0, how can i enable suPHP from the website?
As you have worked out, suPHP or FastCGI should usually be enabled for Joomla file permissions and file ownership to work as you would expect.
There is a good article on this at: http://boomshadow.net/tech/php-handlers
In a shared hosting environment you don't usually have access to change which PHP file handler is enabled but your web hosting company may be able to change this for you.
If your web hosting company can't enable suPHP or FastCGI, the only other option might be to find a new web hosting company.

Transfer pimcore site to another server

Hy,
I am really new to Pimcore (I'm a joomla guy) and my friend asked me if I could help him transfer a page based on Pimcore to another server. I made a sql dump and copied all the files from the server to my hd and after that on the new server, imported the sql database, changed the username in the db and copied all the files back on the server. Also I made the correct changes for the db in the system.xml file in the config folder. But now all I get is a blank screen but the backend works partially (I can't see the files and the page). I would really appreciate some help!
Thanks in advance
Several things could go wrong, but start with checking:
MySQL user has access to the imported views. This is quite a common issue when importing views between servers,
Apache Linux user has read/write access to the whole website/var folder, access to /var/config is not enough. Pimcore writes cache files to website/var/cache for example.
You are missing mod_rewrite in apache, or your vhost does not allow override.