Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Luke

 What errors are you getting? Check file permissions, maybe you can't
 read/write the file.

I get warning:
Warning: dbase_open() [function.dbase-open]: unable to open database 
c:\temp\test.dbf in /usr/local/lappstack-1.1/apache2/htdocs/dbase.php on 
line 8

In php.ini I have safe_mode=off. Even if I wont simple change a directory 
by:
echo getcwd() . \n;
chdir('c:\\temp');
echo getcwd() . \n;

I get  this warning:
/usr/local/lappstack-1.1/apache2/htdocs

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in 
/usr/local/lappstack-1.1/apache2/htdocs/dbase.php on line 5

/usr/local/lappstack-1.1/apache2/htdocs

And how you see the directory does't change :(

Some propositin?

THANKS ALL :)


echo getcwd() . \n;
chdir('c:\\Przewozy\\BAZY');
echo getcwd() . \n;

$db = dbase_open(c:\\Przewozy\\BAZY\\Ceny.dbf, 0);



 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/ 

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC

From: Luke [EMAIL PROTECTED]
echo getcwd() . \n;
chdir('c:\\temp');



echo getcwd() . \n;
chdir('c:\\Przewozy\\BAZY');
echo getcwd() . \n;

$db = dbase_open(c:\\Przewozy\\BAZY\\Ceny.dbf, 0);


Just a quick guess/suggestion:
Single tick quotes ' are taken literally and double tick quotes  allow 
expansion.

$aVariable = 0;
echo '$aVariable';//$aVariable
echo $aVariable;//0
Maybe change the chdir to use double quotes or remove the double backslash?  
Especially if your dbase_open works with double quotes and the double 
backslash.


_
http://im.live.com/messenger/im/home/?source=hmtextlinkjuly07

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread frode
On Thu, Jul 19, 2007 at 19:34:34 +0200, Luke wrote:
 I get  this warning:
 /usr/local/lappstack-1.1/apache2/htdocs
 Warning: chdir() [function.chdir]: No such file or directory (errno 2) in 
 
 echo getcwd() . \n;
 chdir('c:\\Przewozy\\BAZY');
 echo getcwd() . \n;

You seem horribly confused. Why are you using Windows-style paths
(c:\\..) on something that looks to be a un*x server (/usr/local...)

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Luke

Instruct ICC [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 From: Luke [EMAIL PROTECTED]
echo getcwd() . \n;
chdir('c:\\temp');

echo getcwd() . \n;
chdir('c:\\Przewozy\\BAZY');
echo getcwd() . \n;

$db = dbase_open(c:\\Przewozy\\BAZY\\Ceny.dbf, 0);

 Just a quick guess/suggestion:
 Single tick quotes ' are taken literally and double tick quotes  allow 
 expansion.
 $aVariable = 0;
 echo '$aVariable';//$aVariable
 echo $aVariable;//0
 Maybe change the chdir to use double quotes or remove the double 
 backslash?  Especially if your dbase_open works with double quotes and the 
 double backslash.

Thanks, but it did't help :(. I still get the some error.
I thing it is something with php configuration ?

Some other suggestion?


 _
 http://im.live.com/messenger/im/home/?source=hmtextlinkjuly07 

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Luke

[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Thu, Jul 19, 2007 at 19:34:34 +0200, Luke wrote:
 I get  this warning:
 /usr/local/lappstack-1.1/apache2/htdocs
 Warning: chdir() [function.chdir]: No such file or directory (errno 2) in

 echo getcwd() . \n;
 chdir('c:\\Przewozy\\BAZY');
 echo getcwd() . \n;

 You seem horribly confused. Why are you using Windows-style paths
 (c:\\..) on something that looks to be a un*x server (/usr/local...)

Becouse I wont read files, exactly *.dbf, from local machine, not from 
server. I have no problem with read or changing directory, if database is 
located on server.

Thanks for any suggestion. 

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC

Becouse I wont read files, exactly *.dbf, from local machine, not from
server. I have no problem with read or changing directory, if database is
located on server.

Thanks for any suggestion.


So you are running PHP on your local machine localhost which happens to be 
a Windows machine, and also was compiled with the --enable-dbase option?


Are you only dealing with 1 machine and it is not a UNIX flavor?

If you had a web page served from a UNIX box with an html file field (like 
Upload this file) that you view from a browser on a Windows box, which 
browses the local machine, the different file path styles could make sense.  
Or if dbase_open could connect to a remote server like fopen.


If you are trying to use dbase_open on your local machine to connect to a 
remote machine's test.dbf, it looks like this function does not work across 
servers.  Maybe use fopen and friends to get the remote file?


_
http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_2G_0507

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



Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC

$db = dbase_open(c:\\Przewozy\\BAZY\\Ceny.dbf, 0);


Or if you can map the drive, then you should be able to use a path like 
above using the mapped drive or \\server\volume\path\test.dbf


Can you call up the file in Windows Explorer?

_
http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_pcmag_0507

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



[PHP-DB] DBF + PHP

2007-07-18 Thread Luke
Hi.
I need open some dbase files. Function dbase_open work correctly only when I
open data base from server eg. dbase_open('/tmp/test.dbf', 0).
How Can I open this database from local host ?
dbase_open('c:\tmp\test.dbf', 0) - not working
dbase_open('c:\\tmp\test.dbf', 0) - not working
dbase_open('c:/tmp/test.dbf', 0) - not working
Any idea?

Thanks.

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



Re: [PHP-DB] DBF + PHP

2007-07-18 Thread Chris

Luke wrote:

Hi.
I need open some dbase files. Function dbase_open work correctly only when I
open data base from server eg. dbase_open('/tmp/test.dbf', 0).



How Can I open this database from local host ?


What errors are you getting? Check file permissions, maybe you can't 
read/write the file.


--
Postgresql  php tutorials
http://www.designmagick.com/

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