Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Should this work on a windows server?
Old 09-06-2007, 12:27 PM Should this work on a windows server?
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Hi there, just got a dedicated Windows Server and am having loads of problems getting any PHP scripts to run on it.

When I use my control panel it has the option to add a database...
It then asks me to add a "data source" with "SQL Server" as one of the options. but the next window is

name:
Server IP:
Databse Name (On Sql Server):

Im used to having to put database name, user & pass????

How can Install a database??

The normal test connection I use is

Code:
<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';

// username and password to log onto db server
$dbUser='thule1961';
$dbPass='thule1961';

// name of database
$dbName='thuleprof';

    $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect");
    print "Connected successfully<br>";
    mysql_select_db("$dbName") or die("Could not select database");
    print "Database selected successfully<br>";

// close connection
mysql_close($link);
?>
but I'm gessing this is no good now?
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."

Last edited by rolda hayes; 09-06-2007 at 12:29 PM..
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-06-2007, 01:36 PM Re: Should this work on a windows server?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Is PHP and MySql installed on the server?

what control panel are you using?

do you have Terminal Services access?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-06-2007, 03:49 PM Re: Should this work on a windows server?
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Yes both installed, using Matrix Control panel no teminal services...
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 04:48 PM Re: Should this work on a windows server?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Why on earth would you want to run PHP on a dedicated Windows server?

Sounds like you're trying to set up an ODBC DSN. Don't. That's like 30 year old technology, almost as old as I am. Use SQL Server if that's what your host provides, and use the ASP.NET SqlClient namespace for data access.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 05:02 PM Re: Should this work on a windows server?
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
But what if we have sites that run on PHP?
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 05:13 PM Re: Should this work on a windows server?
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Why would you sign up for dedicated Windows hosting and not dedicated Linux?
joder is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 05:29 PM Re: Should this work on a windows server?
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Because a new site were about to run is ASP and the "tech Guys" said go for the windows one as it will run both
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 05:33 PM Re: Should this work on a windows server?
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Then you need to see if they have MySQL installed. Do they provide a control panel?

If they don't provide MySQL, you can change your DB script to MSSQL
http://us3.php.net/mssql
joder is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 05:52 PM Re: Should this work on a windows server?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Yeah, you can make Windows run PHP, but it ain't easy, and I don't know how. I'd help you if I did. But if you also need to run ASP(.NET) that's the way to go.

You can run MySQL on Windows, but it needs to be installed and you have to put the MyODBC drivers on the machine. Like Joder said if you can change the database to MS-SQL that's probably your best bet.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 07:14 PM Re: Should this work on a windows server?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok
Don't worry about these guys telling you what a pain it is to run PHP on IIS.
I've set it up on a few IIS servers now and upgraded a few times as well, even had two different versions of PHP on one server for something that HAD to run on PHP Ver 4.3. So it's not that difficult.

The MyODBC Drivers (3.51 current) only need to be installed when you need ASP/ASP.NET functionality with MySql. PHP has native drivers for MySql.

It sounds like the CP does not have a MySql option installed or activated. Don't know the Matrix CP at all so couldn't begin to give any assistance with that.

It may be worth getting the server techs to install phpMyAdmin on the server to handle MySql, or install HeidiSQL on the server and provide TS access to run that, or open a port through the firewall so you can run the MySql GUI from your desktop.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-06-2007, 08:09 PM Re: Should this work on a windows server?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Don't worry about these guys telling you what a pain it is to run PHP on IIS.
Don't trust Chris telling you not to trust us. He has an unfair advantage - he know's what he's talking about.

(If you read between the lines, that means take Chris's words to heart.)
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-07-2007, 06:54 AM Re: Should this work on a windows server?
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Thanks for that Chris,

We've decided that the new ASP site will be run on its own dedicated server and have got another Linux for al the old stuff.

Yay! I know how to run all that!

Cheers for the advise guys!
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Should this work on a windows server?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43536 seconds with 12 queries