Welcome to Geeklog, Anonymous Tuesday, January 31 2023 @ 09:41 pm EST

Geeklog Forums

Can not install Geeklog on Windows Vista with MSSQL Server 2008 Express


Sergey

Anonymous
brainy
I have tried to install geeklog on my local computer with windows vista running Microsoft IIS 7 with PHP 5 and SQL server 2008 Express installed.
Downloaded geeklog-1.6.0sr1.tar.gz, unpacked it using 7-Zip. Placed the contents of public_html into my web root directory (C:\inetpub\wwwroot\mygeeklog). Placed the remaining contents of geeklog-1.6.0sr1 into other non public folder (D:\mygeeklog). Have granted all possible Permissions for the IIS_IUSRS user on this folder (right click->properties->Security).

Created new database using the script:

USE [master]
GO

CREATE DATABASE Geeklog
GO

CREATE LOGIN [Geeklog]
WITH PASSWORD=N'Geeklog',
DEFAULT_DATABASE=[Geeklog],
CHECK_EXPIRATION=OFF,
CHECK_POLICY=OFF
GO

USE [Geeklog]
GO


CREATE USER [Geeklog] FOR LOGIN [Geeklog] WITH DEFAULT_SCHEMA=[dbo]

Have granted max possible Server Roles and Database roles on this database to the Geeklog user using Microsoft SQL Server Management Studio.

Opened my browser and navigated to http://localhost/mygeeklog/admin/install/index.php.
Installation wizard started. On "Unable to locate Geeklog files" screen have entered D:/mygeeklog/db-config.php path. Clicked continue, then New Install. On Step 2 screen entered the following information:

Database Type: Microsoft SQL
Database Hostname: localhost
Database Name: Geeklog
Database Username: Geeklog
Database Password: Geeklog

Clicked Install. Received white screen in browser.

Is this what I should see?

By the way, in my php.ini a have the following settings:

error_reporting = E_ALL
display_errors = On

Tried to navigate to the http://localhost/mygeeklog/index.php and received "Unfortunately, an error has occurred rendering this page. Please try again later." message.

What else I can do to make geeklog working on my computer?
 Quote

Sergey

Anonymous
brainy
I have uncommented "$_CONF['rootdebug'] = true;" in my siteconfig.php and received the following error message when accessing http://localhost/mygeeklog/index.php:

An error has occurred:
This is being displayed as "Root Debugging" is enabled in your Geeklog configuration.

If this is a production website you must disable this option once you have resolved any issues you are investigating.

2 - mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) @ D:\mygeeklog\system\databases\mysql.class.php line 118

array(0) {
}

Why it tries to connect to the mysql database and not to the MSSQL Server?
On Step 2 screen of installation wizard I have entered the following information:

Database Type: Microsoft SQL

By the way here is the content of my db-config.php file:

<?php

/*
* Geeklog database configuration
*
* You should not need to edit this file. See the installation instructions
* for details.
*
*/

