Page 1 of 1

php noob needs some help

Posted: Mon Aug 29, 2005 10:48 am
by Kaervek
i posted a while ago for some advice on php, i havent tried anything with it since but right now i am looking into setting up this program called phpThumb.

http://phpthumb.sourceforge.net/

anyway theres several things i cant figure out
where do i put teh phpThumb files? do i upload them with my site to the root folder and refer to it from there? also it says it uses the GD library. does that mean that i have to download and set that up as well? if so where do i put the GD library? it appears that GD is something that the server needs to actively execute. am i going to be restricted to sites that are running GD all the time? in order to get php thumb to work do i have to put some kind of include or script at the beginning of my html document.

none of these simple questions are addressed clearly on the phpThumb site.

Thanks for your help in advance.

Posted: Mon Aug 29, 2005 10:55 am
by feyd
The code itself, can likely be placed anywhere you can call it from. As for GD, you should check to see if it's installed and loaded using phpinfo()


Moved to PHP - Code.

Posted: Mon Aug 29, 2005 11:18 am
by Kaervek
i know that i can place the code in my html document for example
"<img src="../phpThumb.php?src=images/disk.jpg&w=200">"
but i cant figure out where to put all the files that come with the phpThumb download. the readme file doesnt seem to say anything about it, it seems that most of these things assume that people know how to set them up

also i have to make a distinction between my local system and the server. is it a fact that something like this will work when you load the page from a weserver but may not if i just open the html file in IE from my local machine?

Posted: Mon Aug 29, 2005 11:28 am
by feyd
in all probability, their code doesn't require a specific location, per se, as long as GD is available to their code.

Posted: Mon Aug 29, 2005 11:49 am
by timvw
I've played a little with phpthumb this weekend ;)
Here is some code that i wrote (i didn't feel like using the standard phpthumb script, so i used only the class)

http://timvw.madoka.be/programming/php/ ... il.php.txt

Posted: Mon Aug 29, 2005 11:50 am
by Kaervek
ok
it seems that way to me too

so is GD something i need to install? if so i should how do i go about installing it in my webspace?

Posted: Mon Aug 29, 2005 11:57 am
by Kaervek
timvw

thanks very much i think that may help me in the future

from what knowledge i have of php (which is precious little) im going to guess that is a file you made called thumbnail.php but you just saved a text version called thumbnail.php.txt for me and others to view? and from your description this is a rewrite of something that comes with phpThumb?
require_once('../../init.php');
require_once(TVW_EXT . '/phpthumb/phpthumb.class.php');
this is the kind of thing im wondering do i need to put into my html document to get this thing to work. or did you only have to use these kind of include statements because you rewrote some of their code?