MySQL File Access, Access Denied

December 31st, 2008 | Posted in MySQL
2

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 ...

Set PHP Include Path in htaccess

December 26th, 2008 | Posted in Apache, PHP
1

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 ...

GoDaddy Now Allows Direct Access to MySQL on Shared Hosting Plans

December 25th, 2008 | Posted in Hosting, MySQL
7

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 ...

Backup Windows Mail on Vista with xcopy

December 25th, 2008 | Posted in Software, Windows Vista
2

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 ...

No New Text Document with Right Click on Vista

December 21st, 2008 | Posted in Windows Vista
2

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 ...

Simple Smarty Template Example

December 20th, 2008 | Posted in PHP
0

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 ...

Show Partial Content, Slide Animate with jQuery

December 20th, 2008 | Posted in jQuery
10

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....

MySQL Match Dates with a UNIXTIME Field

December 19th, 2008 | Posted in MySQL
1

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 ...

Remove/Force www on Your Domain and 301 Redirect

December 18th, 2008 | Posted in Apache
0

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 ...

Quickly Jump In Code with Zend Studio and Bookmarks

December 17th, 2008 | Posted in Programming, Software
0

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 ...