SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 MySQL not as good as MS SQL?
 Forum Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

Frost
Starting Member

USA
33 Posts

Posted - 04/26/2005 :  12:41:43  Show Profile  Visit Frost's Homepage
.... and let me guess Because people who host websites out there are dealing with many clients, like www.ipowerweb.com as an example, it is simpler (or cheaper ) to just put MySQL in there for their database and not give the user a choice of options. We have a phpbb forum site listed with ipowerweb, and it is using MySQL for the host databse. I'll have to check into it and see if ipowerweb allows an option of using your "own" database or even if you used the free version of PostgreSQL that would be miles ahead of the MySQL that is oftentimes your only option.


just a couple of cents worth.

Found a place to ship me a CD of the fully licensed copy of SQL Server Developer Edition for $49.95 +10.00 shipping and handling. CD must weight a ton to cost that to be shipped all the way from NC to Michigan.. LOL


Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 04/26/2005 :  12:54:14  Show Profile
Let's not forget that dbforums runs mySQL....are they up today?



Brett

8-)
Go to Top of Page

eyechart
Flowing Fount of Yak Knowledge

USA
3575 Posts

Posted - 04/26/2005 :  17:25:03  Show Profile
quote:
Originally posted by X002548

Let's not forget that dbforums runs mySQL....are they up today?



I thought you were banned from that site (websense) ;)



-ec

Edited by - eyechart on 04/26/2005 17:25:42
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/26/2005 :  21:07:19  Show Profile  Visit Frost's Homepage
Let me show you a copy paste of some paramaters in the php5 ini I'm working on. Above this it stated that ODBC is enabled by default. Now this text below.... I'm sure there are those much smarter than me.. as in 99.9 % viewing Would there need to be any thing put into the odbc.default_db = and (uncomment out the line)??



[SQL]
sql.safe_mode = Off

[ODBC]
;odbc.default_db = Not yet implemented
;odbc.default_user = Not yet implemented
;odbc.default_pw = Not yet implemented

; Allow or prevent persistent links.
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
odbc.check_persistent = On

Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/28/2005 :  00:23:21  Show Profile  Visit Frost's Homepage
I hope I'm not off topic here, but it does pretain to trying to connect to MS SQL200.
Bought and installed the Microsoft SQL Server2000 Developer Edition and installed it and also installed SP3 that came with it. It is running fine, and the icon in the bottom shows.... Running - \\VERNON MSSQLServer

I have Apache http server and PHP 5 on my computer. If I type http://localhost I get my Apache server page. If I type http://localhost/phpinfo.php I get the info page from PHP5 version and all the attributes. I created a file called "mssqltest.php" and it has the following few lines in it. I copied pretty much what was in my PHP5 manual, but instead substitubed the MSSQL info for the MySQL THEY had " $conection - mysql_connect ( "localhost", "root", ""); " without the qotes. What I now have is below:

<html>
<head> <title>MS SQL2000 Connection Test</title> </head>
<body>
<h2>
<?php
$connection =MS_SQL2000_connect ( "localhost","root","")
or die ( "Sorry - unable to connect to MS SQL2000" );
echo( "Congratulations, Vernon, - you connected to MS SQL2000" );
?>

</h2>
</body> </html>


I get this line when I type in http://localhost/mssqltest.php " Fatal error: call to undefined function MSSQLServer () in Apache\htdocs\mssqltest.php on line 6. Now line 6 is the line starting $connection

Is there a problem in my syntax?
Thanks

Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

United Arab Emirates
1456 Posts

Posted - 04/28/2005 :  01:23:40  Show Profile  Visit mohdowais's Homepage
Vernon, did you see my post on the previous page about using ADO for data access? If you have any experience in coding with ASP, you will have very little trouble picking up the syntax, methods, etc.

Btw, where did you get this syntax from: MS_SQL2000_connect ( "localhost","root","")
The correct function is mssql_connect(). Example: $db=mssql_connect("localhost","sa","");

