This morning, I upgraded www.DBAnalyst.com (a leading forum on finance in Bangladesh) from phpBB3 RC1 to phpBB stable 3.0.0.
Well, let me explain a bit. In lst march, the forum was deployed using phpBB2. Then, after short time, it was upgraded to phpBB3 Release Candidate 1(RC1). Before phpBB3 stable version was published, there were 7 more release cadidates (upto RC8)
Now, when I was thinking of upgrading to stable version from RC1, then I found that no direct updating package is available from RC1. I had to upgrade by cahin: Rc1->RC2->..->RC8->Stable 3
That was quite unexpected. I didnt find any direct way for this. So, I made out a way.
Here are the steps (assume table prefix for my deployment (RC1) was phpbb_):
1. Deleted all files of previous forum
3. Downloaded and unzipped new version
3. Installed new version as fresh install (using different table prefix, say phpbb3_)
4. Did not delete the install folder
5. manually edited the config.php file, changed the table prefix to the old one (phpbb_)
6. Executed in web browser http://forum_url/install/database_update.php
7. Using phpMyAdmin, deleted all the tables created for the fresh install (phpbb3_), because we will be using the old tables prefixed phpbb_.
This process is safe. You can try this.
Sunday, February 24, 2008
Thursday, February 14, 2008
MFC Print Preview problem solved
Today, I was adding Print Preview option in my current project. MFC has made this process very easy. But, the application tended to crash if I invoked the print preview. This was the flow:
>CView::OnFilePrintPreview()
>>AFXAPI _AfxCheckDialogTemplate(LPCTSTR lpszResource, BOOL bInvisibleChild)
>>>HINSTANCE hInst = AfxFindResourceHandle(lpszResource, RT_DIALOG) <<<----- Bingo!! this fails
lpszResource = 0X7803 which is for print preview dialog. But, my app seems
not being able to locate it!
The trace message was :
ERROR: Cannot find dialog template with IDD 30723.
By the by, my app uses MFC in static library. I googled, but found that many
others faced same questions, some found the reson (not being able to locate
the resource), but could not get any solution from the internet.
Then, after much R&D + thinking, I found the solution.
If you face the same problem, just follow these simple steps:
1. Open your project's resource file (*.rc) in text editor
2. find this (including the quotes)
"#include ""afxres.rc"" // Standard components\r\n"
3. Add the following line after that line (including the quotes)
"#include ""afxprint.rc"" // printing/print preview resources\r\n"
4. Find this
#include "afxres.rc" // Standard components
5. Add the following line after that line
#include "afxprint.rc" // printing/print preview resources
----------- You are all done ---------------
Happy programming!
By the way, I am using VS2005
>CView::OnFilePrintPreview()
>>AFXAPI _AfxCheckDialogTemplate(LPCTSTR lpszResource, BOOL bInvisibleChild)
>>>HINSTANCE hInst = AfxFindResourceHandle(lpszResource, RT_DIALOG) <<<----- Bingo!! this fails
lpszResource = 0X7803 which is for print preview dialog. But, my app seems
not being able to locate it!
The trace message was :
ERROR: Cannot find dialog template with IDD 30723.
By the by, my app uses MFC in static library. I googled, but found that many
others faced same questions, some found the reson (not being able to locate
the resource), but could not get any solution from the internet.
Then, after much R&D + thinking, I found the solution.
If you face the same problem, just follow these simple steps:
1. Open your project's resource file (*.rc) in text editor
2. find this (including the quotes)
"#include ""afxres.rc"" // Standard components\r\n"
3. Add the following line after that line (including the quotes)
"#include ""afxprint.rc"" // printing/print preview resources\r\n"
4. Find this
#include "afxres.rc" // Standard components
5. Add the following line after that line
#include "afxprint.rc" // printing/print preview resources
----------- You are all done ---------------
Happy programming!
By the way, I am using VS2005
Monday, February 11, 2008
Simple but useful tip for SQL Injection on MySQL
If you are trying SQL Injection on MySQL database, then keep in mind --
In MySQL, the “
Best of luck...
In MySQL, the “
-- ” (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntaxBest of luck...
Subscribe to:
Comments (Atom)