elkuku / EasyCreator

EasyCreator helps creating extensions for the Joomla! CMS
http://extensions.joomla.org/extensions/miscellaneous/development/5908
50 stars 23 forks source link

deploy package hints #19

Open adamjakab opened 11 years ago

adamjakab commented 11 years ago

I really like elkuku's work and I think this project has excellent potentials.

LNX+J!2.5.11+EC0.0.19: I had a problem deploying packages so i followed the flow and I have identified 2 bugs:

file: com_easycreator/helpers/deployer/ftp.php

1) I had special characters in my ftp password like "[" and "]" and probably others but on connection @line: ~260 method: connect() the value of $credentials->pass is already cleand up (stripping some special chars) missing at least these two characters (and probably some others) - since i was in a rush i changed my ftp password and this one was resolved but this is a bug to be corrected surely. Moreover, even though it was trying to connect with bad pwd and failing, exception in @line:~270 is NOT thrown - so i took some time to figure this out because i did not get error msg "Unable to connect to FTP server".

2) @line:~47 method deployPackage: there is something fishy because after having chdir-ed into downloads dir($this->ftp->chdir($this->credentials->downloads)) which should throw an error on failure, the store command included the same path again ($this->ftp->store($file, $this->credentials->downloads.'/'.$fName)) - failing miserably. changing that to: $this->ftp->store($file, $fName) resolves the problem immediately. Also, I just noticed that the chdir command put inside the loop this way requires that you put "/" in front of your download dir otherwise if you try to deploy multiple packages it will fail from the second one on.

hope it helps Thanks elkuku!