T_STRING error (line 183) - NextGen Gallery Plugin

Thread Solved

Join Date: Jul 2009
Posts: 2
Reputation: cinemaduro is an unknown quantity at this point 
Solved Threads: 0
cinemaduro cinemaduro is offline Offline
Newbie Poster

T_STRING error (line 183) - NextGen Gallery Plugin

 
0
  #1
Jul 3rd, 2009
Hey all. First time poster here. This looks like a great community!

I'm getting a "Parse error: syntax error, unexpected T_STRING" error. I'm just starting to get into PHP and can't for the life of me see where the problem is. This is part of the NextGen Gallery plugin for WordPress. The error is ocurring on line 183, which is the line: $this->oldImage = ini ImageCreateFromJpeg($this->fileName);
I don't see any quotes out of place, or missing semi colons. Any ideas??

If you have the latest version of the nextgen gallery plugin it's the file located: lib/gd.thumbnail.inc.php

Code snippet context is here (problem code is near middle - {edit: line 17 in post}):

  1. // increase memory-limit if possible, GD needs this for large images
  2. @ini_set('memory_limit', '256M');
  3.  
  4. if($this->error == false) {
  5. // Check memory consumption if file exists
  6. $this->checkMemoryForImage($this->fileName);
  7. }
  8.  
  9. //initialize resources if no errors
  10. if($this->error == false) {
  11.  
  12. switch($this->format) {
  13. case 'GIF':
  14. $this->oldImage = ImageCreateFromGif($this->fileName);
  15. break;
  16. case 'JPG':
  17. $this->oldImage = ini ImageCreateFromJpeg($this->fileName);
  18. break;
  19. case 'PNG':
  20. $this->oldImage = ImageCreateFromPng($this->fileName);
  21. break;
  22. }
  23. if (!$this->oldImage) {
  24. $this->errmsg = 'Create Image failed. Check memory limit';
  25. $this->error = true;
  26. } else {
  27. $size = GetImageSize($this->fileName);
  28. $this->currentDimensions = array('width'=>$size[0],'height'=>$size[1]);
  29. $this->newImage = $this->oldImage;
  30. $this->gatherImageMeta();
  31. }
  32. }


Thanks for any help in advance!
Last edited by cinemaduro; Jul 3rd, 2009 at 5:35 pm. Reason: add line number
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: T_STRING error (line 183) - NextGen Gallery Plugin

 
0
  #2
Jul 3rd, 2009
remove the "ini " before ImageCreateFromJpeg on line 17
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 2
Reputation: cinemaduro is an unknown quantity at this point 
Solved Threads: 0
cinemaduro cinemaduro is offline Offline
Newbie Poster

Re: T_STRING error (line 183) - NextGen Gallery Plugin

 
0
  #3
Jul 3rd, 2009
Great, thanks, that seems to have gotten rid of the T_STRING error...now I'm just getting errors that say "resize failed: Check memory limit" guess I'll see if I can edit the php.ini file on this server or not...thought that's what @ini_set('memory_limit', '256M'); was for. Thanks again for the quick response!
Last edited by cinemaduro; Jul 3rd, 2009 at 6:31 pm.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC