Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I am trying to create a javascript application in Aptana Studio3 and have a WAMP server version2.1 as my local host. I am using Windows Vista OS. I am getting an error when i run my php script in the WAMP server

Warning: mysql_connect() [function.mysql-connect]: [2002]  
An attempt was made to access a socket in a way forbidden by its  
(trying to connect via tcp://localhost:3306) in 
C:\wamp\www\myMapProj\php_genXml.php on line 11

Actually the php script worked before and it successfully connected to the mysql database, but later on when I restarted my computer, and ran my php script again it showed me the above warning! Can you pls help me with the above issue?

share
    
"Windows allowed McAfee firewall to take over, appearently the new security patch changed something in priority settings. So.. allowing apache & mysql to communicate through the firewall released the lot." Refer: apachefriends.org/f/viewtopic.php?f=16&t=47332 –  Ashwin A Sep 19 '11 at 10:54
    
Is MySQL running?! –  Prisoner Sep 19 '11 at 16:11
comments disabled on deleted / locked posts

migration rejected from stackoverflow.com Aug 14 '13 at 21:04

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Tom O'Connor Aug 14 '13 at 21:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

In my case it was definitely the settings on the McAfee firewall:

McAfee Firewall > Settings > Internet connections for programs > Apache HTTP Server > Edit

-> Access: Outgoing

share
add comment