Connecting to an existing db farm using MonetDBLite C API - monetdblite

I have a DB farm created with a database (ex: temp). When I try to connect to that using monetdb_startup, get the following error.
src/gdk/gdk_utils.c:1465: GDKfree: Assertion `(asize & 2) == 0' failed.
Aborted (core dumped)
I'm using the sample application tests/readme/readme.c provided.
monetdb_startup("/dbfarm/temp", 0, 0) is what I'm trying to do.
Monet version being used:
MonetDB 5 server v11.29.3 "Mar2018" (64-bit, 128-bit integers)
Stack trace:
#0 0x0000003f39232495 in raise () from /lib64/libc.so.6
#1 0x0000003f39233c75 in abort () from /lib64/libc.so.6
#2 0x0000003f3922b60e in __assert_fail_base () from /lib64/libc.so.6
#3 0x0000003f3922b6d0 in __assert_fail () from /lib64/libc.so.6
#4 0x00007ffff799bc3c in GDKfree (s=0x19602e0) at src/gdk/gdk_utils.c:1465
#5 0x00007ffff79a8521 in freeException (msg=0x19602e0 '▒' <repeats 88 times>, "▒L\001") at src/mal/mal/mal_exception.c:135
#6 0x00007ffff7b38c09 in SQLupgrades (c=0x7ffff42b2400, m=0x1815460) at src/mal/sqlbackend/sql_upgrades.c:1442
#7 0x00007ffff7b1edb2 in SQLinitClient (c=0x7ffff42b2400) at src/mal/sqlbackend/sql_scenario.c:612
#8 0x00007ffff7404f32 in monetdb_connect () at src/embedded/embedded.c:72
#9 0x00007ffff74055da in monetdb_startup (dbdir=0x7fffffffd7c0 "/dbfarm/temp/", silent=0 '\000', sequential=0 '\000')
at src/embedded/embedded.c:162
Thanks

In general, this use case is not supported. So upgrade MonetDBLite databases between versions should work fine, but moving from MonetDBLite to MonetDB and back is probably going to give errors and/or crash.

Related

Fatal Error When Set CI_DEBUG to False On Production Mode Codeigniter 4

Why I get this error when set from Config/Boot/production.php CI_DEBUG to false in production mode ? this is the default setting from CI4.
defined('CI_DEBUG') || define('CI_DEBUG', false);
Fatal error: Declaration of CodeIgniter\Log\Logger::emergency($message, array $context = []): bool must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in E:\testing\Source Code\testing_CI_v.4.2.6\system\Log\Logger.php on line 157
Fatal error: Uncaught Error: Class "CodeIgniter\Log\Logger" not found in E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\Services.php:391 Stack trace: #0 E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\BaseService.php(253): CodeIgniter\Config\Services::logger(false) #1 E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\BaseService.php(194): CodeIgniter\Config\BaseService::__callStatic('logger', Array) #2 E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\Services.php(388): CodeIgniter\Config\BaseService::getSharedInstance('logger') #3 E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\BaseService.php(253): CodeIgniter\Config\Services::logger(true) #4 E:\testing\Source Code\testing_CI_v.4.2.6\system\Common.php(799): CodeIgniter\Config\BaseService::__callStatic('logger', Array) #5 E:\testing\Source Code\testing_CI_v.4.2.6\system\Debug\Exceptions.php(114): log_message('critical', '{message}\nin {e...', Array) #6 E:\testing\Source Code\testing_CI_v.4.2.6\system\Debug\Exceptions.php(180): CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #7 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler() #8 {main} thrown in E:\testing\Source Code\testing_CI_v.4.2.6\system\Config\Services.php on line 391
For Development And Testing Mode run without problem. This error just occur when using routes->resource (RESTFUL API).
It is not clear what error is this. I try to replace the system folder with new one. But the error still exists.
It is said "Uncaught Error: Class "CodeIgniter\Log\Logger" not found" I don't know what is the problem with this and why it is not found.
Now my app just run with set CI_DEBUG to true to prevent the error. But the default is set to false for production.
defined('CI_DEBUG') || define('CI_DEBUG', true);
What is missing in here ? It is so strange that setting the CI_ENVIRONMENT to development or testing worked without a problem. But for production not working. So I decide to turn on the error display in production mode and found the error above.
Seriously help need.
I found the problem in the restful api.
The problem is in the config/filter.php
$routes->resource('ApiManageTips', ['controller' =>'App\Controllers\ApiData\ApiManageTips']); // get, put, create, delete
public $filters = [
'basicauth' => ['before' =>
[
'ApiManageTips/*',
'ApiManageTips',
]
]
];
The Above example is working in the version 4.1.2 but is not working in version 4.2.6
Instead change to :
public $filters = [
'basicauth' => ['before' =>
[
'ApiManageTips/*',
]
];
I don't why it is not working in the CI Version 4.2.6.

Magento error: Invalid backend model specified: customer_entity/address_attribute_backend_region

After updating my magento instance from 1.4.0 to 1.7.0.2 I've got the following error:
Invalid backend model specified: customer_entity/address_attribute_backend_region
The error occurs during the checkout process while the customer is selecting the adress from drop-down list and press the "continue" button.
A AJAX-request to /checkout/onepage/saveBilling/ fails, the second request to checkout/onepage/getAdditional responses. The customer will be redirected to the cart overview page, but content the failed ajax response displays an error report number, which can be looked up at with FTP in the folder var/reports/####reportnumber###.log
EDIT: Stack trace
a:5:{i:0;s:81:"Invalid backend model specified: customer_entity/address_attribute_backend_region";i:1;s:1907:"#0 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(346): Mage::exception('Mage_Eav', 'Invalid backend...')
#1 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1094): Mage_Eav_Model_Entity_Attribute_Abstract->getBackend()
#2 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(998): Mage_Eav_Model_Entity_Abstract->_setAttributeValue(Object(Mage_Customer_Model_Address), Array)
#3 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(959): Mage_Eav_Model_Entity_Abstract->_loadModelAttributes(Object(Mage_Customer_Model_Address))
#4 /home/www/p10000/html/magento/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Customer_Model_Address), '209', NULL)
#5 /home/www/p10000/html/magento/app/code/core/Mage/Checkout/Model/Type/Onepage.php(246): Mage_Core_Model_Abstract->load('209')
#6 /home/www/p10000/html/magento/app/code/core/Mage/Checkout/controllers/OnepageController.php(320): Mage_Checkout_Model_Type_Onepage->saveBilling(Array, '209')
#7 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Checkout_OnepageController->saveBillingAction()
#8 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveBilling')
#9 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/www/p10000/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/www/p10000/html/magento/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#12 /home/www/p10000/html/magento/index.php(101): Mage::run('', 'store')
#13 {main}";s:3:"url";s:60:"/magento/index.php/checkout/onepage/saveBilling/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:11:"german";}
I found this topic: http://www.magentocommerce.com/boards/viewthread/261499/#t350593
So I created this statement (the first two lines I found at learningmagento.com, but they are incomplete and leads into a total break of the onepage/saveBilling-Page, if you don't change the source model, too.
UPDATE `eav_attribute` SET `backend_model` = 'customer/entity_address_attribute_backend_street' WHERE `attribute_code` ='street' LIMIT 1 ;
UPDATE `eav_attribute` SET `backend_model` = 'customer/entity_address_attribute_backend_region' WHERE `attribute_code` ='region' LIMIT 1 ;
UPDATE `eav_attribute` SET `source_model` = 'customer/entity_address_attribute_source_country' WHERE `source_model` = 'customer_entity/address_attribute_source_country' LIMIT 1 ;
UPDATE `eav_attribute` SET `source_model` = 'customer/entity_address_attribute_source_region' WHERE `source_model` ='customer_entity/address_attribute_source_region' LIMIT 1 ;
It worked for me. The AJAX request responses with a validation error for the phone number in my case, but this can be solved easily.
The "customer_entity/..." can be also found in the table "eav_entity_type", but in my case it was (not yet) necessary to change the value.

Can't login to Magento backend 'No region found within the locale 'de''

i have moved a Magento installation from a preview system to my local machine for developing and testing.
i have setup the BASE URL to my V-Host in the database.
The frontend works but i cant get into the admin panel.
if i log in, i got the following error message:
No region found within the locale 'de'
Trace:
#0 /var/www/myProjectName/lib/Zend/Currency.php(101): Zend_Currency->setLocale(NULL)
#1 /var/www/myProjectName/app/code/core/Mage/Core/Model/Locale.php(575): Zend_Currency->__construct('USD', NULL)
#2 /var/www/myProjectName/app/code/core/Mage/Directory/Model/Currency.php(233): Mage_Core_Model_Locale->currency('EUR')
#3 /var/www/myProjectName/app/code/core/Mage/Directory/Model/Currency.php(216): Mage_Directory_Model_Currency->formatTxt(NULL, Array)
#4 /var/www/myProjectName/app/code/core/Mage/Directory/Model/Currency.php(197): Mage_Directory_Model_Currency->formatPrecision(NULL, 2, Array, true, false)
#5 /var/www/myProjectName/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format(NULL)
#6 /var/www/myProjectName/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format(NULL)
#7 /var/www/myProjectName/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(74): Mage_Adminhtml_Block_Dashboard_Bar->addTotal('Revenue', NULL)
#8 /var/www/myProjectName/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#9 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 /var/www/myProjectName/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#11 /var/www/myProjectName/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#12 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#13 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#14 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#15 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#16 /var/www/myProjectName/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#17 /var/www/myProjectName/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#18 /var/www/myProjectName/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#19 /var/www/myProjectName/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#20 /var/www/myProjectName/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#21 /var/www/myProjectName/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_DashboardController->indexAction()
#22 /var/www/myProjectName/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#23 /var/www/myProjectName/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#24 /var/www/myProjectName/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#25 /var/www/myProjectName/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#26 /var/www/myProjectName/index.php(87): Mage::run('', 'store')
#27 {main}
Can i set the region anywhere? everything i found with google cant help me out.
Just tell me what else you want to know.
I hope you can help me!
Thanks smo
So basically:
got to core_config_data in your database
and delete the line where path = general
I got the same problem but there was no "general" Config-Entry without any other path and content, so i need to debug the problem a bit deeper.
Btw - you can search the config-entry like this:
SELECT * FROM core_config_data WHERE core_config_data.path = 'general';
To me, it seems to be a Firefox-only Problem and i think, its out of the language-setting from the browser. Its inside the Zend-currency-handling. Only Firefox has the problem - Chrome, Edge, Internet Explorer works well!
So i fixed the Magento-Code like that a bit dirty but it works:
Copy lib/Zend/Currency.php to app/code/local/Zend/Currency.php and edit this.
Now you can overwrite the Zend-Framework file.
Go to the following line at copied:
public function setLocale($locale = null)
#require_once 'Zend/Locale.php';
try {
$locale = Zend_Locale::findLocale($locale);
Add last Line:
public function setLocale($locale = null)
{
#require_once 'Zend/Locale.php';
try {
$locale = Zend_Locale::findLocale($locale);
if ( $locale == 'de' ) $locale = 'de_DE'; // zend fix the firefox-locale error
After that, you can edit the products again!
This Variant is also updateable out of the overwrite-code.
Hope that helps!
It happens that the locale is defined based on your browser locale detection. You can like or not this behavior but in this case that's the reason you have this error message.
To fix that you have to change the priority or switch the locale supported by your browser. What I mean by priority is that the browser provide a list of supported language. For example you may have something like that Accept-Language: da, en-gb;q=0.8, en;q=0.7
In your case it searches de but your browser doesn't support it. So you may use "Quick Locale" for firefox to switch to en-US or de-DE for example to prevent such errors if you use this one or something similar. It's not a but in Magento, it's a wanted behavior I think.

error when using createEntityTables

I get this error when I include
$installer->createEntityTables( $this->getTable('red/red') );
I am using enterprise 1.11
I have also seen alternative to that is type every thing which is really time consuming. Could someone please tell me who to make this function work.
[previous:Exception:private] =>
[xdebug_message] => ( ! ) Mage_Eav_Exception: Can't create table: red_faqs_eavexample in C:\wamp\www\ubt.onlocal.com.au\app\Mage.php on line 549
Call Stack
#TimeMemoryFunctionLocation
10.0003690528{main}( )..\index.php:0
20.00271167384Mage::run( )..\index.php:81
30.01012776112Mage_Core_Model_App->run( )..\Mage.php:640
40.02304545784Mage_Core_Model_App->_initModules( )..\App.php:338
50.46364871080Mage_Core_Model_Resource_Setup::applyAllUpdates( )..\App.php:412
60.528411772936Mage_Core_Model_Resource_Setup->applyUpdates( )..\Setup.php:235
70.528611769664Mage_Core_Model_Resource_Setup->_installResourceDb( )..\Setup.php:327
80.528611769824Mage_Core_Model_Resource_Setup->_modifyResourceDb( )..\Setup.php:421
90.529511778144include( 'C:\wamp\www\ubt.onlocal.com.au\app\code\local\Magelocal\Red\sql\red_setup\install-0.1.0.php' )..\Setup.php:624
100.529711778712Mage_Eav_Model_Entity_Setup->createEntityTables( )..\install-0.1.0.php:6
)
Error in file: "C:\wamp\www\ubt.onlocal.com.au\app\code\local\Magelocal\Red\sql\red_setup\install-0.1.0.php" - Can't create table: red_faqs_eavexample
#0 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\Resource\Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.1.0')
#2 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\Resource\Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('0.1.0')
#3 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\wamp\www\ubt.onlocal.com.au\app\code\core\Mage\Core\Model\App.php(338): Mage_Core_Model_App->_initModules()
#6 C:\wamp\www\ubt.onlocal.com.au\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#7 C:\wamp\www\ubt.onlocal.com.au\index.php(81): Mage::run('', 'store')
#8 {main}
This is a problem with an error being triggered when it shouldn't be. Long story short, MySQL doesn't support DDL transactions, and in the course of the method DDL routines are being found in the SQL and an error is thrown.
The easy answer is to comment out this line:
lib/Varien/Db/Adapter/PDO/Mysql.php
protected function _checkDdlTransaction($sql)
{
if (is_string($sql) && $this->getTransactionLevel() > 0) {
$startSql = strtolower(substr(ltrim($sql), 0, 3));
if (in_array($startSql, $this->_ddlRoutines)) {
// comment this out: trigger_error(Varien_Db_Adapter_Interface::ERROR_DDL_MESSAGE, E_USER_ERROR);
}
}
}
Doing so allows your module to install. Obviously hacking a core file is a terrible idea. You should extend the method or allow the SQL to run, and then translate the generated SQL into the Magento MySQL API, as seen in core sql setup scripts. The latter is a major pain.. the better idea would be to extend the method.
More here on background information and troubleshooting.

Break at program start on OS X?

How can I break at the very start of a program on OS X (10.6) without debug symbols?
I'm debugging an issue where my machine hangs and can't do certain things (at least anything involving networking). The programs I can use to try to identify the hang also hang on launch, so I'd like to start a program but not actually run it until the hang occurs, in the hopes that either the program runs or the place it hangs helps me to diagnose the issue.
I tried just setting breakpoints at the addresses that show up in the backtrace, but execution didn't stop.
Breakpoint 2, 0x000000010005cc78 in write$NOCANCEL ()
(gdb) bt
#0 0x000000010005cc78 in write$NOCANCEL ()
#1 0x000000010005cc74 in __swrite ()
#2 0x000000010005cbfd in _swrite ()
#3 0x000000010005cb42 in __sflush ()
#4 0x0000000100061361 in __swbuf ()
#5 0x0000000100093474 in putchar ()
#6 0x0000000100003ce7 in ?? ()
#7 0x000000010000090c in ?? ()
(gdb) b *0x000000010000090c
Breakpoint 3 at 0x10000090c
(gdb) b *0x0000000100003ce7
Breakpoint 4 at 0x100003ce7
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: [...]
Breakpoint 2, 0x000000010005cc78 in write$NOCANCEL ()
(gdb) bt
#0 0x000000010005cc78 in write$NOCANCEL ()
#1 0x000000010005cc74 in __swrite ()
#2 0x000000010005cbfd in _swrite ()
#3 0x000000010005cb42 in __sflush ()
#4 0x0000000100061361 in __swbuf ()
#5 0x0000000100093474 in putchar ()
#6 0x0000000100003ce7 in ?? ()
#7 0x000000010000090c in ?? ()
b __dyld__dyld_start works. (Thanks to #kongtomorrow.)

Resources