Pages

Search This Blog

Thursday, May 17, 2012

facebook - Invalid URL The requested URL "/", is invalid. Reference #

I can access to facebook using samsung galaxy SII without problem but when try to access to facebook this morning using my laptop, i hit error

Invalid URL

The requested URL "/", is invalid.Reference #9.3e556acb.1337250952.21c9cc69



















some suggest that delete browser cache will helps but i hit the above error in google chrome, mozilla firefox and IE8.

You can try 2 ways.


  1. Try to flushdns in your computer first.
  2. Click on Start
  3. Click on Run
  4. Type cmd and click on OK button
  5. In the command prompt windows, type ipconfig /flushdns and hit enter button.
  6. Try to browse the website again.





Not problem not solved, try This

  1. Go to folder "C:\Windows\System32\drivers\etc"
  2. Open hosts file with notepad .
  3. Copy below and paste in hosts file
    69.171.228.74 www.facebook.com
    69.171.228.74 https://www.facebook.com
  4. Click on save to save the hosts file
  5. Close the browser 
  6. Open and access to facebook again.
  7. Problem solved.







Friday, May 11, 2012

An error occurred with the POP3 mail server. Mail server mail.xxxx.com responded - Thunderbird 10

My email client Thunderbird 10 working 100% good before today but this morning when i try to retrieve emal from my mail server, i receive error message
"An error occurred with the POP3 mail server. Mail server mail.xxxx.com responded"





I'm very sure that my mail server working fine because i can download my email using my Sumsung Galaxy SII. There must be something wrong with my laptop.

Finally, i found out that the root cause come from the antivirus that i'm using. I'm using avast! antivirus free edition. There is a feature call Mail Shield which will scan inbound and outbound email. Once i disable this feature, it's working back to normal.

Hope this sharing helps.

Wednesday, May 2, 2012

How to view Mysql Stored Procedure in PhpMyAdmin

How to view Mysql Stored Procedure in PhpMyAdmin?


  1. In PhpMyAdmin, select the correct Database on the left hand panel
  2. You can see all the database tables in the right hand panel
  3. Scroll down the right hand panel until the end, you will see Routines
  4. Click on Routines

  5. Once click on Routines, all the Stored Procedure will be displayed on screen

Thursday, February 23, 2012

Mysql very slow for certain schema

I have a database/schema name inventorysoftware and have a .net windows application running on this schema. The issue is, the application run very slow on this schema (like each click need to wait about 30 seconds). I have about 40 others schema running in my development machine with windows XP Pro.

I have tried to google around the issue but can't find any similar problem. One thing i need to mention here is i have about 15 schema with name inventorysoftware_ddmmyy where dd=day, mm=month, yy= year. You know, developer like to keep the backup schema for testing. After the application deployed to customer, i decided to clean my 15 schema with name inventorysoftware_ddmmyy .

After i have deleted the schema, my application move very fast. I found the root cause for the slowness. Lesson learn, don't use the schema starting with the same name. It will kill you.

Wednesday, November 9, 2011

MYSQL - IF NOT EXISTS ... INSERT INTO

Database MYSQL - tried IF NOT EXISTS ... INSERT INTO but not working.

IF NOT EXISTS (SELECT * FROM tblabc WHERE id = 10547) THEN
INSERT INTO tblabc
(a, b, c)
SELECT a , b, c
FROM tblabc WHERE id = 10547;

END IF;


Finally, this work

INSERT INTO tblabc
(a, b, c)
SELECT a , b, c
FROM tblabc WHERE id = 10547
AND NOT EXISTS (SELECT * 
FROM tblabc WHERE id = 10547);

Wednesday, November 2, 2011

Warning: Please select a file! in Opencart

I'm using Opencart version 1.9.4.3,  windows server 2003, IIS 6 and PHP Version 5.3.8. Try to upload image in opencart and error message "Warning: Please select a file!" prompted.



After check on the php eror log file, The error log show "Warning: File upload error - unable to create a temporary file in Unknown on line 0"

Solution for this issue is edit upload_tmp_dir in php.ini.

For example, change to
upload_tmp_dir = "C:\PHP\temp"

after the finish edit, restart the web server.

Done. Problem solved.

Monday, August 22, 2011

ASP.NET - new session id when refresh the page

Using Visual Studio 2005, dotnet framework 2.0.

Try to get a session id in default.aspx


  public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            txtSessionID.Text = this.Session.SessionID;
        }
    }

when i refresh the page, new session id show. This is weird because it won't happen in Asp.net for dotnet framework 1.1.

To solve the problem, simply add below code in global.asax to register an event handler for the session start event


void Session_Start(Object sender, EventArgs e)
        {

        }


Tuesday, July 19, 2011

MySQL scheduler job / event

In order to have MySQL event run, we need to make sure GLOBAL event_scheduler is set to on or 1.

SET GLOBAL event_scheduler = ON;

Or we can set in my.ini (in windows) or my.cnf (in linux) file with value

event_scheduler=on

Then create a scheduler job in MySQL. Example, i wish to call a stored procedure psp_DailyJob() every day start from 12:25:00.

CREATE EVENT CallDailyJob
ON SCHEDULE EVERY 1 DAY STARTS '2011-07-18 12:45:00'
DO
      CALL psp_DailyJob()

Monday, July 18, 2011

Search text in MySQL stored procedure

Search keyword or text in MySQL stored procedure

SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%IsConsignment%'
Order by Routine_Name;

Saturday, July 2, 2011

You can't specify target table 'xx' for update in FROM clause

Try to update a column in MySQL which uses SUM and join and hit error "You can't specify target table 'xx' for update in FROM clause "


UPDATE tblstocktake ap SET TotalQuantity =
(
  SELECT SUM(t.Unitinstock)
  FROM tblstocktake t
  JOIN tblstocktake a
  ON a.productid = t.productid
  WHERE a.productid = ap.productid
  GROUP BY a.productid
);

Which is not working.

Finally, found a solution which is working


UPDATE tblstocktake LEFT JOIN
(SELECT productid,
SUM(unitinstock) AS baseVal
FROM tblstocktake
GROUP BY productid)
AS totalSum USING (productid)
SET totalquantity=baseVal;