brablc / sitebar Goto Github PK
View Code? Open in Web Editor NEWSiteBar - Bookmark Server
License: GNU General Public License v2.0
SiteBar - Bookmark Server
License: GNU General Public License v2.0
When I try to add a new bookmark, I get this message:
Invalid query: 1292: Incorrect datetime value: '0000-00-00 00:00:00' for column 'expires' at row 1
My SiteBar Version is ver. 3.5-svn
A search-as-you-type-feature will be a great improvement on this app.
My environment is Linux Mint.
yama@jpx20120007:~$ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=3
DISTRIB_CODENAME=cindy
DISTRIB_DESCRIPTION="LMDE 3 Cindy"
I setup the Sitebar in my Linux Min.
I typed
http://localhost/sitebar
in browser, Chrome.
"DB Configuration" appears.
I put the following.
DBlocalhost: localhost (already input)
DB Username: sitebar
DB Password: *****
DB Repeat Password: *****
Database Name: sitebar (already input)
Then click "Check Settings".
"Sitebar: No support for MySQL detected!"
message appears.
What is wrong for my settings or environment?
Absolutely password I input is correct and mysql database and user also be correct.
yama@jpx20120007:~$ mysql -u sitebar -p sitebar
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [sitebar]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| sitebar |
+--------------------+
2 rows in set (0.00 sec)
MariaDB [sitebar]> show grants;
+----------------------------------------------------------------------------------------------------------------+
| Grants for sitebar@localhost |
+----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'sitebar'@'localhost' IDENTIFIED BY PASSWORD '*C10F6810992E2D82CDF96FF18C4735317D4FE2A7' |
| GRANT ALL PRIVILEGES ON `sitebar`.`sitebar` TO 'sitebar'@'localhost' |
+----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
MariaDB [sitebar]> show tables;
Empty set (0.00 sec)
I have Sitebar being served by Nginx in $root/sitebar folder.
The login page shows up but once I login, all I can see is a general Nginx error page.
Nginx error log shows: "upstream sent too big header while reading response header from upstream, client"
The solution to this problem is to set "fastcgi_buffer*" params, as specified in the complete working config below.
Regards.
server {
listen :80;
server_name ;
root /http;
gzip on;
access_log /var/log/www/nginx-access.log;
error_log /var/log/www/nginx-error.log warn;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
location /sitebar {
try_files $uri $uri/ /sitebar/index.php?$args;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+?.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php-fpm.sock;
}
Hello,
today I upgraded my Ubuntu Server from 16.04.02 to 16.04.03.
After that, I hab a lot of trouble with the php7.0 support of SiteBar which I thought to have been fixed with you php7 branch. I git cloned the branch and copied config.inc.php from my SiteBar-3.4.
Now I get the following errors:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_WriterInterface has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/writer.inc.php on line 29
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_WriterInterfaceXML has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/writer.inc.php on line 666
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_Converter has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/converter.inc.php on line 27
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_Tree_Link has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/tree.inc.php on line 46
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_Tree_Node has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/tree.inc.php on line 131
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_Tree has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/tree.inc.php on line 521
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SB_UserManager has a deprecated constructor in /opt/SiteBar-3.4_php7.0/sitebar/inc/usermanager.inc.php on line 28
SiteBar: No support for MySQL detected!
With these errors I'm stuck at the moment, do you have an idea how to get SiteBar up and running again ?
Thanks
Markus
Updated to the latest version and I was able to get to the submit form and on clicking submit I received the following error:
Invalid query: 1978: Incorrect default value '0000-00-00 00:00:00' for column 'changed'
INSERT INTO sitebar_link (name, url, favicon, target, private, is_feed, comment, validate, added, nid)
VALUES ('Travelpro� | Highest Quality Luggage for the Experienced Traveler', 'https://www.travelpro.com/', '', '', 0, 0, '', 1, now() , 987)
Hi
After years searching for an alternative to proprietary cross browser bookmark sync tool, I found SiteBar. I was thinking about developing it myself. First, thank you very much for your efforts !
I wish to warn you about the deprecated function eregi :
Attention: Function eregi() is deprecated [converter.inc.php line 123]
Hi,
I think it would be good if CSS for sitebar would adapt to display size (relative sizes) so fonts and icons are not too small on hidpi screens. Also: svg Icons.
I have tried to change it with a skin, but it does not recognize the css somehow in the chromium plugin.
When trying to log in to sitebar client using the sitebar-client add-on in Chrome (Win 10), the login mask appears in red color and you cannot log in. There is a note that you have to allow Chrome to accept cookies. But this is all enabled in Chrome in the settings. No problems using the add-on in Chromium (ubuntu 18) and in Edge (Win 10).
I'm developing my own skin but it seems no matter what font sizes I select in my css files they're being overridden somewhere (except for the stats and powered by footer).
For the life of me, I cannot figure out how to get Sitebar working with Nginx!
This does not work either: #6
EDIT: I forgot to mention that I have php7.4-fpm listening on a separate dedicated socket for Sitebar
I recently installed Yunohost (YNH) on a separate machine and the distro presents a great example of sub-folder hosted multiple web apps. I think Sitebar would be a great alternative for the existing Bookmark apps there, and would provide your project with good exposure. The 2 bookmark apps that already exist in YNH are Sharrli (which stores the BM data in a .php file - ridiculous!) and Shiori (which lacks many features your project already has).
YNH is DEbian based, uses by default Mariadb, php7.3-fpm (Testing branch -Bullseye - uses 7.4) & Nginx. I'm not proficient in PHP, and I have not kept up with Nginx configuration recently so I lack the skills to be of assistance to you - sorry.
I sincerely hope to see Sitebar in the YNH apps collection.
For incremental debugging, I installed apache2 and the PHP requirements.
This section as FYI: I Debugged several problems in inc/page.inc.php
:
sitebar/config.php
shows up,I had other errors, but I'm unsure whether they were due to my mistakes or not. In any case, moving the sitebar folder to /var/www/html (Apache document root) solved those problems.
IMPORT PROBLEM:
There's no submit button when trying to import bookmark file (Firefox exported html).
If I try adding a single bookmark the 3 expected buttons are there.
There's an error message, but that's due to the "Codepage" dropdown not populating (and not important):
[php:error] [pid 1680040] [client 127.0.0.1:34586] PHP Fatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in /var/www/html/sitebar/inc/localizer.inc.php:209\nStack trace:\n#0 /var/www/html/sitebar/inc/localizer.inc.php(209): vsprintf()\n#1 /var/www/html/sitebar/inc/localizer.inc.php(344): SB_Localizer->getText()\n#2 /var/www/html/sitebar/command.php(6181): SB_T()\n#3 /var/www/html/sitebar/command.php(1028): SB_CommandWindow->_buildCodepage()\n#4 /var/www/html/sitebar/command.php(1125): SB_CommandWindow->writeFields()\n#5 /var/www/html/sitebar/command.php(6526): SB_CommandWindow->writeForm()\n#6 {main}\n thrown in /var/www/html/sitebar/inc/localizer.inc.php on line 209, referer: http://localhost/sitebar/index.php?uniq=1648085722
Dear all,
since my last upgrade of PHP to PHP Version 5.6.17 I get the following errors:
Warnung: Non-static method SB_Database::staticInstance() should not be called statically, assuming $this from incompatible context [usermanager.inc.php line 53]
...
more in attachment...
sitebar_errors.txt
Best regards,
Alexander
I have installed the latest version and the link view is working fine.
I added the "Add Page to SiteBar" bookmarklet* to my Chrome and Firefox.
When I try to add a page to my SiteBar, I receive this error:
Invalid query: 1978: Incorrect default value '0000-00-00 00:00:00' for column 'expires'
any idea how I can resolve this error?
Uploaded the latest version Release 3.6
Tried to add webpage to Bookmark list and received the following error.
Error
Function name must be a string search►
Source file
File: ../public_html/bkmk/command.php:1028
1018: }
1019: elseif (isset($params['type']) && $params['type'] == 'callback')
1020: {
1021: if (isset($params['show_label']) && $params['show_label'])
1022: {
1023: ?>
1024:
1025: <?php
1026: }
1027:
1028: $this->$params'function';
1029: }
1030: elseif (isset($params['type']) && $params['type'] == 'callbackextern')
1031: {
1032: $params'function';
Call stack
../public_html/bkmk/command.php:1125 source SB_CommandWindow->writeFields(arguments)
../public_html/bkmk/command.php:6526 source SB_CommandWindow->writeForm() "
--
Call stack
..public_html/bkmk/command.php:1125 source SB_CommandWindow->writeFields(arguments)
1115: <input type="hidden" name="<?php echo $param?>" value="<?php echo $value?>">
1116: <?php
1117: }
1118: }
1119:
1120: $enabled = false;
1121:
1122: // Add missing propeties
1123: $hasOptional = $this->enrichFields() && !$this->um->getParam('user','expert_mode');
1124:
1125: $this->writeFields($optional=false, $customButton, $enabled);
1126:
1127: if ($hasOptional)
1128: {
1129: ?>
../public_html/bkmk/command.php:6526 source SB_CommandWindow->writeForm()
6516: echo '<p>'."\r";
6517: }
6518:
6519: // If we have no errors or ignore them
6520: if (!$cw->hasErrors() || $cw->showWithErrors || $cw->hasHandledErrors()==$cw->hasErrors())
6521: {
6522: if ($cw->fields)
6523: {
6524: $noerrors = !$cw->hasErrors();
6525:
6526: $cw->writeForm();
6527:
6528: // Some late errors?
6529: if ($noerrors && $cw->hasErrors())
6530: {
After my Debian 11 to Debian 12 server upgrade, when I ty to add a new bookmarks I hav a blank page and the following error in my PHP log :
[Wed Oct 18 23:53:56.534779 2023] [php:error] [pid 1692876] [client 192.168.99.10:45952] PHP Fatal error: Uncaught mysqli_sql_exception: Incorrect default value '0000-00-00 00:00:00' for column 'expires' in /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php:536\nStack trace:\n#0 /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php(536): mysqli_query()\n#1 /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php(109): SB_DatabaseMySQL->raw()\n#2 /home/public/www/bookmarks.kozodo.com/htdocs/inc/faviconcache.inc.php(199): SB_Database->insert()\n#3 /home/public/www/bookmarks.kozodo.com/htdocs/inc/pageparser.inc.php(341): SB_FaviconCache->saveFavicon()\n#4 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(1578): SB_PageParser->getInformation()\n#5 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(1384): SB_CommandWindow->buildProperties()\n#6 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(1297): SB_CommandWindow->buildAddBookmark()\n#7 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(183): SB_CommandWindow->buildGetBookmarkInformation()\n#8 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(171): SB_CommandWindow->handleCommandBuild()\n#9 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(96): SB_CommandWindow->handleCommand()\n#10 /home/public/www/bookmarks.kozodo.com/htdocs/command.php(6462): SB_CommandWindow->__construct()\n#11 {main}\n thrown in /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php on line 536, referer: https://bookmarks.kozodo.com/command.php?command=Add%20Bookmark&nid_acl=15
I cannot login to Sitebar anymore under PHP 7.3 and 7.4. Using PHP 7.2, it works.
Hello I have upgraded to 3.4-svn and using the plugin: https://addons.mozilla.org/en-US/firefox/addon/sitebar-client-for-firefox-40x/ in some admin functions when I hit the "return" button I get an error message.
I believe this is something that has to do with the plugin.
Any ideas?
I tried to switch my webspace to php 7 but SiteBar stops working.
Is a update for php 7 possible?
Having trouble creating the tables (note, I'm using MariaDB fork of MySQL.)
The sitebar_link table specifically (There may be others).:
CREATE TABLE `sitebar_link` (
`lid` int(10) unsigned NOT NULL auto_increment,
`nid` int(10) unsigned NOT NULL default '0',
`url` text NOT NULL,
`name` varchar(255) NOT NULL default '',
`private` tinyint(1) default '0',
`comment` longtext,
`favicon` text,
`added` datetime NOT NULL default '0000-00-00 00:00:00',
`changed` datetime NOT NULL default '0000-00-00 00:00:00',
`visited` datetime NOT NULL default '0000-00-00 00:00:00',
`tested` datetime NOT NULL default '0000-00-00 00:00:00',
`deleted_by` int(10) unsigned default NULL,
`is_dead` tinyint(1) NOT NULL default '0',
`is_feed` tinyint(1) NOT NULL default '0',
`is_sidebar` tinyint(1) NOT NULL default '0',
`hits` int(10) unsigned NOT NULL default '0',
`validate` tinyint(1) NOT NULL default '1',
`target` varchar(32),
`type` varchar(10) DEFAULT '',
PRIMARY KEY (`lid`),
UNIQUE KEY `name` (`nid`,`name`)
)
COMMENT='Each link must belong to a node.';
#1071 - Specified key was too long; max key length is 767 bytes
What's odd is none of the keys are that long...
MariaDB: 5.5.43 (x64)
'https' works until a 'command.php' page, then 'Firefox' complains 'Connection Is Not Secure' I have to 'Disable protection' to allow adding links & change settings etc...
I tried setting a 'baseurl' with a 'https' address without any change, still mixed content warning.
Environment:
apache 2.2.32
php 7.2.9
When adding a bookmark without adding a title, it shouldn't be enforced for users to insert the title manually or to get it by clicking on a button. Instead, it should get the title on his own.
Search should be done not only in the titles but on the URL of the webpage, too.
Hi
I'm having a slight problem trying to upgrade an old 3.4 version of Sitebar. I've not been using sitebar for a while and I've recently upgraded to php7 (on CentOS7). I cloned the current version, moved the directory to the correct location the loaded the sitebar page an got the following message:
Your software version 3.6 differs from the database version 3.4.
I hit the upgrade button and that appeared to work but the message then changed to:
our software version 3.6 differs from the database version 3.5
The nect screen has a 'missing' upgrade button, I can't seem to get past this point. I tried that on my sitebar DB which is on a Percona Galera cluster (version 5.7) without success, I then tried this on a stand-alone percona server (also 5.7) and had the same problem. This also happens if I try to install from scratch with a new database.
The current install software versions are these:
php -v
PHP 7.2.4 (cli) (built: Mar 27 2018 17:23:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologie
nginx -v
nginx version: nginx/1.14.0
php-fpm -v
PHP 7.2.4 (fpm-fcgi) (built: Mar 27 2018 17:25:50)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Have I missed some step during the install or is this a bug?
Thanks in advance.
Bill
After my server upgrade from Debian 11 to Debian 12, my hosted sitebar website became blanked.
It was an old install, so I upgrade sitebar to the today master branch (3.6.2).
It was still blank, but I found the following message in my PHP log :
[Wed Oct 18 23:40:54.875685 2023] [php:error] [pid 1692831] [client 192.168.99.10:50032] PHP Fatal error: Uncaught mysqli_sql_exception: Unknown system variable 'innodb_version' in /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php:534\nStack trace:\n#0 /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php(534): mysqli_query()\n#1 /home/public/www/bookmarks.kozodo.com/htdocs/config.php(415): SB_DatabaseMySQL->raw()\n#2 /home/public/www/bookmarks.kozodo.com/htdocs/config.php(375): Configuration->loadSQL()\n#3 /home/public/www/bookmarks.kozodo.com/htdocs/config.php(297): Configuration->conversion()\n#4 /home/public/www/bookmarks.kozodo.com/htdocs/config.php(59): Configuration->checkStructure()\n#5 /home/public/www/bookmarks.kozodo.com/htdocs/config.php(478): Configuration->__construct()\n#6 {main}\n thrown in /home/public/www/bookmarks.kozodo.com/htdocs/inc/database.inc.php on line 534, referer: https://bookmarks.kozodo.com/config.php
After a short search I see that MaraiDB release is 10.11.4 and I read that MariaDB 10.11 remove the innodb_version varibale because it's no more aligned with the official InnoDB source code (https://mariadb.com/kb/en/changes-improvements-in-mariadb-1011/#innodb-variables).
I made a clean installation from GitHub and the following update of the database from 3.3.9 => 3.4
In current version 3.4 of my sitebar installation the drag and drop for a bookmark do not work.
Drag and drop of a folder is working.
I testes it direct on Chrome, Firefox & IE.
Please provide output of select @@sql_mode; and reopen.
select @@sql_mode;
@@sql_mode | |
---|---|
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
Hi!
I tried to move my sitebar installation version 3.3.9 to a new server. This was not possible. The new server has php 7.2 and only the mysqli module. 3.3.9 used mysql. So I did an upgrade to version 3.6 at the same time.
The new server runs MariaDB 10.1.31.
I did:
The first thing I got:
Invalid query: 1978: Incorrect default value '0000-00-00 00:00:00' for column 'expires'
I checked the issues on github for similar errors and found that the db upgrade did not run successfully. For ex. I did not have the tables: sitebar_message
and sitebar_message_folder
which come with upgrade_3.3.12.sql
-- same as in #25 (comment).
I droped the database, imported again from 3.3.9 and did run all upgrade_xxx.sql
manually.
Everything worked fine but the last one upgrade_3.5.sql
.
I had to switch these two statements:
UPDATE `sitebar_user`
SET `visited` = NULL
WHERE `visited` = '0000-00-00 00:00:00';
and
ALTER TABLE `sitebar_user`
CHANGE `visited` `visited` DATETIME NULL DEFAULT NULL;
because one could not set the NULL value in a column not allowing it.
Next problem:
The Update did not work yet. There was no error but the database did not change any rows although there was a row with 0000-00-00 00:00:00
. The WHERE clause did not work.
UPDATE `sitebar_user`
SET `visited` = NULL
WHERE `visited` = '0000-00-00 00:00:00';
The statement worked after I changed it to:
UPDATE `sitebar_user`
SET `visited` = NULL
WHERE date(`visited`) = '0000-00-00 00:00:00';
This however did not solve my Invalid query
problem.
Next step was to find all 0000-00-00 00:00:00
-- clearly a date my db does not like -- and update them with NULL.
ALTER TABLE `sitebar_cache` change `created` `created` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_cache` change `expires` `expires` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_config` change `changed` `changed` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_link` change `changed` `changed` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_link` change `added` `added` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_link` change `visited` `visited` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_link` change `tested` `tested` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_message` change `sent` `sent` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_message` change `expires` `expires` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_session` change `created` `created` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_token` change `issued` `issued` datetime NULL DEFAULT NULL;
ALTER TABLE `sitebar_visit` change `visited` `visited` datetime NULL DEFAULT NULL;
UPDATE `sitebar_cache` SET `expires` = NULL where date(`expires`) = '0000-00-00 00:00:00';
UPDATE `sitebar_link` SET `changed` = NULL where date(`changed`) = '0000-00-00 00:00:00';
UPDATE `sitebar_link` SET `visited` = NULL where date(`visited`) = '0000-00-00 00:00:00';
UPDATE `sitebar_link` SET `tested` = NULL where date(`tested`) = '0000-00-00 00:00:00';
The other tables had no '0000-00-00 00:00:00' saved so I didn't bother updating them.
After this sitebar came online. I get the index page, can login and so on. :-) Sitebar seems to work again.
Just in case you ask for @@sql_mode:
I don't know what it had configured in the beginning.
In upgrade_3.5.sql
one do SET @@sql_mode = '';
and afterwards I get
select @@sql_mode;
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Tom
Since the last pull I have a active Tracy info. How can I disable this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.