I wanted to create a simple web application that allows me manage the data in MySQL Database, I do not wish to waste my time on coding simple CRUD functions. I prefer to generate the codes every time i modified the database.
Been notice that ASP.NET MVC would help me to achieve that, able to find samples of running ASP.NET MVC with MySQL (By default, the codes run with MsSQL). But in the end, i found out few issues of using it.
- All Visual Studio Express version does not allow 3rd party extensibility.
Means I can’t use Entity Framework with .Net Connector by MySQL to auto generate the “Model” with Visual Studio.
Not everyone have a Standard(Paid licence) version of Visual Studio, I’m using Visual Studio 2008 Standard for the testing above.
- Since I’m using Visual Studio 2008 Standard, I’m only able to use ASP.NET MVC2, which now they have launched ASP.NET MVC3 (with better features and support).
- Warning: date(): It is not safe to rely on the system’s timezone settings
“WTF” was the first thing that comes on my mind, then I goggled and found out Setting timezone in your php.ini date.timezone = “UTC” to fix this.
- CDbConnection failed to open the DB connection: could not find driver
Again, “WTF” comes in my mind again.
- First, I checked if my DB connection setting was correct for Yii, and it looks good.
- Next, lots of google results showing “extension=php_mysql.dll was not enabled“. So I enabled it in PHP.ini, and restart the apache. But I still can’t connect my first Yii application.
- Dafaq~~~~ done more google and found a new word call “PDO extenstion”. So I run my personal favorite PHP code (sorry, not “hello world”), phpinfo.php page and looked for the PDO section, nothing was loaded.
Checked with all the Yii Gurus but non of them encounter this issue, reason is they install Apache & PHP via Xampp and Wamp…
- After sometime google-ing, found out that I need to do the following chances.
php.ini set extension_dir = “C:\webserver\php\ext”