Announcement

Collapse
No announcement yet.

Error executing blank in command line

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error executing blank in command line

    Hi i have a blank application that is working fine when executed on a browser, but i need to execute it on a cron so i have to execute at command line and when i do that i get the error tha is on my image .
    i am using this command
    C:\>C:\wamp\bin\php\php5.4.12\php.exe C:\wamp\www\portalpk\export_clientes\export_client es.php
    the paths are correct.
    i have tried to execute in C:\wamp\www\portalpk\export_clientes but stil give me the error that cannot find dll.

    the code of the blank is simple:
    $filename=$this->Ini->path_doc.'\export_web_func.csv';
    $output = fopen( $filename, "w");

    fputcsv($output, array('login', 'pswd', 'name', 'email', 'active','activation_code','priv_admin'));


    $check_sql = "SELECT sec_users.login, pswd, name, email, active,activation_code,priv_admin FROM sec_users LEFT OUTER JOIN sec_users_groups ON sec_users.login = sec_users_groups.login where group_id='3'";
    //sc_lookup(rs, $check_sql);


    sc_select(meus_dados, $check_sql);
    if ({meus_dados} === false)
    {
    echo "Erro de acesso. Mensagem = ";
    }
    else
    {
    while (!$meus_dados->EOF){

    fputcsv($output,array($meus_dados->fields[0],$meus_dados->fields[1],$meus_dados->fields[2],$meus_dados->fields[3],$meus_dados->fields[4],$meus_dados->fields[5],$meus_dados->fields[6]));
    $meus_dados->MoveNext();
    }
    $meus_dados->Close();
    }

    fclose($output);

    Can anyone help me please
    Attached Files

  • #2
    If the files do exists then the only logical explanation is that you cannot access these files from the cron environment due to insufficient rights. Other option is that you are running php from another server in cron so that you have a different server and/or folder.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment

    Working...
    X