Welcome to the RaGEZONE - MMORPG development forums.

Websites cant connect to Database

This is a discussion on Websites cant connect to Database within the Gunz Online forums, part of the MMO and MMORPG Developments category; i got 1. Ranking website 2. normal website 3. register i filled all right information - config.php and still it ...

Results 1 to 8 of 8
  1. #1
    Registered
    Rank
    Member
    Join Date
    Mar 2011
    Posts
    17
    Liked
    1

    ! Websites cant connect to Database

    Click
    i got
    1. Ranking website
    2. normal website
    3. register

    i filled all right information - config.php

    and still it cant see GunzDB

    also did odbcad32 - forwarded 80
    ( all gunz ports )

    Code:
    <?php
    session_start();
    require('class_sqlfunctions.php');
    
    /**********************************
    | @author SuperWaffle.            |
    | Fill in the correct info below. |
    *********************************/
    class connect
    {
      var $host = "PC1-PC\SQLEXPRESS";   // Host, usually PCNAME\SQLEXPRESS
      var $user = "sa";                      // Username is usually empty.
      var $pass = "hugo123";                     // Password is usually empty.
      var $dbn  = "GunzDB2";              // Database name is most likely GunzDB.
    
      public function __construct()
      {
        $con = mssql_connect($this->host, $this->user, $this->pass) or die("<center><font color='red'>Failed to connect to the database!</font></center>");
        mssql_select_db($this->dbn, $con) or die("<center><font color='red'>Failed to select the database!</font></center>");
      }
    }
    new connect();
    
    
    /*** The name of your server.
         This will show up in the title and on every page H1. ***/
    $gunzname = "Fire GunZ";
    
    /*** Location of your emblem folder.
         Example: http://gunz.com/emblem = emblem ***/
    $emblemfolder = "emblem";
    
    /*** Define the account name(s) of the admin(s) here, seperate with ,"this"
         Those will have access to the manage updates, manage events, item shop and IP Ban functions. ***/
    $admins = array("hugofunky", "Hugofunky", "iDevil123");
    ?>

    i dont get it.

    every website i use

    PLEASE HELP!

  2. #2
    Pee Aitch Pee
    Rank
    Subscriber
    Join Date
    Mar 2011
    Location
    The Netherlands
    Posts
    575
    Liked
    284

    Re: Websites cant connect to Database

    Have you tried leaving $user and $pass empty?

    Else the following might be the problem: PHP SQL Server connection problems - mssql_connect() [function.mssql-connect]: Unable to connect to server

    The ntwdblib.dll file in your PHP folder is not the correct version.
    Download the newer version here: ntwdblib.dll download
    Move it to your PHP folder, overwrite it and restart Apache.

  3. #3
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Feb 2012
    Posts
    755
    Liked
    79

    Re: Websites cant connect to Database

    in your Config.php the $dbn is GunzDB2, is that your real database name or just GunzDB?? if so then change

  4. #4
    Registered
    Rank
    Member
    Join Date
    Mar 2011
    Posts
    17
    Liked
    1

    Re: Websites cant connect to Database

    Well SuperWaffle i tried what you said bud now i get this whole error! if i load website.

    Warning: session_start() [function.session-start]: open(C:/Users/USER/AppData/Local/Temp\sess_03f8bba955c5a75c3af0b1e244e2dd10, O_RDWR) failed: No such file or directory (2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\web2\include\config.php:2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\web2\include\config.php:2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\web2\include\config.php on line 18

    Warning: Unknown: open(C:/Users/USER/AppData/Local/Temp\sess_03f8bba955c5a75c3af0b1e244e2dd10, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:/Users/USER/AppData/Local/Temp) in Unknown on line 0
    look for yourself : http://dfgunz.no-ip.biz/web2

  5. #5
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Dec 2011
    Location
    TheHostingsquad
    Posts
    229
    Liked
    12

    Re: Websites cant connect to Database

    do you use appserv? your site is down.
    Ads removed, contact a mental / exclamatio if you want to purchase ad space

  6. #6
    Registered
    Rank
    Member
    Join Date
    Mar 2011
    Posts
    17
    Liked
    1

    Re: Websites cant connect to Database

    i use xampp and the website is online if iam on my computer so alot.

    add me msn : hugolugtenborg@hotmail.com
    or skype : hugofunky

  7. #7
    Gunz Online
    Rank
    Member +
    Join Date
    Jul 2009
    Location
    Georgia
    Posts
    542
    Liked
    301

    Re: Websites cant connect to Database

    click start > and search php.ini and open it > now CTRL + F and search session.save_path > now change the place you want example :
    session.save_path = "C:/Users/Sahar/AppData/Local/Temp"
    you can do it like this :
    session.save_path = "C:/Users/Sahar/AppData/Local"
    [i am talking about this error] :
    Warning: session_start() [function.session-start]: open(C:/Users/USER/AppData/Local/Temp\sess_79f957e5f7da5c22b7392a9c04bbeb42, O_RDWR) failed: No such file or directory (2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\web2\include\config.php:2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\web2\include\config.php:2) in C:\xampp\htdocs\web2\include\config.php on line 2

    Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\web2\include\config.php on line 18

    Warning: Unknown: open(C:/Users/USER/AppData/Local/Temp\sess_79f957e5f7da5c22b7392a9c04bbeb42, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:/Users/USER/AppData/Local/Temp) in Unknown on line 0

  8. #8
    Registered
    Rank
    Member
    Join Date
    Mar 2011
    Posts
    17
    Liked
    1

    Re: Websites cant connect to Database

    @sahar042

    i did what you said bud its still the same?

    maybe u got skype for teamviewer or something?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •