*** rossand has quit IRC | 01:29 | |
*** yoeljacobsen has joined #ingres | 04:36 | |
*** yoeljacobsen has quit IRC | 05:25 | |
*** withdefault has joined #ingres | 06:54 | |
*** eriksnoeijs has joined #ingres | 07:42 | |
*** eriksnoeijs has left #ingres | 07:43 | |
*** grantc_offline is now known as grantc | 08:05 | |
grantc | lo SlimeyPete | 11:05 |
---|---|---|
SlimeyPete | ello | 11:05 |
grantc | i am going through the pecl bugs for ingres and am taking a look at http://pecl.php.net/bugs/bug.php?id=13640 | 11:06 |
grantc | using http://ingres.pastebin.com/f6e16d72d i cannot reproduce the problem | 11:07 |
grantc | so if there are no objections I am going to close off the bug :) | 11:09 |
grantc | http://pecl.php.net/bugs/bug.php?id=13640 - showing the permit did get created | 11:10 |
grantc | http://ingres.pastebin.com/f245814ab - not the pecl-link | 11:15 |
SlimeyPete | okay, go ahead and close it | 11:19 |
SlimeyPete | I haven't noticed it happening recently anyway | 11:20 |
grantc | ta | 11:21 |
*** toumi01 has joined #ingres | 12:38 | |
*** satanmalin has joined #ingres | 12:57 | |
satanmalin | hi guys | 12:57 |
grantc | hi satanmalin | 13:04 |
satanmalin | hi grantc | 13:04 |
satanmalin | how are you ? | 13:04 |
grantc | not too bad, and your self? | 13:04 |
satanmalin | sorry it makes ages that i wasnt there | 13:04 |
satanmalin | Im full of happyness | 13:05 |
satanmalin | im glad to anounce you that ill be a ftaher | 13:05 |
satanmalin | father | 13:05 |
satanmalin | in some month | 13:05 |
satanmalin | my girlfriend is pregnant | 13:05 |
grantc | congratulations | 13:06 |
satanmalin | thanks | 13:07 |
grantc | how long to go? | 13:07 |
satanmalin | she is in her 16th week | 13:07 |
satanmalin | so indeed in more or less 5 month | 13:08 |
grantc | so october, in time for halloween :) | 13:08 |
satanmalin | they told us november 8th | 13:09 |
satanmalin | so maybe for halloween | 13:09 |
satanmalin | like your marriage | 13:09 |
satanmalin | ;-) | 13:09 |
grantc | :) | 13:09 |
satanmalin | and what about you ? | 13:10 |
grantc | not much to say really - working, and living nothing else to report.. still waiting to move in to our house | 13:11 |
satanmalin | I can imagine ;-) | 13:11 |
satanmalin | did 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 |
grantc | i have done some testing, i have some notes here for some cosmetic changes nothing really important | 13:15 |
satanmalin | and about the stability of the programm ? | 13:15 |
satanmalin | proagram | 13:15 |
satanmalin | software LOL | 13:15 |
grantc | generally good although i did not spend much time looking through it. I was mainly looking at the user experience | 13:16 |
satanmalin | Oki | 13:17 |
satanmalin | do you have tested ingres on windows 7 ? | 13:17 |
satanmalin | because it seems that it doesnt work | 13:17 |
satanmalin | indeed easyingres dosnt work | 13:18 |
grantc | err no - i have a window 7 vm but I don't know if Ingres even works on that platform | 13:18 |
grantc | http://ingres.pastebin.com/f307cdbc7 - my notes | 13:18 |
satanmalin | so nothing really "important" | 13:19 |
grantc | from the list the missing JRE is the only problem | 13:20 |
grantc | since IDW needs it | 13:21 |
satanmalin | yep i know | 13:21 |
satanmalin | but its bizarre to install JRE for a PHP software ;-) | 13:21 |
grantc | c'est la vie :) | 13:21 |
satanmalin | waouh | 13:22 |
satanmalin | maintenant tu parles francais grant ? | 13:22 |
satanmalin | ;-) | 13:22 |
grantc | un peu | 13:22 |
satanmalin | parlons en grenouille alors | 13:23 |
satanmalin | '=_ | 13:23 |
satanmalin | ;-) | 13:23 |
grantc | fortunately this channel is english only :) | 13:24 |
satanmalin | oki | 13:25 |
satanmalin | :( | 13:25 |
grantc | seulment en roast beef | 13:25 |
satanmalin | LOL | 13:25 |
grantc | if you want to start #ingres-froggie feel free ;) | 13:25 |
satanmalin | to be the only one with bruno and stephane ;-) | 13:26 |
satanmalin | ? | 13:26 |
grantc | perhaps | 13:26 |
satanmalin | LOL | 13:26 |
satanmalin | like on rape me (nirvana) | 13:26 |
satanmalin | im not hte only oneeeeeeeeeeee | 13:26 |
*** grantc is now known as grantc_offline | 14:03 | |
*** grantc_offline is now known as grantc | 14:04 | |
*** DarylM has joined #ingres | 14:21 | |
*** rossand has joined #ingres | 14:28 | |
*** ChanServ sets mode: +o rossand | 14:28 | |
*** DarylM has quit IRC | 14:44 | |
*** DarylM has joined #ingres | 14:53 | |
satanmalin | grantc are you there i hae a problem not on ingres | 15:09 |
satanmalin | im trying to help a friend of mine | 15:09 |
satanmalin | on a project she has | 15:09 |
satanmalin | (for school) | 15:09 |
satanmalin | and i have a problem in php | 15:09 |
satanmalin | (i know ou are THE personn I need ;-) | 15:10 |
satanmalin | its in PHP and its driving me mad | 15:10 |
*** DarylM has quit IRC | 15:12 | |
satanmalin | grantc the PHP god | 15:22 |
satanmalin | i pray you | 15:22 |
NoeJeko | satanmalin maybe I can help you | 15:46 |
satanmalin | ho Noe | 15:46 |
satanmalin | indeed | 15:46 |
grantc | sorry, was at lunch | 15:46 |
satanmalin | Now i have reached to insert into a Mysql db | 15:46 |
satanmalin | pictures | 15:46 |
pboro | images in db may not be a good idea | 15:46 |
satanmalin | but when i try to read them it is diplayes | 15:46 |
pboro | what is the column data type he is using for them? | 15:47 |
satanmalin | like if i try to open them in the notepad | 15:47 |
satanmalin | I know but its for | 15:47 |
NoeJeko | you need to set a header | 15:47 |
satanmalin | a school project | 15:47 |
pboro | is he using correct mime-type for them? | 15:47 |
satanmalin | BLOB | 15:47 |
pboro | header("Content-type: image/jpeg"); for example in the PHP code | 15:47 |
satanmalin | to set a header ?? | 15:47 |
NoeJeko | header('Content-type: image/png'); | 15:47 |
pboro | yes, in HTTP response you must tell what is the mime type of the data you're serving | 15:47 |
satanmalin | ah oki | 15:48 |
NoeJeko | ack pboro beat me to it | 15:48 |
NoeJeko | I'd recommend checking all images with getimagesize() | 15:48 |
NoeJeko | if you're allowing user uploaded images | 15:48 |
NoeJeko | you'll need the gd library for that | 15:48 |
satanmalin | <meta http-equiv="Content-Type" contnt=text/html | 15:48 |
satanmalin | is it that / | 15:48 |
satanmalin | ? | 15:48 |
NoeJeko | that wil make it attempt to render as a HTML page | 15:49 |
pboro | satanmalin, that's HTML, it's not about HTML | 15:49 |
NoeJeko | you need the header lines I or pboro posted | 15:49 |
NoeJeko | using getimagesize() | 15:49 |
pboro | in 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 client | 15:49 |
NoeJeko | you can detect the image type | 15:49 |
NoeJeko | and pass the appropriate header | 15:49 |
satanmalin | but where should i put the header line ? | 15:50 |
satanmalin | header('Content-type: image/png/jpg...') | 15:50 |
NoeJeko | in the code before you output the octet stream | 15:50 |
pboro | satanmalin, in the PHP code | 15:50 |
grantc | before you send any data.... | 15:50 |
satanmalin | oki may i post a pastebin | 15:51 |
satanmalin | ? | 15:51 |
NoeJeko | <?php | 15:51 |
NoeJeko | header('Content-type: image/png'); | 15:51 |
NoeJeko | echo $picturebinarydata; | 15:51 |
NoeJeko | die(); | 15:51 |
NoeJeko | ?> | 15:51 |
pboro | satanmalin, 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_database | 15:51 |
satanmalin | becaumay i send the files to someone ? | 15:52 |
satanmalin | or post it on pastebin to see where is my problem ? | 15:52 |
pboro | I rest my case and leave for home :) Bye guys! -> | 15:53 |
grantc | cya pboro | 15:53 |
NoeJeko | cheers, I need to head into the office, I leave this with Grant =] | 15:53 |
grantc | thanks NoeJeko | 15:54 |
grantc | satanmalin: post it to a pastebin and I will take a look | 15:54 |
satanmalin | http://ingres.pastebin.com/m45f1c1aa | 15:54 |
satanmalin | http://ingres.pastebin.com/m4e1fe876 | 15:55 |
satanmalin | bye guys | 15:55 |
satanmalin | these are my two files | 15:56 |
*** satanmalin has quit IRC | 16:03 | |
*** satanmalin has joined #ingres | 16:04 | |
satanmalin | grantc ? | 16:06 |
grantc | ok - looking at http://ingres.pastebin.com/m4e1fe876, you cannot echo the image to the screen | 16:06 |
satanmalin | so what is the method to ? | 16:06 |
grantc | in HTML terms you must present an image within an <IMG /> tag | 16:06 |
grantc | so <IMG SRC="http://......" /> | 16:06 |
grantc | i have some code that does something similar for ingres...let me see | 16:07 |
satanmalin | oki | 16:09 |
grantc | ok 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 |
grantc | the other script is http://ingres.pastebin.com/f5c0be75 | 16:11 |
satanmalin | should i use the firs or the second ? | 16:12 |
*** DarylM has joined #ingres | 16:12 | |
grantc | in that 2nd script it fetches the image from the database and displays it with the correct content header | 16:13 |
grantc | that 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 |
satanmalin | euh im a beginner | 16:14 |
satanmalin | LOL | 16:15 |
satanmalin | im lost | 16:15 |
*** mull has joined #ingres | 16:15 | |
satanmalin | may you make me the code mix | 16:17 |
grantc | each HTTP request can only have one content type; html, jpg, png, mp3..... essentially you cannot have multiple content types in a single request | 16:17 |
satanmalin | oki | 16:17 |
grantc | each web page can be made up of one or more requests - one for the text then other for images or flash or .... | 16:17 |
grantc | that way you have one content type per request | 16:18 |
satanmalin | indeed i cant do a select * from wich has as a result text and image ? | 16:18 |
grantc | images are presented using the <IMG SRC="....."/> HTML tag | 16:18 |
grantc | because your page is already set to send text/html | 16:19 |
grantc | the <IMG /> tag is a separate request in the same page | 16:19 |
satanmalin | oki ... | 16:20 |
grantc | so looking at http://ingres.pastebin.com/f5c0be75 - all it does is fetch an image and set the content type to image/jpeg | 16:20 |
grantc | for example if you were to call http://......./get_image.php?id=44 it would just show you the picture for id 44 | 16:21 |
satanmalin | oki | 16:21 |
satanmalin | grantc in http://ingres.pastebin.com/f5c0be75 i only need to copy the header | 16:22 |
satanmalin | or all tge file | 16:23 |
grantc | the file is based on ingres not mysql but the concept is the same | 16:23 |
satanmalin | and mysql funtion are the same as ingres ? | 16:23 |
satanmalin | just rename ingres in mysql | 16:23 |
satanmalin | in this script | 16:24 |
grantc | more or less yes | 16:25 |
satanmalin | so if i copy this code into mine | 16:25 |
satanmalin | changing Ingres by ,sql | 16:25 |
satanmalin | it must work | 16:25 |
grantc | yup | 16:26 |
satanmalin | no need to change the first file only the second | 16:26 |
satanmalin | the one i use to put the image into the database is good | 16:27 |
satanmalin | what is ingres.scrollable ? | 16:28 |
grantc | to display a picture in one page you have to make a separate query or save the image to disk and then show it | 16:29 |
satanmalin | but does it exists on mysql ? | 16:29 |
grantc | am sure there are examples if you search google | 16:29 |
grantc | ingres.scrollable is an ingres only thing | 16:29 |
grantc | http://www.google.fr/search?q=site%3Afr+image+mysql+php | 16:29 |
*** DarylM has quit IRC | 16:30 | |
satanmalin | oki | 16:30 |
satanmalin | i found some pages but the code was not good | 16:30 |
*** DerMeister has joined #ingres | 16:32 | |
satanmalin | oki il try and ill told | 16:34 |
satanmalin | you | 16:34 |
satanmalin | thanks grant | 16:34 |
grantc | first write a page like http://ingres.pastebin.com/f5c0be75 which just fetches the picture | 16:34 |
grantc | then in the page you want to display the picture you do <img src="get_image.php?id=....."> | 16:36 |
grantc | where the id value is some unique identifier for the image | 16:36 |
satanmalin | and is it impossible to list a list of image ?" | 16:40 |
satanmalin | if in my database i have 3 images | 16:41 |
satanmalin | id= ? | 16:41 |
grantc | how do you identify each one | 16:42 |
grantc | or rather the question is "what SQL do you need to get each image" | 16:42 |
satanmalin | select id_article from article | 16:43 |
grantc | so each article has an id_article column? | 16:43 |
satanmalin | yep | 16:43 |
grantc | in that case that will be the id you pass | 16:43 |
satanmalin | may i do somtehong like | 16:44 |
grantc | in the demodb example the column is called up_id | 16:44 |
satanmalin | while { $article== true) | 16:44 |
satanmalin | { | 16:44 |
satanmalin | echo <p><img src = get_image.php?id=.article{i};." | 16:45 |
satanmalin | i++; ? | 16:45 |
satanmalin | somethong like that ? | 16:45 |
grantc | it 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 3 | 16:46 |
satanmalin | it works | 16:47 |
satanmalin | if i have | 16:47 |
satanmalin | 12 4 5 6 | 16:47 |
satanmalin | id {1} exists its 1 | 16:47 |
satanmalin | id[3] exists its 4 | 16:47 |
satanmalin | id[6] doesnt esicts in the database | 16:48 |
satanmalin | the while ends | 16:49 |
satanmalin | ? | 16:49 |
satanmalin | isnt it | 16:49 |
satanmalin | ? | 16:49 |
grantc | if you want to list all articles then it would be easier to do it another way | 16:49 |
grantc | http://ingres.pastebin.com/d49eec158 | 16:52 |
grantc | that code loops on the rows in the database | 16:52 |
satanmalin | thanks grantc | 16:56 |
*** thiagomz has joined #ingres | 18:14 | |
grantc | NoeJeko: are you about? | 18:37 |
*** DarylM has joined #ingres | 19:59 | |
*** grantc is now known as grantc_offline | 20:16 | |
*** DerMeister has quit IRC | 21:10 | |
*** withdefault has quit IRC | 22:00 | |
*** atrofast has joined #ingres | 22:47 | |
*** thoda05 has joined #ingres | 22:48 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!