Re: [PHP] Using session functions in PHP4.1.1

2002-02-03 Thread sagar N chand

i dont know how u r using the thing like PHP on the fucking Win. Moreover
WinMe is the worst of all the OS's. So, better migrate to other OS as soon
as possible.

/sagar

- Original Message -
From: John Mpaliza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 1:23 AM
Subject: [PHP] Using session functions in PHP4.1.1


Hi,

I'm using Win ME-Apache1.3.22-PHP4.1.1 and run this script:
?php
session_start();
?
I got this error: Php has caused an error in PHP4TS.DLL and will be closed.
If the problem continues try to reboot your system.
And in the Apache log file I got : Premature end of script headers.
This happens when using functions: session_start and session_register
What can I do to resolve the problem.


John Mpaliza




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] cant redeclare class......

2001-10-20 Thread Sagar N Chand

Hi all,

I'm using jm_sms class in mysql 
dowhile($myrow=mysql_fetch_array($result)) loop.
the class is running fine for the first time. But when it is called for the 
second time i'm
getting an error saying cant redeclare the class. How to make this class 
work within
a loop.

i'm attaching the files if u want to look inside.

any help is highly appreciated.

thanks,

/sagar 

HTML
HEAD
TITLE Welcome to SMS reminder . . . . .  /TITLE

/HEAD

BODY
?
$db=mysql_connect(localhost,root,terminator);
mysql_select_db(smsdb,$db);

$da=getdate();
$datestamp=$da[year]-$da[mon]-$da[mday];
$custime= date(H:i);
list($ahour, $amin) = explode(:,$custime);
$sql=select * from sms where taskdate='$datestamp' and hour(tasktime)='$ahour' and 
minute(tasktime)='$amin' and delivered !='Y';
$result=mysql_query($sql);
if($myrow=mysql_fetch_array($result))
{   
// Example script using jm_sms class

$email = [EMAIL PROTECTED];// MTNSMS login email address
$password = rascal;   // MTNSMS password
$number = +91 . $myrow[cellno]; // GSM phone number to send to
$signature = SAGAR SMS;   // Signature for text message
$message = $myrow[smstext];;  // Content of text message
$debug = FALSE; // Debugging messages not displayed

// Add additional accounts if required
// $jm_sms-addLogin( [EMAIL PROTECTED], password2 );
// $jm_sms-addLogin( [EMAIL PROTECTED], password3 );

include( class.jm_sms.php );
$jm_sms = new jm_sms( $email, $password, $debug );

// Add Proxy Server details if required
// $jm_sms-setProxyServer( proxyserver );
// $jm_sms-setProxyPort( 81 );
// $jm_sms-setProxyUser( proxyusername );
// $jm_sms-setProxyPass( proxypassword );
// $jm_sms-setProxy( TRUE );

$jm_sms-sendSMS( $number, $signature, $message );  


}

?
/BODY
/HTML


?

