Narrative:

After takeoff and gear retraction, gear door light illuminated and stayed lit. Gear would not retract. Returned to phl. Upon return to the gate, maintenance bypass lever in down position and main gear doors extended. In recalling morning preflight, I cannot recall anything unusual, the gear doors were up and there was no flag extended from the latch. It however could quite possibly have been ajar. A possible solution to such a reoccurrence and multiple oversights is to make it a requirement, when opening this latch, to enter it in the logbook as we do with the gear pins.

Google
 

Original NASA ASRS Text

Title: RETURN LAND DUE TO LNDG GEAR MAINT BYPASS HANDLE IN THE BYPASS POS.

Narrative: AFTER TKOF AND GEAR RETRACTION, GEAR DOOR LIGHT ILLUMINATED AND STAYED LIT. GEAR WOULD NOT RETRACT. RETURNED TO PHL. UPON RETURN TO THE GATE, MAINT BYPASS LEVER IN DOWN POS AND MAIN GEAR DOORS EXTENDED. IN RECALLING MORNING PREFLT, I CANNOT RECALL ANYTHING UNUSUAL, THE GEAR DOORS WERE UP AND THERE WAS NO FLAG EXTENDED FROM THE LATCH. IT HOWEVER COULD QUITE POSSIBLY HAVE BEEN AJAR. A POSSIBLE SOLUTION TO SUCH A REOCCURRENCE AND MULTIPLE OVERSIGHTS IS TO MAKE IT A REQUIREMENT, WHEN OPENING THIS LATCH, TO ENTER IT IN THE LOGBOOK AS WE DO WITH THE GEAR PINS.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.