The growing size of cities and increasing population mobility have determined a rapid increase in the number of vehicles on the roads, which has resulted in many challenges for road traffic management authorities in relation to traffic congestion, accidents, and air pollution. Over the recent years, researchers from both industry and academia have been focusing their efforts on exploiting the advances in sensing, communication, and dynamic adaptive technologies to make the existing road traffic management systems (TMSs) more efficient to cope with the aforementioned issues in future smart cities. However, these efforts are still insufficient to build a reliable and secure TMS that can handle the foreseeable rise of population and vehicles in smart cities. In this survey, we present an up-to-date review of the different technologies used in the different phases involved in a TMS and discuss the potential use of smart cars and social media to enable fast and more accurate traffic congestion detection and mitigation. We also provide a thorough study of the security threats that may jeopardize the efficiency of the TMS and endanger drivers' lives. Furthermore, the most significant and recent European and worldwide projects dealing with traffic congestion issues are briefly discussed to highlight their contribution to the advancement of smart transportation. Finally, we discuss some open challenges and present our own vision to develop robust TMSs for future smart cities.