mysql_connect() problems

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 6:07 am    Post subject: mysql_connect() problems Reply with quote

I just had a quick question about mysql_connect.

I know i need to edit some files in php.ini, but what do i need to update so i can use these functions? anyone know?
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Apr 05, 2007 6:14 am    Post subject: Reply with quote

Read about it:
http://www.php.net/mysql_connect
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 6:27 am    Post subject: Reply with quote

this is the error i get:

Code:

Fatal error: Call to undefined function mssql_connect() in C:\Program Files\Abyss Web Server\htdocs\dbconnect.php on line 6


so it is somethin in the php.ini file i need to add cuz it is undefined. if you can please get on msn :D
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Apr 05, 2007 6:34 am    Post subject: Reply with quote

That's because you're using the mssql_connect function, and the extension probably isn't enabled.
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 6:35 am    Post subject: Reply with quote

how do i enable it?
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Apr 05, 2007 6:36 am    Post subject: Reply with quote

Remove the semi-colon from the extension you wish to have inside your php.ini file.
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 6:37 am    Post subject: Reply with quote

so go 2 my php.ini file down where are the extensions are and do what?
Back to top View user's profile Send private message
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 7:33 am    Post subject: Reply with quote

k nvm i found it (sorry for double posting)
Back to top View user's profile Send private message
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 3:44 pm    Post subject: Reply with quote

K i fixed the code previously from above now i get this error... mayb it is somethin in my php script or mayb it is something on the db.. but the db site is on... so... i have now.

Code:

"); ?>); ?>
Warning: mssql_select_db() [function.mssql-select-db]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 27

Warning: mssql_select_db() [function.mssql-select-db]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 27

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 28

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 28

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 29

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 29

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 30

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 30

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 34

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 34
Failed


please help!
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Thu Apr 05, 2007 3:50 pm    Post subject: Reply with quote

The error plainly says the database server isnt there. Check the config settings for the script to see if its looking for it in the right place.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Thu Apr 05, 2007 6:30 pm    Post subject: Reply with quote

k thx bro! i'll have 2 install a different DB
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Thu Apr 05, 2007 11:19 pm    Post subject: Reply with quote

razorsedge wrote:
k thx bro! i'll have 2 install a different DB


MySQL will be your best bet if the script supports it.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Fri Apr 06, 2007 3:57 am    Post subject: Reply with quote

Well... its a game server.. i dont kno if you have ever heard of it... but... it is KalOnline. We mainly use for the databases ... MSSQL.. it is mainly the best one for that but i am trying 2 talk her slowly into switching into mysql... cuz i know some crap about that, but... we have to redo everything... and ppl that are playing rite now will get mad.. but they will get a lil' better stuff when starting now.. but anyways i am gonna do my best!
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Apr 06, 2007 11:22 pm    Post subject: Reply with quote

razorsedge,

The functions that are reported in the errors are related to connecting to MS SQL Server (and not MySQL). If you have installed our preconfigured package, edit its php.ini file, search the line containing php_mssql.dll, and uncomment it (remove the leading ; character).

Restart the server to ensure that PHP will be reloaded and takes into account the configuration update. Needless to say that you need an MS SQL Server (Microsoft has an Express free edition of MS SQL server. It should be enough for most uses unless you're going to store more than 4GB of data on it).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Sat Apr 07, 2007 4:06 pm    Post subject: Reply with quote

aprelium,

k i uncommented the .dll file and i still get the following error:
Code:

"; ?>
Warning: mssql_select_db() [function.mssql-select-db]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 27

Warning: mssql_select_db() [function.mssql-select-db]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 27

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 28

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 28

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 29

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 29

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 30

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 30

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\install.php on line 34

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\install.php on line 34
Failed


i checked teh username to the database... and i also created a new one! and i still get those errors... i will restert the webserver and see if that has any major impact on it.
Back to top View user's profile Send private message
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Sat Apr 07, 2007 4:22 pm    Post subject: Reply with quote

k sorry for a double post but... just to confirm up onthe last post.. i restarted the server and... the connecting to the server didn't change!
Back to top View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Sat Apr 07, 2007 6:40 pm    Post subject: Reply with quote

If you read the error reports, you would know that the script has failed to locate the server. The message seems to suggest that the script doesn't know the URL (address) of the db server.
_________________
Olly
Back to top View user's profile Send private message
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Sun Apr 08, 2007 5:17 am    Post subject: Reply with quote

i think i figured out the problem... i think its the fact that she has a firewall on ... so i will let you kno if that was the problem if so what port should i use to port forward it?
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Apr 08, 2007 7:10 am    Post subject: Reply with quote

It shouldn't be any firewall issue as long as your connecting from localhost. Incase you're wondering, MySQL uses port 3306.
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Sun Apr 08, 2007 3:47 pm    Post subject: Reply with quote

its not a localhost database... the database is a different ip address.... that is threason it isn't connecting... but... i am using mssql to connect to it... anyways... she has a firewall on and i do as well... and i need 2 find a way to port forward on mine and hers! anyways... just get back to me whenever you can
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Sun Apr 08, 2007 6:56 pm    Post subject: Reply with quote

You need to make sure the server allows connections from those other than localhost. I know MySQL needs you to set it to allow that.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
razorsedge
-


Joined: 06 Jan 2007
Posts: 104

PostPosted: Mon Apr 09, 2007 7:03 pm    Post subject: Reply with quote

How might i go about doing this... i searched google for " MSSQL connection problems" and could not find a thing... can you please help me with this?
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Apr 09, 2007 7:39 pm    Post subject: Reply with quote

Unfortunately I don't know since I only use MySQL with phpMyAdmin to modify these things.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Apr 12, 2007 5:45 pm    Post subject: Reply with quote

razorsedge,

According to MS information, MSSQL uses these ports:

TCP Port 1433 - SQL over TCP Microsoft SQL Server
TCP Port 1433 - SQL over TCP MSSQL$UDDI
UDP Port 1434 - SQL Probe Microsoft SQL Server
UDP Port 1434 - SQL Probe MSSQL$UDDI

So you'll have to open them on the firewall of the computer where MSSQL is running and to forward them on your router if you need remote access to the database.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group