Welcome, Guest
Please Login or Register.    Lost Password?

OWL +SQL SERVER ON WINDOWS SERVER
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: OWL +SQL SERVER ON WINDOWS SERVER
#2791
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 28
Delete the content of the active_sessions table, and try again... if that fails in owl.php set active_session_ip = false; instead of true.

B0zz
Owl DEV Team
Moderator
Posts: 2220
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#2812
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 0
Hi... Now i have OWL working with SQL Server.

The complete Steps to get this are:

1. Update the ntwdblib that php haves for the newest version 200.80.194.0. Because the original DLL from PHP don`t works with sql server.

2-Copy .Dll files that are in the root folder of your php installation that do not begin by php5 *.* to c: \ windows \ system32, this is the list (almost for the version 5.2.8):

* aspell-15.dll
* fdftk.dll
* gds32.dll
* libeay32.dll
* libmcrypt.dll
* libmhash.dll
* libmysql.dll (If u copy this u can work with MySQL and MySQLi without problems)
* libpq.dll (This is for PostgreSQL, but don“t work with copy only)
* ssleay32.dll

Restart web server.

3-Go to your php.ini file and uncomment the php_mssql.dll line (quit the ;).
Restar web server again.

Now u have php_mssql.dll up and working....

4-Run the SQL scripts that I provided (there are wroking over SQL SERVER 2005/2008).
If u use English SQL Environmet, u have to change date to 000-00-00 on the scripts.

5-Go to your owl.php and turn display errors on

6-Go to config/owl.php, uncomment line require_once("$default->owl_fs_root/phplib/db_mysql.inc");

Add the following: require_once("$default->owl_fs_root/phplib/db_mssql.inc");

7-Go to phplib/db_mssql, add at the end of file before the last } the following code:

function now($datestring = "")
{
if (!empty($datestring))
{
$sysdate = "'$datestring'";
}
else
{
$sysdate = "'" . date("Y-m-d H:i:s") . "'";
}
return $sysdate;
}

You might need to adjust Y-m-d H:i:s to accommodate the data format that MS Sql expects as a date inside if INSERT Statements.

8-Go to phplib/db_mssql, add at the end of file before the last } the following code:

function insert_id($tablename = "", $fieldname ="") {
$id = false;
$res = mssql_query('SELECT @@identity AS id');
if ($row = mssql_fetch_row($res)) {
$id = trim($row[0]);
}
mssql_free_result($res);
return $id;
}

9-Delete the content of the active_sessions table

10-Go to owl.php and set active_session_ip = false;

11-Set the parameters to connect to the MSSQL BD in Config/Owl.php

12-Try to login to OWL, if u get an error that the admin account is disable. Then go to user table and add a new user with the same parameter of admin account.

13-Login to owl.

Note: If u forget to do step 8 then u get an error when try to make a new folder.

Now im working on a page that allows to set the BD parameters directly from Web Explores.


Thanks for all your colaboration!!!
File Attachment:
File Name: OWLSQL.zip
File Size: 126994
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
The administrator has disabled public write access.
System Enginnering
 
#2814
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 0
ooppss. have a new question option system logs only gives a message: NO RECORDS FOUND

why???


This is solved.

Go to admin/log.php

Find line $sql->query("SELECT * FROM $default->owl_log_table left outer join $default->owl_users_table u on u.id=userid $whereclause ORDER BY logdate DESC LIMIT $nextrecord,$default->log_rec_per_page");

Around line 414

Change to

$sql->query("SELECT * FROM $default->owl_log_table left outer join $default->owl_users_table u on u.id=userid $whereclause ORDER BY logdate DESC,$default->log_rec_per_page");

The error is because SQL Don`t Support the Instruction Desc Limit 0,25, we have tu use only Desc.
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
Last Edit: 2009/10/02 20:22 By jaullo.
The administrator has disabled public write access.
System Enginnering
 
#2818
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 28
Could you send me your modified db_mssql.inc file?

Thanks,
B0zz
Owl DEV Team
Moderator
Posts: 2220
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#2827
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 0
Sure....Thanks a looootttt....
File Attachment:
File Name: db_mssql.zip
File Size: 1693
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
Last Edit: 2009/10/04 18:49 By jaullo.
The administrator has disabled public write access.
System Enginnering
 
#2831
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 0
Bozz only one more question. Where can i change date/time parameters because im getting only Dec 31, 1969 at 11:00 p.m. in all OWL System, this is not the real system Date/Time
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
The administrator has disabled public write access.
System Enginnering
 
#2832
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 28
That would indicate that the following php calls fail


date($owl_lang->localized_date_format, strtotime($sql->f("smodified")) + $default->time_offset)

So strtotime doesn't like your mssql dates is my guess.

B0zz
Owl DEV Team
Moderator
Posts: 2220
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#2835
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months, 1 Week ago Karma: 0
Where can i find the line that u gives me?
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
The administrator has disabled public write access.
System Enginnering
 
#2837
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months ago Karma: 28
In a bunch of places...

view_default.php:

402, 441, 1179, 1201, 1226 , and in a number of other files, but these affect how the date is viewed in browse.php.

B0zz
Owl DEV Team
Moderator
Posts: 2220
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#2854
Re:OWL +SQL SERVER ON WINDOWS SERVER 11 Months ago Karma: 0
Thanks... i will try...
Jason Ulloa
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
My-Cronline Location: Costa Rica
The administrator has disabled public write access.
System Enginnering
 
Go to topPage: 12

Ad Block