MySQL File Access, Access Denied

December 31st, 2008
If you need to access files for importing directly from MySQL you may have encountered an error stating the following. Access denied for user: 'user@localhost' (Using password: YES) The user used to execute the import needs the FILE privilege in order to complete a command similar the one below. LOAD DATA INFILE filename INTO TABLE products FIELDS TERMINATED BY '|' LINES [...]
Read more on MySQL File Access, Access Denied »

Set PHP Include Path in htaccess

December 26th, 2008
If you do not want to change the include_path directories (or you don’t have access to php.ini) you can still set the include_path value within your root .htaccess file. Update/Create /doc_root/.htaccess Unix/Linux Servers php_value include_path "/path/to/include" Windows Servers php_value include_path "C:/path/to/include" PHP To call the include within PHP do the following: require_once('file.php'); The file above is in /doc_root/include/file.php Options Multiple include directories If you have multiple include [...]
Read more on Set PHP Include Path in htaccess »

GoDaddy Now Allows Direct Access to MySQL on Shared Hosting Plans

December 25th, 2008
GoDaddy.com has recently added the ability for shared hosting plans owners to access their MySQL databases directly. Once you start the MySQL creation process you will have the option to Allow/Disallow direct access. This is very useful if you do not want to use phpMyAdmin to administer your MySQL database such as an initial import that exceeds [...]
Read more on GoDaddy Now Allows Direct Access to MySQL on Shared Hosting Plans »

Backup Windows Mail on Vista with xcopy

December 25th, 2008
I know you can backup your email directly from within Windows Mail but this script saves me a few clicks and I can run it in a scheduled task so I can set it and forget it. Download For impatient you can download the batch file here. Find Windows Mail Store Location Open Windows Mail and open Tools/Options. [...]
Read more on Backup Windows Mail on Vista with xcopy »

No New Text Document with Right Click on Vista

December 21st, 2008
One of the features I use frequently in XP is the Create New X feature with the right click within Explorer. Vista does not have the option to create a new text document. I found a forum post over at vistax64.com that has a fix. Open notepad (Windows + r, notepad, enter) and copy the following: Windows Registry [...]
Read more on No New Text Document with Right Click on Vista »

Simple Smarty Template Example

December 20th, 2008
For those newer to the Smarty Template Engine I thought I would make a simple example to help get started. Download and Install Download Grab the Smarty example here. This is using the latest version as of this post, v2.6.22. Go here if you need an alternate version. Install Extract the downloaded archive to the document root of your web [...]
Read more on Simple Smarty Template Example »

Show Partial Content, Slide Animate with jQuery

December 20th, 2008
This plugin will show a partial amount of content from a and allow the user to click a link from the title or a link at the bottom to view the rest of the content with a sliding action.
Read more on Show Partial Content, Slide Animate with jQuery »

MySQL Match Dates with a UNIXTIME Field

December 19th, 2008
Here is how to grab and compare a date directly from a MySQL query if you are storing your dates as UNIXTIME. SELECT * FROM table WHERE MONTH(FROM_UNIXTIME(unixtime_fieldname)) = MONTH(CURDATE()) AND DAY(FROM_UNIXTIME(unixtime_fieldname)) = DAY(CURDATE()) AND YEAR(FROM_UNIXTIME(unixtime_fieldname)) = YEAR(CURDATE()) This particular query is looking for any records that have the same month, day and year as today. [...]
Read more on MySQL Match Dates with a UNIXTIME Field »

Remove/Force www on Your Domain and 301 Redirect

December 18th, 2008
You want to ensure that Google and other SEs only see one domain so you don’t penalized for duplicate content (www and non-www indexed pages are not the same and counted as duplicates). .htaccess To redirect to domain.com and 301 existing pages: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] To redirect to www.domain.com and 301 existing pages: RewriteEngine [...]
Read more on Remove/Force www on Your Domain and 301 Redirect »

Quickly Jump In Code with Zend Studio and Bookmarks

December 17th, 2008
This is a cool feature in Zend Studio for Eclipse (might be available for the base Eclipse Project as well) that allows you to bookmark your code to quickly jump from section to section for those large files. Open a file to work with and right click the line you want to place a bookmark on. [...]
Read more on Quickly Jump In Code with Zend Studio and Bookmarks »

Sponsors