DS stands for DIRECTORY_SEPARATOR which is / on unix and \ on windows. So, in fact, having an almighty mac does not solve the problem of DS :(
Faifas http://www.voveris.eu/ On Tue, Sep 15, 2009 at 23:17, hahmadi82 <[email protected]> wrote: > > > Hi, > > I'm developing this on a mac. I'm not sure what "DS" means, if you could > please clarify. Can you show me an example of what you mean with what I > posted? I also added the code you wrote below to the create_thumb function > in phpThumb.php (before setparameters() and after $this->php_thumb() = new > phpThumb()). Unfortunately, I still could not get the image to show up. > > > > euromark (munich) wrote: > > > > > > first i hope you are not working under windows > > because you need DS then (instead of just /) > > > > and i guess you are short of one DS right at the beginning of display > > path > > those should be relative to the root (DS.'...') - same with error > > image > > > > > > second: > > "and as this helper does not use the config.php, you just need to pass > > it before calling the setParameter() method" > > > > as far as i could tell, these files are not read in the "object" mode > > so you need to modify your phpthumb helper here! (i might be wrong > > here - if it acually works for you now) > > > > ... > > $this->php_thumb = new phpThumb(); > > > > # addon > > $PHPTHUMB_CONFIG = array(); > > $PHPTHUMB_CONFIG['allow_src_above_docroot'] = true; > > if (!empty($PHPTHUMB_CONFIG)) { > > foreach ($PHPTHUMB_CONFIG as $key => $value) { > > $keyname = 'config_'.$key; > > $this->php_thumb->setParameter($keyname, > $value); > > } > > } > > # addon end > > ... > > > > > > On 14 Sep., 08:25, hahmadi82 <[email protected]> wrote: > >> I changed the flag you mentioned to true in phpThumb.config.php.default > >> and > >> phpThumb.class.php (I assume these are the files I was supposed to > >> modify). > >> And now, it generates I get: > >> > >> Array ( [error] => 0 [src] => > >> garagecar/thumbs/2a562aaab2efeb439d5b63c753746c3e.jpg [w] => 100 [h] => > >> 100 > >> ) > >> > >> However, that image link does not work (shows up blank) and no image is > >> created in that folder. Any ideas why this might be the case? > >> > >> Here's my helper call code: > >> > >> $thumbnail = $phpthumb->generate( > >> array( > >> 'save_path' => WWW_ROOT . > >> 'garagecar/thumbs', > >> 'display_path' => > 'garagecar/thumbs', > >> 'error_image_path' => > >> 'user/blankuser.jpg', > >> 'src' => WWW_ROOT . 'img/garagecar/' > >> . > >> 'gc'.$garagecars[0]['GarageCar']['id'] . '_i' . > >> $garagecars[0]['GarageCar']['default_image_id'] . '.jpg', > >> 'w' => 100, > >> 'h' => 100, > >> 'q' => 100, > >> 'zc' => 1 > >> ) > >> ); > >> > >> > >> > >> euromark (munich) wrote: > >> > >> > i guess i found the problem > >> > >> > you need $PHPTHUMB_CONFIG['allow_src_above_docroot'] = true; > >> > if you use /webroot/ as your top level folder (on localhost i use / > >> > localhost/.../app/ > >> > >> > and as this helper does not use the config.php, you just need to pass > >> > it before calling the setParameter() method > >> > >> > On 13 Sep., 22:54, "euromark (munich)" <[email protected]> > >> > wrote: > >> >> funny thing > >> > >> >> i tried that helper > >> >> and on localhost with xampp/windowsXp it works just fine > >> > >> >> after uploading it to my webserver (linux), it broke (same error as > >> >> yours) > >> > >> >> so my guess is something with the paths? > >> >> i carefully set them up with DS - and they look all right.. > >> > >> >> i made sure the cache folder is set to 777 etc > >> >> so missing rights can be ruled out, too > >> > >> >> did you figure it out, yet? > >> > >> >> On 13 Sep., 22:51, "euromark (munich)" <[email protected]> > >> >> wrote: > >> > >> >> > On 11 Sep., 23:24, hahmadi82 <[email protected]> wrote: > >> > >> >> > > I'm trying to use this helper with the phpThumb > >> >> library:http://code621.com/content/1/phpthumb-helper-for-cakephp > >> > >> >> > > When I run the code to give me a thumbnail I get: > >> > >> >> > > Array ( [error] => 1 [error_detail] => phpThumb > >> >> > > v1.7.9200805132119thissourceFilename and thissrc are both empty > >> [src] > >> >> => > >> >> > > user/blankuser.jpg [w] => 100 [h] => 100 ) > >> > >> >> > > Does anyone know what the error_detail means? > >> > >> >> > > -- > >> >> > > View this message in > >> >> context:http://www.nabble.com/phpThumb-tp25408589p25408589.html > >> >> > > Sent from the CakePHP mailing list archive at Nabble.com. > >> > >> -- > >> View this message in > >> context:http://www.nabble.com/phpThumb-tp25408589p25430889.html > >> Sent from the CakePHP mailing list archive at Nabble.com. > > > > > > > > > -- > View this message in context: > http://www.nabble.com/phpThumb-tp25408589p25461041.html > Sent from the CakePHP mailing list archive at Nabble.com. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
