Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
http://forum.opencart.com/viewtopic.php?f=20&t=33391
http://forum.opencart.com/viewtopic.php?f=20&t=43326
http://forum.opencart.com/viewtopic.php?f=20&t=46870
Was my database prefix was set to HANK745_ it created the database as seen in phpmyadmin as HANK745_ however it wrote the config.php as hank745_ and therefore the database could not be found. May just be a quirk of my hosting or something? Not sure if someone else could confirm the issue?
Cheers
James
I have patched my earlier OC 1.5.1.1 to OC 1.5.1.3 Fixed the small errors/bugs by reading the forums.
Getting the following 2 error message recurrently in the error log, these concern the file cache.php
2012-01-03 15:15:23 - PHP Warning: file_get_contents(/home/vsahita/public_html/sabsebest.com/system/cache/cache.store.1325607323) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/vsahita/public_html/sabsebest.com/system/library/cache.php on line 25
2012-01-03 15:15:23 - PHP Warning: unlink(/home/vsahita/public_html/sabsebest.com/system/cache/cache.store.1325607323) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/vsahita/public_html/sabsebest.com/system/library/cache.php on line 49
Solutions tried so far:
(1) As Daniel had advised, checked with my host and they have 'file_get_contents' enabled for my site and the server.
(2) Based on reading VillageDeFrance's earlier post, I edited cache.php and took out the below string from Line 15 and Line 51. Still the error keeps coming.
Code: Select all
clearstatcache();
The entire (unedited) cache.php is below for study and reference.
If anyone has a fix or knows how to resolve the error, please kindly post it here or email at vickiowa@gmail.com Thanks much, Vick
Code: Select all
<?php
final class Cache {
private $expire = 3600;
public function __construct() {
$files = glob(DIR_CACHE . 'cache.*');
if ($files) {
foreach ($files as $file) {
$time = substr(strrchr($file, '.'), 1);
if ($time < time()) {
if (file_exists($file)) {
unlink($file);
clearstatcache();
}
}
}
}
}
public function get($key) {
$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');
if ($files) {
$cache = file_get_contents($files[0]);
return unserialize($cache);
}
}
public function set($key, $value) {
$this->delete($key);
$file = DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.' . (time() + $this->expire);
$handle = fopen($file, 'w');
fwrite($handle, serialize($value));
fclose($handle);
}
public function delete($key) {
$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');
if ($files) {
foreach ($files as $file) {
if (file_exists($file)) {
unlink($file);
clearstatcache();
}
}
}
}
}
?>
Using version 1.5.1.3.1
Confirmed.speedingorange wrote:Something I spotted when installing the cart on the latest version Not sure if this is just my hosting through.
Was my database prefix was set to HANK745_ it created the database as seen in phpmyadmin as HANK745_ however it wrote the config.php as hank745_ and therefore the database could not be found. May just be a quirk of my hosting or something? Not sure if someone else could confirm the issue?
Cheers
James
Line 78 in "install/controller/step_3.php" reads:
Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes(strtolower($this->request->post['db_prefix'])) . '\');' . "\n";
Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes($this->request->post['db_prefix']) . '\');' . "\n";
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Didn't had time to investigate further, will set it up again if you cant repreduce the error.
Should be supported since you are suppling db and admin credentials during the installation
fido-x wrote:Confirmed.speedingorange wrote:Something I spotted when installing the cart on the latest version Not sure if this is just my hosting through.
Was my database prefix was set to HANK745_ it created the database as seen in phpmyadmin as HANK745_ however it wrote the config.php as hank745_ and therefore the database could not be found. May just be a quirk of my hosting or something? Not sure if someone else could confirm the issue?
Cheers
James
Line 78 in "install/controller/step_3.php" reads:Probably should be:Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes(strtolower($this->request->post['db_prefix'])) . '\');' . "\n";
Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes($this->request->post['db_prefix']) . '\');' . "\n";
thius will be fixed. i seem to remember some idiot telling me it should be lowercase other wise it s bug.
OpenCart®
Project Owner & Developer.
This also occurs on line 39 in the same file.fido-x wrote:Line 78 in "install/controller/step_3.php" reads:Probably should be:Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes(strtolower($this->request->post['db_prefix'])) . '\');' . "\n";
Code: Select all
$output .= 'define(\'DB_PREFIX\', \'' . addslashes($this->request->post['db_prefix']) . '\');' . "\n";
What is happening is the db prefix is being written to the database as entered and then converted to lower-case for the config files.
There are 2 ways this can be fixed. The first is as stated above by removing the "strtolower" when writing to the config files (probably the best method), or by converting the db prefix to lower-case before creating the tables in the database. In the model "install/model/install.php" (lines 23-25), change:
Code: Select all
$query = str_replace("DROP TABLE IF EXISTS `oc_", "DROP TABLE IF EXISTS `" . $data['db_prefix'], $query);
$query = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . $data['db_prefix'], $query);
$query = str_replace("INSERT INTO `oc_", "INSERT INTO `" . $data['db_prefix'], $query);
Code: Select all
$query = str_replace("DROP TABLE IF EXISTS `oc_", "DROP TABLE IF EXISTS `" . strtolower($data['db_prefix']), $query);
$query = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . strtolower($data['db_prefix']), $query);
$query = str_replace("INSERT INTO `oc_", "INSERT INTO `" . strtolower($data['db_prefix']), $query);
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I have been using Opencart for 2 years now and I love it but another stable download like 1.4.9.6 would instill more confidence in us all.
been using it for 18 months, really tired of all of this, just seek a stable platform to use, with this roller coaster ride with version updates svn's version updates etc.
This thing needs a stable updated release soon, a constant wait for version updates svn files is really time consuming, sometimes i think i am a web developer when it comes to updates and versions, bug fixes etc for opencart, love it great work, great team behind it but sometimes feel you guys have lost the plot, people love opensource carts, this one is way ahead of all the others, with the ebay connector and a module to connect to apple android apps this is going to be a quite a powerful tool just really need a stable bug free update free release soon?
please.have waited, read all the threads
Look under "System->Localisation->Zones" in the admin.jules_nz wrote:There is a spelling mistake in the Region/State under New Zealand
It has "Wairprarapa" but the correct spelling is "Wairarapa"
I couldnt find it in the files/database
Is this set offsite somewhere?
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
One customer has managed to use the voucher around 10 times?
I think its a bug of Opencart 1.5.1.3
Kind Regards,
Dan
Thanks for a quick reply.
I have set both of them values to 1 on all of them. For I have a funny feeling it's something to do with nothing being in the coupon history tab. Surely this should populate when someone orders with that coupon ?
Maybe that's why it's allowing it a number of times.
Dan
See obove reply: sorry forgot to quote itrph wrote:If you're talking about coupons (vouchers are a different thing entirely) you need to make sure you've set the limit for Uses Per Coupon and Uses Per Customer.
Users browsing this forum: No registered users and 4 guests