-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
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.
-
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 ) );
-
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.
-
That adds a .php extension. I'm asking what you have for this clean URL stuff you want to do.
-
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.
-
What version of PHP does code stored outside the root use
requinix replied to cyberRobot's topic in PHP Coding Help
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. -
"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.
-
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.
-
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.
-
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.
-
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?
-
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?
-
Having font size troubles with imagettftext
requinix replied to BlackDragonIV's topic in PHP Coding Help
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. -
Having font size troubles with imagettftext
requinix replied to BlackDragonIV's topic in PHP Coding Help
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. -
Having font size troubles with imagettftext
requinix replied to BlackDragonIV's topic in PHP Coding Help
libgd isn't the highest quality stuff. Look into imagemagick, or else use a 10x upscale/downscale. -
Having font size troubles with imagettftext
requinix replied to BlackDragonIV's topic in PHP Coding Help
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? -
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?
-
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?
-
Please no. It is a number. Treat it like a number.
-
php download - redirect to page and finish download
requinix replied to xtent's topic in PHP Coding Help
If you mask the link then how will the browser know where to go? If the browser knows then the user can know. -
(int) will truncate the number. The actual value is something like 27852.99999999997. Spoiler for most floating-point problems: round().
-
php download - redirect to page and finish download
requinix replied to xtent's topic in PHP Coding Help
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.