Reply to Re: Drive Letter And A FQFN (Fully Qualified Filename, OS:Windows), PDO

Your name:

Reply:


Posted by Jim Carlock on 05/17/07 22:09

*** Jim Carlock escribiσ/wrote (Thu, 17 May 2007 14:23:42 -0400):
> This works as long as a drive letter is not FQFN. For instance,
> if, $FQFN = "Z:/mysql/dbn/data.db", PHP replies:
>
> SQLSTATE[HY000] [14]
>
> along with a couple lines of text identifying line numbers and such.
>
> The function above works well if FQFN = "./data.db". But, the
> database file must get set up on a different drive.


"Alvaro G. Vicario" <webmaster@NOSPAMdemogracia.com> wrote:
: Drive letters for network drives are not universal. Each user in the
: same computer will have different letters. If you run your script through
: a web server, the script will not have access to *your* letters but those
: of the user the services runs as (normally LocalSystem).
:
: I suggest you try with UNC paths, such as //server/share

The only problem there, is that no shares really exist... except the
hidden shares. It's not a networked drive. It's a mapped drive letter
created to shorten a path. Subst.exe was used to create the the drive
letter.

No network paths exist on the system. Group policies were set up to
prohibit network paths I think.

The code works on the physical drives, even the removable drives,
for instance...

function CreateMyDataBaseFile($FQFN, $UID, $PW) {
$db = "sqlite:" . $FQFN;
$sql = "CREATE TABLE Customers(name1 TEXT, name2 TEXT);";

$dbh = new PDO($db, $UID, $PW);
$dbh->exec($sql);
$dbh = null;
}

CreateMyDataBaseFile("A:/test.db", "admin", "password");

where A: represents a 3.5" disk drive. It just fails on a SUBST
drive (mapped to a folder on another drive).

Thanks for the suggestion.

I've tried tricking it with things like, "./Z:/test.db" and "//Z:/test.db"
but so far no luck.

--
Jim Carlock
Post replies to the group.

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация