php-windows Digest 30 Nov 2004 13:40:34 -0000 Issue 2489

Topics (messages 25065 through 25080):

cannot send mail via localhost
        25065 by: Ross Hulford
        25066 by: Mike
        25067 by: Mike

Problemas con las igualdades
        25068 by: T4NG0

problem to open dir
        25069 by: Pravin-Kumar
        25070 by: Mike
        25071 by: Pravin-Kumar
        25072 by: Armando
        25075 by: Pravin-Kumar
        25076 by: Luis Moreira
        25077 by: Rafael Soares
        25078 by: Mike
        25079 by: re_action
        25080 by: Rafael Soares

Re: Difference between Installer and ZIP?
        25073 by: Armando

Re: Permission deny on connecting MS Access database
        25074 by: Emperor Kang Xi

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I am trying to test my form locally, however it doesn't get picked up  my 
mailbox.

The form is fine and I even set the access in IIS to 127.0.0.1 so the relay 
error is not a porblem anymore. This must be a setup problem.

Help please,


Ross 

--- End Message ---
--- Begin Message ---
This is going to require a lot more information from your end if you want
help.

Show some code, explain your mail server setup, explain any errors you
receive.

Also, can you telnet to port 25 on localhost? Does anything (e.g., the mail
server) respond? What's the result of a HELO?

-M 

> I am trying to test my form locally, however it doesn't get 
> picked up  my mailbox.
> 
> The form is fine and I even set the access in IIS to 
> 127.0.0.1 so the relay error is not a porblem anymore. This 
> must be a setup problem.

--- End Message ---
--- Begin Message ---
Please respond to the list.

You do realize that port 23 is the telnet port and not the SMTP port, right?
Why is your mail server responding on 23 and not 25?

What happens when you 

telnet localhost 25

And I'll repeat my request for some code...

-M

------------
The mail is a standar mailform. I jsut use IIS thought a mail server is in
place when Iinstalled it.

I get no errors. Telnet is working on port 23 "microsofts esmtp service
ready..."

Ross
----- Original Message -----
From: "Mike" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: "'Ross Hulford'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 30, 2004 2:14 AM
Subject: RE: [PHP-WIN] cannot send mail via localhost


> This is going to require a lot more information from your end if you want
> help.
>
> Show some code, explain your mail server setup, explain any errors you
> receive.
>
> Also, can you telnet to port 25 on localhost? Does anything (e.g., the 
> mail
> server) respond? What's the result of a HELO?
>
> -M
>
>> I am trying to test my form locally, however it doesn't get
>> picked up  my mailbox.
>>
>> The form is fine and I even set the access in IIS to
>> 127.0.0.1 so the relay error is not a porblem anymore. This
>> must be a setup problem.  

--- End Message ---
--- Begin Message ---
Listeros:

estoy tratando de establecer una igualdad y no logro comprender el 
funcionamiento, el código es el siguiente.

dado X archivos en mi directorio cuyo contenido puerde ser "ACTIVADO", 
"DESACTIVADO" o "NULO".

yo debo determinar el contenido de ellos.
el problema es que yo logro ver bien el contenido del archivo y lo puedo 
mostrar sin problemas (esa parte del script no la pastié) pero lo que no 
puedo hacer es determinar el contenido del archivo (la linea IF $leer == 
"ACTIVADO" me da o siempre falso o siempre verdadero pero nunca logro obtener 
un resultado coherente... ni con = ni con == ni con ===)

alguna idea gente ??

supongo que dada la hora mis neuronas ya no quieren funcionar y no veo cual es 
la pavada que me esta deteniendo...


for ($x = 40; $x< 154; $x++)
{
  [EMAIL PROTECTED]("./ws$x",'r');
  $leer = @fread($fp, 8192);

  settype($leer, "string");
 
  if ($leer=="ACTIVADO")
  {
    echo "ACTIVADO";
  } else {
    echo "DESACTIVADO";
  }
}


gracias y Saludos


Gastón.

--- End Message ---
--- Begin Message ---
hi all
i am getting some unexpected error while try to read a local dir..
it is working on the pc where apache is running ..but same code not 
working while trying from other pcs in lan..
here is code..
$dir="C:\Documents and Settings\pravin\Desktop\abcd2";
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
       while (($file = readdir($dh)) !== false) {
          echo "filename: $file : filetype: " . filetype($dir . $file) ."\n";
       }
       closedir($dh);
         }
        }