OS
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/28/2005 :  07:22:47  Show Profile  Visit Frost's Homepage
quote:
Originally posted by mohdowais

Vernon, did you see my post on the previous page about using ADO for data access? If you have any experience in coding with ASP, you will have very little trouble picking up the syntax, methods, etc.

Btw, where did you get this syntax from: MS_SQL2000_connect ( "localhost","root","")
The correct function is mssql_connect(). Example: $db=mssql_connect("localhost","sa","");

OS



OS,
Yes, I saw the post you had earlier. I'm paying close attention to your last post. And I have NO experience in ASP coding. I have a couple of very nice text editors I got free on the net.. Crimson Editor and ConText http://context.com/cx I believe is the latter URL. If you told me what to name the file eg. "ADO.php" or such I'd create it with the Crimson Editor and save it to the ?? folder.

I got this info I type in from a book I bought at Barnes & Nobel called "PHP 5 in easy steps" by Mike McGrath.
ISBN: 0-7607-6331-3 .It was showing on page 18 a script to write for connecting to MySQL. I was just following it and trying to substitute in Microsoft SQL in the place of mysql. I wanted to lear something about PHP, and I bought the book as a learning tool. It uses the elemenst of having the Apache server on your computer, MySQL, and PHP. I have the Apache running, and PHP, and do have MS SQL2000 running as a service as well. Shows as " Running - \\VERNON - MYSQLServer" in my system tray on Windows XP Pro.

Back to your text you put in there a few posts back. What do I name the file? What do I name the Extension? Where do I put it once I have created it?? Does it go in the C:\Apache\htdocs folder?
Many thanks!!
Vernon at jenewein.us


Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

United Arab Emirates
1456 Posts

Posted - 04/28/2005 :  08:08:36  Show Profile  Visit mohdowais's Homepage
Oh, looks like I confused you. You'd use that code from my previous post inside any of your PHP files. It doesnt have to be placed inside a separate file...it was just an alternative way of accessing data. Have you managed to access any data at all from a PHP script (and mySQL presumably)? If yes, then all you have to do is just change the mysql_connect() function to mssql_connect(). Forget the ADO code for the moment, you can try that later.

OS
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/28/2005 :  13:08:30  Show Profile  Visit Frost's Homepage
quote:
Originally posted by mohdowais

Oh, looks like I confused you. You'd use that code from my previous post inside any of your PHP files. It doesnt have to be placed inside a separate file...it was just an alternative way of accessing data. Have you managed to access any data at all from a PHP script (and mySQL presumably)? If yes, then all you have to do is just change the mysql_connect() function to mssql_connect(). Forget the ADO code for the moment, you can try that later.

OS



On the part about successfully connecting to MySQL, yes I was successful a couple of weeks back. That was before I upgraded to PHP5 and then to the Apache 2.0.54 version. I'm using PHP5 now, which seems to have loads of other features, and abilities that the earlier version did not have. The book I had before was just "PHP in easy steps". Now that PHP5 is availabe, I thougth I'd get this newest book, "PHP5 in easy steps". Now the EXACT script he has the reader make for a file called mysqltest.php
is:


<html>
<head> <title>MySQL Connection Test</title> </head>
<body>
<h2>
<?php
$connection = mysql_connection ( "localhost", "root", "")
or die ( "Sorry - unable to connect to MySQL" );
echo( "Congratulations - you connected to MySQL" );
?>

</h2>
</body> </html>


The above is the EXACT thing you would find in the book on page 18, of "PHP5 in easy steps"

So all I have to do is change the info in line 6 (with the start of the variable '$') ?? *real question marks LOL

Also in PHP 5 they have changed the way of php tags from the <? of the older versions to <?php of that written in PHP 5.

OS Appreciate the replies back! Maybe anyone else stumbing into here is intereseted in similar or has similar interests.
vern jenefarm at direcway dot com

