Archive for July, 2008
Changing the default file via htaccess
htaccess has a ton of special operations available in it. One useful is to override the default file that is served up by the server for a directory. A web server typcally has index.html, index.htm, or something similar as the default
Simply locate your .htaccess file and open it for editing with your favorite editor and […]
Posted: July 19th, 2008 under Apache.
Comments: none
Error with file_get_contents(), is there a work around?
Alternative for file_get_contents()
I was trying to use file_get_contents to work the other day and was getting an error message. Turns out the function was disabled in the php config. There is a way around this which I found on wiki.dreamhost.com. see below for an example.
Instead of:
< ?php
$file_contents = file_get_contents(’http://example.com/’);
// display file
echo […]
Posted: July 15th, 2008 under PHP.
Comments: none
Stopbadware - check your site for issues
Interesting site that works in coordination with google to protect your computer from badware. You can check if your site is listed via this URL
http://www.stopbadware.org/home/reportsearch
Being listed can cause your site to diverted to a warning page by google and you could be losing traffic as a result. They even include a brief history of when […]
Posted: July 10th, 2008 under SEO.
Comments: none
How to optimize a table or database in mysql
If you are finding a lot of Long Running Queries and think you have built all the indexes you need. You might want to try to optimize the database files. As tables have inserts, the files can become less than optimized.
From the mysql manual…
shell> mysqlcheck [options] db_name [tables]
shell> mysqlcheck [options] –databases db_name1 [db_name2 db_name3…]
shell> mysqlcheck […]
Posted: July 8th, 2008 under MYSQL.
Comments: none
Tutorial for securing your linux server
Just surfing for fun today and came across a quick and easy tutorial for securing your linux server. While not the end all for security, it sure is a great start.
http://mysql-apache-php.com/basic-linux-security.htm
Posted: July 6th, 2008 under Linux, Firewalls and Security.
Comments: none