Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: DBF + PHP

Posted on 2007-07-17 23:06:29 by 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

Report this message

#2: Re: DBF + PHP

Posted on 2007-07-19 02:16:08 by dmagick

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

Report this message

#3: Re: DBF + PHP

Posted on 2007-07-19 19:34:34 by 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

Report this message

#4: Re: DBF + PHP

Posted on 2007-07-19 19:48:54 by Instruct ICC

>From: "Luke" <scrooge@onet.eu>
>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=hmtextlinkjuly0 7

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

Report this message

#5: Re: DBF + PHP

Posted on 2007-07-19 23:02:01 by 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

Report this message

#6: Re: DBF + PHP

Posted on 2007-07-19 23:05:12 by Luke

""Instruct ICC"" <instructicc@hotmail.com> wrote in message
news:BAY134-F3036CB3BF671A37DB9CBD1B6FB0@phx.gbl...
> >From: "Luke" <scrooge@onet.eu>
>>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=hmtextlinkjuly0 7

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

Report this message

#7: Re: DBF + PHP

Posted on 2007-07-19 23:14:52 by Luke

<frode@CoreTrek.no> wrote in message
news:20070719210201.GC16135@fearless.intra.coretrek.com...
> 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

Report this message

#8: Re: DBF + PHP

Posted on 2007-07-20 00:05:11 by 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-us&ocid=TX T_TAGHM_migration_HM_mini_2G_0507

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

Report this message

#9: Re: DBF + PHP

Posted on 2007-07-20 00:09:07 by 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-us&ocid=TX T_TAGHM_migration_HM_mini_pcmag_0507

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

Report this message