If I put this in the php script in the htdocs of Apache (mssqltest.php)
<?php
$connection = mssql_connect( "localhost", "root", "")
or die ( "Sorry - unable to connect to MS SQL2000" );
echo( "Congratulations, Vernon, - you connected to MS SQL2000" );
?>

I get this by type http://localhost/mssqltest.php :

Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'root'. (severity 14) in c:\Apache\htdocs\mssqltest.php on line 6

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: localhost in c:\Apache\htdocs\mssqltest.php on line 6
Sorry - unable to connect to MS SQL2000







Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"

Edited by - Frost on 04/28/2005 13:33:53
Go to Top of Page

robvolk
Most Valuable Yak

USA
15668 Posts

Posted - 04/28/2005 :  18:49:45  Show Profile  Visit robvolk's Homepage
Do not use "localhost" as a SQL Server name. Use either "(local)", ".", or the actual name of the computer. In fact, it's always preferable to use the actual server name, so that you're not in any doubt which server is being accessed.
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/28/2005 :  21:42:55  Show Profile  Visit Frost's Homepage
I used "VERNON" as that is the name of the server. From the SQL Server Service Manager in lower right system tray, it states server is VERNON Services: SQL Server. So I put in this in the MSSQLTEST.PHP coding and will show the result. *S* Getting closer!!

h2>
<?php
$connection = mssql_connect( "VERNON" )
or die ( "Sorry - unable to connect to MS SQL2000" );
echo( "Congratulations, Vernon, - you connected to MS SQL2000" ) ;

?>

</h2>


Then if I type in my browser http://localhost/mssqltest.php I get the following error:
Parse error: syntax error, unexpected T_STRING in c:\Apache\htdocs\mssqltest.php on line 8

The info on "sorry - Unable to connect to MS SQL2000" has disappeared now and I no longer receive that text.. just I do not recieve the "success" text of Congratulations, ....

Ideas on what my syntax error is on : echo ( "Congratulations, Vernon, - .... ??


Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

robvolk
Most Valuable Yak

USA
15668 Posts

Posted - 04/28/2005 :  22:32:30  Show Profile  Visit robvolk's Homepage
Since this is strictly a PHP issue, I'd suggest heading over here (if you haven't already):

http://www.php.net/

And checking the documentation to see if it sheds any light on the subject. There's bound to be a PHP expert who's gotten it to work with SQL Server. I'm not one of them, and I think the collective experience on SQL Team leans towards ASP and .Net, not PHP.
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

United Arab Emirates
1456 Posts

Posted - 04/30/2005 :  05:26:40  Show Profile  Visit mohdowais's Homepage
>>$connection = mssql_connect( "VERNON" )

Vernon, you'll need to supply a username and password to connect to SQL Server. Try:

$connection = mssql_connect( "VERNON", "sa", "" )

if you've set your SQL Server up in mixed authentication mode, you can use the sa account (the password is blank by default, if you've changed the password, supply that in the third parameter). If you are not sure, open query analyser and try to connect to your local sql server with SQL authentication and type in "sa" in the username and your password. If you can connect from there you should be able to connect using the same credentials from PHP as well.

You can check if SQL authentication is enabled by right clicking on the SQL Server in Enterprise manager and clicking on properties.

OS
Go to Top of Page

robvolk
Most Valuable Yak

USA
15668 Posts

Posted - 04/30/2005 :  07:50:54  Show Profile  Visit robvolk's Homepage
quote:
if you've set your SQL Server up in mixed authentication mode, you can use the sa account
ABSOLUTELY NOT.

NEVER USE SA FOR APPLICATION LOGINS. This is the #1 mistake that all programmers make, and it opens up your database server to hacking, worms, and other network attacks.

Shame on you Owais, you should know better.
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 04/30/2005 :  12:49:47  Show Profile  Visit Frost's Homepage
Well, I went to the PHP.net website and did get some info. There are a lot of those using MS SQL2000 with IIS and also on Linux machines.

