Click to See Complete Forum and Search --> : php + sql server 2000?


rhsunderground
03-10-2005, 04:12 PM
would there be problems to have both php and sql server 2000 running on the same server? my college currently uses sql server 2000 and i'd really like to use php, but the department chair wants me to find out if there would be issues first.

PeOfEo
03-10-2005, 04:41 PM
no. sql server is a db server, it runs over different ports than the http server. Because you are running sql server, that means you are running a windows server. So odds are you are running a windows server. IIS can support php and a windows server can still run apache. I see no conflicts. I am sure php can probably even connect to sql server and use it for it's data... asp and asp.net have no problem with mysql.

rhsunderground
03-14-2005, 12:32 PM
would i need to download apache on top of IIS 6.0? and MySQL on top of just sql server?

edit: i don't plan on using databases, i just want to use php for the ease of having a template.

PeOfEo
03-14-2005, 08:20 PM
wait hold on... you plan on running mssql on a windows server but you are not even going to use it :confused:

That makes no sense to me, lol.

You can download apache, but if you want to use apache either uninstall iis, disable it, or change it's default port. Or just run apache over an alternate. You could always just use iis too, it'l run php. Though you might not be comfortable in that environment. If you are on xp pro go with apache, because IIS on xp pro has a 10 user cap. You can also install mysql if you like, but there again, make sure the two db servers are not running over the same port. That would be the only issue, the port. Otherwise they are going to get along just fine.

rhsunderground
03-14-2005, 08:32 PM
ok, let me recheck my work.

the school has IIS 6.0 on a windows 2003 server. it is set up for asp, asp.net, and sql. the lady wants to know any and everything that would be needed for me to use php as well. obviously, i need php, but do i need to add anything else? the answer i see is no. is that correct?

PeOfEo
03-14-2005, 08:37 PM
you are correct sir. Php can run from iis and even play nice with mssql. If you wish to you can install apache and mysql too though.

MstrBob
03-14-2005, 08:44 PM
My only suggestion to you, is that you install PHP as an ISAPI module. I don't normally recommend CGI binary for PHP. But other then that, you should be set. And, MSSQL is an SQL server, correct? So then, your SQL syntax shouldn't be any different from MYSQL, correct? Actually, I don't know. Only use MySQL.

rhsunderground
03-14-2005, 08:53 PM
sweet. thanks guys, i'll let you know how it flies.

PeOfEo
03-14-2005, 09:19 PM
Originally posted by MstrBob
So then, your SQL syntax shouldn't be any different from MYSQL, correct? not sure about that one. The actual syntax should not change, but the connection strings will probably be pretty different. But I am sure you can find documentation. I just know that I have used asp.net with mysql and I had to play with my connection strings and that was about it.

CardboardHammer
03-15-2005, 01:52 PM
Not all syntax supported by MySQL is supported by SQL Server and vice versa.

EDIT An example: http://hardforum.com/showthread.php?t=876508

MstrBob
03-15-2005, 02:18 PM
Haven't used funky syntax like that before. But, the majority of the syntax is the same, correct? In terms of PHP, the functions one uses to connect to the server vary, but I was under the impression the the syntax for SQL servers was mostly the same. Using the SQL syntax, hence them being SQL servers.

CardboardHammer
03-15-2005, 05:12 PM
Most DQL db products support a certain amount of one of the SQL standards, as well as a number of non-standard features. If you avoid non-standard features and stick to the most commonly supported standard features, you'll have fewer issues with syntax incompatabilities, but, as always, YMMV.

MstrBob
03-15-2005, 05:18 PM
Bah, figures. In a perfect world, people would follow standards. Bah.

russell
03-16-2005, 03:12 AM
1. most everything you know about MySQL will work in MS SQL. There will be a few differences, but nothing too tricky.

2. Running IIS, or Apache, on the same box as SQL Server is a BAD idea.

If you are just doing some testing, playing around, no problem. But if anyone is actually going to use your site besides you (and maybe 3 or 4 others) u will have problems. MSSQL does not play nicely with others on the same box (Apache, IIS or anyone else). It expects the full attention of the OS and all of the memory that the OS doesn't allocate for itself. This is not a flaw in MS SQL Server. All enterprise databases for Intel systems work this way.

** Edit **
All that said, I have had no problem running PHP and SQL Server (my PHP lives on RH Linux boxes running Apache, and my MS SQL servers are Win2k boxes)

PeOfEo
03-18-2005, 10:17 PM
Originally posted by russell
1. most everything you know about MySQL will work in MS SQL. There will be a few differences, but nothing too tricky.

2. Running IIS, or Apache, on the same box as SQL Server is a BAD idea.

If you are just doing some testing, playing around, no problem. But if anyone is actually going to use your site besides you (and maybe 3 or 4 others) u will have problems. MSSQL does not play nicely with others on the same box (Apache, IIS or anyone else). It expects the full attention of the OS and all of the memory that the OS doesn't allocate for itself. This is not a flaw in MS SQL Server. All enterprise databases for Intel systems work this way.

** Edit **
All that said, I have had no problem running PHP and SQL Server (my PHP lives on RH Linux boxes running Apache, and my MS SQL servers are Win2k boxes) Yes, but for a light weight webserver, like a testing server for a school it will work. An issue with running the db server and the webserver on separate boxes is the fact that it then has to use more network bandwidth and you might need TSL depending on what kind of data is being moved. I think a good solution if you are serving several users would be to run http and a db on each box but put a few users on each.


/* bad advice

to overcome the resource-whore problems of a db server you can just turn the http server into a resource-whore too, just run it in real time ;) */

russell
03-20-2005, 07:24 PM
yes, as i said, for a small application, it will work. just don't consider it for an enterprise application