Banshee
the secure PHP framework

Weblog

The view of the 5.0 release has completely been redesigned. Everything is now responsive, inclusing the CMS. I've used Bootstrap for this. The Banshee demo website already uses this 5.0 beta release, so you can test and see what it does.

To all Banshee users, please test this beta release and let me know of any issues. Specially layout issues.

For those who can't access the CMS due to change in the way Banshee stores passwords, use the database/set_password script.

samiux
29 May 2015, 12:51
Can I upgrade from 4.0?
Hugo Leisink
29 May 2015, 12:53
Uh, yes. But since Banshee is a framework, that will likely require some programming. There is no migration tool available.
samiux
29 May 2015, 13:10
@Hugo,

What if I do not change anything in the Banshee v4.0 and just post some data to it? Does the upgrade smooth?
Hugo Leisink
29 May 2015, 14:21
That it's very likely that simply a code replacement will work.
samiux
1 June 2015, 05:27
@Hugo,

I upgraded Banshee v4.0 to v5.0 by replacing the source code and edited the website.conf. Everything looks fine except that I cannot login to the control panel via "admin" directory. Any idea?
Hugo Leisink
1 June 2015, 10:43
Hi Samiux. You can use this script [www.banshee-php.org] to reset your password. The way Banshee stores the password also changed. I'll add that to the release notes. Thanks.
samiux
1 June 2015, 22:56
@Hugo,

I cannot access the "admin" page. Any idea?
Hugo Leisink
1 June 2015, 22:59
Use the database/set_password script to reset your password.
samiux
1 June 2015, 23:07
@Hugo,

When I use my Android to access my site, the following error displayed :

Internal errors :
SQL query: update log_clients set count=count+1 where os='Android' and browser='Firefox' and date='2015-06-02'
Error message: Table 'banshee log_clients' doesn't exist
samiux
1 June 2015, 23:19
@Hugo,

When I access "login" page (i.e. admin page), the error displayed :

The requested page could not be found.
If you believe this is due to a bug in this website, please notify the webmaster. Click here to return to the homepage.
Hugo Leisink
2 June 2015, 09:39
Did you combine pieces of code of previous release with 5.0b? Or do you use the database of an older version with 5.0b?

The definition of the log_clients table can be found in database/mysql.sql. Use it to create that table manually.

Note that the CMS of 5.0b can be reached via /cms, not via /admin like the previous releases.
Heiko
2 June 2015, 12:00
I can view all blog entries, but cant create new or edit old entries in cms.
Has the database for weblog changed, do I need an update for database?
I use the old database. With banshee 4.x I can edit.
Btw Performance seems to be fast and bootstrap is really fine.
Hugo Leisink
2 June 2015, 12:08
Yes, the database have been changed a bit. Load 5.0 database in MySQL server and use a tool like phpMyAdmin to compare and adjust older database.
samiux
2 June 2015, 15:39
@Hugo,

I give up to upgrade Banshee from v4.0 to v5.0b. I tried to set a new one, however, I encounter the following errors :

root@hiawatha:/var/www/infosec/banshee-5.0b/database# ./setup_database
This script will create a MySQL user 'banshee5' and the database 'banshee5'.

Make sure the database settings in settings/website.conf are correct!

Enter MySQL admin's username [root]: root
Enter password for user root:
ERROR 1045 (28000): Access denied for user 'banshee5'@'localhost' (using password: YES)
SQL query: select value, UNIX_TIMESTAMP(timeout) as timeout from cache where `key`='settings_last_updated' limit 1
Error message: Table 'banshee5.cache' doesn't exist
SQL query: delete from cache where `key`='settings_last_updated' limit 1
Error message: Table 'banshee5.cache' doesn't exist
SQL query: select value, UNIX_TIMESTAMP(timeout) as timeout from cache where `key`='settings_last_updated' limit 1
Error message: Table 'banshee5.cache' doesn't exist
SQL query: select * from settings where `key`='secret_website_code'
Error message: Table 'banshee5.settings' doesn't exist
SQL query: insert into settings (`key`, `type`, `value`) values ('secret_website_code', 'string', 'qi24TS8Nz4aVsdMtqORhXjJ0KPScavdC')
Error message: Table 'banshee5.settings' doesn't exist
SQL query: update users set status=1
Error message: Table 'banshee5.users' doesn't exist

I confirmed that database "Banshee" is created but there is no table in it.

I have changed the website.conf to "banshee5", "banshee5" as db name and db user. The database "banshee" is for my version 4.0.

Any idea?
Hugo Leisink
2 June 2015, 15:50
>> Access denied for user 'banshee5'@'localhost' (using password: YES)
Make sure the user banshee5 has proper access rights.
samiux
2 June 2015, 15:53
@Hugo,

