Jump to content

adrianTNT

Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by adrianTNT

  1. Hello. When mysql starts on my server (cent OS with plesk) it shows in mysql logs that max_join_size had a bad value and it set it to correct one, this is the bug info: http://bugs.mysql.com/bug.php?id=35346 It says to set the max_join_size value to "4M" but I have no idea what "config file" to edit. I tried both these in /etc/my.cnf and rebooted the server: But the error is still there in logs, (still tries to start with that bad value): Am I editing the wrong file or entering the wrong command?
  2. Thanks, so I tried this, and it seems to do the trick, (if anyone sees a problem please let me know): $string = preg_replace("/[^A-Za-z0-9_]/", " ",$string);
  3. Can someone tell me how to convert this ereg_replace to preg_replace ? $string = ereg_replace("[^A-Za-z0-9_]", " ", $string); It is supposed to only allow letters and numbers. Then I also need to replace multiple spaces that was like this: $string = ereg_replace("( )+", "_", $string);
  4. I am not sure if there is a better solution but on my server I write another rule with the slash at the end, it works to add it in same rule by writing (/)? at the end, I think it is like this for your rule: RewriteRule ^.*(/)?$ list.php Unless others have better ideas
  5. Hello. I want to have a photo album URL that looks like this: /pictures/christmas-pictures-1020/christmas-lights-234.html That is album title - album id / photo title - photo id ^. My current rule: RewriteRule ^pictures/(.*)-([0-9]+)/(.*)-([0-9]+).html$ ... I want to allow special characters in these titles, characters like ţîş that is why the (.*) but I assume this is not right because any_character can also be a slash. I tried to replace (.*) with [a-zA-Z] but that one does't include special characters ?! What would be the solution? Maybe I can just add a condition where title can be any char but not "/", if this is a good solution then how do I write this "not slash" condition ? Thank you.
  6. I think the part of that code that saves the actual image file on server is: imagejpeg($logoImage, "imageWithLogo.jpg", 100); if you call that in site root it would probably not work, I would try something like this: imagejpeg($logoImage, "images/imageWithLogo.jpg", 100); where "images" is a folder that is made writable.
  7. Hello, I have some questions about dates/time ... I have a site where registered users will receive messages, I want to include the date/time with that message. I am not sure what is best way to do this, so I am recording the GMT hours offset from users input (from receivers), but then I saw that the hours offset from the GMT is different in different seasons of the year, so how do I detect correct local time for the message receiver? Is it something like a database with start-end time of daylight savings hour adjustment or how is this done?
×
×
  • 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.