Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Just a quick tip regarding ftp connections from within webpages

Discussion in 'Workarounds and Optimization' started by durangod, Oct 1, 2016.

  1. durangod

    durangod Well-Known Member

    May 12, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    If your ftp works with for example filezilla, but it does not connect when you try to connect from inside a web page or admin section of a website. One problem might be if your password starts with a $ or has a $ inside of it(other than at the end).

    The reason is that if the website software pulls the data for password as "password" (double quotes) then what happpens is that it thinks its a variable not text data.

    For example: your password might be $12345 but the software sees it as and empty variable called $12345 which is null and which is why it fails.

    Another example: your password is 123$45, in this case the software sees it as 123 because when it sees the $ it thinks thats a variable which is empty so the result is 123

    So if you have tried everything you know and your pulling your hair out trying to get your ftp inside a webpage to work then there are two things you can do.

    1. Move your $ in your password to the very end of the password, the system will take it.
    2. Find where the data is loaded into the array or variable from the webpage form or the php file and where it shows the loading of the variable and you can change the code from "password" to 'password' (single quotes) as single quoted items are taken as is. You need to do this at the first instance of the value storage because after that its wrong all the way through the process. However if there are other places in the process that use "password" you will need to change those as well along the whole ftp connection process.

    Obviously the easiest way is just change the password.

    Hope this helps someone bypass the frustration. :)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael and rpvw like this.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Thanks for taking the time to provide us with this tip!
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice