cancel
Showing results for 
Search instead for 
Did you mean: 

Php/MySql 'LOAD DATA INFILE' Problem

N/A

Php/MySql 'LOAD DATA INFILE' Problem

Hi Every one

I've a Php/MySql Question for you all

My problem, I've enabled my Cgi/Php webspace and have enabled my MySql Database, thats all working fine, i've been calling from scripts and have had a message board running on it, so i'm pretty sure thats not the problem.

However i've been trying to use the MySql command "LOAD DATA INFile", and i can't seem to get it to work. I know there are a lot of User access elements which could be the problem, I run Php/MySql/Http Servers localy for testing and i've had the exstact same script working on it. My php page is as follows:

-----------------------
<?Php

$connection = mysql_connect("humbug","haggo","fakeooopassword")
or die("Couldn't Make Connection To Database, Please Retry Later");

$db = mysql_select_db("haggo_f9", $connection)
or die("Couldn't Select Database, Please Retry Later");

$Sql_Result = Mysql_Query("LOAD DATA INFILE 'http://cgi.haggo.force9.co.uk/minds/Dps/Stock.txt' INTO TABLE Stock",$connection)
or die("Can not run the sql");

mysql_close($connection);

?>
-----------------------

I've uploaded this script to my space "http://cgi.haggo.force9.co.uk/minds/Dps/" and the Stock file is also there. I've also checked all the file pressions and they are set to
Chmod = 755 == upload.php
Chmod = 777 == Stock.txt
Dps Folder == 755

I'm thinking it may be something to do with my user premissions on server for that database.

If you have anyone has ideas is would be great

Thank you for your time

Haggo
1 REPLY
N/A

RE: Php/MySql 'LOAD DATA INFILE' Problem

Hi Haggo,

I'm not familiar with the query, but you might want to know that the php version is outdated, so maybe the MySQL version is too old to incorporate that feature?!

I dont know, but it's worth a thought! Smiley

Liam

> Hi Every one
>
> I've a Php/MySql Question for you all
>
> My problem, I've enabled my Cgi/Php webspace and have enabled my MySql Database, thats all working fine, i've been calling from scripts and have had a message board running on it, so i'm pretty sure thats not the problem.
>
> However i've been trying to use the MySql command "LOAD DATA INFile", and i can't seem to get it to work. I know there are a lot of User access elements which could be the problem, I run Php/MySql/Http Servers localy for testing and i've had the exstact same script working on it. My php page is as follows:
>
> -----------------------
> <?Php
>
> $connection = mysql_connect("humbug","haggo","fakeooopassword")
> or die("Couldn't Make Connection To Database, Please Retry Later");
>
> $db = mysql_select_db("haggo_f9", $connection)
> or die("Couldn't Select Database, Please Retry Later");
>
> $Sql_Result = Mysql_Query("LOAD DATA INFILE 'http://cgi.haggo.force9.co.uk/minds/Dps/Stock.txt' INTO TABLE Stock",$connection)
> or die("Can not run the sql");
>
> mysql_close($connection);
>
> ?>
> -----------------------
>
> I've uploaded this script to my space "http://cgi.haggo.force9.co.uk/minds/Dps/" and the Stock file is also there. I've also checked all the file pressions and they are set to
> Chmod = 755 == upload.php
> Chmod = 777 == Stock.txt
> Dps Folder == 755
>
> I'm thinking it may be something to do with my user premissions on server for that database.
>
> If you have anyone has ideas is would be great
>
> Thank you for your time
>
> Haggo