0

I just started with phing. Below is my code. There are no errors coming regarding connection. The only error it is giving is File could not be uploaded.

I don't have a clue how to resolve this. I mean I am not really able to debug this with this small information. Can anyone tell how to debug this? The wierd thing is phing was able to create/upload folder but it was unable to upload file in that folder. Am I missing something here?

<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="deploy" basedir="." description="a demo project">
 <property name="message" value="Hello World!"/>
 <property name="builddir" value="build"/>
 <property name="srcDir" value="src"/>
 <property name="ftp.destination.host" value="<host>"/>
 <property name="ftp.destination.port" value="<port>"/>
 <property name="ftp.destination.username" value="<user>"/>
 <property name="ftp.destination.password" value="<pass>"/>
 <property name="ftp.destination.dir" value="/upload"/>
 <property name="ftp.destination.mode" value="binary"/>

 <target name="deploy">
    <echo msg="preparing local build directory..." />
    <delete dir="${builddir}" />
    <mkdir dir="${builddir}" />
    <copy todir="${builddir}" overwrite="true">
        <fileset dir="./" id="Files">
            <include name="**" />
            <exclude name="build/" />
            <exclude name="build.*" />
            <exclude name="docs/" />
            <exclude name="tests/" />
        </fileset>
    </copy>

    <echo msg="FTPing up build..." />
    <ftpdeploy
        host="${ftp.destination.host}"
        port="${ftp.destination.port}"
        username="${ftp.destination.username}"
        password="${ftp.destination.password}"
        dir="${ftp.destination.dir}"
        mode="${ftp.destination.mode}" >
        <fileset dir="${builddir}">
            <include name="**" />
        </fileset>
    </ftpdeploy>

    <echo msg="Site deployed..." />
</target>


</project>
user1346107
  • 157
  • 4
  • 11
  • ftpdeploy node shoud be child of target node i guess – cske Aug 22 '13 at 07:45
  • I edited my file I still get same issue.The wierd thing is phing was able to create/upload folder but it was unable to upload file in that folder – user1346107 Aug 22 '13 at 09:12

1 Answers1

2

Try adding the attribute

passive="true"

in the ftpdeploy tag.

Joel
  • 4,732
  • 9
  • 39
  • 54
Carlos T
  • 21
  • 2