Does your script create this user or not?
Hugo Leisink
2 June 2015, 16:04
Only if it does not exist. I did some testing at my server. It works as it should. I'm afraid that at this point I have no idea what goes wrong at your server.
Hugo Leisink
2 June 2015, 16:07
Storing the content of mysql.sql in the database goes via a command line tool. Perhaps a special character in your password disrupts the execution of it?
samiux
2 June 2015, 16:14
@Hugo,

Your "setup_database" script created the user with the designed password. The password contains symbols. However, I can login with that user even v4.0 can do that without problem.

I noticed that your script has been changed since v4.0.

Hugo Leisink
2 June 2015, 16:48
The setup_database script contains a line with the mysql command line tool. What if you execute that line manually from the command line (of course, change parameters with its value).
Heiko
2 June 2015, 17:09
Fatal error:
XSLTProcessor::transformToXml(): ID tags already defined in /var/www/users/website/libraries/xml.php on line 314.

Id tested it. I exported and imported alle tables manually. After adding (in CMS) a tag to a existing weblog I get this message.

It must be related to tags in weblog.

How can I fix it ?

Table is complete new.
Heiko
2 June 2015, 17:23
Manual delete in weblog_tag fixes the error temporary. Truncate for weblog_tag fails because of primary index.
Issue comes, when I have more than one tag.
Hugo Leisink
2 June 2015, 17:56
Can you reproduce the error in demo.banshee-php.org?

What is the output when you add "?output=raw" to the URL? Please send it to my by e-mail.
Heiko
2 June 2015, 18:14
Done.

Whats about the Weblog Issue?
samiux
2 June 2015, 18:35
@Hugo,

The problem is fixed. The problem is caused by the password (with symbols). Thanks for the hints.
Hugo Leisink
2 June 2015, 18:36
@samiux: can you tell me what character caused the issue?
Hugo Leisink
2 June 2015, 18:37
@Heiko: if you delete 'id="tags"' at line 70 of views/cms/weblog.xslt, does that solve the issue?
samiux
2 June 2015, 18:42
@Hugo,

The password contains "$" and "*".

By the way, the "Menu" settings page buttons need to be fixed.
Hugo Leisink
2 June 2015, 18:44
@samiux: what is it exactly that needs fixing?
Hugo Leisink
2 June 2015, 18:46
@heiko: What PHP version do you use?
Heiko
2 June 2015, 19:05
# php -v
PHP 5.5.25 (cli) (built: May 22 2015 00:15:41)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
samiux
2 June 2015, 19:08
@Hugo,

The "Insert" button is too ugly.
Heiko
2 June 2015, 19:10
delete 'id="tags"'

Issue seems to be gone. You can test self again.
samiux
2 June 2015, 19:11
Hints for those who need to upgrade from version 4.0 to 5.0b :

(0) Make sure you did not programming to version 4.0.
(1) Backup the v4.0 database by running database/backup_database.
(2) Extract the dumped database. Changed all "admin" to "cms" at "roles" table. Change "/admin" to "/cms" at "menu" data section.
(3) Still dumped database. Locate "users" table. Go to the data section. Change ",NULL,NULL,1," to ",NULL,NULL,2,"
(4) Install Banshee v5.0b. Change settings/website.conf. Make sure you change the "DB_DATABASE", "DB_USERNAME". Make sure "DB_PASSWORD" does not contain any symbol.
(5) At v5.0b directory, run database/setup_database and then run database/remove_demo_content.
(6) Copy the altered dumped database (v4.0) to the directory of database (v5.0b). Run the following command :

mysql -u [DB_USERNAME] -p[DB_PASSWORD] [DB_DATABASE] < [alterned dumped database]
(7) Still at v5.0b directory. Copy out the whole "settings" table structure and data section as well as the header of the mysql.sql (the first few lines) from mysql.sql to test.sql. Then run the following command :

mysql -u [DB_USERNAME] -p[DB_PASSWORD] [DB_DATABASE] < test.sql
(8) Now, you can access your site now. Make sure you disable the "user" account when necessary. Make sure to change "Settings" module as the data is default value.

Good luck!
Hugo Leisink
2 June 2015, 19:13
@heiko: Great! Although I don't understand why it went wrong at your system. Must be a PHP version issue.

@samiux: Thanks. Will point to your post at final release.
Hugo Leisnk
2 June 2015, 19:35
@heiko & @samiux: Many thanks for all your feedback!!
Heiko
2 June 2015, 19:37
You are welcome and thanks for banshee
samiux
2 June 2015, 19:57
@Hugo,

Thanks for your Hiawatha and Banshee.