Re: [PHP-DB] Help me please

2004-11-08 Thread Arné Klopper
Have you set up a ODBC connection ?
 
You must set up a ODBC connection in the ODBC Sources that is usually in you 
Control Panel or Administrator Tools.
 
You must put it as a System DNS and set up the connection, so your local system 
know where to find the database.
 
 
 
 
 
Kind Regards
Arné Klopper
 

NetCB Solutions (Pty) Ltd.
www.netcb.com
Office: +27 12 997 3007
Fax: 27 12 997 3629
Mobile: +27 84 513 4119

 Petrus Ali Saputra [EMAIL PROTECTED] 2004/11/08 05:55:45 AM 

Can anyone here help me how to connect to an ODBC data?
Here is my code: $odbc = odbc_connect(Ta Fara,,);
And this is the result: Warning: odbc_connect(): SQL error: 
[Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified, SQL state IM002 in SQLConnect in d:\my 
documents\my webs\projects\ta fara\main\admin\config.php on line 2

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





RE: [PHP-DB] Help me please

2004-11-08 Thread Bastien Koert
have you created a dsn for this connection?
Bastien
From: Petrus Ali Saputra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Help me please
Date: Mon, 08 Nov 2004 10:55:45 +0700
Can anyone here help me how to connect to an ODBC data?
Here is my code: $odbc = odbc_connect(Ta Fara,,);
And this is the result: Warning: odbc_connect(): SQL error: 
[Microsoft][ODBC Driver Manager] Data source name not found and no default 
driver specified, SQL state IM002 in SQLConnect in d:\my documents\my 
webs\projects\ta fara\main\admin\config.php on line 2

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] MySQL problem..

2004-11-08 Thread ian
Any body met this error?
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client in
/usr/local/apache2/html/poems/browse.php on line 15

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Extending the MySQLi_Result object?

2004-11-08 Thread Joe Bandenburg
Hi there,
It's my first post here, so go gentle.
I have run into a problem when trying to extend the MySQLi_result object 
because the MySQLi object's method query always returns a 
MySQLi_result and, to my knowledge, it is impossible to make it do 
otherwise. So, my question is, how do I alter the query method to 
return my new MySQLi_result object instead of the base object? Or, is 
there another/better way of achieving what I'm looking for? Am I missing 
something very obvious here? :)

Thanks,
Joe Bandenburg
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] MySQL problem..

2004-11-08 Thread Bastien Koert
Check the mysql website. Have you upgraded from 4.0x to 4.1 recently. If so 
you need to update the client libraries that come with mysql. There are 
significant protocol changes from 4.0x to  4.1.

Bastien
From: ian [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL problem..
Date: Mon, 08 Nov 2004 17:02:53 +
Any body met this error?
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client in
/usr/local/apache2/html/poems/browse.php on line 15
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySQL problem..

2004-11-08 Thread Doug Thompson
ian wrote:
Any body met this error?
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client in
/usr/local/apache2/html/poems/browse.php on line 15
http://dev.mysql.com/doc/mysql/en/Old_client.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] MySQL problem..

2004-11-08 Thread ian
thnx ya'll... :)

On Mon, 2004-11-08 at 17:52, Bastien Koert wrote:
 Check the mysql website. Have you upgraded from 4.0x to 4.1 recently. If so 
 you need to update the client libraries that come with mysql. There are 
 significant protocol changes from 4.0x to  4.1.
 
 Bastien
 
 From: ian [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] MySQL problem..
 Date: Mon, 08 Nov 2004 17:02:53 +
 
 Any body met this error?
 Warning: mysql_connect(): Client does not support authentication
 protocol requested by server; consider upgrading MySQL client in
 /usr/local/apache2/html/poems/browse.php on line 15
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Help me please

2004-11-08 Thread Petrus Ali Saputra
Arné klopper wrote:
Have you set up a ODBC connection ?
 
You must set up a ODBC connection in the ODBC Sources that is usually in you Control Panel or Administrator Tools.
 
You must put it as a System DNS and set up the connection, so your local system know where to find the database.
 
I already have and it's been tested from Delphi before. There's no 
problem with the connection from Delphi.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] session_destroy();

2004-11-08 Thread Chris Payne
Hi there everyone,

 

I need to destroy a session in the browser so when they log out it clears
all the session data from the browser, I have tried:

 

session_destroy();

 

But it doesnt seem to do it as the browser keeps the same PHPSessionID.

 

What is the best way to destroy a session and generate a new sessionid
without having to close the browser and go back again?

 

Chris


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.791 / Virus Database: 535 - Release Date: 11/8/2004
 


[PHP-DB] Institute

2004-11-08 Thread balwantsingh
Hi to all,

May you pls. suggest me a good institute for learning PHP AND MYSQL in and
around Delhi or Noida (INDIA). preferably Noida.

with best wishes
balwant

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] session_destroy();

2004-11-08 Thread Ramil Sagum
On Tue, 9 Nov 2004 01:00:12 -0500, Chris Payne [EMAIL PROTECTED] wrote:
 Hi there everyone,

 I need to destroy a session in the browser so when they log out it clears
 all the session data from the browser, I have tried:

 session_destroy();

 But it doesn't seem to do it as the browser keeps the same PHPSessionID.

 What is the best way to destroy a session and generate a new sessionid
 without having to close the browser and go back again?


Did you unset the session variables using:

// Unset all of the session variables.
$_SESSION = array();

If you are using a cookie for the session id, you might also want to
delete the cookies

if (isset($_COOKIE[session_name()])) {
  setcookie(session_name(), '', time()-42000, '/');
}

Do these before calling session_destroy.

check it out here.

http://www.php.net/session_destroy

HTH

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Question

