List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 1 2002 5:43pm
Subject:Re: LOAD_FILE over SMB filesystems
View as plain text  
At 17:41 +0000 2/1/02, Kevin Smith wrote:
>Yes, it definitely is... I'm running Apache 1.3.22 on Linux RedHat 7.1 and
>MySQL 3.23.47.

Does the script connect to the MySQL server using a MySQL account
that has the FILE privilege?

By the way, you didn't report the error message that you get.
What is it?

>
>----- Original Message -----
>From: "Paul DuBois" <paul@stripped>
>To: "Gerald Clark" <gerald_clark@stripped>; "Kevin Smith"
><ksmith@stripped>
>Cc: <mysql@stripped>
>Sent: Friday, February 01, 2002 5:37 PM
>Subject: Re: LOAD_FILE over SMB filesystems
>
>
>>  At 11:32 -0600 2/1/02, Gerald Clark wrote:
>>  >The single quotes around $image prevent perl from substituting the value.
>>  >You are trying to load a file named $imageFN.
>>  >$SQL = "UPDATE banners SET image=load_file(\"$imageFN\") where id=1";
>>
>>  But the single quotes are within a double-quoted string.  So shouldn't
>>  the substitution still occur?
>>
>>  Is the web server running on the same host as the MySQL server?
>>
>>  >
>>  >Kevin Smith wrote:
>>  >
>>  >>After reading some other posts on inserting a image into a blob field,
> I
>>  >>tried using DBI to insert and the following does not work...
>>  >>
>>  >>I've double-checked the path and it is correct.
>>  >>
>>  >>$imageFN = '/var/www/htdocs/corporate/images/homenew.jpg';
>>  >>$SQL = "UPDATE banners SET image=load_file('$imageFN') where id=1";
>>  >>
>>  >>If I execute the same SQL statement at the MySQL > prompt it inserts
>into
>>  >>the database fine... what am I doing wrong?
>>  >>
>>  >>Thanks,
>>  >>
>  > >>Kevin

Thread
LOAD_FILE over SMB filesystemsEgor Egorov23 Jan
  • Re: LOAD_FILE over SMB filesystemsStephen Lee23 Jan
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
  • Re: LOAD_FILE over SMB filesystemsGerald Clark1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb
    • Re: LOAD_FILE over SMB filesystemsPaul DuBois1 Feb
      • [ANN] LASSO SUMMIT 2002 EUROPEJim Van Heule1 Feb
        • Re: [ANN] LASSO SUMMIT 2002 EUROPEBlue World Lasso Evangelist)1 Feb
  • Re: LOAD_FILE over SMB filesystemsGerald Clark1 Feb
  • Re: LOAD_FILE over SMB filesystemsKevin Smith1 Feb