Monday, 2009-05-18

*** rossand has quit IRC01:29
*** yoeljacobsen has joined #ingres04:36
*** yoeljacobsen has quit IRC05:25
*** withdefault has joined #ingres06:54
*** eriksnoeijs has joined #ingres07:42
*** eriksnoeijs has left #ingres07:43
*** grantc_offline is now known as grantc08:05
grantclo SlimeyPete11:05
SlimeyPeteello11:05
grantci am going through the pecl bugs for ingres and am taking a look at http://pecl.php.net/bugs/bug.php?id=1364011:06
grantcusing http://ingres.pastebin.com/f6e16d72d i cannot reproduce the problem11:07
grantcso if there are no objections I am going to close off the bug :)11:09
grantchttp://pecl.php.net/bugs/bug.php?id=13640 - showing the permit did get created11:10
grantchttp://ingres.pastebin.com/f245814ab - not the pecl-link11:15
SlimeyPeteokay, go ahead and close it11:19
SlimeyPeteI haven't noticed it happening recently anyway11:20
grantcta11:21
*** toumi01 has joined #ingres12:38
*** satanmalin has joined #ingres12:57
satanmalinhi guys12:57
grantchi satanmalin13:04
satanmalinhi grantc13:04
satanmalinhow are you ?13:04
grantcnot too bad, and your self?13:04
satanmalinsorry it makes ages that i wasnt there13:04
satanmalinIm full of happyness13:05
satanmalinim glad to anounce you that ill be a ftaher13:05
satanmalinfather13:05
satanmalinin some month13:05
satanmalinmy girlfriend is pregnant13:05
grantccongratulations13:06
satanmalinthanks13:07
grantchow long to go?13:07
satanmalinshe is in her 16th week13:07
satanmalinso indeed in more or less 5 month13:08
grantcso october, in time for halloween :)13:08
satanmalinthey told us november 8th13:09
satanmalinso maybe for halloween13:09
satanmalinlike your marriage13:09
satanmalin;-)13:09
grantc:)13:09
satanmalinand what about you ?13:10
grantcnot much to say really - working, and living nothing else to report.. still waiting to move in to our house13:11
satanmalinI can imagine ;-)13:11
satanmalindid you have time to test easyingres ??13:12
satanmalin(thats quiet strange, the logo is a baby devil, first that i know the news LOL)13:12
grantci have done some testing, i have some notes here for some cosmetic changes nothing really important13:15
satanmalinand about the stability of the programm ?13:15
satanmalinproagram13:15
satanmalinsoftware LOL13:15
grantcgenerally good although i did not spend much time looking through it. I was mainly looking at the user experience13:16
satanmalinOki13:17
satanmalindo you have tested ingres on windows 7 ?13:17
satanmalinbecause it seems that it doesnt work13:17
satanmalinindeed easyingres dosnt work13:18
grantcerr no - i have a window 7 vm but I don't know if Ingres even works on that platform13:18
grantchttp://ingres.pastebin.com/f307cdbc7 - my notes13:18
satanmalinso nothing really "important"13:19
grantcfrom the list the missing JRE is the only problem13:20
grantcsince IDW needs it13:21
satanmalinyep i know13:21
satanmalinbut its bizarre to install JRE for a PHP software ;-)13:21
grantcc'est la vie :)13:21
satanmalinwaouh13:22
satanmalinmaintenant tu parles francais grant ?13:22
satanmalin;-)13:22
grantcun peu13:22
satanmalinparlons en grenouille alors13:23
satanmalin'=_13:23
satanmalin;-)13:23
grantcfortunately this channel is english only :)13:24
satanmalinoki13:25
satanmalin:(13:25
grantcseulment en  roast beef13:25
satanmalinLOL13:25
grantcif you want to start #ingres-froggie feel free ;)13:25
satanmalinto be the only one with bruno and stephane ;-)13:26
satanmalin?13:26
grantcperhaps13:26
satanmalinLOL13:26
satanmalinlike on rape me (nirvana)13:26
satanmalinim not hte only oneeeeeeeeeeee13:26
*** grantc is now known as grantc_offline14:03
*** grantc_offline is now known as grantc14:04
*** DarylM has joined #ingres14:21
*** rossand has joined #ingres14:28
*** ChanServ sets mode: +o rossand14:28
*** DarylM has quit IRC14:44
*** DarylM has joined #ingres14:53
satanmalingrantc are you there i hae a problem not on ingres15:09
satanmalinim trying to help a friend of mine15:09
satanmalinon a project she has15:09
satanmalin(for school)15:09
satanmalinand i have a problem in php15:09
satanmalin(i know ou are THE personn I need ;-)15:10
satanmalinits in PHP and its driving me mad15:10
*** DarylM has quit IRC15:12
satanmalingrantc the PHP god15:22
satanmalini pray you15:22
NoeJekosatanmalin maybe I can help you15:46
satanmalinho Noe15:46
satanmalinindeed15:46
grantcsorry, was at lunch15:46
satanmalinNow i have reached to insert into a Mysql db15:46
satanmalinpictures15:46
pboroimages in db may not be a good idea15:46
satanmalinbut when i try to read them it is diplayes15:46
pborowhat is the column data type he is using for them?15:47
satanmalinlike if i try to open them in the notepad15:47
satanmalinI know but its for15:47
NoeJekoyou need to set a header15:47
satanmalina school project15:47
pborois he using correct mime-type for them?15:47
satanmalinBLOB15:47
pboroheader("Content-type: image/jpeg"); for example in the PHP code15:47
satanmalinto set a header ??15:47
NoeJeko header('Content-type: image/png');15:47
pboroyes, in HTTP response you must tell what is the mime type of the data you're serving15:47
satanmalinah oki15:48
NoeJekoack pboro beat me to it15:48
NoeJekoI'd recommend checking all images with getimagesize()15:48
NoeJekoif you're allowing user uploaded images15:48
NoeJekoyou'll need the gd library for that15:48
satanmalin<meta http-equiv="Content-Type"  contnt=text/html15:48
satanmalinis it that /15:48
satanmalin?15:48
NoeJekothat wil make it attempt to render as a HTML page15:49
pborosatanmalin, that's HTML, it's not about HTML15:49
NoeJekoyou need the header lines I or pboro posted15:49
NoeJekousing getimagesize()15:49
pboroin PHP code which serves the images (for example getimage.php) you must have line "header('Content-type: image/jpeg');" before outputing the binary data (image) to the client15:49
NoeJekoyou can detect the image type15:49
NoeJekoand pass the appropriate header15:49
satanmalinbut where should i put the header line ?15:50
satanmalinheader('Content-type: image/png/jpg...')15:50
NoeJekoin the code before you output the octet stream15:50
pborosatanmalin, in the PHP code15:50
grantcbefore you send any data....15:50
satanmalinoki may i post a pastebin15:51
satanmalin?15:51
NoeJeko<?php15:51
NoeJeko    header('Content-type: image/png');15:51
NoeJeko    echo $picturebinarydata;15:51
NoeJeko    die();15:51
NoeJeko?>15:51
pborosatanmalin, also post these to your friend: http://mysqldump.azundris.com/archives/36-Serving-Images-From-A-Database.html http://hashmysql.org/index.php?title=Storing_files_in_the_database15:51
satanmalinbecaumay i send the files to someone ?15:52
satanmalinor post it on pastebin to see where is my problem ?15:52
pboroI rest my case and leave for home :) Bye guys! ->15:53
grantccya pboro15:53
NoeJekocheers, I need to head into the office, I leave this with Grant =]15:53
grantcthanks NoeJeko15:54
grantcsatanmalin: post it to a pastebin and I will take a look15:54
satanmalinhttp://ingres.pastebin.com/m45f1c1aa15:54
satanmalinhttp://ingres.pastebin.com/m4e1fe87615:55
satanmalinbye guys15:55
satanmalinthese are my two files15:56
*** satanmalin has quit IRC16:03
*** satanmalin has joined #ingres16:04
satanmalingrantc ?16:06
grantcok - looking at http://ingres.pastebin.com/m4e1fe876, you cannot echo the image to the screen16:06
satanmalinso what is the method to ?16:06
grantcin HTML terms you must present an image within an <IMG /> tag16:06
grantcso <IMG SRC="http://......" />16:06
grantci have some code that does something similar for ingres...let me see16:07
satanmalinoki16:09
grantcok http://ingres.pastebin.com/f37877229 is a page that shows the user profile from the demodb in ingres. The user_profile has a column which contains an image. As you can see in line 14 i make a request to another script using the "id"16:10
grantcthe other script is   http://ingres.pastebin.com/f5c0be7516:11
satanmalinshould i use the firs or the second ?16:12
*** DarylM has joined #ingres16:12
grantcin that 2nd script it fetches the image from the database and displays it with the correct content header16:13
grantcthat is one way to do it - another way is to write the image data to a file and then use <img src="....file">16:13
satanmalineuh im a beginner16:14
satanmalinLOL16:15
satanmalinim lost16:15
*** mull has joined #ingres16:15
satanmalinmay you make me the code mix16:17
grantceach HTTP request can only have one content type; html, jpg, png, mp3..... essentially you cannot have multiple content types in a single request16:17
satanmalinoki16:17
grantceach web page can be made up of one or more requests - one for the text then other for images or flash or ....16:17
grantcthat way you have one content type per request16:18
satanmalinindeed i cant do a select * from wich has as a result text and image ?16:18
grantcimages are presented using the <IMG SRC="....."/> HTML tag16:18
grantcbecause your page is already set to send text/html16:19
grantcthe <IMG /> tag is a separate request in the same page16:19
satanmalinoki ...16:20
grantcso looking at http://ingres.pastebin.com/f5c0be75 - all it does is fetch an image and set the content type to image/jpeg16:20
grantcfor example if you were to call http://......./get_image.php?id=44 it would just show you the picture for id 4416:21
satanmalinoki16:21
satanmalingrantc in http://ingres.pastebin.com/f5c0be75 i only need to copy the header16:22
satanmalinor all tge file16:23
grantcthe file is based on ingres not mysql but the concept is the same16:23
satanmalinand mysql funtion are the same as ingres ?16:23
satanmalinjust rename ingres in mysql16:23
satanmalinin this script16:24
grantcmore or less yes16:25
satanmalinso if i copy this code into mine16:25
satanmalinchanging Ingres by ,sql16:25
satanmalinit must work16:25
grantcyup16:26
satanmalinno need to change the first file only the second16:26
satanmalinthe one i use to put the image into the database is good16:27
satanmalinwhat is ingres.scrollable ?16:28
grantcto display a picture in one page you have to make a separate query or save the image to disk and then show it16:29
satanmalinbut does it exists on mysql ?16:29
grantcam sure there are examples if you search google16:29
grantcingres.scrollable is an ingres only thing16:29
grantchttp://www.google.fr/search?q=site%3Afr+image+mysql+php16:29
*** DarylM has quit IRC16:30
satanmalinoki16:30
satanmalini found some pages but the code was not good16:30
*** DerMeister has joined #ingres16:32
satanmalinoki il try and ill told16:34
satanmalinyou16:34
satanmalinthanks grant16:34
grantcfirst write a page like http://ingres.pastebin.com/f5c0be75 which just fetches the picture16:34
grantcthen in the page you want to display the picture you do <img src="get_image.php?id=.....">16:36
grantcwhere the id value is some unique identifier for the image16:36
satanmalinand is it impossible to list a list of image ?"16:40
satanmalinif in my database i have 3 images16:41
satanmalinid= ?16:41
grantchow do you identify each one16:42
grantcor rather the question is "what SQL do you need to get each image"16:42
satanmalinselect id_article from article16:43
grantcso each article has an id_article column?16:43
satanmalinyep16:43
grantcin that case that will be the id you pass16:43
satanmalinmay i do somtehong like16:44
grantcin the demodb example the column is called up_id16:44
satanmalinwhile { $article== true)16:44
satanmalin{16:44
satanmalinecho <p><img src = get_image.php?id=.article{i};."16:45
satanmalini++; ?16:45
satanmalinsomethong like that ?16:45
grantcit depends on what you want to do - in your code you assume the article id is sequential, like, 1,2,3,4... what happens if there is no article 316:46
satanmalinit works16:47
satanmalinif i have16:47
satanmalin12 4 5 616:47
satanmalinid {1} exists its 116:47
satanmalinid[3] exists its 416:47
satanmalinid[6] doesnt esicts in the database16:48
satanmalinthe while ends16:49
satanmalin?16:49
satanmalinisnt it16:49
satanmalin?16:49
grantcif you want to list all articles then it would be easier to do it another way16:49
grantchttp://ingres.pastebin.com/d49eec15816:52
grantcthat code loops on the rows in the database16:52
satanmalinthanks grantc16:56
*** thiagomz has joined #ingres18:14
grantcNoeJeko: are you about?18:37
*** DarylM has joined #ingres19:59
*** grantc is now known as grantc_offline20:16
*** DerMeister has quit IRC21:10
*** withdefault has quit IRC22:00
*** atrofast has joined #ingres22:47
*** thoda05 has joined #ingres22:48

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!