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->__destruct()
#3 {main}
thrown in <b>C:\xampp\htdocs\project\dmxConnectLib\lib\image\Processor.php</b> on line <b>25</b><br />
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.
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,
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!
@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 ??
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!