Intersting note though, I got in the CD from Microsoft called "Microsfot SQL Server2000 Developer Edition" and installed it. All things went smooth. However,when I boot up now I get a series of evens (hmmm series of unfotunate events??) That I never have had before. I always booted up my home computer (Windows XP Pro with SP2) and went straight into the desktop. After I installed the sQL Server2000 Developer Edition, I get a login screen with my name and picture on it. I never had that before. Also, I get these "warning" messages that pop up in series, one after the other.

warning: PHP startup: Invalid library (may not be a PHP library) 'mssql.dll (this is the exact phase used by the way)
warning: module 'mssql' already loaded
warning: PHP startup: Invalid library (may not be a PHP library) 'ntwdblib.dll
warning: Module 'msql' already loaded


These continue on several times, each "WARNING" with it's own pop up window. I click OK to each warning pop up, and then click my name and everything loads on the desktop as normal. Lower right hand taskbar (system tray) has a little icon with green arrow point to the right and if you hover over it it says : Running - \\VERNON -MSSQLServer

I know if I uninstall PHP that these will probably go away (warnings), but might be an indication that php and MS SQL are interacting with each other at the very system start up.. kind of odd . Also I wondered if anyone else has experienced the automatic "LOG ON" page when you boot up your computer after installing MS SQL2000 ? Now THAT'S different, and I think since I never had that before it has to do with MS SQL Server2000 .





Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

United Arab Emirates
1456 Posts

Posted - 05/01/2005 :  00:55:51  Show Profile  Visit mohdowais's Homepage
Sorry, Rob! I was just trying to keep things simple for him. You can walk him through the steps of creating a new user account, when he can actually connect to SQL Server Vernon, I did honestly forget to mention this, use the SA account only for testing, it has God-like permissions on SQL Server and you shouldn't be using it in your applications.

So looks like you are still having problems connecting...I would wager a guess that it has to do with the order of installation. Either PHP likes to be installed after SQL or vice-versa (the reverse of whatever you did!). Try re-installing PHP, its a fairly painless install IIRC.

quote:
Originally posted by robvolk

quote:
if you've set your SQL Server up in mixed authentication mode, you can use the sa account
ABSOLUTELY NOT.

NEVER USE SA FOR APPLICATION LOGINS. This is the #1 mistake that all programmers make, and it opens up your database server to hacking, worms, and other network attacks.

Shame on you Owais, you should know better.



OS
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 05/01/2005 :  14:55:51  Show Profile  Visit Frost's Homepage
Will do the reinstall, sounds like a good idea to me. Went to Barnes & Nobled yesterday and picked up another book on PHP5 called "PHP5 fast&easy web development" by Julie Meloni ISBN 1-59200-473-3 This one does have installiation of PHP5 along with Apache server 2.0, which was not recommeneded in the other book on easy steps. Also, this book refers to instlaling MySQL along with PHP5, and Apache 2.0 It is truly funny. I go to the book store and the bookstore are lined with MySQL books amost 11:1 against MS SQL. I think I saw 3 books there that were Microsoft Reference manuals dealing with MS SQL2000 Server. I own one of the books, but truly amazing how many PHP/MySQL, PHP/MySQL/Apache, Webdesign/MySQL.. etc etc.. Didn't even see a book on PostgreSQL while there. You would think that they would be so much better off with the MS SQL, even the express than the MySQL. I do belive that MS SQL Express is a freely downloaded program. yes? Even the ProstgreSQL is a bit easier now to install than in the beginnings.. from what I've been told.


Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 05/03/2005 :  23:18:12  Show Profile  Visit Frost's Homepage
Well SQL 2000 is running fine on Windows XP Pro. Thought I'd be amiss to NOT let anyone know who wanders in here.

