Archive

- for August, 2007

Client Does Not Support Authentication Protocol

Are you surprised why your mysql user-password is not working after upgradation to newer version of mysql server. Yes, It will not allow you to login in mysql server this way. Answer is simple: Just change your mysql password using old_password() function. mysql> Set password = old_password('password'); This will change… (Continue)

Integrate PHP with Apache

You need to configure apache a little for telling how to execute php files.For making php work with apache you first dump php suppose c:\php501\. Then add these lines to your apache httpd.conf file. ScriptAlias /php/ "c:/php501/"AddType application/x-httpd-php .phpAction application/x-httpd-php "/php/php-cgi.exe" First check your apache server is running correctly. If… (Continue)

Few important Apache httpd.conf Directive

Want to start learning Apache configuration settings. Start with these settings: Server root. All files conf, htdocs, etc under it.ServerRoot "C:/Program Files/Apache Group/Apache2" Script timeout:Timeout 300 Keep connection alive time:KeepAlive On Max. request accepted keep alive request:MaxKeepAliveRequests 100 Keep Alive timeout:KeepAliveTimeout 15 Registered DNS name, or IP address hereServerName localhost:80… (Continue)

php.ini – PHP configuration file

The file php.ini is used for setting php directive value. It changes the php’s behaviors. What is php.ini file? PHP will dump php.ini file as php.ini.dist and php.ini.recommended. In the absence of php.ini file php can use the default built-in configuration value. Rename php.ini.recommended file to php.ini and place it… (Continue)

Forbidden You don’t have permission to access ..

You can customize the message shown to user when they access Forbidden web page. This is 403 status code header sent by server to browser. ForbiddenYou don't have permission to access ... on this server.Apache .... Server ........ Just add this line to your Apache Config file (httpd):ErrorDocument 403 /forbidden.html… (Continue)

PHP Page – Deny Public Access to it

This article is very informative if you start from Stop Execution of PHP Pages. With the below code, you are not actually denying access to your page but stopping unwanted code execution of the script. Suppose PHP web page name is conn.php- Page:: conn.php <?php $conn = mysql_connect('127.0.0.1', 'userName', 'password');… (Continue)

Stop Execution of PHP Pages

Some files are login protected in PHP application and some are include files that need not run directly and can hold some important data not for direct public view. For each login-protected page you will write login check script at top of the page. <?php If not login then Redirect… (Continue)

Javascript Submit Value on Same Page or Different Page

HTML form's action attribute is responsible for your form's action script. You can mention script name directly in <form method="" action="" > or you can assign it a value through JavaScript. Refer this Javascript code There in function sub1() which is javascript form submit code, either comment the lines where… (Continue)

Ctype – Built-in Form Input Validation Functions in PHP

In previous article you saw how these functions could be used for simply complex form input validation. Ctype_* provide checking for these types of characters: ctype_alnum -- Check for alphanumeric character(s) ctype_alpha -- Check for alphabetic character(s) ctype_cntrl -- Check for control character(s) ctype_digit -- Check for numeric character(s) ctype_graph… (Continue)

Form Input Validation Technique in PHP

I am sure you have written form's input field validation code using your server side scripts. Form validation is most common code we have to write. We generally validate our form for name, age, sex, phone, email and others. For these fields, if we get little complex validation we start… (Continue)