How would you DEBUG that message & interpret it?

I’m getting strange Error messages with Paths. Before it was all working. I’m not sure where to start DEBUG that? Of course I can delete all the image steps in my server actions again and again. But how would you start with that error here and what it tells you?

{"code":0,"file":"C:\\xampp\\htdocs\\project\\dmxConnectLib\\lib\\core\\Path.php","line":41,"message":"Invalid Path! ","trace":"#0 C:\\xampp\\htdocs\\project\\dmxConnectLib\\modules\\image.php(32): lib\\core\\Path::toSystemPath(NULL)\n#1 C:\\xampp\\htdocs\\project\\dmxConnectLib\\lib\\App.php(159): modules\\image->load(Object(stdClass), 'image1')\n#2 C:\\xampp\\htdocs\\project\\dmxConnectLib\\lib\\App.php(128): lib\\App->execSteps(Object(stdClass))\n#3 C:\\xampp\\htdocs\\project\\dmxConnectLib\\lib\\App.php(98): lib\\App->execSteps(Array)\n#4 C:\\xampp\\htdocs\\project\\dmxConnectLib\\lib\\App.php(71): lib\\App->exec(Object(stdClass))\n#5 C:\\xampp\\htdocs\\project\\dmxConnect\\api\\Server Actions\\Clients\\C_quickadvert\\C_quickadvert.php(8): lib\\App->define(Object(stdClass))\n#6 {main}"}<br />
<b>Fatal error</b>:  Uncaught ErrorException: imagedestroy() expects parameter 1 to be resource, null given in C:\xampp\htdocs\project\dmxConnectLib\lib\image\Processor.php:25
Stack trace:
#0 [internal function]: exception_error_handler(2, 'imagedestroy() ...', 'C:\\xampp\\htdocs...', 25, Array)
#1 C:\xampp\htdocs\project\dmxConnectLib\lib\image\Processor.php(25): imagedestroy(NULL)
#2 [internal function]: lib\image\Processor-&gt;__destruct()
#3 {main}
  thrown in <b>C:\xampp\htdocs\project\dmxConnectLib\lib\image\Processor.php</b> on line <b>25</b><br />

Do you have a server action named ‘Path’? Inside that action could you have a path to a folder or file that cannot be found?

Yes, it seems the path provided to the file is wrong. OR the file does not exist there.

For what it’s worth… I get those errors often, especially when I am in a rush, thus it is caused by a mistake on entering the path information, etc. However, I have found that more times it is due to the files not fully uploading the most recent files to the server. Especially when I am making a lot of changes locally and then rushing over to see how the page looks.

So I slow down and walk slowly through the steps, then do a page refresh and then publish it. Afterward, it’s quite rewarding that after all the frustration to see that it works perfectly! – just like the programmers designed it. :sunglasses:

@Freddy_Blockchain

I think I had this error, when using the Image upload, and the uploaded file was larger than 2MB. Nothing gets uploaded above that value, hence the incorrect path.

I solved this issue by changing “post_max_size=2MB” to 8MB in the php.ini file, then restating the Apache server in Xampp . Of course the number of MB depends on your needs,

Hope this helps.

2 Likes

That was it! That was also the reason why I thought it was working and then after some days not… cause the use of different Filesize. @Teodor path etc was correct, uff finally got it!

1 Like

@smwebmedia and @Teodor Again I get that error message. Not sure what it is. Is there some other way how to track that annoying bug down? I mean it says me smth with file path and I thought its the filesize problem (yes there is also a filesize problem) but thats a second error. I’m stuck with that filehandling. Maybe some best practice?

I used already all the tutorials, used all kind of File Upload Steps with Overwrite, Path, replace etc etc, used new LoadFile with all variants of Path settings with slash, backslash, escaping, etc etc. But fileupload works… it gives me still that annoying bug… also checked if maybe Insert Fileupload Action is loaded to early… but its not.

Fileupload works like a charm, but gives me still that shitty Message… Maybe its an error in Server Connect where I try to pass a PATH ??

Okay after spending about 3 hours without any success. My old pages are still working and I try to figure out what could be wrong… :sob:

  1. File Upload step works.
  2. If i put “Load Image” it throws me that error message… posted on my first message…

Then there is an issue with the path you are trying to load.
Can you place a screenshot of this step?

1 Like

@Teodor sure I‘ll post that!

Ok @Teodor

Here is my Load Image step with Detail View

That is the correct binding.
There must be something else wrong. Please zip and send me your server action in a private message so i can inspect it.

1 Like

ok let me check that. Also tried to fix the path absolutely. I get then another error message.

You should not manually edit paths that are used within the server connect, as that will break everything. Paths in server connect must always be generated by the UI!

Yes sure. I just tried everything to see what happens… :smiley:

Maybe if its easier for you I could show u via Teamviewer