$dir = dir($source);


giving error:
Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): failed to 
open dir: Invalid argument in G:\Vyapar\AdvMgmt\addadvt3.php on line 
69

Fatal error: Call to a member function on a non-object in 
G:\Vyapar\AdvMgmt\addadvt3.php on line 70
 



---------
Experience is what you get when you didn't get what you wanted.
---------
Regards
Pravin Kumar
Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
http://geocities.com/pravin_suman/
http://pravindeo.blogspot.com

--- End Message ---
--- Begin Message ---
When you set the $dir variable, try doing so with single quotes - the \
character is used to escape things and might be causing some problems.

If that makes no sense, it's because I'm falling asleep.

Good luck.

-M 

> -----Original Message-----
> From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 30, 2004 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] problem to open dir
> 
> hi all
> i am getting some unexpected error while try to read a local dir..
> it is working on the pc where apache is running ..but same 
> code not working while trying from other pcs in lan..
> here is code..
> $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
> (is_dir($dir)) {
>     if ($dh = opendir($dir)) {
>        while (($file = readdir($dh)) !== false) {
>           echo "filename: $file : filetype: " . filetype($dir 
> . $file) ."\n";
>        }
>        closedir($dh);
>        }
>       }
> 
> $dir = dir($source);
> 
> 
> giving error:
> Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> failed to open dir: Invalid argument in 
> G:\Vyapar\AdvMgmt\addadvt3.php on line
> 69
> 
> Fatal error: Call to a member function on a non-object in 
> G:\Vyapar\AdvMgmt\addadvt3.php on line 70
>  
> 
> 
> 
> ---------
> Experience is what you get when you didn't get what you wanted.
> ---------
> Regards
> Pravin Kumar
> Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
> http://geocities.com/pravin_suman/
> http://pravindeo.blogspot.com
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
        
hi mike!
        $source='F:\cdac2';
        echo $source;
        if(is_dir($source)){echo "it is a dir.";}
        else{echo "it is not a dir..";}


i had tried ur suggestion .. not working dude :(
see i had one more thing .. it says "it is not a dir.."
please help me list...........

---------
Regards
Pravin Kumar

On Tue, 30 Nov 2004, Mike wrote:

> When you set the $dir variable, try doing so with single quotes - the \
> character is used to escape things and might be causing some problems.
> 
> If that makes no sense, it's because I'm falling asleep.
> 
> Good luck.
> 
> -M 
> 
> > -----Original Message-----
> > From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, November 30, 2004 12:37 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] problem to open dir
> > 
> > hi all
> > i am getting some unexpected error while try to read a local dir..
> > it is working on the pc where apache is running ..but same 
> > code not working while trying from other pcs in lan..
> > here is code..
> > $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
> > (is_dir($dir)) {
> >     if ($dh = opendir($dir)) {
> >        while (($file = readdir($dh)) !== false) {
> >           echo "filename: $file : filetype: " . filetype($dir 
> > . $file) ."\n";
> >        }
> >        closedir($dh);
> >      }
> >     }
> > 
> > $dir = dir($source);
> > 
> > 
> > giving error:
> > Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> > failed to open dir: Invalid argument in 
> > G:\Vyapar\AdvMgmt\addadvt3.php on line
> > 69
> > 
> > Fatal error: Call to a member function on a non-object in 
> > G:\Vyapar\AdvMgmt\addadvt3.php on line 70
> >  
> > 
> > 
> > 
> > ---------
> > Experience is what you get when you didn't get what you wanted.
> > ---------
> > Regards
> > Pravin Kumar
> > Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> > Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
> > http://geocities.com/pravin_suman/
> > http://pravindeo.blogspot.com
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Try changing your $dir variable to:

$dir="C:\\Documents and Settings\\pravin\\Desktop\\abcd2";

Failing that, try using the Documents and Settings shortname:

$dir="C:\Docume~1\pravin\Desktop\abcd2";

Or:

$dir="C:\\Docume~1\\pravin\\Desktop\\abcd2";

If none of these work, perhaps also try them and replace the double
quotes that enclose the string to single quotes.

