Unknown image error

Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Hi, I don't know what happened, as far as I remember didn't change anything for the week, didn't rename directories, or anything, everything worked fine, but now when I'm trying to upload an image I get an error, something like that (Custom error handler enabled):

Code: 2, unlink(/var/www/site.com/public_html/blog/bl-content/tmp/9h3wAm8WJ00.jpg): No such file or directory, in file : /var/www/site.com/public_html/blog/bl-kernel/helpers/filesystem.class.php , line 74 , Time: 10:28

Code: 2, imagesx() expects parameter 1 to be resource, bool given, in file : /var/www/site.com/public_html/blog/bl-kernel/helpers/image.class.php , line 16 , Time: 10:29

I don't have an idea what happened.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Does the same happen with another picture?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Edi wrote: Fri Jun 19, 2020 11:02 am Does the same happen with another picture?
Yes it does, any type of picture, already uploaded images are fine.
For example, trying to upload 28kb of image:

Code: 2, unlink(/var/www/site.com/public_html/blog/bl-content/tmp/sn,x1000-pad,750x1000,f8f8f8.u4.jpg): No such file or directory, in file : /var/www/site.com/public_html/blog/bl-kernel/helpers/filesystem.class.php , line 74 , Time: 1...

Deployed new pure instance of Bludit, no such problems, I don't get it.
I don't remember editing of core files, would be grateful if you can tell me how do I fix it?

I'm going to replace bl-kernel directory with original, let's see what will happen, I'll tell.
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

So I replaced bl-kernel directory, but got the same error so lemme tell you what, as I said, I had a custom error handler, that's good when you get error notification instantly, so I deleted from its code die(); function and image uploading worked( :) ) BUT, I perfectly remember that it worked with handler also, and there wasn't any errors, also there still exists an error, not crucial ( but I don't like 'em! :shock: ) , which is:

Code: 2, unlink(/var/www/site.com/public_html/blog/bl-content/tmp/eyyy_senorita.jpg): No such file or directory, in file : /var/www/site.com/public_html/blog/bl-kernel/helpers/filesystem.class.php , line 74 , Time: ...

Is this is a fatal error? As far I know it shouldn't be happening.

Error handler function btw, if I'm wrong with something:

Code: Select all

function customErrorE($errno, $errstr, $errfile, $errline) {
$dateE = date("H:i");
$proxyE = 'localhost:9050';
$visitor_ip = $_SERVER["HTTP_CF_CONNECTING_IP"] . "@" . $_SERVER["HTTP_CF_IPCOUNTRY"] ?? 'Not Found';
$chE = curl_init("https://api.telegram.org/bot123:123TOKEN/sendMessage?chat_id=1023&text=" . ' Code: ' . $errno . ', ' . $errstr . ', in file : ' . $errfile . ' , line ' . $errline . ' , Time: '. $dateE . ", IP@Country: " . $visitor_ip);
curl_setopt($chE, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($chE, CURLOPT_RETURNTRANSFER, true);
curl_setopt($chE, CURLOPT_PROXY, $proxyE);
curl_setopt($chE, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
$resultE = curl_exec($chE);
}
//set error handler
set_error_handler("customErrorE", E_ALL);
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Wrong call, it happens in pure Bludit installation also, it tries to delete images that are already deleted.
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Edi wrote: Fri Jun 19, 2020 11:02 am
Hi Edi, once again.
Since I'm not good in programming stuff, I wanted to ask you about routing.
How can I interact with location and give user edited content?
I have an url:
site.com/some-page
I wan't to give user a page without additional theme characteristics, only pure text with $page->content() and $page->title() in this url:
site.com/some-page/clean

Also if I succeed with building seo friendly AMP page, I wan't to make a plugin for that so I need to inject link containing clean page to <head> of a ordinal page.
Can you give examples?
Or there already exists some plugin for this?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Jacob wrote: Thu Jun 25, 2020 7:22 am How can I interact with location and give user edited content?
I'm not sure if I understand your question... And yes, I'm not a a programer. ;-)

But what about the API?
Also if I succeed with building seo friendly AMP page, I wan't to make a plugin for that so I need to inject link containing clean page to <head> of a ordinal page.
I don't know. I have never done any AMP stuff.

But there were discussions about it:

viewtopic.php?f=21&t=1723

viewtopic.php?f=21&t=1235
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Edi wrote: Fri Jun 19, 2020 11:02 am
Hi Edi, I posted the AMPER plugin, but to my regret, I couldn't be able to upload screenshot due to insufficient push rights, if it is possible I'd like to place that image:
Attachments
amper.png
amper.png (40.66 KiB) Viewed 3191 times
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Jacob wrote: Fri Jun 26, 2020 9:28 am
Edi wrote: Fri Jun 19, 2020 11:02 am
Hi Edi, I posted the AMPER plugin, but to my regret, I couldn't be able to upload screenshot due to insufficient push rights, if it is possible I'd like to place that image:
Alright thanks, sorry if I bothered you with many pull requests, I hope everybody will like it.
Cheers :D
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Jacob wrote: Fri Jun 26, 2020 3:55 pm Alright thanks, sorry if I bothered you with many pull requests, I hope everybody will like it.
Cheers :D
No problem. Thank you for your contribution!
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply