Jump to content

Recommended Posts

Posted

Hi

 

Very strange problem hope someone can point me in the right direction.

 

School website hosted externally. Everything to do with the website works fine when browsed to from any computer external to the school network.

 

The problem occurs when anyone browses to the website via an internal school pc.

 

This error occurs:

Connection to the database failed. Please try again later.

 

PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in d:\domains\wellingtonschool.org\wwwroot\functions.php on line 9

 

It only appears when accessing a php page, which just happens to be the most important pages! Browsing to any standard .htm pages no problem, page displays as normal. I cant login to the site to update the news sections as i get this error. Only started happening from tuesday this week.

 

I have tried this on IE 6, IE7 and IE8, and firefox same exact error on each.

 

Browsing to one of the php pages from an external pc works perfectly.

 

Any pointers?

No local cached copy on the web filter - smoothie.

Bypassing web filter same problem.

Hosting company nothing wrong they say - company that developed website no help they see it working fine from their end, so something local to the school? our isp? dunno..

 

mods move this to another forum if its in the wrong one.

 

thanks

miller

Posted
Hi

 

Very strange problem hope someone can point me in the right direction.

 

School website hosted externally. Everything to do with the website works fine when browsed to from any computer external to the school network.

 

The problem occurs when anyone browses to the website via an internal school pc.

 

This error occurs:

Connection to the database failed. Please try again later.

 

PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in d:\domains\wellingtonschool.org\wwwroot\functions.php on line 9

 

It only appears when accessing a php page, which just happens to be the most important pages! Browsing to any standard .htm pages no problem, page displays as normal. I cant login to the site to update the news sections as i get this error. Only started happening from tuesday this week.

 

I have tried this on IE 6, IE7 and IE8, and firefox same exact error on each.

 

Browsing to one of the php pages from an external pc works perfectly.

 

Any pointers?

No local cached copy on the web filter - smoothie.

Bypassing web filter same problem.

Hosting company nothing wrong they say - company that developed website no help they see it working fine from their end, so something local to the school? our isp? dunno..

 

mods move this to another forum if its in the wrong one.

 

thanks

miller

 

Are they using a particular PHP package ? Drupal, Wordpress ?

 

MYSQL and PHP on a windows server with IIS ? Thats a recipe for a PITA to start with.

  • Thanks 1
Posted

The info i can see from the helm control system is php version 4, asp.net version 1 and mysql4.

 

Not sure what its running on, i can find out if need be.

Thanks

miller

Posted
Can you connect to the mysql db using a different program i.e "navicat lite" from a pc that has the problems? can you not change localhost to something nicer as I think thats where your problem lies (could be wrong...) i.e fully qullified
Posted

'localhost' simply means that the SQL Server is running locally on that machine... pointless changing it to anything else - it should work fine. Need to see the content of d:\domains\wellingtonschool.org\wwwroot\functions.php basically. If it has security details contained (ie: user & pass) than pm it to me and I'll take a look. If it hasn't, then post it in here in code tags...

 

t only appears when accessing a php page, which just happens to be the most important pages! Browsing to any standard .htm pages no problem, page displays as normal.

 

Standard HTM files don't have dynamic content pulled from a database, so don't try to contact the database, and thus don't get a connection error. PHP pages generally will involve dynamic content pulled from the database, and thus generate the errors.

 

We've had issues with LEA proxies causing such issues in the past...

Posted

Are you *sure* you're not pointing to two different servers?

 

If you ping the server from inside the school, do you get the same results as if you ping it from outside?

Posted

apologies for not updating this thread sooner and for not replying to those who posted i got caught up.

 

the problem is resolved now. the problem was a dns issue, the isp changed the ip address of the website and did not notify me. internally there was a dns entry for the school website pointing to the now old address and theres the problem..

 

thanks for the help tho appreciate it.

miller

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...