tipichris / yapcache Goto Github PK
View Code? Open in Web Editor NEWAPC based cache to reduce the database load for the YOURLS URL shortener
License: BSD 2-Clause "Simplified" License
APC based cache to reduce the database load for the YOURLS URL shortener
License: BSD 2-Clause "Simplified" License
Upon installing PHP 8.x on CentOS 7 platform, the PHP APC module is considered depreciated so the newer APCu PHP module is required now. I downloaded and installed the APCu PHP8 module installed on the server. When I attempted to enable either the APC Cache plugin or YAPCache, a APC extension error message appears and prevents the plugin page from appearing.
This error message appears:
This plugin requires the APC extension: http://pecl.php.net/package/APC
Additional context
https://computingforgeeks.com/how-to-install-php-8-on-centos-linux/
https://shouts.dev/install-apcu-on-centos-7
As we were looking into getting this plugin installed, I went through the documentation and realised that this will not work with multi server setups behind a LB.
When will there be a Redis/MemCached plugin made for caching of these shortened urls?
I will look into it when I get time to develop one. But for anyone wanting to use this, it work on single server application only.
Hi;
I just discover your plugins
and on my lemp (debian9) APC become APCu with PHP7
root@server:~# php -m|grep apc
apcu
but your plugins complain about not founding apc
so any plan of supporting apcu ?
Regards!
Jonathan
Hi there,
I just had a weird issue where whenever I updated or activated/deactivated plugins on one yourls installation, they would deactivate/activate/update on all other installations (I run 3, for different purposes). Turns out the yapCache is shared between all installations, so options updating on one would also update on the other.
My fix was to change:
define('YAPC_ID', 'yapcache-');
to:
define('YAPC_ID', YOURLS_DB_NAME.'-'.YOURLS_DB_PREFIX.'-'.'yapcache-');
This takes into account multiple installations, even on the same database but with different prefixes.
-Michael.
Yourls 1.7.4
Ubuntu 18.04
MySQL 5.7.25
php 7.2.15
Loading the plugin produces this error:
(I can get the plugin to load by not using the user/cache.php file, and caching does seem to work, but the same error is produced when I attempt to edit or delete a URL.)
Next Error: Cannot access protected property YOURLS\Database\YDB::$infos in /var/www/xxxxxx/user/plugins/yapcac he/plugin.php:139 Stack trace: #0 /var/www/xxx in /var/www/xxxxxx/user/plugins/yapcache/plugin.php on line 139 [04-Mar-2019 19:25:56 UTC] PHP Fatal error: Uncaught Error: Cannot access protected property YOURLS\Database\YDB ::$infos in /var/www/xxxxxx/user/plugins/yapcache/plugin.php:139 Stack trace: #0 /var/www/xxxxxx/includes/functions-plugins.php(152): yapc_pre_get_keyword(Array) #1 /var/www/xxxxxx/includes/functions-plugins.php(191): yourls_apply_filter('pre_get_keyword', Array) #2 /var/www/xxxxxx/includes/functions.php(459): yourls_do_action('pre_get_keyword', 'mastering-colla...', true) #3 /var/www/xxxxxx/includes/functions.php(494): yourls_get_keyword_infos('mastering-colla...') #4 /var/www/xxxxxx/includes/functions.php(516): yourls_get_keyword_info('mastering-colla...', 'url', false) #5 /var/www/xxxxxx/includes/functions-html.php(483): yourls_get_keyword_longurl('mastering-colla...') #6 /var/www/xxxxxx/admin/admin-ajax.php(25): yourls_table_edit_row('mastering-colla...') #7 {main}
[25-Sep-2019 10:32:29 UTC] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'jwbg' for key 'PRIMARY'' in /home/omoto/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php:748
Stack trace:
#0 /home/omoto/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute()
#1 /home/omoto/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(306): Aura\Sql\ExtendedPdo->perform('INSERT INTO yo...', Array) #2 /home/omoto/public_html/includes/functions.php(161): Aura\Sql\ExtendedPdo->fetchAffected('INSERT INTO
yo...', Array)
#3 /home/omoto/public_html/includes/functions.php(278): yourls_insert_link_in_db('https://survey....', 'jwbg', 'https://survey....')
#4 /home/omoto/public_html/includes/functions-api.php(21): yourls_add_new_link('https://survey....', '', '')
#5 [internal function]: yourls_api_action_shorturl(false)
#6 /home/omoto/public_html/includes/functions-plugins.php(150): call_user_func_array('yourls_api_acti...', Array)
#7 /home/omoto/pu in /home/omoto/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748
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.