I installed opencart in my server hosting. But the site shows the lines given below.
My site is http://fruitsclubbd.com/
Is it problem of server or opencart?
Notice: Trying to get property of non-object in /home8/fruitscl/public_html/index.php on line 52
Notice: Trying to get property of non-object in /home8/fruitscl/public_html/index.php on line 61
Warning: Invalid argument supplied for foreach() in /home8/fruitscl/public_html/index.php on line 61
Notice: Trying to get property of non-object in /home8/fruitscl/public_html/index.php on line 69
Here is the lines of index.php form line 40 to 70.
// Application Classes
require_once(DIR_SYSTEM . 'library/customer.php');
require_once(DIR_SYSTEM . 'library/affiliate.php');
require_once(DIR_SYSTEM . 'library/currency.php');
require_once(DIR_SYSTEM . 'library/tax.php');
require_once(DIR_SYSTEM . 'library/weight.php');
require_once(DIR_SYSTEM . 'library/length.php');
require_once(DIR_SYSTEM . 'library/cart.php');
// Registry
$registry = new Registry();
// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);
Are you trying to use mysqli? If so, edit both of your config files on the DB_DRIVER line and change it from mysql to mysqli. All what probably happened was choosing mysqli instead of mysql during the installation.
Related
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_URI::$config is deprecated
Filename: core/URI.php
Line Number: 102
Backtrace:
File: C:\xampp\htdocs\sin\index.php
Line: 315
Function: require_once
codeigniter version 3.1.12
How to fix the error?
Set the baseurl by opening the application/config/config.php file with a text editor.
Change:
$config['base_url'] = '';
to
$config['base_url'] = ‘http://localhost’;
I use joomla 3.9.6, virtuemart 3.4.2, and tcpdf 1.0.7
When i try to view the invoice(pdf) or when i change order status to confirmed i get the TCPDF ERROR: Unable to create output file: \vmorders\invoices\invoice_190522TIXG01.pdf
i already have created the folders vmorders\invoices and gave it the proper permissions. (the site runs locally with wamp)
Php Error log
[22-May-2019 16:11:21 UTC] PHP Warning: fopen(): remote host file access not supported, file://\vmorders\invoices\invoice_190522TIXG01.pdf in C:\wamp64\www\byzantinemusic\libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php on line 1854
I think i have found the solution. Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php". At line 1850 remove code
$filename = 'file://'.$filename;
and substitute with this
$absPath = getcwd();
$filename = str_replace("\\administrator","",$absPath) .$filename;
For Virtuemart 3.6.10:
Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php".
At line 1817 remove code:
$filename = 'file://'.$filename;
and replace with:
$filename = $filename;
$absPath = getcwd();
$filename = str_replace("\\administrator","",$absPath)."/".$filename;
ErrorException in CryptKey.php line 57:
Key file "file://C:\wamp\www\project\public_html\storage\oauth-private.key" permissions are not correct, should be 600 or 660 instead of 666
My Configuration as follows:
Windows 10 64bit
WampServer 3.1.0
Apache 2.4.27
PHP 7.0.23
Laravel Framework version 5.3.31
composer require laravel/passport=~1.0
Any idea how to solve it?
You can turn off file checking permissions on line 57
your CryptKey Path is vendor/league/oauth2-server/src/CryptKey.php
on line number 48 turn it to false or comment the following block in your CryptKey.php
if ($keyPermissionsCheck === true) {
// Verify the permissions of the key
$keyPathPerms = decoct(fileperms($keyPath) & 0777);
if (in_array($keyPathPerms, ['600', '660'], true) === false) {
trigger_error(sprintf(
'Key file "%s" permissions are not correct, should be 600 or 660 instead of %s',
$keyPath,
$keyPathPerms
), E_USER_NOTICE);
}
}
keyPermissionsCheck set it to false.
Hope this helps.
Simply CHMOD the oauth-private.key file to 600 or 660. I see that you use Windows so you can surely follow the directions in this post to do that.
When attempting to import a csv product file into magento it keeps staying at "please wait". After using firebug I found I was getting this error:
Fatal error: Call to a member function prepareAttributesForSave() on a non-object in /magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php on line 1259
Here's line 1259 in product.php:
$rowData = $this->_productTypeModels[$productType]->prepareAttributesForSave($rowData);
$product = Mage::getModel('importexport/import_proxy_product', $rowData);
I am a complete newbie to PHP and am not sure how to fix this. I tried searching google, but didn't find anything related to this specific function.
I'm using codeigniter. Suddenly, for some reason, my application/config/config.php started loading twice.
I have the following code at the top of config file, starts from line 5 to line 12:
function __autoload ($class) {
$file = APPPATH . 'libraries/' . $class . EXT;
if (strpos($class, 'CI_') !== 0) {
if (file_exists($file) && is_file($file)) {
#include_once (APPPATH . 'libraries/' . $class . EXT);
}
}
}
When i test a page, i get this error:
Fatal error: Cannot redeclare __autoload() (previously declared in C:\xampp\htdocs\ci_centric\application\config\config.php:5) in C:\xampp\htdocs\ci_centric\application\config\config.php on line 12
If i wrap the autoload with if(!function_exists('__autoload')) { ... }, i get the following output:
Notice: Constant FRONTEND_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 390
Notice: Constant FRONTEND_WEBPARTS_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 391
Notice: Constant FRONTEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 392
Notice: Constant BACKEND_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 393
Notice: Constant BACKEND_WEBPARTS_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 394
Notice: Constant BACKEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 395
Notice: Constant BACKEND_MAINPAGES_PATH already defined in C:\xampp\htdocs\ci_centric\application\config\config.php on line 396
.
.
.
Everything used to work fine for days; i played little bit with $this->session->flashdata('...'); then i got the config double loading problem.
Any help will be appreciated...
Well, I don't know what kind of hacks do you use, and WHY do you do such things in a configuration file, where only variables should be declared. You should remove that code or better even start from a fresh copy of CodeIgniter. You don't know where and for what purpose CodeIgniter wants to load this file twice. Anyway, you should not do such things by any means. If it's really necessary for some awkward reason, you can try moving this to MY_core.php or even index.php file, it's still will be totally wrong, but much better than what you have right now.