Missing Database Table Aro (expected "aros"), create it first - mysql

I have an application that uses Cake PHP and it does not want to run properly. I am getting numerous errors and do not even know where to start fixing it:
Notice: Undefined variable: permissions in
app/views/layouts/default.thtml on line 58 Call Stack: 0.0000 637384
{main}() /app/webroot/index.php:0 0.0022 892856
Dispatcher->dispatch() /app/webroot/index.php:84 0.0051 1104112
Controller->_initComponents() /cake/dispatcher.php:227 0.0051 1104616
Component->init() /cake/libs/controller/controller.php:271 0.0051 1105304
Component->__loadComponents() /cake/libs/controller/component.php:59 0.0054 1116768
AclComponent->__construct() /cake/libs/controller/component.php:124 0.0054 1116768
AclComponent->getACL() /cake/libs/controller/components/acl.php:56 0.0074 1543960
Model->__construct() /cake/libs/controller/components/acl.php:72 0.0097 1855456
Model->setSource() /cake/libs/model/model_php5.php:301 0.0103 1856912
Object->cakeError() /cake/libs/model/model_php5.php:518 0.0106 1885784
ErrorHandler->__construct() /cake/libs/object.php:169 0.0111 1892840
At the bottom it says:
Missing Database Table No Database table for model Aro (expected
"aros"), create it first. Notice: If you want to customize this error
message, create app/views/errors/missing_table.html.
Does anyone have an idea what is wrong?

You're missing a database table
It's looking for the table "aros" but can't find it. Create the table based on the ACL part of the CakePHP book.

Related

pgadmin 4 import/export table does not work

I have made sure that the columns match the 'column to export' field in the columns tab, not null columns have data, tried in both csv and txt but all i get is a message saying:
import/export job created
Nothing else: no errors, no warning, no completion.
windows 7 os
Version1.4
CopyrightCopyright 2013 - 2017, The pgAdmin Development Team
Python Version2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
Flask Version0.11.1
Application ModeDesktop
till then ill try via psql
Just a guess, but are you trying this as a superuser? I'm having the same issue and so trying to write it as a COPY statement, but get this response:
ERROR: must be superuser to COPY to or from a file
SQL state: 42501
Hint: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
I'm not sure, but maybe the functionality in pgAdmin just constructs a COPY statement, then isn't properly relaying the error message back to you when it fails.
Sounds like psql is the right way to go, though.

Creating classes in pimcore

