Jump to content

jishosan

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jishosan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. MadTechie is right on. Honestly, you wouldn't need more than about 60M or so for at 3500 pixel image, even if PHP creates a bitmap copy during the image resampling process. 80M should be enough, and 160M is probably overkill. I take it the memory_get_usage() line never executed or showed you any additional error message?
  2. To expand on what was explained before: When using $this-> within a class definition for OOP, you are telling the system to reference the specific instance of a class rather than the actual function itself. For instance: <?php class Bar { var $text; function HelloWorld() { echo $this->text; } } $Foo = new Bar; $Foo->text = "Hello, World! <br>"; $Foo2 = new Bar; $Foo2->text = "Goodbye, World! <br>"; $Foo->HelloWorld(); $Foo2->HelloWorld(); ?> In the code above, we created two instances of the same class. When we called the HelloWorld() function for each class, the $this->text keyword replaced "$this" with the corresponding class name ($Foo and $Foo2).
  3. Yes, increase it to 80 and see if you get the same error. Probably 60M would be enough, but 80M is a safe number.
  4. akitchin is exactly right. The system does not retain the 'search' variable when you click on the second link. It is basically reloading the query, but with an empty search string, which means the entire query is basically "order by name". You need to modify your order links to retain the search= string by appending the order string to it. You could use things like Session variables to get around this limitation, but it seems like the simple fix that was mentioned will cover it. Because you are using echo commands for you html, you should be able to just put it like this: if (mysql_num_rows($result)>0) { echo "<div id=sortactions>". "Order results by: ". "<a href='search.php?search={$searchTitle}&order=name'>Name / </a>". "<a href='search.php?search={$searchTitle}&order=price'>Price</a></div>";
  5. Are you able to view or modify the php.ini memory information on the remote server? If you're using shared hosting, you might be facing an issue with their memory limits.
  6. Can we see the code for the page submit? As was previously mentioned, you will need to ensure that the system is passing the variables correctly http://localhost/page/page.php?search=string&order=name If the &order is not listed properly, then order will not be populated. Could you post the full URL for a search that passes both variables, and the relevant query that your script builds?
  7. Before you submit the mysql_query, echo $query so we can validate the string being passed.
  8. Can you echo out the $im_divice variable? Or better yet, echo ALL your variables before the $thumb= statement and post the output. Also, have you checked the site logs for any expanded error information?
  9. Perhaps a strange question, but your comments note that you want a maximum thumbnail size of 100x100. However, your code seems to set the longest side to 140px. Was that just an intentional feature change? Looking at the information you posted, you have PHP memory_limit set to 40M, which should be plenty. Are the images coming from two different sources? Can you add some echo statements to echo your assigned values as the script runs? If one of your values resolves to 0, you might be experiencing a divide by zero error.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.