Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. There's a lot more to cache than just the data itself. Does your 11GB count indexes? It definitely won't include a query cache.
  2. I'm not sure I understand. You posted some code earlier and asked why it didn't work, and are now saying that this other code is somehow responsible for it? Look at your code again, but this time with proper indentation: $_SESSION["cart_item"] = array( // <- this will be $cart_items 'cart_item' => array( // <- so this is what the foreach will find 'id' => $id, 'product_name' => $product_name ) );
  3. The item in $_SESSION is called "cart_item". One item. That's what it is, right? You then assign it to a variable named "cart_items". Plural. That does not magically make it have multiple items. You only have the one item. You can't foreach over an item. What you need is an array of items (see the plural?) which you can then foreach over.
  4. That adds a .php extension. I'm asking what you have for this clean URL stuff you want to do.
  5. I don't mean to replace your network_id key with this. Keep it with its CASCADE SET NULL. And the account_id key. Add a new key, with no cascading options, that is specifically about enforcing the account_id agrees with the (if present) network_id. You have to delete the attachment too, otherwise IPB will think you want them added automatically.
  6. Oh, so the node's network_id is not so much "child of" but more "assigned to". That's fine. MySQL's foreign keys are always MATCH SIMPLE, meaning that any value can be NULL and the key just won't be enforced. So give the node a foreign key (network_id, account_id) to network's (id, account_id).
  7. PHP scripts aren't programs. They don't execute themselves. They are interpreted. Which means how they're interpreted depends on what is doing the interpreting.
  8. "Added back"? That doesn't sound right. The network ID should be artificial, so if you "add back" the network then it will have a new ID. So either, a) The network ID is not artificial. It should be some unique identifier inherent to the network. I have no idea what that might be, but it would be something you can recover when you restore the deleted network. b) Don't delete networks. Mark them as deleted but leave the data intact. Then you can unmark it later.
  9. No, because a decent "script" doesn't know you or your application or your server. Perish the thought but you have to actually do some work here.
  10. Yeah. Javascript runs on the browser. Not the server. (Except like Node.js, that's different.) And it would be an extremely terrible idea to allow Javascript on someone's browser to upload files to your server without your say-so.
  11. Then the answer to "where is the line I need to edit" is either "whatever the code says the line is" or "whatever the documentation says the line is". In other words, I don't see what one has to do with the other. Javascript cannot upload files to a directory on your server. Thankfully. You have to have an script to receive uploaded files and process them according to however you want.
  12. Exactly what kind of answer are you looking for? How can anyone reply to that question in a way that doesn't make the answer sound obvious?
  13. One sure-fire way to get people to not help you is to tag them and plead for their help. What RewriteRule have you tried to do this? "Can't" do that with just mod_rewrite. The problem is that you want to replace spaces with hyphens. What you can do is rewrite /article/this-is-new-product to /article?title=this-is-new-product. So first make your article.php support that. When that's ready, What RewriteRule have you tried to do this?
  14. Not upscale the whole image - just the parts that involve rendering text. Scale up, add text and draw stuff, scale down, layer on images and whatever other assets. And GD does support transparency, but it's a bit tricky to get working. All in all ImageMagick is just generally better quality. GD is more about quick and dirty.
  15. You can settle for 0.75pt, if that's an option. Honestly I would still stick with 1pt increments, given that I wasn't able to see an explanation when I checked the libgd source (which actually shells out this work to the FreeType library). ImageMagick is rather good, but requires a bit more stuff installed on the server, and using it tends to involve calling the program - it's not often used as a library like GD. If you need to do this "seriously" then I recommend it. Upscaling would be easy and get you the 0.1pt resolution you want. At the expense of higher memory usage, but that may not be a problem. Going to an entirely different language seems like a lot of effort and is, frankly, an overreaction.
  16. libgd isn't the highest quality stuff. Look into imagemagick, or else use a 10x upscale/downscale.
  17. Yeah. Though technically it's libgd doing the work, not PHP itself. Stick with integral font sizes. Or you can upscale the image even further. But you haven't mentioned what you're trying to get out of this. What is your actual goal here?
  18. Unfortunately, if you're looking for someone (me included) to learn your application and do the work for you, you're probably going to have to pay them. But help and advice is free, as long as you're willing to put some effort into it. I assume you've tried entering more than 275 characters already? To see what happens? So: what happens?
  19. There's really no way whatsoever for us to know from just your description. Maybe the limitation is in the code. Maybe it's in the database. Maybe there is no limitation and it's just lying to you. Exactly how much do you know about the code?
  20. I'm not sure it can help you... What is the amount changed since yesterday? Do you have that value? What is yesterday's price? Do you have that value? Do you possibly have a way of calculating that value? What is 100?
  21. Please no. It is a number. Treat it like a number.
  22. If you mask the link then how will the browser know where to go? If the browser knows then the user can know.
  23. (int) will truncate the number. The actual value is something like 27852.99999999997. Spoiler for most floating-point problems: round().
  24. Set up the second page to show what you want, then use Javascript to "redirect" to the download. If you think not showing them the link means they can't download the file at will, you're quite a bit mistaken.
×
×
  • 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.