2004-11-08 Thread Jacob Hackamack
Hello,

I am using PostNuke and have decided to create a page for a local basketball
team.  I have this as the create team function:


//
/// Create a new Team for the given Tournament
///
/// Parameters:
/// 'cid' = Tournament ID
///'team' = Team name
/// 'contact' = name of the team representative
///   'email' = representative's email
///'homepage' = team's Homepage
//
function standings_admin_createteam($args)
{
// Get parameters from whatever input we need.
list($lid,$cid,$team,$city,$shorts,$tshirt,$shortsa,$tshirta,
 $contact,$phone,$paddress,$email,$homepage,$penpts,$picturet)
 = 
pnVarCleanFromInput('lid','cid','team','city','shorts','tshirt','shortsa','t
shirta',
   
'contact','phone','paddress','email','homepage','penpts','picturet');

// Admin functions of this type can be called by other modules.
extract($args);

// Confirm authorisation code.
if (!pnSecConfirmAuthKey()) {
pnSessionSetVar('errormsg', _BADAUTHKEY);
pnRedirect(pnModURL('Standings', 'admin', 'viewteams', array('lid'
= $lid)));
return true;
}

$modid  = pnModGetIDFromName('Standings');
$modinfo= pnModGetInfo($modid);
$picenable  = pnModGetVar('Standings', 'picenable');

// Notable by its absence there is no security check here.  This is
because
// the security check is carried out within the API function and as such
we
// do not duplicate the work here

// Load API.
if (!pnModAPILoad('Standings', 'admin')) {
pnSessionSetVar('errormsg', _LOADFAILED);
return $output-GetOutput();
}

// The API function is called.
$tid = pnModAPIFunc('Standings','admin','createteam',
array('lid' = $lid,
  'team'= $team,
  'city'= $city,
  'shorts'  = $shorts,
  'tshirt'  = $tshirt,
  'shortsa' = $shortsa,
  'tshirta' = $tshirta,
  'contact' = $contact,
  'phone'   = $phone,
  'paddress'= $paddress,
  'email'   = $email,
  'homepage'= $homepage,
  'penpts'  = $penpts));

// The return value of the function is checked here
if ($tid != false) {
// Success
pnSessionSetVar('statusmsg', _STANDINGSTEAMCREATED);
}


/*
if ($picenable == 1) {
// manage picture Upload if there is a picture sent - Portrait
if ($picture!=) {
$picname = $_FILES['picture']['name'];

with:

if ($picenable == 1) {
// manage picture Upload if there is a picture sent
// make Portrait photo first
$picname = $_FILES['picturep']['name'];
if ($picname != ) {

*/
if ($picenable == 1) {
// manage picture Upload if there is a picture sent
// make Portrait photo first
   $picname = $_FILES['picturet']['name'];
   if ($picname != ) {
$pictype = $_FILES['picturet']['type'];
$picsize = $_FILES['picturet']['size'];
   $pictemp = $_FILES['picturet']['tmp_name'];
$picdest =
modules/.$modinfo['directory']./pnimages/photos/teams/team.$tid..jpg;
   $picmax = pnModGetVar('Standings', 'picmaxt');
   $picwidth = pnModGetVar('Standings', 'xsizet');
   $picheight = pnModGetVar('Standings', 'ysizet');
   $picqual = pnModGetVar('Standings', 'picqualt');

   $picerror = ;
   // check if file is of the right type (jpg - gif - png) - Set in
config???
   if ($pictype != image/pjpeg) {
  $picerror = _STANDINGSPLAYERPICTERR1;
   }
   if ($picsize  $picmax) {
  $picerror = _STANDINGSPLAYERPICTERR2;
   }
   if ($picerror == ) {
  $g_is=getimagesize($pictemp);
  if(($g_is[0]-$picwidth)=($g_is[1]-$picheight)) {
  $g_iw=$picwidth;
  $g_ih=($picwidth/$g_is[0])*$g_is[1];
  } else {


  $g_ih=$picheight;
  $g_iw=($g_ih/$g_is[1])*$g_is[0];
  }

  $img_src = imageCreateFromJpeg($pictemp);
  $img_dst = imageCreateTrueColor($g_iw,$g_ih);
  imageCopyResampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw,
$g_ih, $g_is[0], $g_is[1]);
  imageJpeg($img_dst, $picdest, $picqual);
  imageDestroy($img_dst);
   }
}

}

// This function generated no output, and so now it is complete we
redirect
// the user to an appropriate page for them to carry on their work
pnRedirect(pnModURL('Standings', 'admin', 'viewteams', array('lid' =
$lid)));

// Return
return true;

}

The only problem is that the image upload does not seem to work.   Any help

Re: [PHP-DB] Help me please

2004-11-08 Thread Petrus Ali Saputra
Bastien Koert wrote:
have you created a dsn for this connection?
Bastien
From: Petrus Ali Saputra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Help me please
Date: Mon, 08 Nov 2004 10:55:45 +0700
Can anyone here help me how to connect to an ODBC data?
Here is my code: $odbc = odbc_connect(Ta Fara,,);
And this is the result: Warning: odbc_connect(): SQL error: 
[Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified, SQL state IM002 in SQLConnect in d:\my 
documents\my webs\projects\ta fara\main\admin\config.php on line 2

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Problem solved. Thanks for the help.
--
Petrus Ali Saputra
==
Addr. : Karang Empat Besar 76
Surabaya 60133
East Java, Indonesia
Phone : 62-31-381-7866
62-31-6010-2653
62-81-23000-254
--
A professional web hosting for your business and corporate
URL   : http://attractive.as/hostmania
--
Mau kredit mobil baru/bekas dengan bunga rendah?
URL   : http://fantastic.as/kreditmobil
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php