phalanger 2.0 , connect to mssql howto

Discussion about the open-source Phalanger [?] project.

phalanger 2.0 , connect to mssql howto

Postby berekin@codeplex » February 6th, 2007, 1:52 pm

Hi to all, i am a newbie in use phalanger. I have a script written in php and i try to compile it with Phalanger 2.0 but i have problem with mssql_connect function . Script is simple, here is the code..

<?php

function logs($file_name,$date,$status) {
$conn=mssql_connect('127.0.0.1,1084','homer','test1234');
mssqlselectdb('examle',$conn);
$query1="insert into logs1 values (\"".$file_name."\",\"".$date."\",\"".$status."\")";
$rezq=mssqlquery($upit,$conn);
if($conn) {mssql_close($conn);}
}
}
$fajl="logs.txt";
logs($fajl,date("Y-m-d H:i:s"),1);

?>

then ...
D:\work>"d:\Programs\Phalanger v2.0"\Bin\phpc database2.php
Phalanger - the PHP Language Compiler - version 2.0
for Microsoft (R) .NET Framework version 2.0
Performing compilation ...
database2.php
Generating assembly ...

Build complete -- 0 errors, 0 warnings.

D:\work\bin>database2.exe
Error: Call to undefined function: 'mssql_connect' in D:\razno\php-rad\baza2.php
at expression on line 4, column 1.

There is a library php_mssql.dll in Extension directory and PhpNetMsSql.dll in Dynamic directory. I didn't find any tutorials connecting with this problem... any suggestions?
berekin@codeplex
 
Posts: 3
Joined: January 7th, 2012, 8:56 pm

RE: phalanger 2.0 , connect to mssql howto

Postby Duracellko@codeplex » February 6th, 2007, 7:35 pm

create database2.exe.config with following content:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<phpNet>
<classLibrary>
<add assembly="PhpNetMsSql, Version=2.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="mssql" />
</classLibrary>
</phpNet>
</configuration>
Duracellko@codeplex
 
Posts: 11
Joined: January 7th, 2012, 8:37 pm

RE: phalanger 2.0 , connect to mssql howto

Postby berekin@codeplex » February 6th, 2007, 9:17 pm

It works! Tnx Man!
berekin@codeplex
 
Posts: 3
Joined: January 7th, 2012, 8:56 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 67 guests

User Control Panel

Login

Who is online

In total there are 67 users online :: 0 registered, 0 hidden and 67 guests (based on users active over the past 5 minutes)
Most users ever online was 480 on April 27th, 2024, 5:51 am

Users browsing this forum: No registered users and 67 guests