Comments (26)
The sample account database does not exists. You can safely delete the config/accounts/sample.ini file. I have removed the file in the latest version of the code.
Which version of PHP are you using ?
from webzash-v1-defunct.
Hi, thanks for your reply. I am using PHP version 5.3.9 and IIS 7.5 on Windows Server 2008 R2 with Service Pack 1.
I created a new account called test and when I try to activate it, I get the following messages:
Account changed.
Invalid account database. Table "settings" missing.
Currently active account remains (None) and I checked my database and there is a test database in there. Also, test.ini is created with the following parameters:
[database]
db_hostname = "localhost"
db_port = "3306"
db_name = "test"
db_username = "root"
db_password = "password"
Thanks for all your help.
from webzash-v1-defunct.
if you are using git clone then you need to checkout the v1.x branch and try again.
$git checkout v1.x
from webzash-v1-defunct.
For the PHP warning you are getting try http://www.apachefriends.org/en/xampp.html
from webzash-v1-defunct.
also please create a new account after checkout of v1.x branch
from webzash-v1-defunct.
Ok, here's what I did:
- Checked out v1.5.1
- Tried to create an account and got the following messages:
Initialized account database.
Initialized basic accounts data.
Error adding account settings. - This newly created account does not display under Select account drop down menu on Accounts page.
- Tried Manage accounts -> New account. This worked without any issues and the Select account drop down menu on Accounts page got populated with the new account. However, when I try to activate it, I get the following error:
Account changed.
Invalid account database. Table "settings" missing.
Currently active account : (None)
There seems to be a problem with account settings table.
from webzash-v1-defunct.
You need to give write permissions to the webserver to the config/accounts/ folder to automatically create the accounts .ini file for you. Else you need to do it manually.
For the 'Invalid account database. Table "settings" missing.' are you trying to do a update from older version of webzash ? Please post the account database table structure if you can. it is looking for the 'settings' table and it cannot find one. Let me know if you need any help with that. Its available in phpmyadmin in Export option.
Also check the database name. It is looking for a table called 'settings' but it cannot find one.
from webzash-v1-defunct.
Check the config/accounts folder. The account list in the dropdown are just normal text file with .ini extension and can be created /edited by any decent text editor like notepad++ on windows.
from webzash-v1-defunct.
I did some checking and noticed the following:
- Creating a new account using Create account (from Change Account page) does create the database and its tables, including settings. I confirmed this on Mysql, but executing there select * from settings; return Empty set (0.00 sec). It seems to me two things are going wrong here:
a) The settings table is created, but not getting populated (insert statement not working?) as confirmed by the error message (Error adding account settings.) above.
b) The .ini file under config/accounts is not getting created either. Permissions are ok, as this file does get created in (2) below. - Creating a new account using Manage accounts -> New account works without any error and the Select account drop down menu on Accounts page is also populated with the new account. However choosing to activate this new account output the following:
Account changed.
Invalid account database. Table "settings" missing.
Currently active account : (None) - Manually creating the .ini file under config/accounts for (1) above and selecting it on Accounts page drop down menu output the following:
Account changed.
Invalid account settings.
Currently active account : test (dashboard and other options are NOT displayed).
The error in (3) should disappear, if there is data in the settings table.
Thanks for all your help.
from webzash-v1-defunct.
I just tied the same on my machine with Ubuntu + XAMPP and it seems to work correctly.
You can try adding a row manually to settings table for the first error and try again :
INSERT INTO `settings` (`id`, `name`, `address`, `email`, `fy_start`, `fy_end`, `currency_symbol`, `date_format`, `timezone`, `manage_inventory`, `account_locked`, `email_protocol`, `email_host`, `email_port`, `email_username`, `email_password`, `print_paper_height`, `print_paper_width`, `print_margin_top`, `print_margin_bottom`, `print_margin_left`, `print_margin_right`, `print_orientation`, `print_page_format`, `database_version`) VALUES (1, 'webzash', 'test', '[email protected]', '2011-04-01 00:00:00', '2012-03-31 23:59:59', 'Rs', 'dd/mm/yyyy', 'UM12', 0, 0, '', '', 0, '', '', 0, 0, 0, 0, 0, 0, '', '', 4);
from webzash-v1-defunct.
"Creating a new account using Manage accounts -> New account works without any error and the Select account drop down menu on Accounts page is also populated with the new account. "
The Manage accounts -> New account will just add the ini file, it will not create the dababase. It assumes that the database already exists and user wants to add a reference to it from his copy of webzash.
from webzash-v1-defunct.
I looked up the date and time warnings on the net and I was able to resolve them by updating my php.ini. The timezone had to be uncommented and set to something valid, e.g. date.timezone = "America/New_York". So, all those several warnings I was getting are now all gone and that too on IIS 7.5 and Windows Server 2008 R2. :-)
I am assuming the current settings table issue is similar, i.e. probably conflicting with some set up issue, possibly in php.ini or maybe in mysql. I have a hunch it has to do with the timezone entry as well (drop down menu) which is possibly not valid and causing the sql statement to go bad and hence, it is not getting populated in to the database and failing account creation.
I will try the example sql statement you provided, manually inserting in to the table and see if it works. Not tested it yet, but UM12 for timezone seem a bit odd. Valid timezones are listed at this page: http://www.php.net/manual/en/timezones.php
Thanks again for all your help. Let me know your thoughts on my observations.
from webzash-v1-defunct.
"I will try the example sql statement you provided, manually inserting in to the table and see if it works. Not tested it yet, but UM12 for timezone seem a bit odd. Valid timezones are listed at this page: http://www.php.net/manual/en/timezones.php"
Its just a dummy timezone and not getting used anywhere currently. Its a feature that still needs to be implemented.
from webzash-v1-defunct.
Sorry for the late update. As expected, almost everything works fine after manually inserting the settings data. However, for some entry (especially, payment), I get the following error message:
Invalid Entry type specified. Showing all Entries.
Sometimes even while entering the voucher data, I see this message. Despite the message, Create works fine. I am now pretty sure the error during UI based account creation is due to a broken INSERT statement. I will have to check it, but I am guessing one or more of the data items are initialized differently on Windows and Linux and hence, the error only shows up on Windows.
Now, regarding functionality, I don't want the Edit and Delete functionality for the entries. For security, I would prefer a new entry to void (cancel) out or update an existing entry. Is this possible and if yes, how? And what are the roles of each user types?
Also, I don't want users who are assigned only ONE account to require them to activate that one account at every log on. What is the easiest way to get users from log on directly to dashboard?
Thanks.
from webzash-v1-defunct.
Can you try xampp and see if you get the same error.
For roles related info check the system/application/helpers/access_helper.php file. you can hand edit the file and add/remove permissions as per your req.
For the one account, you need to do some custom coding. check the system/application/controllers/user.php line 77
from webzash-v1-defunct.
most of the files are hand editable. check the ./config folder
from webzash-v1-defunct.
Thanks for the leads. I did fix the settings sql code and now UI based account creation is possible on Windows as well. Here it is for ./system/application/controllers/admin:
/* Adding account settings */ $newacc->trans_start(); if ( ! $newacc->query("INSERT INTO settings (id, name, address, email, fy_start, fy_end, currency_symbol, date_format, timezone, manage_inventory, account_locked, email_protocol, email_host, email_port, email_username, email_password, print_paper_height, print_paper_width, print_margin_top, print_margin_bottom, print_margin_left, print_margin_right, print_orientation, print_page_format, database_version) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", array(1, $data_account_name, $data_account_address, $data_account_email, $data_fy_start, $data_fy_end, $data_account_currency, $data_account_date, $data_account_timezone, 0, 0, '', '', 0, '', '', 0, 0, 0, 0, 0, 0, '', '', 4)))
To test on XAMPP, I will need some time as I will have to set up a VM first. Don't want Apache to mess with IIS. ;-)
I looked up system/application/controllers/user.php. Since [account_name] is already stored in [user].ini, what is the easiest way to auto activate this [account] after log on? Basically, I want users with only one account to skip the Activate step as this is redundant and instead load their dashboard.
Thanks.
from webzash-v1-defunct.
thanks for the fix ! can u send a diff/patch file with your signature using git commit -s
for the auto activation can you code in PHP ? I can give u pointers where to make changes.
from webzash-v1-defunct.
I've not used git, so feel free to check in the fix on my behalf. I can code, but I'm really from JSP world and not very fluid in PHP. Used to code in Perl, so give me detail pointers and I'll give auto activation a shot.
from webzash-v1-defunct.
after line 77 once the user is auth, get the user details from line 140. this will give you the account name in $active_user['accounts'] in string, convert to array in 150. if one element then line 180 to load the account. set session in 187 and then redirect to home page.
much more simple hack :
just add one line after line no. 77 where 'sample' is the account label. thats it.
$this->session->set_userdata('active_account', 'sample');
from webzash-v1-defunct.
If I am not wrong in your sql fix you added all the columns of the database table.. right ? Is there anything else that you did ?
from webzash-v1-defunct.
Yup, that's it. In the schema, you defined the constrain NOT NULL for all fields of settings table. If all fields are not initialized during INSERT, shouldn't populating settings fail even on Linux?
I'm closing this thread and opening a new one for auto activation.
from webzash-v1-defunct.
I will check all the NOT NULL insert statements. I will keep this issue open till it is fixed.
from webzash-v1-defunct.
I am working on totally new version of webzash based on CakePHP, so I will close this issue.
from webzash-v1-defunct.
on creating a new account i am getting this error
Failed to edit account settings file. Check if "config/accounts/faisal.ini" file is writable.
You can manually update the text file "config/accounts/faisal.ini" with the following content :
[database]
db_type = "mysql"
db_hostname = "localhost"
db_port = "3306"
db_name = "webzash"
db_username = "myuser"
db_password = "mypass"
from webzash-v1-defunct.
Do as the error says by manually creating the file inside the webzash folder.
from webzash-v1-defunct.
Related Issues (20)
- Getting an error, kindly support HOT 17
- I received one more error HOT 1
- Issue in the amount for 32-bit platform HOT 4
- Problem in Chaning Accounts HOT 2
- Problem in opening balance when I enter more than 21474836.48 HOT 3
- INITIALISATION HELP HOT 1
- Can i have accounts in single database ? rather than having seperate db for each account ? HOT 2
- Error connecting to database. HOT 1
- adding new feature HOT 3
- Translation
- translating HOT 1
- Multiple CSRF Vulnerabilities Leads to account take over and settings change and other HOT 1
- IS THIS PROJECT STILL OPEN? HOT 73
- Balance Sheet HOT 122
- how can i find users table in Webzash HOT 5
- Where to change english month names to spanish month names HOT 1
- Need for web.config HOT 14
- Calculation Issue HOT 10
- Month vise Report HOT 40
- Error connecting to database. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webzash-v1-defunct.