#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2009
    Posts
    8
    Rep Power
    0

    Fatal error: Call to undefined function mssql_connect() --Searched for solution fail


    Hello there people, I am new here and I really need some help. I am stuck on a PHP scrypt.....

    This is the error I am getting.

    Fatal error: Call to undefined function mssql_connect() in D:\wamp\bin\apache\Apache2.2.11\htdocs\banmanagement\connect.php on line 7

    .... This is the SCRIP of connect.php

    <?php
    /*The connection page by Zombe.*/
    $MSSQLserverIP = 'xx.xxx.x.x'; // IP goes here
    $MSSQLusername = 'sa'; // MSSQL username goes here
    $MSSQLpassword = 'xxxxxxxxxx'; // MSSQL password goes here

    $link = mssql_connect ("$MSSQLserverIP", "$MSSQLusername", "$MSSQLpassword");
    if(!$link)
    {
    die('Something went wrong while connecting to MSSQL');
    }
    mssql_select_db('account', $link);


    $MYSQLserverIP = 'xx.xxx.x.x'; // IP goes here
    $MYSQLusername = 'root'; // MYSQL username goes here
    $MYSQLpassword = 'xxxxxxxxxxxxx'; // MYSQL password goes here

    mysql_connect("$MYSQLserverIP", "$MYSQLusername", "$MYSQLpassword") or die(mysql_error());
    mysql_select_db("ban_info") or die(mysql_error());

    $foundersIP = 'IP'; //Your IP goes here
    ?>


    Softwares being used:
    Wamp server 2.0
    MySQL Server 5.1
    phpmyadmin3

    Queries (SQL) execute into Myphpadmin

    Code:
    create database ban_info;
    
    use ban_info;
    
    CREATE TABLE `banip` (  
      `ID` BIGINT (10) NOT NULL AUTO_INCREMENT, 
      `IP` VARCHAR(50) NOT NULL, 
      `ip2long` INT(50) NOT NULL, 
      PRIMARY KEY (`ID`)  
    );
    CREATE TABLE `allowed` (  
      `ID` BIGINT (10) NOT NULL AUTO_INCREMENT, 
      `IP` VARCHAR(50) NOT NULL, 
      `ip2long` INT(50) NOT NULL, 
      PRIMARY KEY (`ID`)  
    );
    .....
    If there is any additional information required, please let me know.... there are about 6 -12 files involved in this... But i think everything is good if i could pass through this error

    Thank you very much in advance for your help.
    Thiago.
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    that error means mssql isn't enabled in php.ini. Enable it (uncomment it, usually) and restart.

    -Dan
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2009
    Posts
    8
    Rep Power
    0
    Hello there, Thank you for the quick reply ... Let me show you my php.ini file... maybe you can help ....

    By the way, I have 2, which one should I touch???

    1)
    d:\wamp\bin\apache\Apache2.2.11\bin\php.ini

    2)
    d:\wamp\bin\php\php5.3.0\php.ini

    which of those 2 do I want to touch ... also, when you tell me which one, I will try it, if it doesnt work I will show u what the whole file looks like...

    ONce again, Thank you very much for the quick reply.
    Thank you.! !!!! ... do you know of any known easyer ways to prevent sql injection? .... If i can avoid doing all this headache I will go with a software or any sort of thing... Right now my REG page is using obdc settings btw..

    ty.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2009
    Posts
    4
    Rep Power
    0
    i think u had to uncomment one under the dynamic extensions...just search for dynamic extensions and just scroll down a little and u can find a bunch of codes like
    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    ;extension=php_dba.dll
    ;extension=php_exif.dll
    ;extension=php_fileinfo.dll
    extension=php_gd2.dll
    ;extension=php_gettext.dll
    search for what u need and uncomment it..restart the server..i think this will do..u can also load that on run time by using dl() but in the newest versions it is depreciated and in php 6 it is excluded and hence better way is edit php.ini itself...
  8. #5
  9. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2006
    Location
    Hindustan
    Posts
    1,121
    Rep Power
    1309
    Originally Posted by thiagocosta85
    By the way, I have 2, which one should I touch???

    1)
    d:\wamp\bin\apache\Apache2.2.11\bin\php.ini

    2)
    d:\wamp\bin\php\php5.3.0\php.ini
    2 easy ways to identify your php.ini file.

    1. check for phpinfo() Loaded Configuration File.
    2. Left-click the WAMP icon and select PHP php.ini.

    Regards
    Trimbak D. Bankar.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2009
    Posts
    8
    Rep Power
    0
    Wow, thank you so much fopr the attention guys.. Really ..

    These hackers are injecting, parsing queries into my reg page.
    Now I found no easy way to prevent it. Now i have to go thru this.. ><'' ...

    I am at work painting a few cars, when I get home tonight I will try this. Thank you so much. I will let u guys kno what happened. Hopefully I will have to find a "SOLVED" button =D

IMN logo majestic logo threadwatch logo seochat tools logo