please help me !

03/24/2011 10:30 insteadof#1
this error

[Only registered and activated users can see links. Click Here To Register...]

Code:
$mssql = array( 
        'host' => "192.168.1.3", 
        'user' => "sa", 
        'pass' => "123456" 
    ); 
     
echo "<center>Player Online List<br><br>"; 
echo "<table border='1'> 
    <tr> 
        <td align='center'>Character Name</td> 
        <td align='center'>Level</td> 
        <td align='center'>Map</td> 
        <td align='center'>Login</td> 

    </tr>"; 

$con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']); 

$result1 = mssql_query("SELECT user_no FROM account.dbo.USER_PROFILE WHERE login_flag = '1100'",$con); 


while($row1 = mssql_fetch_row($result1)) { 
     
    $result2 = mssql_query("SELECT character_name,wLevel,wMapIndex,login_time FROM character.dbo.user_character WHERE user_no = '".$row1[0]."' ORDER by login_time DESC",$con); 
    $row2 = mssql_fetch_row($result2); 

        echo "<tr> 
            <td align='left'>".$row2[0]."</td> 
            <td align='center'>".$row2[1]."</td> 
            <td align='center'>".$row2[2]."</td> 
            <td align='center'>".$row2[3]."</td> 

        </tr>"; 

} 
echo "</table></center>"; 
?>
03/25/2011 16:35 insteadof#2
up, help me pls , I want it :(
03/25/2011 16:49 =Warmonger=#3
Try removing $con from this line. Since you already have a link opened, theres no need to call it. Also make sure you have the php_mssql.dll extension enabled.
Code:
$result1 = mssql_query("SELECT user_no FROM account.dbo.USER_PROFILE WHERE login_flag = '1100'",$con);
03/26/2011 01:49 insteadof#4
Quote:
Originally Posted by Warmonger1337 View Post
Try removing $con from this line. Since you already have a link opened, theres no need to call it. Also make sure you have the php_mssql.dll extension enabled.
Code:
$result1 = mssql_query("SELECT user_no FROM account.dbo.USER_PROFILE WHERE login_flag = '1100'",$con);
after a change , I get a new error
Code:
Parse error: syntax error, unexpected ')' in C:\Program Files\VertrigoServ\www\newreg\Player_Online_List_php.php on line 21
I can find it anywhere (php_mssql.dll)
03/26/2011 02:17 Decima#5
first of all, warmonger, as usual, is incorrect, for the mssql u do need the $con, otherwise it wont connect to the DB

second, 'php_mssql.dll' can be found in a line in the httpd.conf file in ur apache folder, u need to uncomment that in order for it to load mssql extensions, be sure u save and restart the apache server b4 u try again.

usually i am against spoonfeeding the noobs, but the only thing worse then spoonfeeding them, is giving them bad info . . .

and u need to learn how ur apache server works, and u need to learn php otherwise your server willl be a miserable failure, they are both required to successfully run and admin a server.
03/26/2011 02:35 ҉ THT ҉#6
If you are using XAMPP
Open with notepad: 'xampp/php/php.ini'.
Go to line 617 OR find ';extension=php_mssql.dll'.

Replace line: ';extension=php_mssql.dll' with 'extension=php_mssql.dll'
OR delete ';' == ;extension=php_mssql.dll
03/26/2011 02:38 insteadof#7
I use code by Janvier123
I only use the new reg code, code view online pen do not work

download all from [Only registered and activated users can see links. Click Here To Register...]
Please help me make it work

I use Vertrigo it ok ?
03/26/2011 02:49 insteadof#8
Quote:
Originally Posted by ҉ THT ҉ View Post
If you are using XAMPP
Open with notepad: 'xampp/php/php.ini'.
Go to line 617 OR find ';extension=php_mssql.dll'.

Replace line: ';extension=php_mssql.dll' with 'extension=php_mssql.dll'
OR delete ';' == ;extension=php_mssql.dll
I tried doing so with Vertrigo, but not :(
03/26/2011 18:30 =Warmonger=#9
Quote:
Originally Posted by Decima View Post
first of all, warmonger, as usual, is incorrect, for the mssql u do need the $con, otherwise it wont connect to the DB

second, 'php_mssql.dll' can be found in a line in the httpd.conf file in ur apache folder, u need to uncomment that in order for it to load mssql extensions, be sure u save and restart the apache server b4 u try again.

usually i am against spoonfeeding the noobs, but the only thing worse then spoonfeeding them, is giving them bad info . . .

and u need to learn how ur apache server works, and u need to learn php otherwise your server willl be a miserable failure, they are both required to successfully run and admin a server.
Wrong kid, I can sit here and spoon feed you all day. But sitting back and watching you realize how wrong you are from the start should be a learning experience all its own. You do NOT need to call a active connection, if one is already open, php will automatically default and use the last one active. So really the $con itself is just a waste of text. Secondly the php extensions are enabled through php.ini configuration file, not through the web servers config file (kinda makes sense php extensions enabled in php configurations?). And who uses slow ass insecure apache anymore? Time for you people to catch up with the times.
03/26/2011 19:46 Decima#10
hmm, it is php.ini, that u are right about, dunno wtf i was thinking giving out httpd.conf :O
so, toche' ill give you that one

but i just tested ur theory on $con 3 times in a row and get an error everytime

but hey, i guess it knows how 1337 u are . . . .
03/27/2011 23:22 ҉ THT ҉#11
did you restart your apache server for sure?
03/28/2011 11:52 insteadof#12
Quote:
Originally Posted by ҉ THT ҉ View Post
did you restart your apache server for sure?
I use xampp and do as you say, but it does not work
03/28/2011 13:27 ҉ THT ҉#13
did you restart xampp?
03/29/2011 04:06 insteadof#14
I do not find extension = php_mssql.dll' in php.ini of xampp why?
03/29/2011 05:39 Decima#15
its going to be around line number 965 depending on ur version, it will look like this:
Code:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
extension=php_mbstring.dll
extension=php_exif.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_intl.dll
;extension=php_ldap.dll
extension=php_mcrypt.dll
;extension=php_mssql.dll
;extension=php_mysql_mysqlnd.dll
extension=php_mysql_libmysql.dll
;extension=php_mysqli_mysqlnd.dll
extension=php_mysqli_libmysql.dll
u can find it in xampp/php/php.ini

just take the comment out so it looks like so:
Code:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
extension=php_mbstring.dll
extension=php_exif.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_intl.dll
;extension=php_ldap.dll
extension=php_mcrypt.dll
extension=php_mssql.dll
;extension=php_mysql_mysqlnd.dll
extension=php_mysql_libmysql.dll
;extension=php_mysqli_mysqlnd.dll
extension=php_mysqli_libmysql.dll