Developing PHP Applications

Zhannar Personal Blog

Archive for the ‘PHP-MySQL’ Category

May-17-2008

Easier way to Maximize the Import Limit of your PhpMyAdmin

Just simply add this code to the top of your config.inc.php file.

<?
ini_set('memory_limit', '32M');
ini_set('upload_max_filesize', '20M');
ini_set('post_max_size', '20M');
ini_set('max_execution_time', '1800');
ini_set('max_input_time', '1800');

// … rest of the config.inc.php …//

?>

This is much more helpful if you don’t have access to ‘.htaccess’ file.

Posted under PHP-MySQL
Mar-29-2008

Authentication with Zend Framework Article

Another great article for Zend Framework. It is all about ‘Login’ and ‘Authentication’ using this framework.

Link: Login and Authentication with Zend Framework

Have fun reading. This seems to be very helpful article. :)

Posted under PHP-MySQL, Zend Framework
Mar-6-2008

Reducing spammers using your “Contact Form” as a gateway

This is a simple function to eliminate those unwanted strings coming from the user’s input. In this way, we can reduce those spammers using your Contact Form as their gateway to spam.

PHP trim unwanted headers for mail

Posted under PHP-MySQL
Jan-24-2008

How to setup your WAMP with your own choice of directory (Part 3)

Yeah I know that it’s been a while since my last post about this series. But don’t worry, here it is. ;) :P

This is the last part of my WAMP setup series

In this part we finalize our WAMP Server (configurations and settings).

1. Create a folder named “php” under “C:/server/apache/modules” directory.

2. Extract your PHP zip file here and copy this highlighted files.

3. And paste it under “C:/WINDOWS/system32″

4. Copy the distributed php.ini file

5. And put it under “C:\server\apache\conf” directory (where your apache’s httpd.conf reside).

6. Create a temporary folder under your server directory (is this case, “C:/server/”). This will be use in your “session.save_path” setting.

7. Start editing your php.in file set your “extension_dir” to “C:/server/apache/modules/php/ext” and load most commonly used extensions. Also set session.save_path here.

8. Now, Start editing your apache’s httpd.conf file. Here, set your DirectoryIndex, DocumentRoot (where your public files are located.). Also change your directory path “<Directory … >” same as your DocumentRoot’s value.

Load the PHP as module in your apache server:

LoadModule php5_module “C:/server/apache/modules/php/php5apache2_2.dll”

Then add the filetype of the php. (you can also add .php5 and .php3 if you want to)

AddType application/x-httpd-php .php

And lastly, locate your php.ini, the one that you have edit.

PHPIniDir “C:/server/apache/conf”

…and that’s all. Happy PHPing!!!

Posted under PHP-MySQL, Tutorials
Jan-19-2008

Install Aspell for your WAMP setup

Download this files first: (http://aspell.net/)

Aspell installer: Aspell-0-50-3-3-Setup.exe

Precompiled dictionary (English): Aspell-en-0.50-2-3_2.exe

Install this files, then go to “C:\Program Files\Aspell\bin” copy the following files

- aspell-15.dll
- pspell-15.dll

Paste it under C:\windows\system32\

You can now enable the pspell extension through your php.ini file by uncommenting this line:

extension=php_pspell.dll

Check it through your phpinfo file.

pspell enable

sweeet… right? ;)

Posted under PHP-MySQL
Jan-11-2008

Simple Tag Cloud Code

Don’t have any idea how to create a simple tag cloud for your application?

Here’s a simple code snippet to start with:

PHP Tag Cloud Tutorial

It’s pretty much that simple.

Posted under PHP-MySQL
Dec-24-2007

How to setup your WAMP with your own choice of directory (Part 2)

Before I start, I would like to greet everyone a Blessed and Joyful Christmas! ;-)

It’s been a long busy month, because I just got a new large scale website project (wheew…). I am very excited about this project. As of now, I can’t tell any details about it. :D

This tutorial is the second part of the WAMP (Windows, Apache, MySQL, PHP) setup.

In this part we install our MySQL Server.

1. Run the installer then click “Next”

2. Select Custom then click “Next”

3. Choose your directory then click “Next”

4. Click Install

5. Installing…

6. Click “Next”

7. Click “Next”

8. Click “Finish” - be sure to check the checkbox

9. Click “Next”

10. Click “Next” (Detailed Configuration)

11. Click “Next” (Developer Machine)

12. Click “Next” (Multifunctional Database)

13. Click “Next”

14. Click “Next” (Decision Support)

15. Click “Next” (Enable TCP/IP - Port 3306 - Enable Strict Mode)

16. Click “Next” (Standard Character Set)

17. Click “Next” (Select your service name, this name will be appear in your windows services)

18. Set your database root password then click “Next”

19. Click “Execute”

20. And you’re done.

Hopefully, I can post the next part asap. :D

Once Again MERRY CHRISTMAS TO ALL!!!

Posted under PHP-MySQL, Tutorials
Dec-21-2007

Use MySQL Full-Text

When you are about to develop a database for a large-scale website. MySQL’s Full-Text feature is worth considerable.

Here’s a great article on how to use this feature

Posted under PHP-MySQL
Nov-27-2007

How to setup your WAMP with your own choice of directory (Part 1)

Ok, the first thing you need to do is to download installers which can be found to their website. In this tutorial we are using versions:
Apache 2.2.6, MySQL 5.0.45, PHP 5.2.5

httpd.apache.org

http://www.mysql.com

http://www.php.net


Here’s the quick download link

apache_2.2.6-win32-x86-no_ssl.msi

mysql-essential-5.0.45-win32.msi

php-5.2.5-Win32.zip

In this part we install our Apache Server.

1. Just click “Next”

2. Accept the agreement then click “Next”

3. Click “Next”

4. Set the “Network Domain” to “localhost”, Change also the “Server Name” to “localhost”, and lastly set your local e-mail address(you can use your real e-mail address). Then click “Next”

5. Select the “Custom”, then click “Next”

6. In this section, you need to specify a directory for your apache server.(in my case, I use C:\server). Click “Next”

Note: Put also, “apache” as a sub-directory.

7. Click “Install”

8. Installing…

9. You’re done.

Posted under PHP-MySQL, Tutorials