Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 01-11-2006, 11:40 PM   #1 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Angry help in PHP-mysql

I want to insert an image as long blob in mysql4.0. I am using php 4.4 with apache 2 under winXP.
The following script I am using for inserting the image which is not working.
I have changed the buffer and global settings(output_buffering = on and register_globals = on) in php.ini file but with no result. Kindly see the attachment and please help.
Attached Files
File Type: zip image insert.zip (1.7 KB, 9 views)
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-11-2006, 09:10 PM   #2 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Default Re: help in PHP-mysql

A bump for all??
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Old 05-11-2006, 11:12 PM   #3 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,453
Default Re: help in PHP-mysql

http://hockinson.com/index.php?s=37

But I wud recommend to store them in server folders n use em from there!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 07-11-2006, 10:10 PM   #4 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Default Re: help in PHP-mysql

I found a good solution with working script(Yes working script) which I want to share with you guys.please see the attachment or click
http://www.dreamwerx.net/phpforum/?id=1


Thanx Mediator, indeed I was also thinking about the same as it is said that unless you are having a good pattern recognition software which can identify a rose from a picture of garden, storing image in database is not a very good idea. Another problem is the size restriction. I want to store a scanned image (in tiff format) which has approximately 35 to 40MB size. This is very very difficult if i use the database.So your solution will be very helpful. can you provide me a script or a link? Thanx in advance.
Attached Files
File Type: pdf Image with php-mysql.pdf (29.3 KB, 6 views)
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Old 08-11-2006, 12:19 AM   #5 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,453
Default Re: help in PHP-mysql

@bukaida : See u can store the image in a folder and develop a php script so that u can manually enter the filepath of that file and make it as a link!

To make an existing file as a link (so that u can open it via link) here's the script!

Quote:
<?php
$filename="path/xyz.jpg";
if (file_exists($filename)) echo "<a href=\"$filename\">$filename</a>";
?>
Here instead of "path/xyz.jpg" u can retrieve the filepath from some Form where u can enter the filepath more conveniently! Then instead of "path/xyz.jpg" it wud be $_POST["file"] where file is a variable of the form!

U can use this idea to insert the filepath in mysql and retrieve it from there and make it a link !!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 08-11-2006, 12:27 PM   #6 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Default Re: help in PHP-mysql

@mediator: Got your idea but can it be used to upload the image file. I mean the image is in client's machine and it should be uploaded to a remote folder at the server so that another client can download and use it.Can you help?
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Old 08-11-2006, 01:19 PM   #7 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,453
Default Re: help in PHP-mysql

@bukaida : Sorry dood, I haven't yet tried the remote upload part of php yet! U can manually ftp to upload the file or follow this link! See the php ftp n http section on left hand side!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 08-11-2006, 03:20 PM   #8 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,404
Default Re: help in PHP-mysql

Code:
if ($_FILES['imagefile']['type'] == "image/jpg"){ 
   copy ($_FILES['imagefile']['tmp_name'], "files/".$_FILES['imagefile']['name']) 
    or die ("Could not copy");
This is something i made a long time back. See if it works for you, the code is self explanatory.
kalpik is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2