/*
jm_sms 0.7 21/09/01
Copyright (C) 2001 James McGlinn [EMAIL PROTECTED]
jm_sms is a class for sending GSM text messages via the
free web-based service at http://www.mtnsms.com/.
Updates can be found at http://james.mcglinn.org/jm_sms/.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
(See http://www.gnu.org/copyleft/gpl.html)

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Changes:
0.7  21/09/01  Randomised login array for faster sending
  when over quota on first account.
  Speed optimisations in network code
   thanks to Mike Petrov ([EMAIL PROTECTED]).
0.6  06/06/01  Added check for incorrect login details.
0.5  31/05/01  Proxy support added
   thanks to Bas ([EMAIL PROTECTED]).
0.4  28/05/01  Provision for multiple mtnsms accounts.
   Bug fix for accounts defaulting to smsxtra.
0.3  27/04/01  New debug option outputs status data.
0.2  24/04/01  Re-attempts connection if server is busy.
0.1  23/04/01  Initial release.
*/
class jm_sms {

var $server;
var $cookies;
var $login;
var $curUrl;
var $debug = FALSE;
var $proxyServer;
var $proxyPort;
var $proxyUser;
var $proxyPass;
var $proxy = FALSE;

function getServer() { return $this-server; }
function setServer( $server ) { return $this-server = $server; }
function getCurUrl() { return $this-curUrl; }
function setCurUrl( $curUrl ) { return $this-curUrl = $curUrl; }
function getDebug() { return $this-debug; }
function setDebug( $debug ) { return $this-debug = $debug; }
function getProxyServer() { return $this-proxyServer; }
function setProxyServer( $proxyServer ) { return $this-proxyServer = 
$proxyServer; }
function getProxyPort() { return $this-proxyPort; }
function setProxyPort( $proxyPort ) { return $this-proxyPort = $proxyPort; }
function getProxyUser() { return $this-proxyUser; }
function setProxyUser( $proxyUser ) { return $this-proxyUser = $proxyUser; }
function getProxyPass() { return $this-proxyPass; }
function setProxyPass( $proxyPass ) { return $this-proxyPass = $proxyPass; }
function getProxy() { return $this-proxy; }
function setProxy( $proxy ) { return $this-proxy = $proxy; }

function jm_sms( $username, 

[PHP] only c if u r an indian...

2001-10-03 Thread sagar N Chand

hi,

any body out there from hyderabad. if u r a hyderabadi plese mail me.
v have got a lot of things to do.

thanks,
/sagar




Re: [PHP] Creating mailaccounts

2001-10-03 Thread sagar N Chand

work out with squrrelmail or basilix. If u want to set up won mail server then
you must have your head and fingers into linux.

/sagar

  - Original Message - 
  From: Bjornie 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 12:25 AM
  Subject: [PHP] Creating mailaccounts


  Hi everybody!

  I have a problem :/
  I just said yes to a project, which includes webmail. I know how to send
  mail and how to receive mail with imap, but can I in any way create a
  mailaccount on the server by using PHP? Or should I use any other language
  like Java/JSP or ASP (with a component)?`

  Hilfe! :)



  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] A powerful editor!

2001-10-03 Thread sagar N Chand

coool man,
i've been using it since 2yrs.

/sagar

  - Original Message - 
  From: Dean Householder 
  To: Alex Shi ; [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 2:27 AM
  Subject: Re: [PHP] A powerful editor!


  I used to use TextPad until I found EditPlus.  I'm also amazed by it's
  power.  It has more than I could even use including everything TextPad has
  and nicer colors for the different styles.  You can find it at
  http://www.editplus.com.

  Dean Householder
  Daylight Creations
  http://www.daylightcreations.com



  - Original Message -
  From: Alex Shi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, October 01, 2001 6:08 PM
  Subject: [PHP] A powerful editor!


   Hello folks,
  
   Today, I found a very powerful editor, called TextPad. I said it is
   'powerful'
   because it can recognize syntax of php, html, java, css and also many
   many more great featuresmuch better that Windows Notepad. You can
   download and try. You need to take a few minutes to explore it and
  maximize
   its functionality for you.
  
   Here is the link:
   http://www.textpad.com/
  
   Alex
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] sessions in php4

2001-10-01 Thread sagar N Chand

hi all,

i'm using a php4.0.6 with apache on win2k. when i register a session and immediately 
if i redirect to another
page the session seems not to be registered. eg.
?
session_start();
$value = 908;
session_register(value);
header(location : new location);
?

when i go to the new page i c that the session has not been reigstered.

but in case if i dont redirect from php rather use a html redirection code like click 
here to redirect then
it worked. why ?
?
session_start();
$value = 908;
session_register(value);
?
a href=newlocationclick here to redirect/a(this worked out )

any suggestions ?

/sagar




[PHP] sock prob

2001-09-29 Thread sagar N Chand

hi,

the socket() function is not working on win2k. any help?

thanx,
/sagar



Re: [PHP] updating a database (mysql)

2001-09-27 Thread sagar N Chand

try using the die function. it might help out.

or u can use the mysql_affected_rows functions. check out.
http://www.php.net/manual/en/function.mysql-affected-rows.php

/sagar

  - Original Message - 
  From: Joseph Bannon 
  To: PHP (E-mail) 
  Sent: Thursday, September 27, 2001 1:17 AM
  Subject: [PHP] updating a database (mysql)


  When I update my mysql database, is there a way with PHP to know what or if
  any records where updated?

  Joseph



  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] session not working

2001-09-27 Thread sagar N Chand

session must be registered before any code is sent to the browser. so the syntax 
should be
?session_start();
session_register(uname);
session_register(pwd);
.


?
HTML
body bgcolor=#ff
html code here


/sagar

  - Original Message - 
  From: Krushna Kumar R 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, September 27, 2001 5:43 PM
  Subject: [PHP] session not working


  Hi,

  I wrote a program where the session gets created, but on subsequent page the session 
does not work or i could not retrieve the value kindly help me, I have put the coding 
below

  The operating system I use is Win98 and Personal Web Server, PHP version used is 
4.0.6

  File 1 : where the session is registered or created

  ?session_start();?
  HTML
  body bgcolor=#ff
  ?php

  session_register(uname);
  session_register(pwd);
  print Username var is - . $username.br;
  print Password var is - . $password.br;
  $uname=$username;
  $pwd=$password;
  print Uname var is - . $uname.br;
  print Pwd var is - . $pwd.br;

  echo session_is_registered(uname);
  echo session_name(uname);
   ?
  a href=file2.phpclick here to go to next page/a
  /body
  /HTML


  File 2 : Next page, the file where i check for the session variable's value

  ?session_start();
  print uname is - .$uname.br;
  echo Session is - .session_is_registered(uname).br;
  echo session name is - . session_name(uname).br;
  echo the session is $uname.br;
  ?
  a href=last.phpclick here go to last page/a

  Those are the coding i had used on the files i was trying to execute

  Regards
  Krushna Kumar




[PHP] php chat

2001-09-27 Thread sagar N Chand

i've seen many members seeking for a good php chat.
so my suggestion is use phpmychat. its the best php
chat i've ever come across. here is the site where u can
download your version. www.phpheaven.net
its also very easy to install and configure with good admin.

ejoy your chat server,

/sagar




[PHP] no of files in a folder....

2001-09-25 Thread sagar N Chand

hi all,

is there any way out to get the total no of files in a directory including its
subfolders ?

thanQ,,

/sagar




Fw: [PHP] Capturing several checkbox values

2001-09-25 Thread sagar N Chand


- Original Message - 
From: sagar N Chand 
To: John Day 
Sent: Tuesday, September 25, 2001 6:46 PM
Subject: Re: [PHP] Capturing several checkbox values


give each checkbox an individual name before you submit it.
In the next page put this code :

while(list($key,$value)=each($HTTP_POST_VARS)) {
echo ($key);  // if you want to print the name of the check box
echo($value); // if you want to print the values of the check box 
}

make sure that u use post method while submitting the form.

/sagar

  - Original Message - 
  From: John Day 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, September 25, 2001 3:00 PM
  Subject: [PHP] Capturing several checkbox values


  Hi,

  I have a page containing about 50 different checkboxes, the user can
  select as few or many as they like. When they submit the form I want the
  values/names of the checkboxes that they selected to be displayed on the
  next page, i.e. a thankyou page. Any help is much appreciated.

  JD

  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] how to get the total disk space used in a directory

2001-09-23 Thread sagar N Chand

hi all,

is there any way to get the total disk space used under a directory
including its subdirectories and all the contents.

/sagar




[PHP] How to download files to the server

2001-09-21 Thread sagar N Chand

hi everyone,

I'm sorry that i'm not there on the list for a few days. Actually i'm
working for  a project in which i want to download some files to
the server(remote) if the user inputs the url of the file name.
hope u got me.

i want to make my server to do the downloads for me so that i can
later on download them to my idiot box.

hope i'll get some help

/sagar



[PHP] how to password protect files

2001-09-21 Thread sagar N Chand

i want to restrict the access of some files to a single user only whose names and pwds
are stored in mysql table and i'm authenticating them through my website. So what
i'm looking for is that the files should not be downloaded when their urls are typed in
the browsers.

/sagar




[PHP] mysql error on win2k

2001-09-21 Thread sagar N Chand

hi,

i have installed win2k and configured apache and php4.0.6 but
mysql is giving error 1016 or so.

why is this happening.

/sagar



[PHP] cant connect to mysql

2001-08-28 Thread Sagar N Chand

Hi geeks,

I have a strage problem over here. I developed a site which runs fine at my home.
When i hosted it on to the remote server it is giving an error saying cant connect
to mysql. the error is like this
 
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in 
/home/httpd/html/procbit/login.php on line 17

the line 17 in my code is as follows:
$db=mysql_connect(localhost,root,password);

please help me out of this problem.
Please reply me at [EMAIL PROTECTED] 

thank you all
sagar