I ran into a lot of issues myself when trying to access the windows
filesystem through PHP when using just single backslashes in my path
variables because, as Mike noted, the \ is typically used to escape
characters. In that case when PHP parses your $dir variable, it could be
stripping out the \ thinking they are escaping the next characters. As
soon as I used the double backslashes in my $dir variables on my own
pages, everything worked fine. Mind you, I then got annoyed with some
other Windows related issues so blew away my development box and put
Linux on it instead :-) But I digress...

Cheers.

Armando

-----Original Message-----
From: Mike [mailto:[EMAIL PROTECTED] 
Sent: November 29, 2004 11:06 PM
To: 'Pravin-Kumar'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] problem to open dir


When you set the $dir variable, try doing so with single quotes - the \
character is used to escape things and might be causing some problems.

If that makes no sense, it's because I'm falling asleep.

Good luck.

-M 

> -----Original Message-----
> From: Pravin-Kumar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 30, 2004 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] problem to open dir
> 
> hi all
> i am getting some unexpected error while try to read a local dir.. it 
> is working on the pc where apache is running ..but same code not 
> working while trying from other pcs in lan.. here is code..
> $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
> (is_dir($dir)) {
>     if ($dh = opendir($dir)) {
>        while (($file = readdir($dh)) !== false) {
>           echo "filename: $file : filetype: " . filetype($dir 
> . $file) ."\n";
>        }
>        closedir($dh);
>        }
>       }
> 
> $dir = dir($source);
> 
> 
> giving error:
> Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2):
> failed to open dir: Invalid argument in 
> G:\Vyapar\AdvMgmt\addadvt3.php on line
> 69
> 
> Fatal error: Call to a member function on a non-object in
> G:\Vyapar\AdvMgmt\addadvt3.php on line 70
>  
> 
> 
> 
> ---------
> Experience is what you get when you didn't get what you wanted.
> ---------
> Regards
> Pravin Kumar
> Technical Associate, CDAC, 68, E-City, Bangalore, 560100. Registered 
> Linux user #365056; Ph. +91 80 28523300 Extn:2103 
> http://geocities.com/pravin_suman/
> http://pravindeo.blogspot.com
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
hi list!
 
 $dest='F:/vyapar-2/test/cdaci'; or 
 $dest='F:\vyapar-2\test\cdaci'; or
 $dest='F:\\vyapar-2\\test\\cdaci'; or
 $dh = opendir($dest);
 $a=dir($dest);

the above code giving following problem on apache 1.3  on windows

Warning: opendir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid
argument in G:\Vyapar-2.0\test\1.php on line 10

Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid argument
in G:\Vyapar-2.0\test\1.php on line 11

--
Nothing is working i had tried \\ , /, "double quot", 'single quot'

---------
Regards
Pravin Kumar

On Tue, 30 Nov 2004, Mike wrote:

> When you set the $dir variable, try doing so with single quotes - the \
> character is used to escape things and might be causing some problems.
> 
> If that makes no sense, it's because I'm falling asleep.
> 
> Good luck.
> 
> -M 
> 
> > -----Original Message-----
> > From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, November 30, 2004 12:37 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] problem to open dir
> > 
> > hi all
> > i am getting some unexpected error while try to read a local dir..
> > it is working on the pc where apache is running ..but same 
> > code not working while trying from other pcs in lan..
> > here is code..
> > $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
> > (is_dir($dir)) {
> >     if ($dh = opendir($dir)) {
> >        while (($file = readdir($dh)) !== false) {
> >           echo "filename: $file : filetype: " . filetype($dir 
> > . $file) ."\n";
> >        }
> >        closedir($dh);
> >      }
> >     }
> > 
> > $dir = dir($source);
> > 
> > 
> > giving error:
> > Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> > failed to open dir: Invalid argument in 
> > G:\Vyapar\AdvMgmt\addadvt3.php on line
> > 69
> > 
> > Fatal error: Call to a member function on a non-object in 
> > G:\Vyapar\AdvMgmt\addadvt3.php on line 70
> >  
> > 
> > 
> > 
> > ---------
> > Experience is what you get when you didn't get what you wanted.
> > ---------
> > Regards
> > Pravin Kumar
> > Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> > Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
> > http://geocities.com/pravin_suman/
> > http://pravindeo.blogspot.com
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 

--- End Message ---
--- Begin Message ---
Remove the double quotes.

