Jump to content

adrianTNT

Members
  • Posts

    146
  • Joined

  • Last visited

About adrianTNT

  • Birthday 05/03/1983

Contact Methods

  • Website URL
    http://www.adriantnt.com
  • Yahoo
    adrianTNT

Profile Information

  • Gender
    Male

adrianTNT's Achievements

Member

Member (2/5)

2

Reputation

  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?
  8. I also seen this... I have files as: /image_files/120.jpg and if I access same path without it's extension it still shows the file. That happens with no rewrite rules from my end, I deleted the .htaccess to test this. Let me know if this indicates any other issue, otherwise I am waiting for GoDaddy's answer and inform them about this other thing if needed. Looks like it is from their configuration, it is not a dedicated server so my access to settings is limited.
  9. Hello, I have a strange problem with mod rewrite, this rewrite rule shows 404 error: RewriteRule ^admin(/)?$ admin.php as long as the .php file is named the same. But if I rename existent file on server to something like admins.php and rewrite "admin/" to admins.php then it works ok. It looks like I would not be able to rewrite "path/" if path.php exists I am using a "grid" hosting account from Godaddy. These rules worked fine on some dedicated servers from where I got the site files.
  10. Yes, that was the problem. I have to review so much code now
  11. ok, I guess I never noticed the difference between arsort() and rsort() Now I have to review thousand of code lines that I made so far and used arrays EDIT:
  12. Hello. I was trying to sort values of an array and something is very different from everything I knew so far. Code is: $files_list = array(); array_push($files_list,"0.jpg"); array_push($files_list,"3.jpg"); array_push($files_list,"1.jpg"); array_push($files_list,"2.jpg"); arsort($files_list); echo $files_list[0]; I was expecting last line to echo "3.jpg" but it keeps returning "0.jpg" , I tried all kind of sort/arsort, nothing retruns that greatest value, what am I doing wrong? I managed to find a solution by end($array_name), but still what was wrong with the above code?
  13. Hello. I have a domain that I use for domain parking, let's say parking.com, in root of this site I have a folder "domains" and I will keep all content of my parked domains inside this folder: phisical directory structure is: parking.com/domains/somesite.com/ parking.com/domains/someothersite.com/ I am doing this by htaccess so that by accessing some-site.com it will show the content of parking.com/domains/some-site.com I have a trailing slash problem with my code: If I enter in browser somesite.com/sample/ it works ok but if I enter somesite.com/sample it redirects incorrectly in address bar, it goes to http://somesite.com/domains/somesite.com/sample/ but shows correct content though. Is there a way to maybe redirect somesite.com/sample to somesite.com/sample/ ? My htaccess, ady advices/fixes are welcome: RewriteCond %{HTTP_HOST} !parking.com RewriteCond %{HTTP_HOST} !208.109.209.xx RewriteCond $1 !^domains # with or without www redirect to a folder without www RewriteCond %{HTTP_HOST} ^(www.)?([^.]*)\.(.*)$ [NC] RewriteRule ^(.*)$ /domains/%2.%3/$1 [L,QSA] # redirect to index without any "if file exists" exception, otherwise root "/" exists and directory list will be printed ?! RewriteRule ^domains/([^/]*)/$ /domains/?domain=$1 # allow for existent files, redirect otherwise RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^domains/([^/]*)/(.*)$ /domains/?domain=$1&page=$2 [L,QSA]
×
×
  • 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.