Expiry data not being stored when entered via Expiry List Tab
shrimpchip28 opened this issue ยท 36 comments
It appears there are compatibility issues with YOURLS 1.7.9? is there a plan to address compatibility with current version YOURLS?
I'm looking at the underlying expiry table and it appears that a record is not being created when trying to add via the Expiry List tab. A record is created sometimes, but the Click, Timer, PostX Destination information does not get saved.
Also when creating a new short url, I see the options, set them, in admin, but 1) no record is saved in the expiry table.
Thanks. This would come in handy for what I am looking to do.
I experience the same as shrimpchip28. When I click on the expiry icon next to a link on the main admin screen and I set an 'expiration click', it is saved. However it throws an error, this is from my PHP log:
[Mon Jul 13 13:48:07.949460 2020] [lsapi:error] [pid 9860:tid 139683996489472] [client 82.169.4.146:62329] [host example.com] Backend fatal error: PHP Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'type' at row 1 in /home/user123/domains/example.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php:748\nStack trace:\n#0 /home/user123/domains/example.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute()\n#1 /home/user123/domains/example.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(306): Aura\\Sql\\ExtendedPdo->perform('REPLACE INTO ex...', Array)\n#2 /home/user123/domains/example.com/public_html/user/plugins/expiry/plugin.php(1242): Aura\\Sql\\ExtendedPdo->fetchAffected('REPLACE INTO ex...', Array)\n#3 /home/user123/domains/example.com/public_html/user/plugins/expiry/plugin.php(715): expiry_old_link()\n#4 /home/user123/domains/example.com/public_html/user/plugins/expiry/plugin.php(225): expiry_list_mgr('a61b4eef2e')\n#5 /home/user123/domains/example.com/public_html/includes/functions-plugins.php(622): expiry_do_page()\n#6 /home/u8 in /home/user123/domains/example.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748\n, referer: https://example.com/admin/plugins.php?page=expiry
Unfortunately still not expiring on clicks... or... is it flagged as blacklisted by Phishtank?
Also when setting expiration on the main page, the settings are not saved.
Edit: ok, there's something weird going on :) Sometimes it limits the number of clicks when set expiration by timer and when set by clicks it doesn't limit.
In the expiry list, the expiration by time or clicks is not visible, see snapshot:
I can confirm clicks setting, counting, and expiring with 2.2.0 installed with YOURLS 1.7.10 (current pull from MASTER). Did you verify that the database tables updated appropriately? Can you disable the other plugins and test expiry in isolation?
Ahaa, I'm using v1.7.9
I will check with 1.7.10 and check the tables update.
I cannot find 1.7.10 -- 1.7.9 is the latest release.
I checked the tables. I had to recreate them by issuing the SQL command myself, because the scripts wouldn't do it.
However, I still run into the same problems.
On my server I have PHP 7.3 running, but that shouldn't be a problem, right?
1.7.10 is just the latest pull from git. After looking at the updates, it should work with both.
The code in plugin.php
should be doing its job, if not, how about some log file data? That would at least point in the direction of the problem. I can confirm that the upgrade code worked under my own environment.
With the correct database table name, I can see no reason why these errors should be occurring for you. Again, log file data, an error message, this would be necessary to move the ball further down the field here.
PHP version ought not effect this. Unless it is. Log files would indicate any problem if reporting is sensitive enough.
q: in config.php
, what is your setting for YOURLS_DB_PREFIX
?
q: when you created your database tables manually, did you make sure that the table name expiry
had that prefix, if applicable?
q: in config.php, what is your setting for YOURLS_DB_PREFIX ?
define( 'YOURLS_DB_PREFIX', 'yourls_' );
q: when you created your database tables manually, did you make sure that the table name expiry had that prefix, if applicable?
Yes (see screenshot)
I enabled debug in Yourls and I disabled Cloudflare proxy. The last one sure helped, but only briefly.
After that I was able to have expire data shown in the expiry overview. They did not limit me from visiting the links.
However, when adding links with expiry details from the admin home page, these data were not stored.
Then neither adding expiry details from the expiry page did work.
This is debug info was shown:
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00038 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00043 s)
Could not store cookie: headers already sent in /home/user/domains/domain/public_html/includes/functions-html.php on line 811
SQL: SELECT COUNT(`keyword`) FROM `yourls_url` WHERE `keyword` = '1-mMx'; (0.00025 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '1-mMx' (0.00025 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00024 s)
SQL: REPLACE INTO yourls_expiry (keyword, type, click, timestamp, shelflife, postexpire) VALUES ('' '' '' '' '' 'https://bing.com') (0.00029 s)
SQL: SELECT * FROM `yourls_expiry` ORDER BY timestamp DESC (0.00021 s)
this info is from the main admin page attempt or the expiry list page?
I cannot reproduce your error. I added a url via admin interface, gave a 4 click expiry, and it worked as expected with one exception, the click counts on the expiry page were not accurate. Despite this, it still expired appropriately.
Here are the scenario's I tried:
- disabled all plugins except expiry and usrv,
- upgraded to Yourls 1.7.10,
- use Firefox instead of Safari,
- used PHP7.4 instead of PHP7.3.
- used PHP extensions nd_mysqli and nd_pdo_mysql instead of mysqli and pdo_mysql.
I still have the same unpredictable behaviour: sometimes expiry list is empty upon save, sometimes there's data in clicks and destination. Sometimes click/timer is saved from the main screen and often not.
I keep seeing this error message in the debug results:
Could not store cookie: headers already sent in /home/myusername/domains/mydomain/public_html/user/plugins/expiry/plugin.php on line 214
seems like you're doing a good job troubleshooting. Log data is required for further analysis. You need to make sure that error reporting is on and set appropriately in PHP to collect the data, and then display it on screen and/or write to file. Error reporting can also be increased in apache/nginx. etc.
Rule 1, look to the logs.
This is what I found with my webhost. I could not find an option for more detailed reporting though.
[Thu Jul 23 14:04:49.136279 2020] [lsapi:notice] [pid 9955:tid 139961961371392] [client 82.169.x.xxx:51648] [host mydomain.com] Backend log: PHP Notice: Undefined variable: click in /home/user/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1217\n, referer: https://mydomain.com/admin/plugins.php?page=expiry
[Thu Jul 23 14:04:49.136324 2020] [lsapi:notice] [pid 9955:tid 139961961371392] [client 82.169.x.xxx:51648] [host mydomain.com] Backend log: PHP Notice: Undefined variable: fresh in /home/user/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1218\n, referer: https://mydomain.com/admin/plugins.php?page=expiry
[Thu Jul 23 14:04:49.136363 2020] [lsapi:notice] [pid 9955:tid 139961961371392] [client 82.169.x.xxx:51648] [host mydomain.com] Backend log: PHP Notice: Undefined variable: stale in /home/user/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1219\n, referer: https://mydomain.com/admin/plugins.php?page=expiry
That's exactly what I need. You're using lsapi, might explain why our experiences are different. I use nginx and php-fpm. I'll look into this.
Which brings me to Rule 2, always describe your environment (OS, web server, hosting, etc) when reporting an issue. For YIOURLS I recommend posting errors with data from this plugin
Can I ask, what host do you use? Is it a VPS or shared hosting?
Back to Rule 1: If you are having issues with understanding log files in PHP: take a look at this. Lots of great places to start there. I suggest the same for your web server. Error logs are the absolute best friend of any dev.
:-)
-
YOURLS version: 1.7.9
-
Plugins enabled:
- admin_issue_diagnostic/plugin.php
- yourls-additional-charsets/plugin.php
- puns/plugin.php
- snapshot/plugin.php
- phishtank-2.0/plugin.php
- iqrcodes/plugin.php
- dont-log-crawlers/plugin.php
- old-pages/plugin.php
- usrv/plugin.php
- expiry/plugin.php
- compliance/plugin.php
- yourls-redirect-index/plugin.php
-
YOURLS DB Ver: 482
-
PHP version: 7.3.18
-
Server OS Build: Linux
-
Server & version: Apache/2
-
Browser information: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15
-
Generated by the AID Plugin ver 1.0
It is shared hosting, but I do have some influence over PHP version and extensions.
It is shared hosting
my condolences
It appears the secondary parameters are broken. More information would help me zero in on the code, otherwise it will take some combing.
Edit: politeness
I have to make a clean test. What I sent you earlier was a mixed test set.
Here's something interesting, while I was creating a new test, I had a timed expiration working!!!
Then I tried editing an existing (non expiry) link and that, that broke the system. Because after that, the time/click choice, their value and the destiantion weren't saved anymore. Not from expiry, not from the main admin page.
weird. I'm reviewing the code referred to in the log data you presented, it appears to be well structured.
edit: Q: what type of expiry were you trying to add?
Try this:
- Clear all your caches, including from hosting provider, etc.
- try entering timed and click expiry links from the main admin page. this should hopefully work.
- Go to expiry page to add click based expiry data to an already existing link. this should break the system. repeat steps 1 and 2, then repeat this step attempting clock based expiry. take notes.
- clear the caches one by one, each time attempting a new expiry from the admin page. this might isolate a problem.
I was able to reproduce the error
Here is how:
- Clear the browser cache (destroying cookies)
- Enter expiry data on main admin page while adding a new link: success
- Add expiry data to an old link: works at first, then doesn't on subsequent tries. Also breaks the first try when the link doesn't exist.
- Go back to admin, no longer working.
This issue is addressed with v2.2.2 of this plugin with this commit: dd08a22
Please update to this code, clear your browser cache and test. It appears to be working for me.
My results are still unpredictable:
- creating click expiry from main admin: no forwarding of the page, just a blank browser window.
- creating clock from expiry window: get inserted correct in database, counts down too, but still forwards to regular page.
- creating click expiry after an expired clock expiry: the clock expiry disappears and new click entry has NULL values.
I used Firefox and chrome as browser, both in private/incognito mode so there shouldn't be any old cookies.
This is weird:
(aside from Github that now refuses to insert screen shots...)
keyword | type | click | timestamp | shelflife | postexpire |
---|---|---|---|---|---|
7 | 7 | NULL | NULL | NULL | NULL |
8 | click | 2 | NULL | NULL | NULL |
yeah, that is weird. I have tried and cannot reproduce this behavior.
If I could reproduce results like that, I would
- disable the plugin, update it to the latest release or commit, and delete the expiry table
- set error reporting to "info" at least, and then re-enable the plugin.
- verify table creation
- do the iterative tests outlined above #26 (comment) paying attention to what happens in the database at each step.
- continue until the error or the earliest specific point of failure is isolated.
- look to the code that is active at that point, note it and what preceeds it.
Note: when you got a blank browser window, what did your logs say?
Ok, I followed your suggestions (very subtle they were, about what you would do -- haha)
I cleared all cookies, browsers and what not. I used Firefox for admin pages and Chrome for link checking.
Here are the results for adding expiry parameters via the link creation on main admin page:
After enabling the expiry plugin, debug info on plugin page shows:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00071 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00049 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00565 s)
SQL: DESCRIBE `yourls_flagged` (0.00129 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.01852 s)
Check for new version: no
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00052 s)
Then I clicked the link to go to main admin page, debug info:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00055 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00042 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00312 s)
SQL: DESCRIBE `yourls_flagged` (0.00077 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.01805 s)
Check for new version: no
SQL: SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM `yourls_url` WHERE 1=1 (0.00033 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00026 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'iqrcodes_logo_file_type' LIMIT 1 (0.00033 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00027 s)
SQL: SELECT * FROM `yourls_url` WHERE 1=1 ORDER BY `timestamp` desc LIMIT 0, 15; (0.00032 s)
SQL: SELECT click_time, ip_address, country_code, referrer, a.shorturl AS shorturl, b.url AS longurl, b.title as title
FROM yourls_log a, yourls_url b
WHERE a.shorturl = b.keyword
ORDER BY click_time DESC
LIMIT '10'; (0.00075 s)
Table is created, but it seems of a different type: MyISAM vs InnoDB
I added a Click expiry link and opened the link in chrome:
Fatal error: Uncaught Error: Call to undefined function yourls_get_keyword_stats() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php:763 Stack trace: #0 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(152): expiry_check(Array) #1 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(191): yourls_apply_filter('redirect_shortu...', Array) #2 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php(764): yourls_do_action('redirect_shortu...', 'https://github....', 'COGSP') #3 /home/u12345p12345/domains/mydomain.com/public_html/yourls-go.php(21): yourls_redirect_shorturl('https://github....', 'COGSP') #4 /home/u12345p12345/domains/mydomain.com/public_html/yourls-loader.php(37): require_once('/home/u80956p75...') #5 {main} thrown in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 763
I added a Time expiry link, debug info on admin main:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00055 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00042 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00312 s)
SQL: DESCRIBE `yourls_flagged` (0.00077 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.01805 s)
Check for new version: no
SQL: SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM `yourls_url` WHERE 1=1 (0.00033 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00026 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'iqrcodes_logo_file_type' LIMIT 1 (0.00033 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00027 s)
SQL: SELECT * FROM `yourls_url` WHERE 1=1 ORDER BY `timestamp` desc LIMIT 0, 15; (0.00032 s)
SQL: SELECT click_time, ip_address, country_code, referrer, a.shorturl AS shorturl, b.url AS longurl, b.title as title
FROM yourls_log a, yourls_url b
WHERE a.shorturl = b.keyword
ORDER BY click_time DESC
LIMIT '10'; (0.00075 s)
I Opened the link in Chrome and it went OK
In Firefox I went back to admin page and added click expiry, debug info:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00069 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00039 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00353 s)
SQL: DESCRIBE `yourls_flagged` (0.00092 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.03281 s)
Check for new version: no
SQL: SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM `yourls_url` WHERE 1=1 (0.00039 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00027 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'iqrcodes_logo_file_type' LIMIT 1 (0.00032 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00028 s)
SQL: SELECT * FROM `yourls_url` WHERE 1=1 ORDER BY `timestamp` desc LIMIT 0, 15; (0.00031 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = 'UZCoh' (0.00076 s)
SQL: SELECT * FROM yourls_flagged WHERE `keyword` = 'UZCoh' (0.00029 s)
SQL: SELECT * FROM yourls_expiry WHERE BINARY `keyword` = 'UZCoh' (0.00027 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = 'COGSP' (0.00027 s)
SQL: SELECT * FROM yourls_flagged WHERE `keyword` = 'COGSP' (0.00025 s)
SQL: SELECT * FROM yourls_expiry WHERE BINARY `keyword` = 'COGSP' (0.00025 s)
SQL: SELECT click_time, ip_address, country_code, referrer, a.shorturl AS shorturl, b.url AS longurl, b.title as title
FROM yourls_log a, yourls_url b
WHERE a.shorturl = b.keyword
ORDER BY click_time DESC
LIMIT '10'; (0.00077 s)
I Opened the link in Chrome:
Fatal error: Uncaught Error: Call to undefined function yourls_get_keyword_stats() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php:763 Stack trace: #0 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(152): expiry_check(Array) #1 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(191): yourls_apply_filter('redirect_shortu...', Array) #2 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php(764): yourls_do_action('redirect_shortu...', 'https://github....', 'wBySr') #3 /home/u12345p12345/domains/mydomain.com/public_html/yourls-go.php(21): yourls_redirect_shorturl('https://github....', 'wBySr') #4 /home/u12345p12345/domains/mydomain.com/public_html/yourls-loader.php(37): require_once('/home/u80956p75...') #5 {main} thrown in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 763
In Firefox I went back to admin page:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00067 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00051 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00330 s)
SQL: DESCRIBE `yourls_flagged` (0.00081 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.03387 s)
Check for new version: no
SQL: SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM `yourls_url` WHERE 1=1 (0.00046 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00025 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'iqrcodes_logo_file_type' LIMIT 1 (0.00034 s)
SQL: SELECT option_value FROM yourls_options WHERE option_name = 'expiry_global_post_expire' LIMIT 1 (0.00035 s)
SQL: SELECT * FROM `yourls_url` WHERE 1=1 ORDER BY `timestamp` desc LIMIT 0, 15; (0.00032 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = 'wBySr' (0.00029 s)
SQL: SELECT * FROM yourls_flagged WHERE `keyword` = 'wBySr' (0.00026 s)
SQL: SELECT * FROM yourls_expiry WHERE BINARY `keyword` = 'wBySr' (0.00025 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = 'UZCoh' (0.00026 s)
SQL: SELECT * FROM yourls_flagged WHERE `keyword` = 'UZCoh' (0.00026 s)
SQL: SELECT * FROM yourls_expiry WHERE BINARY `keyword` = 'UZCoh' (0.00023 s)
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = 'COGSP' (0.00024 s)
SQL: SELECT * FROM yourls_flagged WHERE `keyword` = 'COGSP' (0.00026 s)
SQL: SELECT * FROM yourls_expiry WHERE BINARY `keyword` = 'COGSP' (0.00025 s)
SQL: SELECT click_time, ip_address, country_code, referrer, a.shorturl AS shorturl, b.url AS longurl, b.title as title
FROM yourls_log a, yourls_url b
WHERE a.shorturl = b.keyword
ORDER BY click_time DESC
LIMIT '10'; (0.00095 s)
Then I Opened the time expiry link in Chrome, it should have expired (which it was):
Success but with following errors shown:
Notice: yourls_escape is deprecated since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226
Notice: yourls_escape_real is deprecated since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226
Notice: $ydb->escape is deprecated since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226
Notice: $ydb->query is deprecated since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226
The complete webserver logs of the above events are:
[Fri Jul 24 12:58:17.154687 2020] [lsapi:notice] [pid 12675:tid 140199728207616] [client 82.169.x.xxx:61458] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:01:07.197444 2020] [lsapi:notice] [pid 12675:tid 140199761778432] [client 82.169.x.xxx:61631] [host mydomain.com] Backend log: PHP Notice: $ydb->get_results is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/index.php
[Fri Jul 24 13:03:47.774349 2020] [lsapi:error] [pid 12675:tid 140199560353536] [client 82.169.x.xxx:61761] [host mydomain.com] Backend fatal error: PHP Fatal error: Uncaught Error: Call to undefined function yourls_get_keyword_stats() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php:763\nStack trace:\n#0 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(152): expiry_check(Array)\n#1 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(191): yourls_apply_filter('redirect_shortu...', Array)\n#2 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php(764): yourls_do_action('redirect_shortu...', 'https://github....', 'COGSP')\n#3 /home/u12345p12345/domains/mydomain.com/public_html/yourls-go.php(21): yourls_redirect_shorturl('https://github....', 'COGSP')\n#4 /home/u12345p12345/domains/mydomain.com/public_html/yourls-loader.php(37): require_once('/home/u80956p75...')\n#5 {main}\n thrown in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 763\n
[Fri Jul 24 13:05:20.252234 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 295\n
[Fri Jul 24 13:05:20.252368 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: array_filter() expects parameter 1 to be array, null given in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 295\n
[Fri Jul 24 13:05:20.252456 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: Invalid argument supplied for foreach() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 272\n
[Fri Jul 24 13:05:20.261226 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 295\n
[Fri Jul 24 13:05:20.261275 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: array_filter() expects parameter 1 to be array, null given in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 295\n
[Fri Jul 24 13:05:20.261309 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Warning: Invalid argument supplied for foreach() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/dont-log-crawlers/plugin.php on line 272\n
[Fri Jul 24 13:05:20.268169 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:05:20.268389 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:05:20.268426 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:05:20.268460 2020] [lsapi:notice] [pid 12675:tid 140199409284864] [client 82.169.x.xxx:61860] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:06:23.864756 2020] [lsapi:notice] [pid 12675:tid 140199669458688] [client 82.169.x.xxx:61953] [host mydomain.com] Backend log: PHP Notice: $ydb->get_results is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/index.php
[Fri Jul 24 13:07:11.144460 2020] [lsapi:error] [pid 11383:tid 140199593924352] [client 82.169.x.xxx:62009] [host mydomain.com] Backend fatal error: PHP Fatal error: Uncaught Error: Call to undefined function yourls_get_keyword_stats() in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php:763\nStack trace:\n#0 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(152): expiry_check(Array)\n#1 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(191): yourls_apply_filter('redirect_shortu...', Array)\n#2 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php(764): yourls_do_action('redirect_shortu...', 'https://github....', 'wBySr')\n#3 /home/u12345p12345/domains/mydomain.com/public_html/yourls-go.php(21): yourls_redirect_shorturl('https://github....', 'wBySr')\n#4 /home/u12345p12345/domains/mydomain.com/public_html/yourls-loader.php(37): require_once('/home/u80956p75...')\n#5 {main}\n thrown in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 763\n
[Fri Jul 24 13:09:22.629994 2020] [lsapi:notice] [pid 11383:tid 140199333750528] [client 82.169.x.xxx:62102] [host mydomain.com] Backend log: PHP Notice: $ydb->get_results is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/index.php
[Fri Jul 24 13:12:00.389514 2020] [lsapi:notice] [pid 11383:tid 140199761778432] [client 82.169.x.xxx:62210] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:12:00.389592 2020] [lsapi:notice] [pid 11383:tid 140199761778432] [client 82.169.x.xxx:62210] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:12:00.389630 2020] [lsapi:notice] [pid 11383:tid 140199761778432] [client 82.169.x.xxx:62210] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
[Fri Jul 24 13:12:00.389665 2020] [lsapi:notice] [pid 11383:tid 140199761778432] [client 82.169.x.xxx:62210] [host mydomain.com] Backend log: PHP Notice: $ydb->query is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n
End result of database table:
I will clear everything up and restart testing, but this time only the expiry page, i will post this next.
Here's part 2.
I decided to removed the usrv table as I created it manually, perhaps that's why the type was InnoDB and your other plugins were MyISAM.
After enabling the usrv plugin, plugin page debug info:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00056 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00030 s)
SQL: DESCRIBE `yourls_flagged` (0.00089 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.01930 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00636 s)
Check for new version: no
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00048 s)
Note: NO usrv table is created in database!
Then I enabled expiry plugin, plugin page debug info:
Connected to database u12345p12345_yourls on localhost
SQL: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00075 s)
SQL: SELECT * FROM `httpBL_wl` WHERE `ip` = '82.169.x.xxx' (0.00040 s)
SQL: DESCRIBE `yourls_flagged` (0.00123 s)
SQL: ALTER TABLE `yourls_flagged` ENGINE = INNODB; (0.01841 s)
SQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'usrv'
AND ENGINE = 'MyISAM' LIMIT 1 (0.00497 s)
Check for new version: no
SQL: SELECT * FROM `yourls_url` WHERE `keyword` = '' (0.00043 s)
Then I clicked on U-SRV plugin link:
Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'u12345p12345_yourls.usrv' doesn't exist in /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php:748 Stack trace: #0 /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute() #1 /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(523): Aura\Sql\ExtendedPdo->perform('SELECT * FROM `...', Array) #2 /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/usrv/plugin.php(86): Aura\Sql\ExtendedPdo->fetchObjects('SELECT * FROM `...') #3 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(622): usrv_do_page() #4 /home/u12345p12345/domains/mydomain.com/public_html/admin/plugins.php(8): yourls_plugin_admin_page('usrv') #5 {main} thrown in /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748
Original File Name Hashed Name
The complete webserver logs of the above events are:
(the last log entries are were I disabled all your plugins to see if I could have u-srv to recreate the table, but alas, it didn't)
[Fri Jul 24 13:33:19.370778 2020] [lsapi:notice] [pid 32266:tid 140199677851392] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:33:19.370983 2020] [lsapi:notice] [pid 32266:tid 140199677851392] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:33:19.371087 2020] [lsapi:notice] [pid 32266:tid 140199677851392] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:33:19.371195 2020] [lsapi:notice] [pid 32266:tid 140199677851392] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:34:45.782391 2020] [lsapi:notice] [pid 21630:tid 140199375714048] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:34:45.782494 2020] [lsapi:notice] [pid 21630:tid 140199375714048] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:34:45.782549 2020] [lsapi:notice] [pid 21630:tid 140199375714048] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:34:45.782612 2020] [lsapi:notice] [pid 21630:tid 140199375714048] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:35:47.440374 2020] [lsapi:notice] [pid 32666:tid 140199719814912] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Warning: copy(assets/srv.php): failed to open stream: No such file or directory in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/usrv/plugin.php on line 420\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:35:47.441728 2020] [lsapi:notice] [pid 32666:tid 140199719814912] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:35:47.441834 2020] [lsapi:notice] [pid 32666:tid 140199719814912] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:35:47.441957 2020] [lsapi:notice] [pid 32666:tid 140199719814912] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:35:47.442068 2020] [lsapi:notice] [pid 32666:tid 140199719814912] [client 82.169.x.xxx:63135] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:37:12.455940 2020] [lsapi:notice] [pid 3951:tid 140199778563840] [client 82.169.x.xxx:63340] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=activated
[Fri Jul 24 13:37:12.455994 2020] [lsapi:notice] [pid 3951:tid 140199778563840] [client 82.169.x.xxx:63340] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=activated
[Fri Jul 24 13:37:12.456013 2020] [lsapi:notice] [pid 3951:tid 140199778563840] [client 82.169.x.xxx:63340] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=activated
[Fri Jul 24 13:37:12.456116 2020] [lsapi:notice] [pid 3951:tid 140199778563840] [client 82.169.x.xxx:63340] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=activated
[Fri Jul 24 13:39:07.645709 2020] [lsapi:error] [pid 32266:tid 140199501604608] [client 82.169.x.xxx:63451] [host mydomain.com] Backend fatal error: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'u12345p12345_yourls.usrv' doesn't exist in /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php:748\nStack trace:\n#0 /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute()\n#1 /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php(523): Aura\\Sql\\ExtendedPdo->perform('SELECT * FROM `...', Array)\n#2 /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/usrv/plugin.php(86): Aura\\Sql\\ExtendedPdo->fetchObjects('SELECT * FROM `...')\n#3 /home/u12345p12345/domains/mydomain.com/public_html/includes/functions-plugins.php(622): usrv_do_page()\n#4 /home/u12345p12345/domains/mydomain.com/public_html/admin/plugins.php(8): yourls_plugin_admin_page('usrv')\n#5 {main}\n thrown in /home/u12345p12345/domains/mydomain.com/public_html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748\n, referer: https://mydomain.com/admin/plugins.php?success=activated
[Fri Jul 24 13:40:22.966758 2020] [lsapi:notice] [pid 32266:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:40:22.966813 2020] [lsapi:notice] [pid 32266:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:40:22.966833 2020] [lsapi:notice] [pid 32266:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:40:22.966851 2020] [lsapi:notice] [pid 32266:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php
[Fri Jul 24 13:40:27.869785 2020] [lsapi:notice] [pid 2743:tid 140199451248384] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:27.869884 2020] [lsapi:notice] [pid 2743:tid 140199451248384] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:27.869969 2020] [lsapi:notice] [pid 2743:tid 140199451248384] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:27.870038 2020] [lsapi:notice] [pid 2743:tid 140199451248384] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:33.793735 2020] [lsapi:notice] [pid 3951:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:33.793835 2020] [lsapi:notice] [pid 3951:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:33.793902 2020] [lsapi:notice] [pid 3951:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:33.793988 2020] [lsapi:notice] [pid 3951:tid 140199518390016] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:39.656015 2020] [lsapi:notice] [pid 3951:tid 140199543568128] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:39.656160 2020] [lsapi:notice] [pid 3951:tid 140199543568128] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:39.656257 2020] [lsapi:notice] [pid 3951:tid 140199543568128] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:39.656365 2020] [lsapi:notice] [pid 3951:tid 140199543568128] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:43.429775 2020] [lsapi:notice] [pid 32266:tid 140199593924352] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:43.429830 2020] [lsapi:notice] [pid 32266:tid 140199593924352] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:43.429850 2020] [lsapi:notice] [pid 32266:tid 140199593924352] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:43.429881 2020] [lsapi:notice] [pid 32266:tid 140199593924352] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:47.414846 2020] [lsapi:notice] [pid 2743:tid 140199384106752] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:47.414970 2020] [lsapi:notice] [pid 2743:tid 140199384106752] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:47.415034 2020] [lsapi:notice] [pid 2743:tid 140199384106752] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:47.415099 2020] [lsapi:notice] [pid 2743:tid 140199384106752] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:53.583521 2020] [lsapi:notice] [pid 2743:tid 140199644280576] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:53.583669 2020] [lsapi:notice] [pid 2743:tid 140199644280576] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:53.583766 2020] [lsapi:notice] [pid 2743:tid 140199644280576] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:53.583874 2020] [lsapi:notice] [pid 2743:tid 140199644280576] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:56.269375 2020] [lsapi:notice] [pid 2743:tid 140199459641088] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:56.269530 2020] [lsapi:notice] [pid 2743:tid 140199459641088] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:56.269627 2020] [lsapi:notice] [pid 2743:tid 140199459641088] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:56.269732 2020] [lsapi:notice] [pid 2743:tid 140199459641088] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:59.180340 2020] [lsapi:notice] [pid 2743:tid 140199308572416] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:59.180423 2020] [lsapi:notice] [pid 2743:tid 140199308572416] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:59.180462 2020] [lsapi:notice] [pid 2743:tid 140199308572416] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:40:59.180498 2020] [lsapi:notice] [pid 2743:tid 140199308572416] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:41:05.962016 2020] [lsapi:notice] [pid 3951:tid 140199610709760] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:41:05.962163 2020] [lsapi:notice] [pid 3951:tid 140199610709760] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:41:05.962262 2020] [lsapi:notice] [pid 3951:tid 140199610709760] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:41:05.962371 2020] [lsapi:notice] [pid 3951:tid 140199610709760] [client 82.169.x.xxx:63535] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:42:19.186694 2020] [lsapi:notice] [pid 32266:tid 140199468033792] [client 82.169.x.xxx:63637] [host mydomain.com] Backend log: PHP Notice: yourls_escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:42:19.186772 2020] [lsapi:notice] [pid 32266:tid 140199468033792] [client 82.169.x.xxx:63637] [host mydomain.com] Backend log: PHP Notice: yourls_escape_real is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:42:19.186807 2020] [lsapi:notice] [pid 32266:tid 140199468033792] [client 82.169.x.xxx:63637] [host mydomain.com] Backend log: PHP Notice: $ydb->escape is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:42:19.186841 2020] [lsapi:notice] [pid 32266:tid 140199468033792] [client 82.169.x.xxx:63637] [host mydomain.com] Backend log: PHP Notice: $ydb->get_var is <strong>deprecated</strong> since version 1.7.3! Use PDO instead. in /home/u12345p12345/domains/mydomain.com/public_html/includes/functions.php on line 2226\n, referer: https://mydomain.com/admin/plugins.php?success=deactivated
[Fri Jul 24 13:44:46.241168 2020] [lsapi:notice] [pid 17046:tid 140199761778432] [client 82.169.x.xxx:63637] [host mydomain.com] Backend log: PHP Warning: copy(assets/srv.php): failed to open stream: No such file or directory in /home/u12345p12345/domains/mydomain.com/public_html/user/plugins/usrv/plugin.php on line 420\n, referer: https://mydomain.com/admin/plugins.php
A few notes.
- Notice how I formatted your comments. This is good etiquette moving forward. A pastebin is also a good option.
- Expiry does not rely on U-SRV.
Please openI opened a separate issue for that, as is appropriate. - Following that, in order to isolate your issue, it is good to create a testing environment. It is good to disable all other plugins first.
Now to your reports:
- Expiry is moving to InnoDB. f66eee9 finalizes this. On table creation it should be InnoDB moving forward.
- There is a fatal error related to
yourls_get_keyword_stats()
not being defined in your logs. That function was introduced in YOURLS 1.7.10 as indicated here. Just use the latest YOURLS from git by downloading from the link as indicated below:
yourls_escape
,yourls_escape_real
,$ydb->escape
, and$ydb->query
are all mentioned in your logs. This tells me that you are using a plugin that has not been updated in some time. You will need to isolate which one, and address that with a separate issue elsewhere. It looks likedont-log-crawlers
is showing up in your logs a lot around those errors. That plugin has not been updated in some time. I would look in that direction.
It seems to be working. But what I don't understand is what happens after a link expired. Now it seems that it's just replaced, it overwrites the old link. Is that how it should be?
Can you disable the other plugins and test expiry in isolation?
Let's start where this began.
- Deactivate this plugin and delete your Expiry table. Manually, via the options, doesn't matter. If you use the latest version of this plugin (2.3.3) database recreation just work regardless of your choice here.
- Disable all other plugins.
- Update to the latest YOURLS as mentioned above, and get latest version of this plugin.
- Clear your browser cache for your installation of YOURLS. Just do it, I don't care if you use safe browsing. Humor the dev.
- Enable the plugin.
Any logs before this point are just noise. Do your testing at this point without enabling any other plugin.
Yeah I forgot to mention: done, done, done, done, done.
When I edit a link from the admin main page and click on expiry to edit an existing link (non-expiry) and entered 2 clicks for that link, I got this error:
Notice: Undefined variable: count in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1116
Notice: Undefined variable: fresh in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1117
Notice: Undefined variable: stale in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1118
Yeah I forgot to mention: done, done, done, done, done.
So, if you are running YOURLS 1.7.10 and Expiry 2.3.3, and have not enabled any other plugin, then we can proceed. Please note, I just updated this plugin to 2.3.3 a few moments before posting my reply above.
I take it that the database remains unchanged, and that nothing appears in the Expiry List tab?
Your issue there is the same that you mentioned here #26 (comment). I attempted to address this issue with dd08a22 as stated here #26 (comment).
I cannot seem to reproduce this error at this time using the code bases referred to above.
I have
- selected an existing short-link from the admin page and clicked the expiry button
- after being taken to the Expiry List tab I then added a click-type expiry with 99 clicks
- I receive no errors on screen. The Expiry List shows the correct information.
- I checked all logs, nothing is written to the logs.
Here is my database afterwards:
Does the same behavior happen for you when you attempt a clock type expiry? Separately, can you add expiry data to new links as you create them?
It seems to be working.
I didn't see this comment when I added my last. When you said that it seems to be working, what do you mean? It is working with new links, but not old?
But what I don't understand is what happens after a link expired.
Separate issue.
When I wrote "it seems to be working" I was referring to the fact that it seemed to be working when a) adding a short URL from fresh, from the admin main page. I wrote "seemed" because I hadn't tested from b) clicking the expiry link next to an existing link and then adding expiration details or c) from entering it directly in the expiray page either by copy-pasting the short URL code or from memory.
The "Undefined variable" errors as reported twice by me in the comments ONLY exist with YOURLS 1.7.10 -- Not with 1.7.9
As 1.7.9 is the last official release don't you think that the version to support?
Anyway, once more I cleared everything and ran it again. I can add to the above three lines
That this is also shown with the three PHP "Undefined variable" errors:
You can add an Expiry condition to a link that is already in the database
And in the YOURLS debug output:
Could not store cookie: headers already sent in /home/user123/domains/mydomain.com/public_html/includes/functions-html.php on line 788
Then the table is shown with the Alias entered (in it is the short code) and in the Expiry Type is also the same value (the short code) as in the Alias field. The other fields (ao Clicks and Timer fields) are empty.
Checking with PHPmyadmin, the other fields are NULL.
Regarding your question "Does the same behavior happen for you when you attempt a clock type expiry? Separately, can you add expiry data to new links as you create them?" -- the answer is: yes, it happens with both expiry types.
So it still works for you when adding expiry data to a new link, and still does not when adding either click or time based expiry data to an old link via the Expiry List tab, where it fails with the following errors:
Notice: Undefined variable: count in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1116
Notice: Undefined variable: fresh in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1117
Notice: Undefined variable: stale in /home/user123/domains/mydomain.com/public_html/user/plugins/expiry/plugin.php on line 1118
That is certainly odd, as I am using YOURLS 1.7.10 and Expiry 2.3.3 and I receive no such errors.
The above errors refer to variables in the following array
YOURLS-Expiry/expiry/plugin.php
Lines 1114 to 1119 in 4f4dca6
Those variables are systematically defined by arguments which precede it in the code. I cannot find any errors in those arguments. I invite you to explore that code, specifically the function which begins here
YOURLS-Expiry/expiry/plugin.php
Line 995 in 4f4dca6
That function is also called when adding expiry data to an old link via an API call. Consider testing the API call for that, documentation can be found in the Expiry admin page.
The line that you are reporting that is added to the errors only appears in the code here
YOURLS-Expiry/expiry/plugin.php
Line 222 in 4f4dca6
This is HTML for the plugin admin page, and it is displayed here
That should seriously not be appearing in any logs, and I strongly suspect that there is something in your shared hosting environment responsible for this, and likely your other errors as well.
As 1.7.9 is the last official release don't you think that the version to support?
I tend to develop against the most up to date commit against a MASTER branch. However, I rolled back the changes and put them in another branch here: https://github.com/joshp23/YOURLS-Expiry/tree/1.7.9-compat
Try your luck against that. If it works I'm puzzled.
Closing this with the strong inclination that this was a shared hosting issue. I might add to the readme that shared hosting environments are ineffective for this plugin, etc.