TheHaloEffect Posted November 29, 2008 Share Posted November 29, 2008 Hey guys, First off, thanks for looking at my post The problem I'm having is this: I've set phpthumb to do the following:- <img src="phpthumb/phpThumb.php?src=/screens/upload.php?show=<?php $random = rand(11,14); echo $random; ?>" alt=""> Now, on the site itself, it comes up with an error saying /home/halo/public_html/screens/upload.php?show=12 does not exist Whereas if you visit: http://www.xodiac.net/screens/upload.php?show=12 - the picture does very well indeed exist. Any ideas what's going on? Thanks again! <3 Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/ Share on other sites More sharing options...
kenrbnsn Posted November 29, 2008 Share Posted November 29, 2008 Remove the leading "/" from the path. <img src="phpthumb/phpThumb.php?src=screens/upload.php?show=<?php $random = rand(11,14); echo $random; ?>" alt=""> Ken Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701719 Share on other sites More sharing options...
TheHaloEffect Posted November 29, 2008 Author Share Posted November 29, 2008 I tried that before mate, I tried quite a few variations but still no joy. I've changed it now so you can see the error... /home/halo/public_html/screens/phpthumb/screens/upload.php?show=12 does not exist Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701744 Share on other sites More sharing options...
ShiloVir Posted November 29, 2008 Share Posted November 29, 2008 <?php echo "<img src='phpthumb/phpThumb.php?src=screens/upload.php?show=".rand(11,14)."' alt=''>"; ?> Perhaps...? EDIT: I tested it on my server to find this does work. Enjoy... Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701790 Share on other sites More sharing options...
TheHaloEffect Posted November 29, 2008 Author Share Posted November 29, 2008 http://www.xodiac.net/screens/ does exactly the same thing In theory, it should work... Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701811 Share on other sites More sharing options...
flyhoney Posted November 29, 2008 Share Posted November 29, 2008 Look at the error: /home/halo/public_html/screens/phpthumb/screens/upload.php?show=12 does not exist phpthumb is looking in the wrong directory. Try this: <img src="phpthumb/phpThumb.php?src=../upload.php?show=<?php $random = rand(11,14); echo $random; ?>" alt=""> Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701814 Share on other sites More sharing options...
Daniel0 Posted November 29, 2008 Share Posted November 29, 2008 You cannot do that. It seems it needs the path to the image on the disk. It's not asking for a URL. Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-701816 Share on other sites More sharing options...
TheHaloEffect Posted December 2, 2008 Author Share Posted December 2, 2008 You cannot do that. It seems it needs the path to the image on the disk. It's not asking for a URL. So is there nothing that can be done? Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703961 Share on other sites More sharing options...
Daniel0 Posted December 2, 2008 Share Posted December 2, 2008 Yes, specify the path to the file on the disk. Or generate the thumbnail yourself. Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703971 Share on other sites More sharing options...
TheHaloEffect Posted December 2, 2008 Author Share Posted December 2, 2008 Yes, specify the path to the file on the disk. Or generate the thumbnail yourself. The image is in MySQL. The path the upload script shows is ?show=xx Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703977 Share on other sites More sharing options...
Daniel0 Posted December 2, 2008 Share Posted December 2, 2008 You mean like in a blob? You're better off storing the image on the disk and reading it from there. It'll put less strain on the database server. Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703986 Share on other sites More sharing options...
TheHaloEffect Posted December 2, 2008 Author Share Posted December 2, 2008 Meh, now I've gotta rewrite my whole upload script Yer I meant in a blob. Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703990 Share on other sites More sharing options...
TheHaloEffect Posted December 2, 2008 Author Share Posted December 2, 2008 Thank you everyone who has replied Link to comment https://forums.phpfreaks.com/topic/134759-phpthumb-variable-help-please/#findComment-703997 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.