Scripting

Configuring Php and ASP.Net web pages on single IIS Web site

Posted on

Requirement:  You have an IIS web server.  You want to host all Php as well as ASP.Net developed web pages from the same web server and further with the same site name.  Thus you end up need to configure both Php as well ASP.Net pages from the same IIS site.   Options: This can be setup by ensuring below configuration for both of the technologies: A Proper Handler Mapping for *.aspx the respective handler will be auto configured for *.php you need to ensure a proper handler is setup if you are installing it manually Then you can set the […]

Advertisements
Scripting

Setting Current_Timestamp/Datetime to field/column value in MySQL doesn’t work from Php using PDO connection.

Posted on

Say in one of your table you have a field which you want to set with current time value from your database server. However, setting timestamp/datetime values from php to MySQL using PDO didn’t work for me in case of both NOW(), SYSDATE(), FROM_UNIXTIME(NOW()) The alternate/workaround, I found is to set MySQL default value for the selected column to auto-populate with the current_timestamp of the MySQL server. This worked fine.   ALTER TABLE testusers CHANGE creation_time creation_time TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ;   < p>

DataBase

Understanding how user usernames and passwords are saved, retrieved and verified on websites

Posted on

Environment: Lets consider you have a web site that is developed in PHP with MySQL DB in the backend and pages being served via the Apache Web Server.  All are freeware technologies with appropriate licensing terms.   End User input to Webpage and Webpage to Php script: A user login and/or registration page will prompt user for providing the username and password to access the site content.  The Login page form, will pass the user provided username and password to the appropriate php script.   Php Script to/from DB and back to Web page form: The php script will make […]