I'm new to the whole pimcore thing. I am trying to play around and create classes. The issue is, I am not able to create more than 1 class, and in the database it is nameless, so when I try to create another class, it also tries to store it in the database with no name, which ends up showing an SQL error saying that there is a duplicate entry. Any ideas what the reason behind this could be?
I installed pimcore on an nginx server, I am trying to create classes by choosing Settings->Objects->Classes and then "Add Class", creating the first class was ok, I entered a name for the class and it was successfully added, however the name field in the corresponding database entry is empty, as in empty string ' '. So, when I try to add another class and pimcore attempts to store it in the table "classes", it returns an error saying that it would be a duplicate entry since they both are nameless, i.e. the name entered isn't added. The following error is what I managed to find using developer tools, could be helpful.
[WARN] Unable to parse the JSON returned by the server
minified_javascript_core_f5757da….js?_dc=3708:5684 Error: You're trying to decode an invalid JSON String:
Fatal error: Call to a member function hasChilds() on null in /var/www/html/pimproject/pimcore/modules/admin/controllers/DocumentController.php on line 59
at new Ext.Error (http://192.10.0.0/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27054)
at Function.Ext.apply.raise (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27447)
at Object.Ext.raise (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27594)
at Object.Ext.JSON.me.decode (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:385102)
at Ext.define.onProxyLoad (http://192.10.0.10/website/var/tmp/minified_javascript_core_f5757da9fa29d5bf13e6aa5058eff9f7.js?_dc=3708:5641:28)
at Ext.cmd.derive.triggerCallbacks (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594533)
at Ext.cmd.derive.setCompleted (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594231)
at Ext.cmd.derive.setException (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594444)
at Ext.cmd.derive.process (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:593638)
at Ext.cmd.derive.processResponse (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:648303)
Just reinstall Pimcore.
It can be some composer or submodules error.
I strongly recommend for the first installation to run Demo project https://github.com/pimcore/demo not Skeleton, especially if you are using Docker. Later, when you will get the feeling of Pimcore, feel free to install Skeleton or any other project.
Pimcore is stable working for years. If you had some problems before -- nowadays, it is stable.

Trying to fix "tMySQL query error: Duplicate entry" For a garrysmod server

I'm new to this website, and I'm not sure if I'm supposed to ask questions about mysql things in a game server. Anyways, I'm trying to fix this error here, and I was wondering if there's anything I can do to figure out, or solve where the issue is occurring.
Trace:
1: Line 32 "Trace" lua/includes/extensions/debug.lua
2: Line 33 "nil" gamemodes/catalystrp/gamemode/data.lua
3 C function
4: Line 84 "nil" lua/includes/modules/hook.lua
tMySQL query error: Duplicate entry 'STEAM_0:0:53698800' for key 'PRIMARY'Query:
INSERT INTO metrorp_wallets (`steam`, `rpname`) VALUES('STEAM_0:0:53698800', 'T
what this error means is that you are trying to insert a row to the table that conflicts with row already in the table (meaning- there's already a row in the table with the same primary key).
How to deal with this case is really a matter of what you are trying to do. I can think of three ways to go here:
if this case is illegal, than I guess you should not change the query, but handle the error (exception, log, whatever)
if you want to replace the data in the table with the new row, use REPLACE INTO instead of INSERT INTO in your query.
if you want to keep the data that's already there, use INSERT IGNORE in your query.

ACL truncates action name

Using PhalconPHP framework
I have been using ACL successfully for a while but ran into an issue when I tried using an action name that was more than 16 characters long. When I add adminChangePassword as an access under my users resource | get the error
Access 'adminChangePassw' does not exist in resource 'users'
#0 [internal function]: Phalcon\Acl\Adapter\Memory->_allowOrDeny('Administrators', 'users', 'adminChangePass...', 1)
But using the name adminChangePassw works fine (apart from that it is a rubbish name). It appears that the name is being truncated at some point which I presume would be a bug.
Is that what is happening or can anyone give another explanation of this error?
A quick test
I've just tried adding an access in the users resource called 12345678901234567 and the error says that 1234567890123456 does not exist - truncating the last 7...
Occurs in tutorial programs
I tried adding 'adminChangePassword' to the ACL in my working Vokuro example and get the same error - so it isn't related to any changes I have made to how the ACL works.
This is because I had been working from the Vokuro example code - the database for which limits the size of the action and resource fields to 16 characters. Changing the database setup to allow more characters in those fields fixes the problem.

CaseSenstive Table names

hi there i made track star application and everything works fine except for one issue that i face error
CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'devnmark_root.AuthAssignment' doesn't exist. The SQL statement executed was: SELECT *
FROM 'AuthAssignment'
WHERE userid=:userid
now this was automatically generated by Yii when i checked for if(Yii::app()->user->checkAccess('createUser',array('project'=>$model)))
18 {
19 $this->menu[] = array('label'=>'Add User To Project','url'=>array('adduser', 'id'=>$model->id));
20 }
then i went to phpmyadmin and executed this query manually
SELECT * FROMAuthAssignmentWHERE userid=4 and there is error which says same that table does not exist.
if i use small case letter for table name then no error.
i executed same query on local wamp 's phpmyadmin same query does not show any error there so this is clear that there is error with my sql .any idea what can i do to solve?
I suggest you hitting up SQL_MODE documentation for setting your final options. http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
For testing you can just do a:
SET sql_mode = '';
Or adjust your command line:
--sql-mode=""
You may try to set the system variable *lower_case_table_names* to 1.
My local application was developed under Windows, howerver production is under Linux and I caused the same problem.
For me it happened because of case sensitivity - table AuthAssignment in database was actually authassignment.
I have found two options to solve it:
rename database table from authassignment to AuthAssignment
or
edit config file component section:
'components'=>array(
...
'user'=>array(...
),
'authManager'=>array(
...
'assignmentTable'=>'authassignment' //THIS LINE SOLVED MY PROBLEM
),
I had the same problem of non-existent authassignment table, I had forgotten running the rights installation which in my case was by following URL i.e.
/index.php/rights/install
and then the setup was like a breeze and self explanatory :)
For me this answer helped the most: original source.
In the authManager in config/main.php you can add lowercased names of the tables like this:
'components'=>array(
'authManager'=>array(
'defaultRoles'=>array('guest'),
'class'=>'RDbAuthManager',
'assignmentTable'=>'authassignment',
'itemTable'=>'authitem',
'rightsTable'=>'rights',
'itemChildTable'=>'authitemchild',
),