[PHP-DB] mssql_connect error only on command line

2008-04-02 Thread Molteni Davide
Hi, I have a problem with all my php scripts that use MS SQL Server, but only when I start them from the command line I'm using Apache 2.2.4 with PHP 5.2.5 on a server Win2k3 with SP2, and MS SQL Server 2000 on another Win2k3 server. If I run the same script using a webbrower as an internet page

Re: [PHP-DB] mssql_connect error only on command line

2008-04-02 Thread Krister Karlström
Hi! That description did not help us very much... I think you're just connecting using the wrong credentials, or using no at all. From where do you grab the hostname, username and password? Maybe it's stored in your session or something, and that session is not working in your command line

Re: [PHP-DB] mssql_connect error only on command line

2008-04-02 Thread Molteni Davide
Hi, thanks for your quick answer, but in the script I don't use sessions variables to store host, user and password, I wrote something like that: $sc=mssql_connect(hostname,1433,userid,password); Can you please tell me where I can find information about how to design scripts for either the

Re: [PHP-DB] mssql_connect error only on command line

2008-04-02 Thread Krister Karlström
Hi! Please have a look at the manual pages (if you have not allready done that). There might be some information for you in the user comments: http://www.php.net/manual/en/function.mssql-connect.php Manual page about command line scripting:

Re: [PHP-DB] mssql_connect error only on command line

2008-04-02 Thread Molteni Davide
Hi, I red the http://www.php.net/manual/en/function.mssql-connect.php in a more accurate manner, and I found an user contribution note suggesting to substitute the ntwdblib.dll with a newer one. The version of the old (original from the PHP v5.2.5 installation) is 2000.2.8.0 and the newer version

[PHP-DB] php + mysql + copy file

2008-04-02 Thread Emiliano Boragina
Hello I have the next code: -- archive_a_subir.php -- form action=archivo_subir.php method=post enctype=multipart/form-data input type=file name=file input type=submit value=ADJUNTAR ARCHIVO /form In archive_subir.php: ? $carpeta = subidos; // nombre de

Re: [PHP-DB] php + mysql + copy file

2008-04-02 Thread Chris
$carpeta = subidos; // nombre de la carpeta ya creada. chmool 777 (todos los permisos) copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE ['file']['name']); It's $_FILES not $_FILE (an 's' on the end). It's always worth using error_reporting(E_ALL) and