if (strpos(strtolower($_SERVER['PHP_SELF']), 'db-config.php'Wink !== false) {
die('This file can not be used on its own!'Wink;
}

global $_DB_host, $_DB_name, $_DB_user, $_DB_pass, $_DB_table_prefix, $_DB_dbms;

$_DB_host = 'localhost';
$_DB_name = 'geeklog';
$_DB_user = 'username';
$_DB_pass = 'password';
$_DB_table_prefix = 'gl_';
$_DB_dbms = 'mysql';

?>

Any help would be highly appreciated!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Sergey

$_DB_dbms = 'mysql';


Change that to 'mssql' and see if it helps.

'mysql' is the default and since you mentioned that the install ended in a blank page for you, it may simply have not come to the point where it would change that entry.

bye, Dirk
 Quote

Sergey

Anonymous
brainy
Why the installation wizard does not write the settings I supplied on Step 2 screen to my db-config.php file?

Ok, I have changed this settings by hand. Instead of:

$_DB_host = 'localhost';
$_DB_name = 'geeklog';
$_DB_user = 'username';
$_DB_pass = 'password';
$_DB_table_prefix = 'gl_';
$_DB_dbms = 'mysql';

I have written

$_DB_dbms = 'mssql'; // 'mssql' (Microsoft SQL Server)
$_DB_host = 'localhost'; // Name of your database server
$_DB_name = 'Geeklog'; // Name of the database
$_DB_user = 'Geeklog'; // MSSQL user name
$_DB_pass = 'Geeklog'; // MSSQL password
$_DB_table_prefix = 'gl_';

Trying accessing http://localhost/mygeeklog/index.php received another error message:"PHP Fatal error: Call to undefined function mssql_connect() in D:\mygeeklog\system\databases\mssql.class.php on line 122".

Why this error appears?

I have installed PHP on IIS using Microsoft Web Platform Installer 2.0 and it was installed successfully without any error.
 Quote

Sergey

Anonymous
brainy
I do have

[PHP_MSSQL]
extension=php_mssql.dll

lines in my php.ini file
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Sergey

Why the installation wizard does not write the settings I supplied on Step 2 screen to my db-config.php file?


See above: You said you did get a blank page. Which means that something went wrong with the install script. If that happened before it got a chance to update the db-config.php, then that's the explanation.

At which point did that happen exactly? What was the URL in your browser when that happened?


Sorry, can't help you with the DLL / undefined function mssql_connect problem, as I'm not on Windows.

bye, Dirk
 Quote

Sergey

Anonymous
brainy
At last the problem with the "Call to undefined function mssql_connect()" error resolved.
After searching around on various php forums I have recognized that I need ntwdblib.dll which was not for some reason on my entire c:\ drive. Have downloaded the ntwdblib.dll from somewhere and placed it to my php catalog. The last problem disappeared, the D:/mygeeklog/db-config.php file have been updated according to my inputs and I have been moved one step further in my installation of Geeklog. Having entered:

$_DB_dbms = 'mssql';
$_DB_host = 'Sergey-PC\SQLExpress';
$_DB_name = 'Geeklog';
$_DB_user = 'Geeklog';
$_DB_pass = 'Geeklog';
$_DB_table_prefix = 'gl_';

on

http://localhost/mygeeklog/admin/install/index.php?mode=install&dbconfig_path=D%3A%2Fmygeeklog%2Fdb-config.php&language=english&display_step=2

I have got another error (I think so) message:

PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 840
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 840
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 845
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 845
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 840
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 845
PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 845


These 840 - 850 lines looks like:
if( (($this->_fastForwardRows["{$recordset}"]+$this->_limitRows["{$recordset}"])> @mssql_num_rows($recordset)) && $this->_fastForwardRows["{$recordset}"]!=0 ){
//only return num rows - fast forwarded rows

return @mssql_num_rows($recordset)-$this->_fastForwardRows["{$recordset}"]+1;
}
elseif($this->_limitRows["{$recordset}"]>@mssql_num_rows($recordset) || $this->_limitRows["{$recordset}"]==''Wink{
return @mssql_num_rows($recordset);
}
else{
return $this->_limitRows["{$recordset}"];
}

What do I wrong? Please, provide any suggestions!
 Quote

Sergey

Anonymous
brainy
Actually things goes slightly different than I described in my previous post.
After I have supplied inputs on
http://localhost/mygeeklog/admin/install/index.php?mode=install&dbconfig_path=D%3A%2Fmygeeklog%2Fdb-config.php&language=english&display_step=2
page I have received a page with weird list (3191 lines) of error messages almost totally consisting of such messages repeating hundreds times:

PHP Notice: Undefined index: Resource id #9 in D:\mygeeklog\system\databases\mssql.class.php on line 840
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 840
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 845
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 845
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 941
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 942
PHP Notice: Undefined index: Resource id #420 in D:\mygeeklog\system\databases\mssql.class.php on line 942
PHP Notice: Undefined variable: ret in D:\mygeeklog\system\databases\mssql.class.php on line 1152

I looked up in mssql.class.php file and actually not found declaration of this variable. The only mentioning of this variable is $ret++ exactly in that 1152 line (except of return $ret; on 1158 line).

The weird list of error messages ends with

PHP Fatal error: Call to undefined function COM_error() in D:\mygeeklog\plugins\links\autoinstall.php on line 149

message.

But when I tried to perform this step of installation second time (by pressing the back button in browser and supplying same settings again) I got a short list of messages I gave in my previous post.

Where is the key error? I am a newbie to php, please help anyone!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I'd say the main problem is that you have set your error reporting to report all these minor issues. Geeklog usually suppresses notices like that. We're in the process of cleaning them up, but they won't affect functionality. Try
Text Formatted Code
error_reporting  =  E_ALL & ~E_NOTICE

bye, Dirk
 Quote

All times are EST. The time is now 09:41 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content