$dh = opendir('F:/vyapar-2/test/cdaci');


Pravin-Kumar wrote:

hi list!

$dest='F:/vyapar-2/test/cdaci'; or $dest='F:\vyapar-2\test\cdaci'; or
$dest='F:\\vyapar-2\\test\\cdaci'; or
$dh = opendir($dest);
$a=dir($dest);


the above code giving following problem on apache 1.3  on windows

Warning: opendir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid
argument in G:\Vyapar-2.0\test\1.php on line 10

Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid argument
in G:\Vyapar-2.0\test\1.php on line 11

--
Nothing is working i had tried \\ , /, "double quot", 'single quot'

---------
Regards
Pravin Kumar

On Tue, 30 Nov 2004, Mike wrote:



When you set the $dir variable, try doing so with single quotes - the \
character is used to escape things and might be causing some problems.

If that makes no sense, it's because I'm falling asleep.

Good luck.

-M



-----Original Message-----
From: Pravin-Kumar [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 30, 2004 12:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] problem to open dir


hi all
i am getting some unexpected error while try to read a local dir..
it is working on the pc where apache is running ..but same code not working while trying from other pcs in lan..
here is code..
$dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) ."\n";
}
closedir($dh);
}
}


$dir = dir($source);


giving error:
Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): failed to open dir: Invalid argument in G:\Vyapar\AdvMgmt\addadvt3.php on line
69


Fatal error: Call to a member function on a non-object in G:\Vyapar\AdvMgmt\addadvt3.php on line 70




--------- Experience is what you get when you didn't get what you wanted. --------- Regards Pravin Kumar Technical Associate, CDAC, 68, E-City, Bangalore, 560100. Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103 http://geocities.com/pravin_suman/ http://pravindeo.blogspot.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--- End Message ---
--- Begin Message ---
Hello!

The sintax I use is this:

$dir = 'C:\\dir\\subdir\\';

But I haven't tried to access windows dirs like Documents and Settings

The only way to be sure is using the is_dir(); function.

See you.

Rafael Soares - AgênciaM
Fone:  +55 11 4616-1394
 
