CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 mssql problems: Call to undefined function: mssql_pconnect

Print topic Send  topic

Author Message
ewever

Posts: 1
Posted: 10/13/2004, 11:24 PM

I've been using the trialversion of codecharge2.2.

When I try to build a page with a grid containing data from a sql-server database, I get the error "Call to undefined function: mssql_pconnect".

How is this possible? All the code I use is generated by codecharge itself...

_________________
E.
View profile  Send private message
peterr


Posts: 5971
Posted: 10/14/2004, 12:36 AM

It's probably not possible to connect to MS SQL using your PHP installation. Please refer to PHP manual on how to install PHP with MS SQL support. www.php.net/mssql
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
E.
Posted: 10/14/2004, 3:05 AM

Thanks, this solved the problem...!

By the way, does anybody know where to initialise/use/display objects that I've created myself?

Zulu


Posts: 33
Posted: 02/03/2005, 11:01 AM

Dear Peter R.

Can u pls tell me how I can get a readymade PHP compiled for MSSQL functions to work.
View profile  Send private message
peterr


Posts: 5971
Posted: 02/03/2005, 11:55 AM

I've only used PHP with MySQL and MS Access. I don't remember doing anything special to configure it. If you have any problems then try reading PHP documentation, especially http://us3.php.net/mssql .
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Zulu


Posts: 33
Posted: 02/04/2005, 7:30 AM

Dear Peter R.

The doc says to compile PHP specially for MS-SQL but I don't have the resources to do that. I just want to use the MS-SQL functions directly (without ODBC). Do u know where I can get the compiled PHP with MS-SQL functionalities?

Thanks again
View profile  Send private message
peterr


Posts: 5971
Posted: 02/04/2005, 12:34 PM

Sorry, I never have done this so I don't know more than you. I would just use PHP documentation if I needed to do this.
But why you wrote that you don't have the resources to do that? What type of resources? Based on the above response from ewever, he was able to install PHP with MySQL.
You could also try contacting our product support. Maybe someone there had an experience with this.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Don Safar
Posted: 02/04/2005, 6:42 PM

What platform are running php on? Linux/Unix or Windows?

"Zulu" <Zulu@forum.codecharge> wrote in message
news:542027519e618f@news.codecharge.com...
> Dear Peter R.
>
> Can u pls tell me how I can get a readymade PHP compiled for MSSQL
> functions to
> work.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Zulu


Posts: 33
Posted: 02/04/2005, 10:04 PM

Dear Don Safar:

I use win xp pro.
View profile  Send private message
Zulu


Posts: 33
Posted: 02/04/2005, 10:07 PM

Dear Peter R.

By resources I meant I do not have VC++ or else to compile PHP for MS-SQL functionalties. I have no problem with PHP/MySQL but I need to use an existing database on MS-SQL to be used with PHP. Can u help or do u have any reference in this regard?
View profile  Send private message
peterr


Posts: 5971
Posted: 02/04/2005, 11:20 PM

I personally don't have anything else, but found one more page about it at http://www.zend.com/manual/ref.mssql.php.
I don't think that you need VC++ or anything else. Have you already read those instructions and tried to follow them? You can let us know where exactly you get stuck, then maybe someone can help. Just provide the exact URL with the steps that you were performing and which step didn't work for you.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 02/04/2005, 11:45 PM

Oh yes, if you don't use Linux then looks like you don't even need to compile anything. The instructions say that you only need to copy some files. Are you sure that you read those instructions? :-)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Don Safar
Posted: 02/05/2005, 8:57 AM

Find the line in your php.ini file that looks like this

;extension=php_mssql.dll

then remove the semi-colon. Look in the extensions directory in you PHP
install directory and make sure that php_mssql.dll is there. If not, then
you will need to download it form the php site.

"Zulu" <Zulu@forum.codecharge> wrote in message
news:542027519e618f@news.codecharge.com...
> Dear Peter R.
>
> Can u pls tell me how I can get a readymade PHP compiled for MSSQL
> functions to
> work.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Zulu


Posts: 33
Posted: 02/05/2005, 10:37 AM

Dear Don Safar:

Thanks and to you Peter R. too. I finally could connect to MS-SQL Server 2000. Now I've got newer problem. I was trying with simple test codes like below:

<?php
$dbh=mssql_pconnect ("ZAMANS", "sa", "") or die ('Cannot connect to server');
mssql_select_db("Northwind",$dbh) or die ('Cannot select db');
$result=mssql_query('SELECT Categories.* FROM Categories',$dbh);
$reccount=mssql_num_rows($result);
echo $reccount;
?>

...and got this:

Warning: mssql_query() [function.mssql-query]: message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC .7 or earlier. (severity 16) in c:\inetpub\wwwroot\test.php on line 4

Warning: mssql_query() [function.mssql-query]: Query failed in c:\inetpub\wwwroot\test.php on line 4

Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in c:\inetpub\wwwroot\test.php on line 5
View profile  Send private message
Don Safar
Posted: 02/06/2005, 9:05 AM

Check and see what version of mdac you have installed. You will need version
2.7 or later.
this link will explain how to do it

http://support.microsoft.com/default.aspx?kbid=301202

You might also want to Replace the Unicode type fields (ntext, nvarchar) by
their non-Unicode equivalent (text, varchar).

"Zulu" <Zulu@forum.codecharge> wrote in message
news:54205126693132@news.codecharge.com...
> Dear Don Safar:
>
> Thanks and to you Peter R. too. I finally could connect to MS-SQL Server
> 2000.
> Now I've got newer problem. I was trying with simple test codes like
> below:
>
> <?php
> $dbh=mssql_pconnect ("ZAMANS", "sa", "") or die ('Cannot connect to
> server');
>
> mssql_select_db("Northwind",$dbh) or die ('Cannot select db');
> $result=mssql_query('SELECT Categories.* FROM Categories',$dbh);
> $reccount=mssql_num_rows($result);
> echo $reccount;
> ?>
>
> ..and got this:
>
> Warning: mssql_query() [function.mssql-query]: message: Unicode data in a
> Unicode-only collation or ntext data cannot be sent to clients using
> DB-Library
> (such as ISQL) or ODBC .7 or earlier. (severity 16) in
> c:\inetpub\wwwroot\test.php on line 4
>
> Warning: mssql_query() [function.mssql-query]: Query failed in
> c:\inetpub\wwwroot\test.php on line 4
>
> Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result
> resource in c:\inetpub\wwwroot\test.php on line 5
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.