|
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]
|