Installed then removed SSL Cert - now getting Fatal error: Call to a member function isLogged() on null - ssl

A client asked me to install an SSL cert on her site (Krystal.co.uk CPanel hosting, OpenCart 1.5.6.1 website). I installed cert and edited htaccess file to force https, but encountered various content errors, so removed cert and removed edits to htaccess file.
Today I tried the solution provided in
https://isenselabs.com/posts/opencart-pages-https
But got errors - so I removed the certificate again, undid my edits, and now I'm getting the following errors:
Notice: Undefined index: token in /home/bluebir1/public_html/admin/controller/error/not_found.php on line 16Notice: Undefined index: token in /home/bluebir1/public_html/admin/controller/error/not_found.php on line 22
Fatal error: Call to a member function isLogged() on null in /home/bluebir1/public_html/admin/controller/common/header.php on line 122
I can access the OpenCart admin panel and login, but unsure what to do next.
This is happening in all browsers, tried reverting my edits but still getting errors. Tried this solution,
https://forum.opencart.com/viewtopic.php?t=199568
but there were no instances of user_token in the file.

Please share the code in which you are getting the error.
Also, undefined index means the variable you are trying to use (token) is not defined before. So you could make use isset() function to check whether the variable is set or not.

Related

Postman Error: error:09000066:PEM routines:OPENSSL_internal:BAD_END_LINE

First time using postman along with an ADP API. I keep getting the error of bad end line despite double and triple checking certificates to ensure the 5 dashes before and after the start and end lines without any extra spaces. When I decode the certificate online there are no errors and everything is fine.
I've followed the instructions to include header authorization values as well.
I've tested both on a Windows/Mac machine.
Attached the following images for reference of the errors and what the environment looks like when setting this up including the error messages in console, my current settings, what the json with headers looks like, certificate set up etc.
Any help would be greatly appreciated.
Actual Certificate
Client Certificate Setup
Error Message
Headers
Settings
Made sure start and end lines were as expected

Lets encrypt, "Your connection is not secure"

I´ve tried to add a SSL-Certificate to my webpage with Lets Encrypt as verifier. After I followed the steps described at https://certbot.eff.org/lets-encrypt/ubuntutrusty-apache I got an
Your connection is not secure
error. I´ve tested the SSL Connection with https://www.ssllabs.com/ssltest/analyze.html and got an "DNS CAA" warning. After I found out that I have to add the verifier to my DNS (xyz.com 3600 0 issue "letsencrypt.org") the warning disappeared, but I still get the error.
I´ve checked the page with https://www.whynopadlock.com as well, and the only warning I get is
You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018.
but the warning states that this should not break my padlock.
I thought that smth. might be cached at the DNS (if this is even possible), but I dont know for certainty. I´ve tested the page on multiple devices and all of them get the error.
I´ve found the problem.
The "www" is somehow missing when I browse the page, so the cert. is registered the the page with "www" in front of it. I´ve created another cert with the missing "www" and now it works

Calling Cpanel UAPI method

i have the following simple script to list the ftp accounts
but i am unable to get it to work as i have the following error as soon as it tries to call the constructor
include '/usr/local/cpanel/php/cpanel.php';
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
// List FTP account information.
$list_ftp_accts = $cpanel->uapi('Ftp', 'list_ftp');
echo "<pre>";
print_r($list_ftp_accts);
Fatal error: Uncaught exception 'RuntimeException' with message 'There
was a problem fetching the env variable containing the path to the
socket' in /usr/local/cpanel/php/cpanel.php:146 Stack trace: #0
/public_html/uapi.php(4): CPANEL->__construct() #1
{main} thrown in /usr/local/cpanel/php/cpanel.php on line 146
Line 146 in cpanel.php
$socketfile = getenv('CPANEL_PHPCONNECT_SOCKET');
According to a post on the cPanel forums, you can only use LiveAPI from within cPanel's document root, meaning your code would need to be in either /usr/local/cpanel/base/frontend/ or /usr/local/cpanel/base/3rdparty/. I ran into this while trying to use it in a WHM plugin (which would reside in /usr/local/cpanel/whostmgr/docroot/), and apparently that causes the same problem. If you're trying to run this from within cPanel or WHM, this page has some debugging steps you can try walking through.
If you're trying to run this code on a different server or from within a normal website's hosting account, you'll definitely need to use a different interface, such as the XML or JSON API. These are unfortunately somewhat confusingly documented, but the Guide to WHM API 1 page should get you started.
Me too got the same error.
Try changing your file extension to your_file.live.php, instead of your_file.php. It solved the issue for me.
Referred the documentation here.

How can you include http://foo.local in CORS Access-Control-Allow-Origin?

I'm using *, but apparently that's not enough. I'm trying to upload a file from a client browser. It works when the client's URL is localhost:3000 or foo.com. It's not working when the URL is http://meteor.local. I've tried changing the third line to <AllowedOrigin>http://meteor.local</AllowedOrigin>, but get the same error.
The browser error:
The error text was misleading – error was not due to the header sent by s3. Adding an access rule to Cordova fixed it. (In meteor, add it with App.accessRule('http://meteor.local'); in mobile-config.js.)

SSL Certificate Installation Caused Website to Stop Working

So I had an SSL certificate, I bought one from a new company, through plesk, I installed the new one and then the website just stopped working completely.
The host company cant help, the developers we have dont know how to get it to work.
We essentially have a very large site crashed due to ssl installation.
There was no error, just a blank page, after turning on error reporting, Here is the error we are getting on the website when we go to the website url
Warning: require_once(): open_basedir restriction in effect.
File(/usr/share/psa-pear/MDB2.php) is not within the allowed path(s):
(/var/www/vhosts/domain.com/:/tmp/) in
/var/www/vhosts/domain.com/httpdocs/inc/general.php on line 7 Warning:
require_once(/usr/share/psa-pear/MDB2.php): failed to open stream:
Operation not permitted in
/var/www/vhosts/domain.com/httpdocs/inc/general.php on line 7 Fatal
error: require_once(): Failed opening required 'MDB2.php'
(include_path='.:/usr/share/psa-pear/') in
/var/www/vhosts/domain.com/httpdocs/inc/general.php on line 7
This started only when we installed the new certificate, changing back to the old one does not work, still the same error on the website
Modify your php.ini's basedir setting to include /usr/share/psa-pear/.