Be a Supporter!

getting image from database problem

  • 670 Views
  • 9 Replies
New Topic Respond to this Topic
twistednexus4k
twistednexus4k
  • Member since: Dec. 24, 1999
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
getting image from database problem 2001-07-30 09:18:12 Reply

will some one please help me as this is a pain in the ass and i dunno why it wont show the image here is the line that im having problems with :

img src=<?PHP echo $camurl; ?>

can anyone see anythign wrong with this as i cant figure out how i should have it layed out.. Please reply asap or e-mail me at chris@stoned-animations.com

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to getting image from database problem 2001-07-30 09:52:22 Reply

At 7/30/01 09:18 AM, cpeat wrote: will some one please help me as this is a pain in the ass and i dunno why it wont show the image here is the line that im having problems with :

img src=<?PHP echo $camurl; ?>

can anyone see anythign wrong with this as i cant figure out how i should have it layed out.. Please reply asap or e-mail me at chris@stoned-animations.com

I'd put the variable in paretheses: echo($camurl);

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to getting image from database problem 2001-07-30 10:23:44 Reply

At 7/30/01 09:52 AM, MassiveBit wrote:
At 7/30/01 09:18 AM, cpeat wrote: will some one please help me as this is a pain in the ass and i dunno why it wont show the image here is the line that im having problems with :

img src=<?PHP echo $camurl; ?>

can anyone see anythign wrong with this as i cant figure out how i should have it layed out.. Please reply asap or e-mail me at chris@stoned-animations.com
I'd put the variable in paretheses: echo($camurl);

No need for parentheses, but some quotes (single or double) may help. <? echo "$camurl"; ?>

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to getting image from database problem 2001-07-30 10:53:09 Reply

At 7/30/01 10:23 AM, liljim wrote:
At 7/30/01 09:52 AM, MassiveBit wrote:
At 7/30/01 09:18 AM, cpeat wrote: will some one please help me as this is a pain in the ass and i dunno why it wont show the image here is the line that im having problems with :

img src=<?PHP echo $camurl; ?>

can anyone see anythign wrong with this as i cant figure out how i should have it layed out.. Please reply asap or e-mail me at chris@stoned-animations.com
I'd put the variable in paretheses: echo($camurl);
No need for parentheses, but some quotes (single or double) may help. <? echo "$camurl"; ?>

Either one should work.
BTW Jim, mySQL is still down. I was able to shut it down, but now I can't get it back up. :( It keeps throwing an error saying it couldn't find or get into a directory mysql/var/, but I don't have a 'var' directory in there. I don't know why it keeps looking for it.

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to getting image from database problem 2001-07-30 12:43:36 Reply

At 7/30/01 10:53 AM, MassiveBit wrote: BTW Jim, mySQL is still down. I was able to shut it down, but now I can't get it back up. :( It keeps throwing an error saying it couldn't find or get into a directory mysql/var/, but I don't have a 'var' directory in there. I don't know why it keeps looking for it.

Hrms... Did you gunzip the file from mysql, or did you install some other way? I am bound to come across these problems in the near future, but installing for us was easy... we just did it with the cobalt software that came with the server.

There's a directory on our server called /var/lib/mysql - which holds all of the database files, and is referenced from the mysql_config file. Wonder if that has anything to do with it?

Mxpxstud14
Mxpxstud14
  • Member since: Oct. 30, 2000
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to getting image from database problem 2001-07-30 12:58:43 Reply

I need to learn some more mysql got any really good easy to use refrence sites jimbo?

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to getting image from database problem 2001-07-30 13:04:35 Reply

At 7/30/01 12:43 PM, liljim wrote:
At 7/30/01 10:53 AM, MassiveBit wrote: BTW Jim, mySQL is still down. I was able to shut it down, but now I can't get it back up. :( It keeps throwing an error saying it couldn't find or get into a directory mysql/var/, but I don't have a 'var' directory in there. I don't know why it keeps looking for it.
Hrms... Did you gunzip the file from mysql, or did you install some other way? I am bound to come across these problems in the near future, but installing for us was easy... we just did it with the cobalt software that came with the server.

There's a directory on our server called /var/lib/mysql - which holds all of the database files, and is referenced from the mysql_config file. Wonder if that has anything to do with it?

Yup, I just gunzipped as per the instructions of mysql.com and it never had a 'var' directory to begin with. But I'll have to check my mysql_config, perhaps there's something weird going on there.. maybe I just got hacked I dunno.. I don't have the most secure server ever. ;)

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to getting image from database problem 2001-07-30 15:54:28 Reply

At 7/30/01 12:58 PM, Mxpxstud14 wrote: I need to learn some more mysql got any really good easy to use refrence sites jimbo?

Yeah, MySQL.com ;) Seriously, many people (including me) seem to miss the most important sites when they're first learning PHP and MySQL. I can remember spending days with some scripts, just too get them to do what both PHP and MySQL already had in built functions for.

If you haven't got much background coding experience, I suggest you get a decent book which'll give you some working knowledge on real world examples etc etc. You might also like to download some free scripts and look at the code other people have written... If there's something you don't understand (like a function or class) you can look it up in the quick reference section of the PHP site (providing of course that it's not a user-defined function), or do a search at MySQl.com if it's syntax relative to MySQL.

Kon - I guess you could grep through each of the config files and see what's pointing to this elusive directory... Don't you have to recompile MySQL if you start fiddling with the config files though?

Pecos
Pecos
  • Member since: Dec. 29, 1999
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to getting image from database problem 2001-07-30 21:11:34 Reply

At 7/30/01 03:54 PM, liljim wrote:
At 7/30/01 12:58 PM, Mxpxstud14 wrote: I need to learn some more mysql got any really good easy to use refrence sites jimbo?
Yeah, MySQL.com ;) Seriously, many people (including me) seem to miss the most important sites when they're first learning PHP and MySQL. I can remember spending days with some scripts, just too get them to do what both PHP and MySQL already had in built functions for.

If you haven't got much background coding experience, I suggest you get a decent book which'll give you some working knowledge on real world examples etc etc. You might also like to download some free scripts and look at the code other people have written... If there's something you don't understand (like a function or class) you can look it up in the quick reference section of the PHP site (providing of course that it's not a user-defined function), or do a search at MySQl.com if it's syntax relative to MySQL.

Kon - I guess you could grep through each of the config files and see what's pointing to this elusive directory... Don't you have to recompile MySQL if you start fiddling with the config files though?

You shouldn't have to for most basic configs. That's be just dumb on their part - to make us compile it every time.

<deleted>
Response to getting image from database problem 2001-08-12 08:09:21 Reply

lol