Jump to content

Rederick

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by Rederick

  1. Hi, I have a script that simply downloads five files from an ftp server.
    I do this

    [code]$ftp_server = "example.com";
    $ftp_user_name  = "username";
    $ftp_user_pass = "pass";

    // set up basic connection
    $conn_id = ftp_connect($ftp_server);


    // login with username and password
    $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

    ftp_cdup($conn_id);
    ftp_chdir($conn_id, "directory/subdirectory");

    $server_file = "serverfile.zip";
    $local_file = "localfile.zip";
    ftp_get($conn_id, $local_file, $server_file, FTP_BINARY);[/code]

    Which was working for a while then now the server seems to be losing my authentication, and it is asking the script to send autentication again, then it doesn't and the script is unable to complete the dowload.

    My Question is, is there a way to force that the authentication to the FTP Server stays for the entire time the script runs, or somehow check if it needs to be resent.

    Thanks for any Advice..

    Red.
  2. I installed mysql, using wamp. I created a php script using dreamweaver. I can see my database and tables, but when I do a call to them I get an error:

     

    Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\ru playing\manage.php on line 13

     

    I do the following in my script:

     

    function doDB() {

    global $conn;

    //connect to server and select database; you may need it

    $conn = mysql_connect("localhost", "user", "password") or die(mysql_error());

    mysql_select_db("ruplaying",$conn) or die(mysql_error());

    }

    Of course I am using my userid and password.

     

    The database is spelled corretly. Why would I be getting this area.

     

    Is the code different when using dreamweaver?  I used a site to set this up in dreamweaver?  Does mysql.exe need to be in the path statement.  I also found out I have to do to c:\wamp\mysql\bin to create tables and databases or use phpadmin.

     

    Am I doing something wrong?

    Thanks

    Dee

    249214[/snapback]

     

    Ok do this... make a .php page say "info.php"

    then inside the file put

    <?php

    phpinfo();

    ?>

    Then go there in your webbrowser... If you can see a section about mysql then this is not your problem, but I suspect from that error message that php is not set up to support mysql....this might be of use

    http://www.siteinaweek.com/installphp5/howto.php

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.