I downloaded a fresh install of PHP 5, and unzipped it to C:\PHP along with all the extra dll files that you could download separate. I also copied the php5activescript.dll (activescript Company PHP) to the C:\Windows\System32 folder, then using command prompt, registered it by going to the php folder (C:/PHP) folder and typing at the end of the command prompt regsvr32 php5activescript.dll
Make sure also in the c:/php folder are php5apache2.dll, ntwdblib.dll, php5ts.dll .

I also made sure that c\PHP and C:\Apache2 were included in the Windows Path, and also that created a variabe in the "Systyem Variables of "PHPRC" and Value of "C:\PHP" Now, my following "testmssql2000.php" looks like the following, and if I type the following in the Internet Explorer address bar: http://localhost/mssqltest.php I get a "Congratulations, Vernon, you connected to MS SQL2000!"

<html>
<head> <title> MS SQL 2000 Connection test by Vernon</title> </head>
<body>
<h2>
<?php
$conneciton= mssql_connect ("localhost")
or die ( "Sorry Vernon, you did not connect to MS SQL2000" );
echo ( "Congratulations, Vernon, you connected to MS SQL2000!" );
?>
</h2>
</body> </html>


I know this is not PHP 101 but there might be someone out there that is trying to break free of MySQL and go with Microsoft SQL Server 2000 and this will let them know it can be done. BTW I can go to another computer on our network, type in http://192.168.1.50/mssqltest.php and I get the same thing!! yea!! Also the <?php phpinfo(); ?> on my computer or on antother netorked computer will show me the configuration of the PHP 5. But, mainly, the SQL 2000 databse connects fine with Windows XP Pro, PHP5 and Apache 2.0.54


Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 05/04/2005 :  09:28:39  Show Profile
quote:
Originally posted by eyechart

quote:
Originally posted by X002548

Let's not forget that dbforums runs mySQL....are they up today?



I thought you were banned from that site (websense) ;)



-ec



Hardly

http://www.dbforums.com/memberlist.php?&order=DESC&sort=posts&pp=30<r=



Brett

8-)
Go to Top of Page

Frost
Starting Member

USA
33 Posts

Posted - 05/04/2005 :  13:32:56  Show Profile  Visit Frost's Homepage
quote:
Originally posted by eyechart

to say that mysql isn't scalable is ridiculous. Look at livejournal for example. look at slashdot. Both of these sites take tons of hits per day, livejournal takes 1000s of hits per second at it's busiest. Neither one of These sites would even exist if they had to use SQL Server. Not because of missing capability or lack of scalability, the cost of the license would kill them. Livejournal has (currently) 18 servers hosting their databases. Figure between 36 and 48 total CPUs to license that would run you between 200-300k for std edition licensing, or 800-1.2 million for ent. edition licensing.

I agree that mysql doesn't have some important features that SQL Server has. I also agree that I would not run my company ERP on mysql. but then again, I would think twice about running a big ERP on SQL Server as well.

Anyway, mysql is an improving product. They are adding features much quicker than Microsoft is with SQL Server (how many years since the last release?). Learning something new is never a bad thing.



-ec



EC,
I kind of have to disagree with your statement about running a big ERP on SQL Server. Reference this URL: http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part2/c0661.mspx It is a page link that deals with Migrating Sybase to SQL Server 2000. Toward the bottom of the page it states that SQL Server 2000 is the foundation for the Microsoft TerraServer Web site. The average hits per day is 15,130,000; average database queries per day: 8,810,000 and peak queries per day : 17,760,000. TerraServer accesses 1 terabyte of satellite images of the world, and has recieved over 1 billion hits. ...makes one wonder about the newest kid on the block.. MS SQLServer 2005

That's a bunch!! (as they say in Nebraska!)

Vernon

"Never argue with an idiot..they will only bring you down to their level and beat you with years of experience"

Edited by - Frost on 05/09/2005 00:03:21
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000