-----Mensagem original-----
De: Luis Moreira [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 30 de novembro de 2004 08:04
Para: Pravin-Kumar
Cc: [EMAIL PROTECTED]
Assunto: Re: [PHP-WIN] problem to open dir

Remove the double quotes.

 $dh = opendir('F:/vyapar-2/test/cdaci');


Pravin-Kumar wrote:

>hi list!
> 
> $dest='F:/vyapar-2/test/cdaci'; or 
> $dest='F:\vyapar-2\test\cdaci'; or
> $dest='F:\\vyapar-2\\test\\cdaci'; or
> $dh = opendir($dest);
> $a=dir($dest);
>
>the above code giving following problem on apache 1.3  on windows
>
>Warning: opendir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid
>argument in G:\Vyapar-2.0\test\1.php on line 10
>
>Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid argument
>in G:\Vyapar-2.0\test\1.php on line 11
>
>--
>Nothing is working i had tried \\ , /, "double quot", 'single quot'
>
>---------
>Regards
>Pravin Kumar
>
>On Tue, 30 Nov 2004, Mike wrote:
>
>  
>
>>When you set the $dir variable, try doing so with single quotes - the \
>>character is used to escape things and might be causing some problems.
>>
>>If that makes no sense, it's because I'm falling asleep.
>>
>>Good luck.
>>
>>-M 
>>
>>    
>>
>>>-----Original Message-----
>>>From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
>>>Sent: Tuesday, November 30, 2004 12:37 AM
>>>To: [EMAIL PROTECTED]
>>>Subject: [PHP-WIN] problem to open dir
>>>
>>>hi all
>>>i am getting some unexpected error while try to read a local dir..
>>>it is working on the pc where apache is running ..but same 
>>>code not working while trying from other pcs in lan..
>>>here is code..
>>>$dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
>>>(is_dir($dir)) {
>>>    if ($dh = opendir($dir)) {
>>>       while (($file = readdir($dh)) !== false) {
>>>          echo "filename: $file : filetype: " . filetype($dir 
>>>. $file) ."\n";
>>>       }
>>>       closedir($dh);
>>>      }
>>>     }
>>>
>>>$dir = dir($source);
>>>
>>>
>>>giving error:
>>>Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
>>>failed to open dir: Invalid argument in 
>>>G:\Vyapar\AdvMgmt\addadvt3.php on line
>>>69
>>>
>>>Fatal error: Call to a member function on a non-object in 
>>>G:\Vyapar\AdvMgmt\addadvt3.php on line 70
>>> 
>>>
>>>
>>>
>>>---------
>>>Experience is what you get when you didn't get what you wanted.
>>>---------
>>>Regards
>>>Pravin Kumar
>>>Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
>>>Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
>>>http://geocities.com/pravin_suman/
>>>http://pravindeo.blogspot.com
>>>
>>>-- 
>>>PHP Windows Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>      
>>>
>
>  
>

--- End Message ---
--- Begin Message ---
Definitely use the is_dir() function as Rafael suggests. Also, make sure
that the user that PHP will be running as has permissions to read from that
location. I had some troubles a while back reading, writing and deleting
from some locations that the user IIS was running as did not have the proper
permissions in that location.

So if is_dir() returns true for you but you're still having those issues,
try explicitly adding the user that apache is running as to that directory
with some good permissions.

Oh - and about the slashes, only use the \\ when you're using double quotes
and only use \ with single quotes. Double quotes tells PHP to try to
evaulate the contents of the string (replace varables with their value,
interperate \[character] with their proper escaped value, etc.) while single
quotes tells PHP that "treat this value as exactly what's entered - don't
try to evaulate anything".

-M

> -----Original Message-----
> From: Rafael Soares [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 30, 2004 6:11 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RES: [PHP-WIN] problem to open dir
> 
> Hello!
> 
> The sintax I use is this:
> 
> $dir = 'C:\\dir\\subdir\\';
> 
> But I haven't tried to access windows dirs like Documents and Settings
> 
> The only way to be sure is using the is_dir(); function.
> 
> See you.
> 
> Rafael Soares - AgênciaM
> Fone:  +55 11 4616-1394
>  
> -----Mensagem original-----
> De: Luis Moreira [mailto:[EMAIL PROTECTED]
> Enviada em: terça-feira, 30 de novembro de 2004 08:04
> Para: Pravin-Kumar
> Cc: [EMAIL PROTECTED]
> Assunto: Re: [PHP-WIN] problem to open dir
> 
> Remove the double quotes.
> 
>  $dh = opendir('F:/vyapar-2/test/cdaci');
> 
> 
> Pravin-Kumar wrote:
> 
> >hi list!
> > 
> > $dest='F:/vyapar-2/test/cdaci'; or
> > $dest='F:\vyapar-2\test\cdaci'; or
> > $dest='F:\\vyapar-2\\test\\cdaci'; or
> > $dh = opendir($dest);
> > $a=dir($dest);
> >
> >the above code giving following problem on apache 1.3  on windows
> >
> >Warning: opendir(F:/vyapar-2/test/cdaci): failed to open 
> dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 10
> >
> >Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 11
> >
> >--
> >Nothing is working i had tried \\ , /, "double quot", 'single quot'
> >
> >---------
> >Regards
> >Pravin Kumar
> >
> >On Tue, 30 Nov 2004, Mike wrote:
> >
> >  
> >
> >>When you set the $dir variable, try doing so with single 
> quotes - the 
> >>\ character is used to escape things and might be causing 
> some problems.
> >>
> >>If that makes no sense, it's because I'm falling asleep.
> >>
> >>Good luck.
> >>
> >>-M
> >>
> >>    
> >>
> >>>-----Original Message-----
> >>>From: Pravin-Kumar [mailto:[EMAIL PROTECTED]
> >>>Sent: Tuesday, November 30, 2004 12:37 AM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: [PHP-WIN] problem to open dir
> >>>
> >>>hi all
> >>>i am getting some unexpected error while try to read a local dir..
> >>>it is working on the pc where apache is running ..but same 
> code not 
> >>>working while trying from other pcs in lan..
> >>>here is code..
> >>>$dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if
> >>>(is_dir($dir)) {
> >>>    if ($dh = opendir($dir)) {
> >>>       while (($file = readdir($dh)) !== false) {
> >>>          echo "filename: $file : filetype: " . filetype($dir . 
> >>>$file) ."\n";
> >>>       }
> >>>       closedir($dh);
> >>>            }
> >>>   }
> >>>
> >>>$dir = dir($source);
> >>>
> >>>
> >>>giving error:
> >>>Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> >>>failed to open dir: Invalid argument in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line
> >>>69
> >>>
> >>>Fatal error: Call to a member function on a non-object in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line 70
> >>> 
> >>>
> >>>
> >>>
> >>>---------
> >>>Experience is what you get when you didn't get what you wanted.
> >>>---------
> >>>Regards
> >>>Pravin Kumar
> >>>Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> >>>Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103 
> >>>http://geocities.com/pravin_suman/
> >>>http://pravindeo.blogspot.com
> >>>
> >>>--
> >>>PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: 
> >>>http://www.php.net/unsub.php
> >>>
> >>>      
> >>>
> >
> >  
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hello Pravin-Kumar,

I hope you've noticed that you use disk "F" in $dest, and the actualy
dir seems to be on disk "G".

This code, should work fine, i test it on my system:

$dir="C:\\Documents and Settings\\pravin\\Desktop\\abcd2\\";
if (is_dir($dir)) {
     if ($dh = opendir($dir)) {
             while (($file = readdir($dh)) !== false) {
             echo "filename: $file : filetype: " . filetype($dir.$file) ."\n";
             }
     closedir($dh);
     }
}
$dir = dir($source);


PK> hi list!
 
PK>  $dest='F:/vyapar-2/test/cdaci'; or 
PK>  $dest='F:\vyapar-2\test\cdaci'; or
PK>  $dest='F:\\vyapar-2\\test\\cdaci'; or
PK>  $dh = opendir($dest);
PK>  $a=dir($dest);

PK> the above code giving following problem on apache 1.3  on windows

PK> Warning: opendir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid
PK> argument in G:\Vyapar-2.0\test\1.php on line 10

PK> Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid argument
PK> in G:\Vyapar-2.0\test\1.php on line 11

PK> --
PK> Nothing is working i had tried \\ , /, "double quot", 'single quot'

PK> ---------
PK> Regards
PK> Pravin Kumar

PK> On Tue, 30 Nov 2004, Mike wrote:

>> When you set the $dir variable, try doing so with single quotes - the \
>> character is used to escape things and might be causing some problems.
>> 
>> If that makes no sense, it's because I'm falling asleep.
>> 
>> Good luck.
>> 
>> -M 
>> 
>> > -----Original Message-----
>> > From: Pravin-Kumar [mailto:[EMAIL PROTECTED] 
>> > Sent: Tuesday, November 30, 2004 12:37 AM
>> > To: [EMAIL PROTECTED]
>> > Subject: [PHP-WIN] problem to open dir
>> > 
>> > hi all
>> > i am getting some unexpected error while try to read a local dir..
>> > it is working on the pc where apache is running ..but same 
>> > code not working while trying from other pcs in lan..
>> > here is code..
>> > $dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if 
>> > (is_dir($dir)) {
>> >     if ($dh = opendir($dir)) {
>> >        while (($file = readdir($dh)) !== false) {
>> >           echo "filename: $file : filetype: " . filetype($dir 
>> > . $file) ."\n";
>> >        }
>> >        closedir($dh);
>> >             }
>> >    }
>> > 
>> > $dir = dir($source);
>> > 
>> > 
>> > giving error:
>> > Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
>> > failed to open dir: Invalid argument in 
>> > G:\Vyapar\AdvMgmt\addadvt3.php on line
>> > 69
>> > 
>> > Fatal error: Call to a member function on a non-object in 
>> > G:\Vyapar\AdvMgmt\addadvt3.php on line 70
>> >  
>> > 
>> > 
>> > 
>> > ---------
>> > Experience is what you get when you didn't get what you wanted.
>> > ---------
>> > Regards
>> > Pravin Kumar
>> > Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
>> > Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103
>> > http://geocities.com/pravin_suman/
>> > http://pravindeo.blogspot.com
>> > 
>> > -- 
>> > PHP Windows Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> > 
>> 




-- 
Best regards,
 re_action                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Mike wrote:
> Oh - and about the slashes, only use the \\ when you're using double 
> quotes
> and only use \ with single quotes. Double quotes tells PHP to try to
> evaulate the contents of the string (replace varables with their value,
> interperate \[character] with their proper escaped value, etc.) while 
> single
> quotes tells PHP that "treat this value as exactly what's entered - don't
> try to evaulate anything".

Strangely, when I tried 'C:\dir\subdir'; (single quotes and backslashes)
is_dir() returned false!!!

I did not understand, but using single quotes(') and double backslashes (\\)
it works fine.

And also passing the dir string by POST don't work. You may have to use the
addslashes() function.

Rafael Soares - AgênciaM
Fone:  +55 11 4616-1394
 

-----Mensagem original-----
De: Mike [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 30 de novembro de 2004 11:05
Para: 'Rafael Soares'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Assunto: RE: [PHP-WIN] problem to open dir

Definitely use the is_dir() function as Rafael suggests. Also, make sure
that the user that PHP will be running as has permissions to read from that
location. I had some troubles a while back reading, writing and deleting
from some locations that the user IIS was running as did not have the proper
permissions in that location.

So if is_dir() returns true for you but you're still having those issues,
try explicitly adding the user that apache is running as to that directory
with some good permissions.

Oh - and about the slashes, only use the \\ when you're using double quotes
and only use \ with single quotes. Double quotes tells PHP to try to
evaulate the contents of the string (replace varables with their value,
interperate \[character] with their proper escaped value, etc.) while single
quotes tells PHP that "treat this value as exactly what's entered - don't
try to evaulate anything".

-M

> -----Original Message-----
> From: Rafael Soares [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 30, 2004 6:11 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RES: [PHP-WIN] problem to open dir
> 
> Hello!
> 
> The sintax I use is this:
> 
> $dir = 'C:\\dir\\subdir\\';
> 
> But I haven't tried to access windows dirs like Documents and Settings
> 
> The only way to be sure is using the is_dir(); function.
> 
> See you.
> 
> Rafael Soares - AgênciaM
> Fone:  +55 11 4616-1394
>  
> -----Mensagem original-----
> De: Luis Moreira [mailto:[EMAIL PROTECTED]
> Enviada em: terça-feira, 30 de novembro de 2004 08:04
> Para: Pravin-Kumar
> Cc: [EMAIL PROTECTED]
> Assunto: Re: [PHP-WIN] problem to open dir
> 
> Remove the double quotes.
> 
>  $dh = opendir('F:/vyapar-2/test/cdaci');
> 
> 
> Pravin-Kumar wrote:
> 
> >hi list!
> > 
> > $dest='F:/vyapar-2/test/cdaci'; or
> > $dest='F:\vyapar-2\test\cdaci'; or
> > $dest='F:\\vyapar-2\\test\\cdaci'; or
> > $dh = opendir($dest);
> > $a=dir($dest);
> >
> >the above code giving following problem on apache 1.3  on windows
> >
> >Warning: opendir(F:/vyapar-2/test/cdaci): failed to open 
> dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 10
> >
> >Warning: dir(F:/vyapar-2/test/cdaci): failed to open dir: Invalid 
> >argument in G:\Vyapar-2.0\test\1.php on line 11
> >
> >--
> >Nothing is working i had tried \\ , /, "double quot", 'single quot'
> >
> >---------
> >Regards
> >Pravin Kumar
> >
> >On Tue, 30 Nov 2004, Mike wrote:
> >
> >  
> >
> >>When you set the $dir variable, try doing so with single 
> quotes - the 
> >>\ character is used to escape things and might be causing 
> some problems.
> >>
> >>If that makes no sense, it's because I'm falling asleep.
> >>
> >>Good luck.
> >>
> >>-M
> >>
> >>    
> >>
> >>>-----Original Message-----
> >>>From: Pravin-Kumar [mailto:[EMAIL PROTECTED]
> >>>Sent: Tuesday, November 30, 2004 12:37 AM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: [PHP-WIN] problem to open dir
> >>>
> >>>hi all
> >>>i am getting some unexpected error while try to read a local dir..
> >>>it is working on the pc where apache is running ..but same 
> code not 
> >>>working while trying from other pcs in lan..
> >>>here is code..
> >>>$dir="C:\Documents and Settings\pravin\Desktop\abcd2"; if
> >>>(is_dir($dir)) {
> >>>    if ($dh = opendir($dir)) {
> >>>       while (($file = readdir($dh)) !== false) {
> >>>          echo "filename: $file : filetype: " . filetype($dir . 
> >>>$file) ."\n";
> >>>       }
> >>>       closedir($dh);
> >>>            }
> >>>   }
> >>>
> >>>$dir = dir($source);
> >>>
> >>>
> >>>giving error:
> >>>Warning: dir(C:\Documents and Settings\pravin\Desktop\cdac2): 
> >>>failed to open dir: Invalid argument in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line
> >>>69
> >>>
> >>>Fatal error: Call to a member function on a non-object in 
> >>>G:\Vyapar\AdvMgmt\addadvt3.php on line 70
> >>> 
> >>>
> >>>
> >>>
> >>>---------
> >>>Experience is what you get when you didn't get what you wanted.
> >>>---------
> >>>Regards
> >>>Pravin Kumar
> >>>Technical Associate, CDAC, 68, E-City, Bangalore, 560100.
> >>>Registered Linux user #365056; Ph. +91 80 28523300 Extn:2103 
> >>>http://geocities.com/pravin_suman/
> >>>http://pravindeo.blogspot.com
> >>>
> >>>--
> >>>PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: 
> >>>http://www.php.net/unsub.php
> >>>
> >>>      
> >>>
> >
> >  
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
If you're looking for quick and dirty just to get it up and running fast
to play with, then download the installer. It's that much smaller
because it just doesn't include a lot of extras such as external
extensions.

I personally suggest the ZIP package and doing a manual install. There
is documentation available to help you and there is much more bundled in
the zip package that you don't have to go looking for if you end up
needing it. Cheers.

Armando

-----Original Message-----
From: Ian [mailto:[EMAIL PROTECTED] 
Sent: November 28, 2004 1:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Difference between Installer and ZIP?


Hi there,

Just went to php.net to download the installer/zip.

I notice that the zip is quite large 7 megs or so... but the installer
is 
only 2 megs..

The installer says CGI ONLY, i quite a newbie at this and I just wish to

install it on the server, what are the differences?

The installer says it automatically configures IIS for me but the ZIP 
doesn't state that..

Can anybody give any guidance on which method I should go for ??

Thanks in advance

Ian 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi,

Thanks michael, i have tired before, and wont run and produce the same error messages. But it can run with while the MDB file is at local drive (what i need is network drive).

but thanks alot anyway.. maybe i should try other way..


åç


<[EMAIL PROTECTED]>
Re: [PHP-WIN] Permission deny on connecting MS Access database
ï
Hi,
 
Make sure the DB is not open by somebody else on the network (from the looks of things X is your network drive) or else add the Username and Password to the connection string.  If there are any other programs / websites accessing the database this could present a problem, in this case make sure that the apps / websites close their connections.  Try the below code and see if it works.  If that doesn't work then try to create a fresh database on your local drive and test that (It could be just that MS Access is crap ;)).
 
<?php
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
// Providing username and password exist (Make sure your OLEDB Driver version matches!)
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=X:\mdb\mydata.mdb; UID=username; Password=yourpassword"); 
 
// Create and populate recordset             
$rs = $conn->Execute("SELECT * FROM sometable;");
 
// Loop through recordset and display 1 column from some table               
while (!$rs->EOF) {                
    $rs->Fields[somecolumnname]->Value;

    $rs->MoveNext(); 
 }     
 
// Close the recordset and destroy the object           
$rs->Close();
$rs->Release();
$rs = null;
 
// Close the connection and destroy object
$rs->Close();
$rs->Release();
$rs = null;
?>
----- Original Message -----
Sent: Thursday, November 25, 2004 9:01 PM
Subject: [PHP-WIN] Permission deny on connecting MS Access database

Hi all,

I need help to solve my problem, I use ADO to connect MS Access database; the data is store in another server computer; I have try two different way to access the data, and below is the code:
-----------------------------------------
//$dbName = "\\SERVER\mdb\mydata.mdb";
$dbName = "X:/mdb/mydata.mdb";

$conn = new COM('ADODB.Connection');
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$dbName;Persist Security Info=False");

output:
------------------------------------------
Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft JET Database Engine Description: The Microsoft Jet database engine cannot open the file 'X:\mdb\mydata.mdb'. It is already opened exclusively by another user, or you need permission to view its data.


Thanks

åç


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---

Reply via email to