Re: [PHP] Session not Registering

2002-11-21 Thread Ernest E Vogelsinger
At 04:02 21.11.2002, Stephen said:
[snip] 
I have a PHP script that logs someone in then takes them to another page
indicating their online status. However, when I try echoing out the
contents of the session variable, it says this:
 
Notice: Undefined variable: _SESSION in c:\program files\apache
 group\apache\htdocs\checker\members\index.php on line 38
 
Here's the code that registers the variable, or is atleast supposed to:
 
  if ($dbconn) {
$querystr = SELECT user FROM users WHERE (user = ' .
 prepareData($_POST['user']) . ' and pass=PASSWORD(' .
 prepareData($_POST['pass']) . '));
$result = mysql_query($querystr,$dbconn);
if ($result) {
  if ($frow = mysql_fetch_row($result)) {
session_start();
   session_register('user');
$_SESSION['user'] = $frow[0];
header(Location: index.php? . SID);
exit();
  }
  else {
$error = Invalid username and password combo.;
  }
}
 
Here's where I echo it out:
 
div align=left class=logfont size=2Logged in as ?php echo
 $_SESSION['user']; ?/font/div
[snip] 

What's line 38 - is it the line where you assign to it, or is it the line
with the echo?

If it's the line with the assignment - duh, this should work IMHO
if it's the line with the echo - you got nothing from mysql and didn't
start the session.

BTW - you shouldn't mix session_register() and accessing the $_SESSION
array. Definetely it's not needed.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/




Re: [PHP] Newbie: nested include and object in session

2002-11-21 Thread Ernest E Vogelsinger
At 04:30 21.11.2002, Michael Wai said:
[snip]
Hi everyone, I'm a newbie on PHP and MySQL. I've two questions that want to
get some help.

1. How to solve the problem of nested include? That's mean A include B and B
include C.

Just do it, it works perfectly.

2. Can I save the object in session?

Yes:
session_start();
$_SESSION['myobject'] = $myobject;

What you need to observe is that the class MUST be declared BEFORE the
session is reloaded:

// won't work
session_start();
class A {
   function A() {}
}
if (!$a) {
$a = new A();
$_SESSION['a'] = $a;
}

Here your session is started _before_ the class gets declared. This works
for the first time, but when reloading the session object $a will be
reconstructed without the class definition readily available, so PHP will
default to a standard class. The next example will work, though:

class A {
   function A() {}
}
session_start();
if (!$a) {
$a = new A();
$_SESSION['a'] = $a;
}

As you can see the class decl is given _before_ the session is started.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




RE: [PHP] STRICTLY CONFIDENCIAL

2002-11-21 Thread Troy May
Oldest scam in the book.  Nice try.


-Original Message-
From: desmond west [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] STRICTLY CONFIDENCIAL


#20 BOTHA CRESCENT,
SADTON,JOHANNESBURG,
SOUTH AFRICA.
Tel/Fax:+:+27-834377724
E-mail:[EMAIL PROTECTED]

Dear sir,

In order to transfer out (USD 126 M) One hundred
and
twenty six million United States Dollars) from
NED Bank in south africa. I have the courage to ask
you
to
look for a reliable and honest person who will be
capable for this important business believing
that
you
will never let me down either now or in future.

I am Mr. DESMOND WEST,the Chief auditor of
NED Bank in south africa.
There is an account opened in this bank in 1980
and
since 1990 nobody has operated on this account
again.
After going through some old files in the
records,
I
discovered that if I do not remit this money out
urgently it would be forfeited for nothing. The
owner
of this account is Mr. ADAMS .H. NICOLES, a
foreigner,
profession and he died since 1990. No other
person
knows about this account or any thing concerning
it,
the account has no other beneficiary and my
investigation proved to me as well that this
company
does not know anything about this account and the
amount involved is (USD 126M) One hundred and
twenty
six million United States Dollars million
dollars.

I want to first transfer USDM twenty six million
United States Dollars from this money into a safe
foreigners account abroad before the rest, but I
don't
know any foreigner.
I am only contacting you as a foreigner because
this
money cannot be approved to a local bank here,
but
can
only be approved to any foreign account because
the
money is in us dollars and the former owner of
the
account is Mr. ADAMS .H. NICOLES he is a foreigner
too.

I know that this message will come to you as a
surprise as we don't know ourselves before. We
will
sign an agreement, but be sure that it is real
and
a
genuine business.

I only got your contact address from my secretary
who operates computer, with believe in God that
you
will never let me down in this business. You are
the
only person that I have contacted in this
business;
so
please reply urgently so that I will inform you
the
next step to take immediately.
Send also your private telephone and fax number
including the full details of the account to be
used
for the deposit. I want us to meet face to face
or
sign a binding agreement to bind us together so
that
you can receive this money into a foreign account
or
any account of your choice where the fund will be
safe. And I will fly to your country for
withdrawal
and sharing and other investments.

I am contacting you because of the need to
involve
a
foreigner with foreign account and foreign
beneficiary. I need your full co-operation to
make
this work fine because the management is ready to
approve this payment to any foreigner, who has
correct

information of this account, which I will give to
you


later immediately, if you are able and with
capability
to handle such amount in strict confidence and
trust
according to my instructions and advice for our
mutual
benefit because this opportunity will never come
again
in my life. I need truthful person in this
business
because I don't want to make mistake I need your
strong assurance and trust.

With my position now in the office I can transfer
this money to any foreigner's reliable account, which
you


can provide with assurance that this money will
be
intact pending my physical arrival in your
country
for
sharing. I will destroy all documents of
transaction
immediately we receive this money leaving no
trace
to
any place. You can also come to discuss with me
face
to face after which I will make this remittance
in
your presence and two of us will fly to your
country
at least two days ahead of the money going into
the
account.

I will apply for annual leave to get visa
immediately
I hear from you that you are ready to act and
receive
this fund in your account. I will use my position
and
influence to effect legal approvals and onward
transfer of this money to your account with
appropriate clearance forms of the ministries and
foreign exchange departments.

At the conclusion of this business, you will be
given
35% of the total amount, 60% will be for me,
while
5%
will be for expenses both parties might have
incurred
during the process of transferring.

I look forward to your earliest reply.
Or by my Tel/Fax:+27-834377724

Yours truly,
MR.DESMOND WEST




__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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



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




Re: [PHP] ill sprintf() behavior w/ HEX type

2002-11-21 Thread Chris Wesley
On Thu, 21 Nov 2002, Jason Wong wrote:

 That's because it's expecting a _decimal_ and will automatically convert it to
 hex for you.

AH!  Must've been a longer day than I thought ... dunno how that escaped
me.  Somehow I was reading x - the argument is treated as in integer and
presented as a hexadecimal number as if it meant the function would
recognize the argument as a integer, even though it's in hex format
(resembling a string).

Thanks for clearing that up for me!
~Chris


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




[PHP] FW: FTP_SITE and FTP_EXEC prob

2002-11-21 Thread António Godinho
Hya, 
I'm using a script to upload a file, and after I need to chmod
it to 755. I upload the file with no prob AND I can chmod using the ftp
server with a FTP client.
But when I use PHP I get this error:

Warning: ftp_site: Unknown SITE command. in
/home/to/public_html/CriaPagina.php on line 59


Here's the code:
ftp_exec($conn_id,site chmod 755 /home/to/public_html/index.php);

I tried with ftp_exec and ftp_site, what I'm doing wrong?


Tó


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




Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-21 Thread Jason Wong
On Monday 18 November 2002 10:53, Troy May wrote:
 Oldest scam in the book.  Nice try.

Please, we've all seen it before. We all know it's a scam. Really there's no 
need to comment each time some idiot sends one of these. The idiots won't be 
reading your smart comments -- it is us, the law-abiding-god-fearing citizens 
of this list who has to suffer ;-)

Just ignore them. They may not go away but at least you won't be adding more 
noise.


 -Original Message-
 From: desmond west [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, November 17, 2002 4:30 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] STRICTLY CONFIDENCIAL



 #20 BOTHA CRESCENT,
 SADTON,JOHANNESBURG,
 SOUTH AFRICA.
 Tel/Fax:+:+27-834377724
 E-mail:[EMAIL PROTECTED]

 Dear sir,

 In order to transfer out (USD 126 M) One hundred
 and
 twenty six million United States Dollars) from
 NED Bank in south africa. I have the courage to ask



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




[PHP] apache 2.0.43 and php 4.2.2 compilation problem

2002-11-21 Thread Matthieu Le Corre
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

lo,

i've a working apache 2.0.43 and php 4.2.3 ... but it seems that the informix 
support is broken (unable to connect)
so I decided to downgrade to php 4.2.2 .
and i'm unble to compil :/
i get  error :'(
sorry for my french version of make :P

any patch/idea ?

- --
make[3]: Entre dans le répertoire `/root/php-4.2.2/sapi/apache2filter'
/bin/sh /root/php-4.2.2/libtool --silent --mode=compile gcc  -I. 
- -I/root/php-4.2.2/sapi/apache2filter -I/root/php-4.2.2/main -I/root/php-4.2.2 
- -I/usr/local/apache/include -I/root/php-4.2.2/Zend -I/include 
- -I/usr/local/include -I/opt/informix/incl/esql 
- -I/root/php-4.2.2/ext/mysql/libmysql -I/root/php-4.2.2/ext/xml/expat  
- -D_REENTRANT -DIFX_THREAD -I/root/php-4.2.2/TSRM -DTHREAD=1 -g -O2 -pthread 
- -DZTS -prefer-pic  -c sapi_apache2.c
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter' 
makes pointer from integer without a cast
sapi_apache2.c:534: too few arguments to function `ap_register_output_filter'
sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter' makes 
pointer from integer without a cast
sapi_apache2.c:535: too few arguments to function `ap_register_input_filter'
make[3]: *** [sapi_apache2.lo] Erreur 1
make[3]: Quitte le répertoire `/root/php-4.2.2/sapi/apache2filter'
make[2]: *** [all-recursive] Erreur 1
make[2]: Quitte le répertoire `/root/php-4.2.2/sapi/apache2filter'
make[1]: *** [all-recursive] Erreur 1
make[1]: Quitte le répertoire `/root/php-4.2.2/sapi'
make: *** [all-recursive] Erreur 1
- 
--

- -- 
   __
 / Matthieu Le Corre
|  Service Informatique
| 
|  Inspection Academique de la Sarthe
|  72000 LE MANS
| 
|  Tel   : 02 43 61 58 91 
|  Mail : [EMAIL PROTECTED]
 \
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE93Ly5iQG6YxCcev4RAvMJAJ0S56BXFMM5IRBL2A/bF/BlrBHJlQCdFtTb
UjCqXEw/k0Z9e7boCEgTDDQ=
=LclH
-END PGP SIGNATURE-


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




[PHP] url - self

2002-11-21 Thread Paul Dionne
hello,

I have three tables with similar formats but different information.  So, I 
wrote one function to deal with all three.  Problem is that originally this 
was done with one form, so I had an add button at the bottom (and delete 
beside each record).  But the form took too long to load now I need to 
break it up.

I would like to keep the function and use it across three pages...I just 
need to know how to get the url of the page calling the function so I can 
delete the information from the appropriate table.  

Thanks in advance.

Paul

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




Re: [PHP] Still having ereg migranes

2002-11-21 Thread Marek Kilimajer
I think you should really ask at a unix list

Mako Shark wrote:


Heheh. Maybe I wasn't clear, or maybe I'm missing
something.

 

Well, one way without regex would be to explode()
numbers on a comma and use in_array() to see if
you're value exists.
That should look for your number, preceded by either
the beginning of the string or a comma and followed 
by either a comma or the end of the string. 
   


I can't use PHP commands to do this. I can only have
an ereg statement, but that has to be placed in a grep
statement. Maybe I should ask a Unix list, but I
figure with the ereg(i) expertise here, this is my
best bet.

By the time my shell_exec() call returns its results,
it should return only those files with the actual
number. At that point, I can't explode() it and start
searching for the number all over again using
in_array() or any other commands. By the time Unix
returns its results, the only thing I can do is carry
on assuming I have only those tags that contain the
number without having to search through the array.

I appreciate the help, but while these commands would
work in some situations, it won't work in mine. The
whole finding-if-it's-in-the-list thing has to happen
in the ereg that I pass to grep.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

 



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




Re: [PHP] Listing a table /Limit

2002-11-21 Thread Marek Kilimajer
Simply do it like with math fields:
SELECT count(*) WHERE order_column  '$mid_row_value'

Marco Bleeker wrote:


At 15:38 20-11-02 +0100, you wrote:


I don't think this can be done without ordering the selection first. 
Then you can do it:
1. you need to find out the value your middle row has in the order 
column,
2. count rows with smaller value in the order column than your middle 
row, this is its offset
3. now you can (using the offset) select 20 rows before and after, 
but you must order your selection by the order column


Thank you Marek. Next problem: My order column is a string field. 
Would there be a MySQL function to compare string fields like with a 
if(A  B) - you would do with numeric fields?

Thanks, Marco (not on the list anymore, please answer to private address)



Marco Bleeker wrote:


And how would I find out which portion (row number) the row would be 
in, that I would like to see in a listing?

Q
Hello, how would I go about listing a portion of a MySQL table, 
without an overall selection criterium? I have a unique index field, 
but it's a string and not autoincremented (but manually and with 
gaps). I just want to go to one particular row (query on that index 
field) and then list, say, 20 rows before that point and 20 rows 
after it. So I can create an output of 41 rows in a HTML table. Is 
there something like the dBase SKIP and GOTO command? Should I do a 
query for each individual row (and get 41 result sets) or can I 
somehow walk through 1 result set ?
/Q

Thanks, Marco
--
Marco Bleeker, Amsterdam, NL.
Please do not distribute my email address to a third party
Refer to www.ecocam.com for an email form (and more)



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






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




Re: [PHP] Re: SQLCODE=-930

2002-11-21 Thread Matthieu Le Corre
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

oki that good  i managed to compile php 4.2.2 
but my informix support is still broken :/

did you manage tu connect tu ifx with 4.2.2 and apache 4.0.23 ?
if yes . what's your ifx SDK version ?



Le Lundi 18 Novembre 2002 17:00, Matthieu Le Corre a écrit :
 arf ... I failed to compile php 4.2.2 
 du to compiling error in sapi/apachefilter module for http2.0.43
 on a RH 7.2
 it's not my days 

 Le Lundi 18 Novembre 2002 15:42, Oliver Fänger a écrit :
  could somebody tell me why libphp4.so (php-4.2.3 --with-informix,
  httpd-2.43, RH8, Intel) links against
 
  libthasf.so
  libthgen.so
  libthos.so
  libthsql.so
 
  and misses
 
  libifasf.so
  libifgen.so
  libifos.so
  libifsql.so
 
  4.2.2 works fine with these libs and does not have the  above ones.
 
  and why do i have to set LDFLAGS=-L/opt/informix/lib
  -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix
 
  i saw something like this in the macro file (/ext/informix/config.m4):
 
  PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD)
  PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD)
 
  (INFORMIXDIR is set)
 
  php-4.2.3:
  libdl.so.2 = /lib/libdl.so.2 (0x40192000)
  libpam.so.0 = /lib/libpam.so.0 (0x40196000)
  libthsql.so = /opt/informix/lib/esql/libthsql.so (0x4019e000)
  libthasf.so = /opt/informix/lib/libthasf.so (0x401e1000)
  libthgen.so = /opt/informix/lib/esql/libthgen.so (0x40217000)
  libthos.so = /opt/informix/lib/esql/libthos.so (0x40269000)
  libifgls.so = /lib/libifgls.so (0x4028)
  libcrypt.so.1 = /lib/libcrypt.so.1 (0x402bb000)
  libifglx.so = /lib/libifglx.so (0x402e8000)
  libexpat.so.0 = /usr/lib/libexpat.so.0 (0x402ea000)
  libpspell.so.4 = /usr/lib/libpspell.so.4 (0x4030a000)
  libncurses.so.5 = /usr/lib/libncurses.so.5 (0x40323000)
  libgmp.so.3 = /usr/lib/libgmp.so.3 (0x40362000)
  libgd.so.1.8 = /usr/lib/libgd.so.1.8 (0x4038f000)
  libpng12.so.0 = /usr/lib/libpng12.so.0 (0x403c)
  libz.so.1 = /usr/lib/libz.so.1 (0x403e3000)
  libdb-4.0.so = /lib/libdb-4.0.so (0x403f1000)
  libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x40499000)
  libcurl.so.2 = /usr/lib/libcurl.so.2 (0x404a)
  libbz2.so.1 = /usr/lib/libbz2.so.1 (0x404c2000)
  libssl.so.2 = /lib/libssl.so.2 (0x404d1000)
  libcrypto.so.2 = /lib/libcrypto.so.2 (0x40501000)
  libresolv.so.2 = /lib/libresolv.so.2 (0x405d5000)
  libm.so.6 = /lib/i686/libm.so.6 (0x405e7000)
  libttf.so.2 = /usr/lib/libttf.so.2 (0x40609000)
  libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x4063)
  libjpeg.so.62 = /usr/lib/libjpeg.so.62 (0x40679000)
  libnsl.so.1 = /lib/libnsl.so.1 (0x40697000)
  libxml2.so.2 = /usr/lib/libxml2.so.2 (0x406ac000)
  libc.so.6 = /lib/i686/libc.so.6 (0x4200)
  libltdl.so.3 = /usr/lib/libltdl.so.3 (0x40754000)
  libpspell-modules.so.1 = /usr/lib/libpspell-modules.so.1
  (0x4075c000)
  libstdc++.so.5 = /usr/lib/libstdc++.so.5 (0x4075e000)
  libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x4081)
  /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)
 
 
  php-4.2.2:
 
  libdl.so.2 = /lib/libdl.so.2 (0x40184000)
  libpam.so.0 = /lib/libpam.so.0 (0x40188000)
  libifsql.so = /lib/libifsql.so (0x4019)
  libifasf.so = /lib/libifasf.so (0x401d)
  libifgen.so = /lib/libifgen.so (0x40206000)
  libifos.so = /lib/libifos.so (0x40254000)
  libifgls.so = /lib/libifgls.so (0x40268000)
  libcrypt.so.1 = /lib/libcrypt.so.1 (0x402a3000)
  libifglx.so = /lib/libifglx.so (0x402d)
  libexpat.so.0 = /usr/lib/libexpat.so.0 (0x402d2000)
  libpspell.so.4 = /usr/lib/libpspell.so.4 (0x402f2000)
  libncurses.so.5 = /usr/lib/libncurses.so.5 (0x4030b000)
  libgmp.so.3 = /usr/lib/libgmp.so.3 (0x4034a000)
  libgd.so.1.8 = /usr/lib/libgd.so.1.8 (0x40377000)
  libpng12.so.0 = /usr/lib/libpng12.so.0 (0x403a8000)
  libz.so.1 = /usr/lib/libz.so.1 (0x403cb000)
  libm.so.6 = /lib/i686/libm.so.6 (0x403d9000)
  libxml2.so.2 = /usr/lib/libxml2.so.2 (0x403fb000)
  libdb-4.0.so = /lib/libdb-4.0.so (0x404a3000)
  libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x4054c000)
  libcurl.so.2 = /usr/lib/libcurl.so.2 (0x40553000)
  libcrypto.so.2 = /lib/libcrypto.so.2 (0x40574000)
  libssl.so.2 = /lib/libssl.so.2 (0x40648000)
  libbz2.so.1 = /usr/lib/libbz2.so.1 (0x40678000)
  libresolv.so.2 = /lib/libresolv.so.2 (0x40687000)
  libttf.so.2 = /usr/lib/libttf.so.2 (0x4069a000)
  libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x406c)
  libjpeg.so.62 = /usr/lib/libjpeg.so.62 (0x40709000)
  libnsl.so.1 = /lib/libnsl.so.1 

[PHP] Problem on OpenDir()

2002-11-21 Thread Jack
Dear all
I was trying to check if a directory exist in a specific folder, but i got this error 
message as below : 
Warning: OpenDir: Invalid argument (errno 22) in C:\InetPub\wwwroot\Nedcor Internal 
Live\Reports\Bills Reports\page.php on line 21

here is the code : 
?
$handle=opendir(c:\\);
$dirname=$filepath.$folder;
if (is_dir(Aegis))
 {
/*  while (($file=readdir($handle))!==false) 
  {
   if (ereg($premondate,$file))
   {
   copy($file, $filepath.$folder./.$file);
   }

 closedir($handle);

  }
*/
 }

The strange thing is, the script had worked for once, but in the middle of test stage, 
there is a permission error to the folder and after i fixed it, it seems keep prompt 
me the Invalid Argument instead of open the folder.
Don't know what is going on! pls help!

Thx a lot,
Jack



[PHP] character ' in switch

2002-11-21 Thread Martin Hudec
Hello all,

I would like to know how can I put ' character to case in switch...

Situation:

from flash i am getting url: index.php?action=what's new

i need to pass this thing to switch like:

switch ($action) {
   case about:
   code
   break;

   case what's new: -- i want this...
   code
   break;

   default:
   break;
}

but PHP can't use 'i am thinking about making urlencode() to put
that character to %XX value

any advices?


-- 
Best regards,
 Martin  mailto:[EMAIL PROTECTED]


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




RE: [PHP] character ' in switch

2002-11-21 Thread Jon Haworth
Hi Martin,

 I would like to know how can I put ' character to case in switch...

 switch ($action) {
case about:
code
break;
 
case what's new: -- i want this...
code
break;

Try wrapping the cases in quotes:

switch ($action) { 

  case about: 
code
break;

  case what's new: 
code
break;

}

HTH
Jon

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




[PHP] Re: Problem on OpenDir()

2002-11-21 Thread Brian McGarvie
I don't do much file-stuff with php  windows, but i think the path nees to
use // not \\?

Jack [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Dear all
I was trying to check if a directory exist in a specific folder, but i got
this error message as below :
Warning: OpenDir: Invalid argument (errno 22) in C:\InetPub\wwwroot\Nedcor
Internal Live\Reports\Bills Reports\page.php on line 21

here is the code :
?
$handle=opendir(c:\\);
$dirname=$filepath.$folder;
if (is_dir(Aegis))
 {
/*  while (($file=readdir($handle))!==false)
  {
   if (ereg($premondate,$file))
   {
   copy($file, $filepath.$folder./.$file);
   }

 closedir($handle);

  }
*/
 }

The strange thing is, the script had worked for once, but in the middle of
test stage, there is a permission error to the folder and after i fixed it,
it seems keep prompt me the Invalid Argument instead of open the folder.
Don't know what is going on! pls help!

Thx a lot,
Jack




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




[PHP] Re: character ' in switch

2002-11-21 Thread Brian McGarvie
try:

 case what's new:


Martin Hudec [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello all,

 I would like to know how can I put ' character to case in switch...

 Situation:

 from flash i am getting url: index.php?action=what's new

 i need to pass this thing to switch like:

 switch ($action) {
case about:
code
break;

case what's new: -- i want this...
code
break;

default:
break;
 }

 but PHP can't use 'i am thinking about making urlencode() to put
 that character to %XX value

 any advices?


 --
 Best regards,
  Martin  mailto:[EMAIL PROTECTED]




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




RE: [PHP] url - self

2002-11-21 Thread Jon Haworth
Hi Paul,

 I just need to know how to get the url of the page 
 calling the function so I can delete the information 
 from the appropriate table.  

Does $PHP_SELF not give you what you're after?

Cheers
Jon

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




Re: [PHP] REPLY NEEDED

2002-11-21 Thread Peter Goggin
Where has this crap come from?
Regards

Peter Goggin
- Original Message - 
From: MICHAEL OSHODI [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 5:51 PM
Subject: [PHP] REPLY NEEDED



 ASSISTANCE

WE ARE MEMBERS OF A SPECIAL COMMITTEE FOR BUDGET AND
PLANNING OF THE NIGERIA NATIONAL PETROLEUM CORPORATION
 (NNPC)IN WEST AFRICA. THIS COMMITTEE IS PRINCIPALLY CONCERNED
WITH CONTRACT AWARDS AND APPROVAL. WITH OUR POSITIONS,
WE HAVE SUCCESSFULLY SECURED FOR OURSELVES THE SUM OF
THIRTHY ONE MILLION, FIVE HUNDRED THOUSAND UNITED
STATES DOLLARS (US$31.5M). THIS AMOUNT WAS CAREFULLY
MANIPULATED BY OVER-INVOICING OF AN OLD CONTRACT.

BASED ON INFORMATION GATHERED ABOUT YOU, WE BELIEVE
YOU WOULD BE IN A POSITION TO HELP US IN TRANSFERING
THIS FUND (US$31.5M) INTO A SAFE ACCOUNT. IT HAS BEEN
AGREED THAT THE OWNER OF THE ACCOUNT WILL BE
COMPENSATED WITH 30% OF THE REMITTED FUNDS, WHILE WE
KEEP 60% AS THE INITIATORS AND 10% WILL BE SET ASIDE
TO OFFSET EXPENSES AND PAY THE NECESSARY TAXES.WE
INTEND TO USE PART OF OUR OWN SHARE TO IMPORT FROM
YOUR COUNTRY AGRICULTURAL AND CONSTRUCTION MACHINERY.
THIS IS BECAUSE THE PRESENT GOVERNMENT OF MY COUNTRY
IS EMPHASISING ON PROVIDING FOOD AND HOUSING FOR ALL
ITS CITIZENS BEFORE THE NEXT ELECTION. HENCE,
AGRICULTURAL AND CONSTRUCTION EQUIPMENT ARE IN HIGH
DEMAND OVER HERE. WE SHALL ALSO NEED YOUR ASSISTANCE
IN THIS REGARD ON A COMMISSION TO BE AGREED UPON WHEN
WE FINALLY MEET.

ALL MODALITIES OF THIS TRANSACTION HAVE BEEN CAREFULLY
WORKED OUT AND ONCE STARTED WILL NOT TAKE MORE THAN
SEVEN (7) WORKING DAYS, WITH YOUR FULL SUPPORT. THIS
TRANSACTION IS 100% RISK FREE.

MOREOVER, WE SHALL NEED THE FOLLOWING FROM YOU TO 
ENABLE US BEGIN THE TRANSACTION FORMALLY. THEY ARE; 
YOUR FULL NAME AND ADDRESS OR YOUR COMPANY NAME, 
ADDRESS AND TELEPHONE/FAX NUMBERS, YOUR BANKERS 
NAME AND ADDRESS, YOUR ACCOUNT NUMBER AND NAME. 
THIS INFORMATION WILL BE USED ALONGSIDE OTHER VITAL
 DOCUMENTS OVER HERE IN PREPARING THE NECESSARY 
APPLICATION FOR PAYMENT TO THE CONCERNED QUARTERS 
WHERE PAYMENT APPROVALS WOULD BE SECURED IN FAVOUR
 OF YOUR COMPANY FOR THE PAYMENT OF OUR FUND(US$31.5M)
 INTO YOUR NOMINATED ACCOUNT FOR US ALL. BY OUR APPLICATION, 
IT WILL BE ASSUMED THAT THIS SUM IS BEING REQUESTED AS 
PAYMENT, WHICH IS LONG-OUTSTANDING, FOR A CONTRACT, 
WE SHALL CLAIM WITH OUR POSITION, YOU OR YOUR COMPANY
 EXECUTED FOR (NNPC) SOMETIME IN 1997. HENCE, WE SHALL 
FOLLOW ALL THE LEGAL OFFICIAL PROTOCOLS USUALLY 
OBSERVED BY FOREIGN CONTRACTORS WHENEVER THEY 
ARE DEMANDING PAYMENT FOR CONTRACTS EXECUTED 
FOR THE GOVERNMENT OF MY COUNTRY.

FURTHERMORE, IMMEDIATELY THE FINAL APPROVAL IS GRANTED, 
THE FUND WILL BE TRANSFERRED INTO YOUR ACCOUNT WITHIN 72
HOURS, BY WHICH TIME MY PARTNERS AND I WILL BE IN YOUR COUNTRY 
FOR THE FINAL DISBURSEMENT IN THE RATIO ALREADY SPELT OUT TO YOU.

 PLEASE, YOU SHOULD ENDEAVOUR TO GIVE US AN ACCOUNT 
WHICH YOU HAVE ABSOLUTE CONTROL OVER. THIS IS VERY 
IMPORTANT BECAUSE WE WOULD NOT WANT A SITUATION 
WHEN THE MONEY IS IN THE ACCOUNT, YOU NOW TELL US 
YOU WOULD NEED TO BE AUTHORISED BY ANOTHER PERSON 
BEFORE WE CAN HAVE OUR OWN SHARE.

YOU WILL NOT BE REQUIRED TO TRAVEL OUT OF YOUR COUNTRY, 
ME AND MY PARTNERS, WE TRAVEL DOWN TO YOUR COUNTRY 
FOR THE DISBURSEMENT OF THE FUND, AFTER THE FINAL TRANSACTION. 
WE WILL ALSO DISCUSS ABOUT OIL BUSINEES IN MY COUNTRY 
WHEN WE COME DOWN OVER THERE. BECAUSE WE WOULD 
LIKE TO ESTABLISH A JOINT BUSINESS WITH YOU. THAT IS 
WE WILL USE YOUR NAME TO REGISTER AND  
INCORPORATE AN OIL COMPANY IN MY COUNTRY. 

BESIDES, ON THE COMPLETION OF THIS TRANSFER, 
ALL DOCUMENTS USED FOR THE PURPOSE WILL BE 
WITHDRAWN FROM THE QUARTERS THEY ARE SUBMITTED 
BY OUR CONTACTS IN THESE OFFICES AND DESTROYED, 
THEREAFTER. SO, THERE WILL NOT BE ANY PROBLEM 
ARISING FROM THIS TRANSACTION NOW OR IN THE FUTURE.
IF THIS PROPOSAL SATISFIES YOU, PLEASE REACH US ONLY
BY EMAIL FOR MORE INFORMATION. 

PLEASE, TREAT AS URGENT AND VERY IMPORTANT.

YOURS FAITHFULLY,

CHIEF MICHAEL OSHODI




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




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




[PHP] Re: [PHP-DB] Help with Date

2002-11-21 Thread DL Neil
Rodrigo,

Is there a way to convert a date  20/11/2002  to a Float number in PHP,
since the date starts in 30/12/1899, just like the delphi treats the
dates

=Check out UNIX timestamps (but watch the valid date range),
=dn


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




Re: [PHP] script seen on php.net manual

2002-11-21 Thread Pedro Furtado
hey thanx for the answer,
actually yes, but it's my fault,
the thing is on the other side is flash and not php,
so i need to output something like this to later parse it in flash
response4:row0=$article__2||tipo 1:row1=art2|b|Tipo 2:colunms
4rows 2
but i cannot harcode anything because i don't know fields or anything for that
matter so i'm just missing how to 'format' my data output like this :D
Thx!
Pedro

On Wed, 20 Nov 2002 15:40:02 -0600 [EMAIL PROTECTED] (Chris Boget) wrote:

 i need to output
 row0=article__2||tipo 1:row1=art2|b|Tipo 2
 how can i achieve this?

 I believe you can just use urlencode() and urldecode() on the values.

 Chris



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




Re: [PHP] Session not Registering

2002-11-21 Thread Stephen
I didn't orginially put that there. I also made it echo out the session
varaible on the first page where they login and it displayed correctly. It's
just when you go to a new page.

The line 38 is the part where it echos out.


- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 3:26 AM
Subject: Re: [PHP] Session not Registering


 At 04:02 21.11.2002, Stephen said:
 [snip]
 I have a PHP script that logs someone in then takes them to another page
 indicating their online status. However, when I try echoing out the
 contents of the session variable, it says this:
 
 Notice: Undefined variable: _SESSION in c:\program files\apache
  group\apache\htdocs\checker\members\index.php on line 38
 
 Here's the code that registers the variable, or is atleast supposed to:
 
   if ($dbconn) {
 $querystr = SELECT user FROM users WHERE (user = ' .
  prepareData($_POST['user']) . ' and pass=PASSWORD(' .
  prepareData($_POST['pass']) . '));
 $result = mysql_query($querystr,$dbconn);
 if ($result) {
   if ($frow = mysql_fetch_row($result)) {
 session_start();
session_register('user');
 $_SESSION['user'] = $frow[0];
 header(Location: index.php? . SID);
 exit();
   }
   else {
 $error = Invalid username and password combo.;
   }
 }
 
 Here's where I echo it out:
 
 div align=left class=logfont size=2Logged in as ?php echo
  $_SESSION['user']; ?/font/div
 [snip]

 What's line 38 - is it the line where you assign to it, or is it the line
 with the echo?

 If it's the line with the assignment - duh, this should work IMHO
 if it's the line with the echo - you got nothing from mysql and didn't
 start the session.

 BTW - you shouldn't mix session_register() and accessing the $_SESSION
 array. Definetely it's not needed.


 --
O Ernest E. Vogelsinger
(\)ICQ #13394035
 ^ http://www.vogelsinger.at/




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




RE: [PHP] character ' in switch

2002-11-21 Thread David Russell
Hi Martin,

Just a thought - can't you escape it?

switch ($_GET['action']) {
   case about:
   code
   break;

   case what\'s new: -- i want this...
   code
   break;

   default:
   break;
}

You would definitely need to put it into quotes (as I have above)

For newer versions of PHP, you would also want register globals off, and
thus you would probably want to use $_GET['action'] as I have above. If
you are using OLD PHP, then use HTTP_GET_VARS instead.

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com

-Original Message-
From: Martin Hudec [mailto:[EMAIL PROTECTED]] 
Sent: 21 November 2002 02:11 PM
To: PHP
Subject: [PHP] character ' in switch


Hello all,

I would like to know how can I put ' character to case in switch...

Situation:

from flash i am getting url: index.php?action=what's new

i need to pass this thing to switch like:

switch ($action) {
   case about:
   code
   break;

   case what's new: -- i want this...
   code
   break;

   default:
   break;
}

but PHP can't use 'i am thinking about making urlencode() to put
that character to %XX value

any advices?


-- 
Best regards,
 Martin  mailto:[EMAIL PROTECTED]


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




smime.p7s
Description: application/pkcs7-signature


RE: [PHP] Session not Registering

2002-11-21 Thread David Russell
I assume that you do have a sesion_start() on the second (Target) page

It needs to be present on each page using your session.

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com

-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: 21 November 2002 02:43 PM
To: Ernest E Vogelsinger
Cc: PHP List
Subject: Re: [PHP] Session not Registering


I didn't orginially put that there. I also made it echo out the session
varaible on the first page where they login and it displayed correctly.
It's just when you go to a new page.

The line 38 is the part where it echos out.


- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 3:26 AM
Subject: Re: [PHP] Session not Registering


 At 04:02 21.11.2002, Stephen said:
 [snip]
 I have a PHP script that logs someone in then takes them to another 
 page indicating their online status. However, when I try echoing out 
 the contents of the session variable, it says this:
 
 Notice: Undefined variable: _SESSION in c:\program files\apache 
  group\apache\htdocs\checker\members\index.php on line 38
 
 Here's the code that registers the variable, or is atleast supposed 
 to:
 
   if ($dbconn) {
 $querystr = SELECT user FROM users WHERE (user = ' .
  prepareData($_POST['user']) . ' and pass=PASSWORD(' .
  prepareData($_POST['pass']) . '));
 $result = mysql_query($querystr,$dbconn);
 if ($result) {
   if ($frow = mysql_fetch_row($result)) {
 session_start();
session_register('user');
 $_SESSION['user'] = $frow[0];
 header(Location: index.php? . SID);
 exit();
   }
   else {
 $error = Invalid username and password combo.;
   }
 }
 
 Here's where I echo it out:
 
 div align=left class=logfont size=2Logged in as ?php 
  echo $_SESSION['user']; ?/font/div
 [snip]

 What's line 38 - is it the line where you assign to it, or is it the 
 line with the echo?

 If it's the line with the assignment - duh, this should work IMHO if 
 it's the line with the echo - you got nothing from mysql and didn't 
 start the session.

 BTW - you shouldn't mix session_register() and accessing the $_SESSION

 array. Definetely it's not needed.


 --
O Ernest E. Vogelsinger
(\)ICQ #13394035
 ^ http://www.vogelsinger.at/




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




smime.p7s
Description: application/pkcs7-signature


RE: [PHP] character ' in switch

2002-11-21 Thread Ernest E Vogelsinger
At 13:16 21.11.2002, David Russell spoke out and said:
[snip]
Hi Martin,

Just a thought - can't you escape it?

switch ($_GET['action']) {
   case about:
   code
   break;

   case what\'s new: -- i want this...
   code
   break;

   default:
   break;
}
[snip] 

You need to escape a quote if it's in a string that is quoted with the same
quote:
   Double quoted string needs to \escape\ double quotes but not 'single
quotes'
   'Single quoted string needs not to escape double quotes but \'single
quotes\'


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Session not Registering

2002-11-21 Thread Ernest E Vogelsinger
At 13:42 21.11.2002, Stephen spoke out and said:
[snip]
I didn't orginially put that there. I also made it echo out the session
varaible on the first page where they login and it displayed correctly. It's
just when you go to a new page.
[snip] 

If it echoes out correctly on page 1 but not on page 2 your script fails
(somehow) to pass the session identifier.


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



RE: [PHP] character ' in switch

2002-11-21 Thread David Russell
Hi Ernest,

I stand corrected. (I tend to standardise on double quotes where
possible, and rarely use singles)

Thanks for correcting me on this.

Thanks

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com

-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]] 
Sent: 21 November 2002 02:59 PM
To: David Russell
Cc: 'Martin Hudec'; 'PHP'
Subject: RE: [PHP] character ' in switch


At 13:16 21.11.2002, David Russell spoke out and said:
[snip]
Hi Martin,

Just a thought - can't you escape it?

switch ($_GET['action']) {
   case about:
   code
   break;

   case what\'s new: -- i want this...
   code
   break;

   default:
   break;
}
[snip] 

You need to escape a quote if it's in a string that is quoted with the
same
quote:
   Double quoted string needs to \escape\ double quotes but not
'single quotes'
   'Single quoted string needs not to escape double quotes but
\'single quotes\'


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



smime.p7s
Description: application/pkcs7-signature


RES: [PHP] Passing Variables from one php doc to another

2002-11-21 Thread Rodrigo de Oliveira Costa
I tried to use this way but it doesnt work I think its because it is a
variable that I have to pass, something like:


http://www.example.com/doo.php?dah=somethingdee=$somethingelse

HELP

Rodrigo




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




Re: RES: [PHP] Passing Variables from one php doc to another

2002-11-21 Thread Bastian Vogt
hi,

then you have to do it like this:
http://www.example.com/doo.php?dah=somethingdee=?echo $somethingelse?

regards,
Bastian

 I tried to use this way but it doesnt work I think its because it is a
 variable that I have to pass, something like:

 http://www.example.com/doo.php?dah=somethingdee=$somethingelse

 HELP

 Rodrigo


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




Re: RES: [PHP] Passing Variables from one php doc to another

2002-11-21 Thread Jason Wong
On Thursday 21 November 2002 22:04, Rodrigo de Oliveira Costa wrote:
 I tried to use this way but it doesnt work I think its because it is a
 variable that I have to pass, something like:


 http://www.example.com/doo.php?dah=somethingdee=$somethingelse

___HOW___ does it not work?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
...if the church put in half the time on covetousness that it does on lust,
 this would be a better world.  - Garrison Keillor, Lake Wobegon Days
*/


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




RE: [PHP] url - self

2002-11-21 Thread Paul Dionne
Yep, that is what I was looking for. 

thanks,
paul


Jon Haworth wrote:

 Hi Paul,
 
 I just need to know how to get the url of the page
 calling the function so I can delete the information
 from the appropriate table.
 
 Does $PHP_SELF not give you what you're after?
 
 Cheers
 Jon


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




[PHP] Ereg headache: got an Aspirin

2002-11-21 Thread Mako Shark
Finally, I found y answer to my ereg/grep question.
Thanks to all those who took a stab at it. You led me
to the answer. For all those interested in reg-parsing
comma-delimited lists, here is what I searched for:

'^INPUT TYPE = \HIDDEN\ NAME = \numbers\ VALUE =
\[0-9,\]*[\,] . $numbertosearch .
[\,][0-9,\]*$'

It was much simpler than I thought it would be. Thanks again!

__
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP] MY CLIENT

2002-11-21 Thread UberGoober
I've had some of my posts moderated away, how do these jokers sneak them in?


Troy May [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Sorry, I'm holding out for the 126 million.  :)



 -Original Message-
 From: GEORGE EMEKA [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 20, 2002 10:18 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] MY CLIENT
 Importance: High



 GOLDEN BUSINESS OPPORTUNITY
 I am an Attorney and close confidant of MRS. MARYAM
 ABACHA, the former first lady and wife of the late
 GEN. SANI ABACHA, the former head of state and
 commander in chief of the armed forces of the Federal
 Republic of Nigeria.

 She (MRS. M. ABACHA), has as a result of the trust and
 confidence she has in me mandated that I search for a
 reliable and trustworthy foreign partner, who
 will help receive some funds which she had in cash
 totaling US$45m (Forty Five Million United States
 Dollars Only) into a personal, company or any
 reliable foreign bank account for safe keeping for a
 short period of time, since her family bank accounts
 within and outside the country have all been
 frozen by the authorities. (I would refer you to the
 website of
 .http://www.transnationale.org/anglais/sources/tiersmonde/dirigeants__aba
 http://allafrica.com/stories/200203180074.html
 http://www.time.com/time/europe/magazine/2000/27/swiss.html ,
  for further information
 about these monies and the ABACHAS)

 This money in question has however, been carefully
 keptin defaced form and deposited with a security
 company that has branches in Europe and America.
 You may therefore be required to travel to any
 of the branches to collect the money on behalf of my
 client for safe keeping.

 It may also interest you to know that she (MRS.
 ABACHA) and her family have, since the inception of
 the present democratic government, been placed under
 partial house arrest, with their international
 traveler's passports withdrawn pending  the resolution
 of current fund recovery face - off between them and
 the present RTD GEN. OBASANJO led Federal Government,
 which from all indications will not exceed this year.

 She has decided to offer anybody who will be willing
 to render this tremendous assistance 20% of the total
 sum, while 5% shall be set aside for incidental
 expenses.

 Note that this transaction involves no risks
 whatsoever, as you will have no dealing with my
 Country, Nigeria. Rather, you will deal directly with
 the security company, which is based where the money
 is right now.

 Let me have your confidential Tel/Fax Numbers in your
 response to this proposal.

 I shall let you into a complete picture of this
 mutually beneficial transaction when I have received
 your anticipated positive reply. This matter should be
 treated as urgent and confidential. This is very
 important.

 Best Regards,

 Barrister George Emeka.







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





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




[PHP] Similar settings of encoding constants as codepage in ASP?

2002-11-21 Thread Ns_Andy
Codepage can be used to set different encoding in ASP,
what about PHP?

--
Regards,



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




[PHP] ImageLoadFont

2002-11-21 Thread Christoph
Hi,

I want to create dynamic images using php4  php4-gd2.
My problem now: in wich format the bitmap font file have to be to be
loaded correctly into my script?

Regards peterschen

---
Liebe ist es, nach einem Bluescreen zu behaupten es gäbe keine
Alternative.
http://www.peterschen.de/



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




[PHP] Preg_replace question

2002-11-21 Thread David Russell
Hi all,

Following on from a previous discussion, I am trying to write a safe
strip_tags function.

I start by applying htmlentities to the entire string, and then convert
allowed tags back.

One of the steps I am looking at doing is to replace something lt;a
href=blah onmouseover=blahgt; with a href=blah

What would be a good preg_replace string for this?

Preg_replace('/(lt;A)/i', 'a', $htmlstring);

Except I need to keep the href=anything as well as the closing ,
but drop everything else.

I will be googling on this too, but a reply from this group is always
quicker g

Thanks

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com



smime.p7s
Description: application/pkcs7-signature


Re: [PHP] Preg_replace question

2002-11-21 Thread Marek Kilimajer
Try xml parsing functions,  start with an empty string and build it up 
in your handlers. In start
element handler check if the tag is allowed, if yes, append it to the 
string together with allowed
attributes, and add it to a count (so users won't be able to mess up 
your design), else append it
using htmlspecialchars. In the end element handler, check if the count 
for this element is  0,
if yes, append it and subtract the count, else append it using 
htmlspecialchars. And in the data
handler you just need the obvious: append it using htmlspecialchars. 
After all you need to check
the count for each element and if it is  0, append that many end elements.

This is just an idea, and I'm curious myself, if that would work, so 
write share with us your results

David Russell wrote:

Hi all,

Following on from a previous discussion, I am trying to write a safe
strip_tags function.

I start by applying htmlentities to the entire string, and then convert
allowed tags back.

One of the steps I am looking at doing is to replace something lt;a
href=blah onmouseover=blahgt; with a href=blah

What would be a good preg_replace string for this?

Preg_replace('/(lt;A)/i', 'a', $htmlstring);

Except I need to keep the href=anything as well as the closing ,
but drop everything else.

I will be googling on this too, but a reply from this group is always
quicker g

Thanks

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com
 



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




[PHP] I'm having a problem with running scripts on IIS server

2002-11-21 Thread Davíð Örn Jóhannsson
This is the script I’m running
 
?php
include(db_connect.php);
$query = select top 5 * from news order by news_id desc;
$result = mssql_query($query, $db);
 
$i = 0;
while($row = mssql_fetch_row($result)){
$i++;
$title = rawurlencode($row[1]);
$date = rawurlencode($row[2]);
$headline = rawurlencode($row[3]);
$full = rawurlencode($row[4]);

$title = str_replace(%DE, %80, $title);
$date = str_replace(%DE, %80, $date);
$headline = str_replace(%DE, %80, $headline);
$full = str_replace(%DE, %80, $full);

$title = str_replace(%FE, %81, $title);
$date = str_replace(%FE, %81, $date);
$headline = str_replace(%FE, %81, $headline);
$full = str_replace(%FE, %81, $full);

$title = str_replace(%FD, %87, $title);
$date = str_replace(%FD, %87, $date);
$headline = str_replace(%FD, %87, $headline);
$full = str_replace(%FD, %87, $full);

$title = str_replace(%DD, %87, $title);
$date = str_replace(%DD, %87, $date);
$headline = str_replace(%DD, %87, $headline);
$full = str_replace(%DD, %87, $full);

$title = str_replace(%F0, %9B, $title);
$date = str_replace(%F0, %9B, $date);
$headline = str_replace(%F0, %9B, $headline);
$full = str_replace(%F0, %9B, $full);

$title = str_replace(%D0, %8B, $title);
$date = str_replace(%D0, %8B, $date);
$headline = str_replace(%D0, %8B, $headline);
$full = str_replace(%D0, %8B, $full);

printf(title$i=%sdate$i=%sheadline$i=%sfull$i=%s,
$title, $date, $headline, $full);}
 
php?
 
And it results this: 
 
?title1=ewrsdfdate1=21.11.2002headline1=sfasd%20fsd%20sdfdfffull1=s
df%20sdf%20sdf%20asdfdline$i=%sfull$i=%s, $title, $date, $headline,
$full);} php? , $full); } php?
 
Prints out all kinds of shit, php tags, variable names and stuff, I’ve
used this script on a LAMP server and no problems.
 
The server is runing PHP V. 4.1.2 on win 2000 CGI version, Any Ideas???
 



Re: [PHP] Preg_replace question

2002-11-21 Thread 1LT John W. Holmes
 Following on from a previous discussion, I am trying to write a safe
 strip_tags function.

 I start by applying htmlentities to the entire string, and then convert
 allowed tags back.

 One of the steps I am looking at doing is to replace something lt;a
 href=blah onmouseover=blahgt; with a href=blah

 What would be a good preg_replace string for this?

 Preg_replace('/(lt;A)/i', 'a', $htmlstring);

 Except I need to keep the href=anything as well as the closing ,
 but drop everything else.

 I will be googling on this too, but a reply from this group is always
 quicker g

How about

$new_string = preg_replace('/lt;a href=([^]+).*gt;/U',' a
href=$1',$old_string);

Adapt to your needs...

---John Holmes...


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




Re: [PHP] Preg_replace question

2002-11-21 Thread Ernest E Vogelsinger
At 15:38 21.11.2002, David Russell spoke out and said:
[snip]
One of the steps I am looking at doing is to replace something lt;a
href=blah onmouseover=blahgt; with a href=blah
[snip] 

I found it way easier not to look for encoded values but for the characters
themselves, as it is a lot easier with regexes to scan for characters (or,
better, to scanb for everything EXCEPT a certain character).

So I once took this approach:

Step 1 - extract all allowed tags
Step 2 - htmlentitize the string
Step 3 - put the pieces together again

You need to consider that there may be multiple possibilities to write a
link tag (other tags too):
a href=foo title=bar
 a title = bar href = foo any=other
etc etc.

So you must be looking for the href portion, enclosed by (encoded) angle
brackets:
$re = '/(.*?)(\s*a\s*[^]+?href.*?)(.*)/i';
This reads as
(   build a group
.*? with anything until the very next '' (below)
)   end group
(   build a group 
   beginning with ''
\s*a\s+ followed by optional blanks and an 'a' followed by at least one
blank
[^]*?  followed by anything EXCEPT '' until the very next
hrefhref
.*? followed by anything until the very next
   ''
)   end group
The 'i' modifier makes that expression case insenitive.

Next we parse the whole buffer for the href:

$result = null;
while ($buffer  $preg_match($re, $buffer, $aresult)) {
// $aresult is:
// [0] - whole buffer
// [1] - pre-match
// [2] - matched group
// [3] - post match
$result .= htmlentities($aresult[1]) . $aresult[2];
$buffer = $aresult[3];
}
$result .= $buffer;

This loops through the data buffer, applying htmlentities() to all parts
except any link tag.

Of course this example only works for the a href tag. If you have
multiple tags (and you _do_ have them since you also need to check for the
/a tag), find ANY tag and check if they are valid:
$re = '/(.*?)(\s*)(\/?)([^]*?)(\s*)(.*)/';
preg_match will create the following result array:
[0] - whole buffer
[1] - prematch
[2] - tag opener incl. opt. blanks
[3] - optional '/' for the closing tag
[4] - tag contents
[5] - tag closer incl. opt. blanks
[6] - postmatch
You can then, within your loop, analyze the tag contents (entry [4]) and
decide how to proceed.


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



FW: [PHP] I'm having a problem with running scripts on IIS server

2002-11-21 Thread Davíð Örn Jóhannsson
?php
include(db_connect.php);
$query = select top 5 * from news order by news_id desc;
$result = mssql_query($query, $db);
 
$i = 0;
while($row = mssql_fetch_row($result)){
$i++;
$title = rawurlencode($row[1]);
$date = rawurlencode($row[2]);
$headline = rawurlencode($row[3]);
$full = rawurlencode($row[4]);

$title = str_replace(%DE, %80, $title);
$date = str_replace(%DE, %80, $date);
$headline = str_replace(%DE, %80, $headline);
$full = str_replace(%DE, %80, $full);

$title = str_replace(%FE, %81, $title);
$date = str_replace(%FE, %81, $date);
$headline = str_replace(%FE, %81, $headline);
$full = str_replace(%FE, %81, $full);

$title = str_replace(%FD, %87, $title);
$date = str_replace(%FD, %87, $date);
$headline = str_replace(%FD, %87, $headline);
$full = str_replace(%FD, %87, $full);

$title = str_replace(%DD, %87, $title);
$date = str_replace(%DD, %87, $date);
$headline = str_replace(%DD, %87, $headline);
$full = str_replace(%DD, %87, $full);

$title = str_replace(%F0, %9B, $title);
$date = str_replace(%F0, %9B, $date);
$headline = str_replace(%F0, %9B, $headline);
$full = str_replace(%F0, %9B, $full);

$title = str_replace(%D0, %8B, $title);
$date = str_replace(%D0, %8B, $date);
$headline = str_replace(%D0, %8B, $headline);
$full = str_replace(%D0, %8B, $full);

printf(title$i=%sdate$i=%sheadline$i=%sfull$i=%s,
$title, $date, $headline, $full);}
 
php?
 
And it results this: 
 
?title1=ewrsdfdate1=21.11.2002headline1=sfasd%20fsd%20sdfdfffull1=s
df%20sdf%20sdf%20asdfdline$i=%sfull$i=%s, $title, $date, $headline,
$full);} php? , $full); } php?
 
Prints out all kinds of stuff, php tags, variable names and stuff, I’ve
used this script on a LAMP server and no problems.
 
The server is runing PHP V. 4.1.2 on win 2000 CGI version, Any Ideas???
 


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




[PHP] New ImageMagick Extension v0.1a Released

2002-11-21 Thread Michael Montero
Hello all!  I have release version 0.1a of an ImageMagick PHP 
extension.  It includes everything you need to test it out and it's well
documented.  I support a small number of functions and am working on adding
PHP functionality for everything that ImageMagick can do.  I'm sending out 
this release to get feedback and suggestions.  Feel free to email me 
directly with comments, suggestions, questions, etc.

I include a number of example PHP pages on how to use this as well and 
have tested them both with PHP as a standalone executable and as an Apache 
module.  I will be developing this over the next several weeks and adding 
more and more functionality.  Please see the TODO file to see what's 
currently on my list.

I'd like to especially thank Bob Friesenhahn and Dan Cowgill for their 
assistance on this project and for allowing me to bug then incessantly 
with questions.

You can download the latest version here:
http://apc.communityconnect.com/magick/magick-0.1a.tar.gz

I'm working on getting a better site up and will do so in the near future.

By the time you get this, I will have added a number of functions so I'll 
try to keep everyone posted on my progress.  Please note that I know 
little about Windows and have done no testing there.  So far, it has been 
only Linux.  If folks get it working elsewhere, I'd love to hear where.

I hope this helps you out.

Thanks.

-- 
Michael C. Montero
Chief Technology Officer
Community Connect Inc. Co-founder
[EMAIL PROTECTED]

-=-=-=-=-=  Community Connect Inc.  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The Premier Source of Interactive Online Communities149 Fifth Avenue
http://www.CommunityConnectInc.com/ New York, NY 10010

http://www.AsianAvenue.com/ http://www.BlackPlanet.com/
Click into Asian AmericaThe World Is Yours

http://www.MiGente.com/ http://www.DiversityJobMarket.com/
The Power of LatinosIn partnership with The New
York Times

-  Your Message May Appear Below This Line



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




[PHP] mysql_num_rows

2002-11-21 Thread empty
Hi guys;

I have a problem (or  mistake(s));

for this code

 39|   $result=mysql_query(slecet * from site_members where User_Name='$username');
 40|   $num_row=mysql_num_rows($result);
 41|   if($num_row0) echo(error 46);

as a reult I have unsolved error in my hands :(

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in 
D:\sites\inc\register.inc on line 40

NOTE: all the fields on the db are empty

anybody knows why?
(PHP 4.2.3 SAPI - MySql 3.23.53 - IIS 5.0 running on WinXP)


thanks


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




Re: [PHP] mysql_num_rows

2002-11-21 Thread Chris Shiflett
Your query on the previous line is failing for one reason or another.

You can use mysql_error() to get the error message from MySQL, or you
can place an echo statement in your code to make sure the SQL
statement is what you think it is.

You can also try the SQL statement yourself interactively at a MySQL
prompt.

Chris

--- empty [EMAIL PROTECTED] wrote:

 I have a problem (or  mistake(s));
 
 for this code
 
  39|   $result=mysql_query(slecet * from site_members where
User_Name='$username');
  40|   $num_row=mysql_num_rows($result);
  41|   if($num_row0) echo(error 46);
 
 as a reult I have unsolved error in my hands :(
 
 Warning: mysql_num_rows(): supplied argument is not a valid MySQL
 result resource in D:\sites\inc\register.inc on line 40

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




RE: [PHP] mysql_num_rows

2002-11-21 Thread M.A.Bond
I suppose it's nothing to do with the spelling mistake in the sql statement
(slecet should be select)

Mark


-Original Message-
From: empty [mailto:[EMAIL PROTECTED]] 
Sent: 21 November 2002 15:57
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_num_rows


Hi guys;

I have a problem (or  mistake(s));

for this code

 39|   $result=mysql_query(slecet * from site_members where
User_Name='$username');
 40|   $num_row=mysql_num_rows($result);
 41|   if($num_row0) echo(error 46);

as a reult I have unsolved error in my hands :(

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in D:\sites\inc\register.inc on line 40

NOTE: all the fields on the db are empty

anybody knows why?
(PHP 4.2.3 SAPI - MySql 3.23.53 - IIS 5.0 running on WinXP)


thanks


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


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




Re: [PHP] mysql_num_rows

2002-11-21 Thread Sascha Cunz
Hi,

  39|   $result=mysql_query(slecet * from site_members where
 User_Name='$username'); 40|   $num_row=mysql_num_rows($result);
  41|   if($num_row0) echo(error 46);

There is an typo-error in the word slecet which shoud look like select :-)

-Sascha

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




Re: [PHP] mysql_num_rows

2002-11-21 Thread Marek Kilimajer
add
echo mysql_error();
after line 39, it should tell you why the query failed in the future. 
Now I can tell you you have a typo:
slecet = select

empty wrote:

Hi guys;

I have a problem (or  mistake(s));

for this code

39|   $result=mysql_query(slecet * from site_members where User_Name='$username');
40|   $num_row=mysql_num_rows($result);
41|   if($num_row0) echo(error 46);

as a reult I have unsolved error in my hands :(

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\sites\inc\register.inc on line 40

NOTE: all the fields on the db are empty

anybody knows why?
(PHP 4.2.3 SAPI - MySql 3.23.53 - IIS 5.0 running on WinXP)


thanks


 



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




[PHP] thanks :)

2002-11-21 Thread empty
ooww

there is nothing slecet in mysql :)

thanks all


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




[PHP] HTML page and php

2002-11-21 Thread Martin Johansson
How do I get a html page into a string variable in php?
Isnt there any function working like this:
$homepage = getHtmlPage(http://www.myhomepage.com/index.html);

/Newbie



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




RE: [PHP] MY CLIENT

2002-11-21 Thread Van Andel, Robert
Perhaps its the moderator sending them out ;)  (This'll be my one and only
off topic post, I just couldn't resist).

Robbert van Andel 


-Original Message-
From: UberGoober [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 5:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MY CLIENT


I've had some of my posts moderated away, how do these jokers sneak them in?


Troy May [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Sorry, I'm holding out for the 126 million.  :)



 -Original Message-
 From: GEORGE EMEKA [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 20, 2002 10:18 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] MY CLIENT
 Importance: High



 GOLDEN BUSINESS OPPORTUNITY
 I am an Attorney and close confidant of MRS. MARYAM
 ABACHA, the former first lady and wife of the late
 GEN. SANI ABACHA, the former head of state and
 commander in chief of the armed forces of the Federal
 Republic of Nigeria.

 She (MRS. M. ABACHA), has as a result of the trust and
 confidence she has in me mandated that I search for a
 reliable and trustworthy foreign partner, who
 will help receive some funds which she had in cash
 totaling US$45m (Forty Five Million United States
 Dollars Only) into a personal, company or any
 reliable foreign bank account for safe keeping for a
 short period of time, since her family bank accounts
 within and outside the country have all been
 frozen by the authorities. (I would refer you to the
 website of
 .http://www.transnationale.org/anglais/sources/tiersmonde/dirigeants__aba
 http://allafrica.com/stories/200203180074.html
 http://www.time.com/time/europe/magazine/2000/27/swiss.html ,
  for further information
 about these monies and the ABACHAS)

 This money in question has however, been carefully
 keptin defaced form and deposited with a security
 company that has branches in Europe and America.
 You may therefore be required to travel to any
 of the branches to collect the money on behalf of my
 client for safe keeping.

 It may also interest you to know that she (MRS.
 ABACHA) and her family have, since the inception of
 the present democratic government, been placed under
 partial house arrest, with their international
 traveler's passports withdrawn pending  the resolution
 of current fund recovery face - off between them and
 the present RTD GEN. OBASANJO led Federal Government,
 which from all indications will not exceed this year.

 She has decided to offer anybody who will be willing
 to render this tremendous assistance 20% of the total
 sum, while 5% shall be set aside for incidental
 expenses.

 Note that this transaction involves no risks
 whatsoever, as you will have no dealing with my
 Country, Nigeria. Rather, you will deal directly with
 the security company, which is based where the money
 is right now.

 Let me have your confidential Tel/Fax Numbers in your
 response to this proposal.

 I shall let you into a complete picture of this
 mutually beneficial transaction when I have received
 your anticipated positive reply. This matter should be
 treated as urgent and confidential. This is very
 important.

 Best Regards,

 Barrister George Emeka.







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





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


 The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers. 





[PHP] show mysql- processing time

2002-11-21 Thread Tularis
I was wondering if anyone knew of a way to return the processing time of 
a mysql query via php.

And NOT using the

$starttime = time();
mysql_query($whatever);
$endtime = time();
$processingtime = $endtime - $starttime;

Does anyone please?


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



[PHP] Re: HTML page and php

2002-11-21 Thread Tularis
Martin Johansson wrote:


How do I get a html page into a string variable in php?
Isnt there any function working like this:
$homepage = getHtmlPage(http://www.myhomepage.com/index.html);

/Newbie



try this:
$file = file('http://www.myhomepage.com/index.html');
foreach($file as $key = $val){
	echo $val\r\n;
}
/*
$file will be an array where each index corresponds with a line from the 
file.
so:

1 = html
2 = head
3 = titleblah/title

etc.


Hope that helps
- Tularis


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



[PHP] crashed apache-processes eat up my cpu

2002-11-21 Thread sebastian stadtlich
 
Sorry it is not 100% sure that this PHP relatet, but since PHP
is the only thing i run on the Server it is very likely :
Every day i find strange httpd-processes that eat up my cpu power.
# /top
 336 nobody17   0  6012 6012  4944 R95.9  0.5  55:49 httpd
32745 nobody19   0  6324 6324  4864 R95.5  0.6  55:01 httpd
it is PHP 4.2.3 running on apache 1.3.37
Question Nr 1 : Did anyone ever have something similar an found a
solution ?
Question Nr 2 : How can i track what this process is doing? strace -p
{pid} does not output anything
Question Nr 3 : Does someone have a script that automatically kill
process that reach a certain amount of CPU Time?
 
regards
Sebastian



[PHP] running php on apache 2 on windows??

2002-11-21 Thread Chris Edwards
Anyone got it working?

I'm getting this:
C:\Program Files\Apache Group\Apache2\binApache.exe
Syntax error on line 183 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Cannot load C:/php/sapi/php4apache2.dll into server: The specified procedure
could not be found.

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




Re: [PHP] Session not Registering

2002-11-21 Thread Stephen
I fixed it. It was my stupidity. I forgot to call session_start on the other
pages...


- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 8:02 AM
Subject: Re: [PHP] Session not Registering


 At 13:42 21.11.2002, Stephen spoke out and said:
 [snip]
 I didn't orginially put that there. I also made it echo out the session
 varaible on the first page where they login and it displayed correctly.
It's
 just when you go to a new page.
 [snip]

 If it echoes out correctly on page 1 but not on page 2 your script fails
 (somehow) to pass the session identifier.


 --
O Ernest E. Vogelsinger
(\) ICQ #13394035
 ^ http://www.vogelsinger.at/



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




Re: [PHP] show mysql- processing time

2002-11-21 Thread Chris Shiflett
Well, you say you want to return the processing time of a MySQL query
via PHP, but then you go on to say that you do not want to do this in
PHP. :-)

I would recommend Jeremy Zawodny's mytop:

http://jeremy.zawodny.com/mysql/mytop/

Chris

--- Tularis [EMAIL PROTECTED] wrote:
 I was wondering if anyone knew of a way to return the processing
 time of a mysql query via php.
 
 And NOT using the
 
 $starttime = time();
 mysql_query($whatever);
 $endtime = time();
 $processingtime = $endtime - $starttime;

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




RE: [PHP] show mysql- processing time

2002-11-21 Thread Van Andel, Robert
This is what I did.

$StartTime = date(U);
$result = mysql_query($query);
$EndTime = date(U);

$difference = $EndTime - $StartTime;
echo pThe query took $difference seconds to generate/p\n;

Perhaps not the most accurate but who cares about a few milliseconds.

Robbert van Andel 

-Original Message-
From: Tularis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 8:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] show mysql- processing time


I was wondering if anyone knew of a way to return the processing time of 
a mysql query via php.

And NOT using the

$starttime = time();
mysql_query($whatever);
$endtime = time();
$processingtime = $endtime - $starttime;

Does anyone please?


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


 The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers. 





RE: [PHP] show mysql- processing time

2002-11-21 Thread Van Andel, Robert
Sorry,  I didn't read the entire message.  Didn't realize you were already
using my suggestion.

Robbert van Andel 

-Original Message-
From: Tularis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 8:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] show mysql- processing time


I was wondering if anyone knew of a way to return the processing time of 
a mysql query via php.

And NOT using the

$starttime = time();
mysql_query($whatever);
$endtime = time();
$processingtime = $endtime - $starttime;

Does anyone please?


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


 The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers. 





[PHP] Object Oriented PHP

2002-11-21 Thread Stephen



I need some books on OOP, Object Oriented PHP. Any 
recomendations?
Thanks,Stephen Cratonhttp://www.melchior.us

"Life is a gift from God. Wasting it is like destroying a gift you got from 
the person you love most." -- http://www.melchior.us
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Automatic file upload...

2002-11-21 Thread Tom Woody
I am trying to put together a script so that I can upload files to a
php script, with just a URL and can't seem to get my brain around it.

For example, The browser would have a url like:
http://example.com/upload/fileupload.php?filename=C:\filename.txt

Is there a way to do this and I'm just missing it, or will the client
have to browse and choose the filename with a form/form type of
construct?

I have tried some google searches on input syntax, as well as php
file uploads to no success.  The simple code I have been working with
is (obviously nothing has been found for automatically submitting a
form):

?php
  if (is_uploaded_file($_FILES['toProcess']['tmp_name'])) {
//successfully uploaded
move_uploaded_file($_FILES['toProcess']['tmp_name'],
   /var/www/html/filename.txt);
echo File successfully uploaded...thank youbr\n;
  }
  else {
echo Upload Problembr\n;
  }

?
html
body
form enctype=multipart/form-data action=? $PHP_SELF; ?
  method=POST
Filename: input type=file name=toProcess
 value=file:///home/user/uploadtest.txt
input type=submit
/form
/body
/html

-- 
Tom

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




Re: [PHP] Automatic file upload...

2002-11-21 Thread Marek Kilimajer
No, there is no way. This is a security restriction - if it would be 
possible, any web page could
steal files from you.

Tom Woody wrote:

I am trying to put together a script so that I can upload files to a
php script, with just a URL and can't seem to get my brain around it.

For example, The browser would have a url like:
	http://example.com/upload/fileupload.php?filename=C:\filename.txt

Is there a way to do this and I'm just missing it, or will the client
have to browse and choose the filename with a form/form type of
construct?

I have tried some google searches on input syntax, as well as php
file uploads to no success.  The simple code I have been working with
is (obviously nothing has been found for automatically submitting a
form):

?php
 if (is_uploaded_file($_FILES['toProcess']['tmp_name'])) {
   //successfully uploaded
   move_uploaded_file($_FILES['toProcess']['tmp_name'],
  /var/www/html/filename.txt);
   echo File successfully uploaded...thank youbr\n;
 }
 else {
   echo Upload Problembr\n;
 }

?
html
body
form enctype=multipart/form-data action=? $PHP_SELF; ?
 method=POST
Filename: input type=file name=toProcess
value=file:///home/user/uploadtest.txt
input type=submit
/form
/body
/html

 



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




[PHP] php programming style

2002-11-21 Thread Beau Hartshorne
Hi,

I'm curious if it's bad coding style for a function to return a value on
success, or simply false on fail. Here's what I mean:

?php

function foo($number)
{
if (is_numeric($number)) {
return $number . ' is a number.';
} else {
return false;
}
}

if ($string = foo(1)) {
echo $string;
} else {
echo 'error';
}

?

Is this ok?

Thank you,

Beau



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




[PHP] Help needed with the php.ini file

2002-11-21 Thread Pushpinder Singh Garcha
Hi all

I  am trying make changes with the register_global variable in the 
php.ini file, but I am unable to locate it.
I am running Mac OS JaguarPlease help me out

Many Thanks.

--Pushpinder

Pushpinder Singh Garcha
_
Web Architect
T. Falcon Napier and Associates, Inc.

Off   :  704 987 6500
Cell  :  704 236 2939
Fax   :  704 987 5002
_

Re: [PHP] show mysql- processing time

2002-11-21 Thread Tularis
ok, let me rephrase that... I ment I would like to use a php-function 
for it, OR a mysql command... just not such a function as I put down here...

Chris Shiflett wrote:

Well, you say you want to return the processing time of a MySQL query
via PHP, but then you go on to say that you do not want to do this in
PHP. :-)

I would recommend Jeremy Zawodny's mytop:

http://jeremy.zawodny.com/mysql/mytop/

Chris

--- Tularis  wrote:

I was wondering if anyone knew of a way to return the processing
time of a mysql query via php.

And NOT using the

$starttime = time();
mysql_query($whatever);
$endtime = time();
$processingtime = $endtime - $starttime;



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




Re: [PHP] php programming style

2002-11-21 Thread Ray Hunter
It depends on many issues...do you have a set standard that you use when
programming.

1. does it make sense to do it that way.
2. are there performance issue
3. is it understandable for maintenance by yourself or others.
4. does the function require a return value, if so which type.


I think that some of the above question might help you out. However,
from a programming standpoint i like to make sure that my functions
return the same type at least.  Some feel different about this and
return various type (ie, int, strings, arrays)...

HTH


On Thu, 2002-11-21 at 10:57, Beau Hartshorne wrote:
 Hi,
 
 I'm curious if it's bad coding style for a function to return a value on
 success, or simply false on fail. Here's what I mean:
 
 ?php
 
 function foo($number)
 {
   if (is_numeric($number)) {
   return $number . ' is a number.';
   } else {
   return false;
   }
 }
 
 if ($string = foo(1)) {
   echo $string;
 } else {
   echo 'error';
 }
 
 ?
 
 Is this ok?
 
 Thank you,
 
 Beau
-- 

Ray Hunter
email:  [EMAIL PROTECTED]
www:http://venticon.com


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




[PHP] Re: php programming style

2002-11-21 Thread Tularis
why wouldn't it be??

it's clean code as long as you can read it without having to do much 
trouble, and you have written it the shortest way possible with still 
enough extra stuff around to make other ppl understand it...

so, I would say - yeah, it's clean :)
- Tularis


Beau Hartshorne wrote:

Hi,

I'm curious if it's bad coding style for a function to return a value on
success, or simply false on fail. Here's what I mean:
?php

function foo($number)
{
	if (is_numeric($number)) {
		return $number . ' is a number.';
	} else {
		return false;
	}
}

if ($string = foo(1)) {
	echo $string;
} else {
	echo 'error';
}

?




Is this ok?

Thank you,

Beau





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




Re: [PHP] Help needed with the php.ini file

2002-11-21 Thread Ray Hunter
You need to supply more info here for help.

1. like how is php installed: compile, rpm
2. where is php trying to look for you php.ini file ( phpinfo() path)
3. tell us what you have done to try and find the php.ini file.

Then we can really help out...

or just run and search for the file php.ini on your mac...


On Thu, 2002-11-21 at 11:03, Pushpinder Singh Garcha wrote:
 Hi all
 
 I  am trying make changes with the register_global variable in the 
 php.ini file, but I am unable to locate it.
 I am running Mac OS JaguarPlease help me out
 
 Many Thanks.
 
 --Pushpinder
 
 Pushpinder Singh Garcha
 _
 Web Architect
 T. Falcon Napier and Associates, Inc.
 
 Off   :  704 987 6500
 Cell  :  704 236 2939
 Fax   :  704 987 5002
 _
-- 

Ray Hunter
email:  [EMAIL PROTECTED]
www:http://venticon.com


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




[PHP] MySQL-port question

2002-11-21 Thread Jule Slootbeek
I have a problem,
i know this is not the MySQL mailinglist, but i hope you guys can help 
me.
when i type mysqladmin variables the port comes up as 0 and doesn't let 
people connect to my db remotely.
does anyone know why this problem is, and how i can change my port?

TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]


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



Re: [PHP] Automatic file upload...

2002-11-21 Thread Hugh Danaher
Tom,
It sounds like the file you want is online someplace.  So, perhaps it's
fread() that you want to use.  With it, you can get the html output of a
page.
Hugh
- Original Message -
From: Tom Woody [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 9:28 AM
Subject: [PHP] Automatic file upload...


 I am trying to put together a script so that I can upload files to a
 php script, with just a URL and can't seem to get my brain around it.

 For example, The browser would have a url like:
 http://example.com/upload/fileupload.php?filename=C:\filename.txt

 Is there a way to do this and I'm just missing it, or will the client
 have to browse and choose the filename with a form/form type of
 construct?

 I have tried some google searches on input syntax, as well as php
 file uploads to no success.  The simple code I have been working with
 is (obviously nothing has been found for automatically submitting a
 form):

 ?php
   if (is_uploaded_file($_FILES['toProcess']['tmp_name'])) {
 //successfully uploaded
 move_uploaded_file($_FILES['toProcess']['tmp_name'],
/var/www/html/filename.txt);
 echo File successfully uploaded...thank youbr\n;
   }
   else {
 echo Upload Problembr\n;
   }

 ?
 html
 body
 form enctype=multipart/form-data action=? $PHP_SELF; ?
   method=POST
 Filename: input type=file name=toProcess
  value=file:///home/user/uploadtest.txt
 input type=submit
 /form
 /body
 /html

 --
 Tom

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



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




Re: [PHP] Help needed with the php.ini file

2002-11-21 Thread 1LT John W. Holmes
 I  am trying make changes with the register_global variable in the
 php.ini file, but I am unable to locate it.
 I am running Mac OS JaguarPlease help me out

Create a page with ? phpinfo(); ? only on it and call it up through your
browser. The first block on the page will tell you where php.ini is. If
there is just a path and no actual php.ini on the end of it, then that is
the path where php expects to find php.ini, but there isn't one there. Look
for a php-ini.dist or php-ini.recommended in the files you downloaded, edit
and rename it to php.ini, place it in that directory and restart your web
server.

---John Holmes...


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




Re: [PHP] Automatic file upload...

2002-11-21 Thread 1LT John W. Holmes
 For example, The browser would have a url like:
 http://example.com/upload/fileupload.php?filename=C:\filename.txt

Hmmm...that would be fun. How about I just send you my hard drive now?

You can't give values for file inputs. Otherwise, you could steal files w/o
people knowing about it.

---John Holmes...


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




Re: [PHP] Graph Question..

2002-11-21 Thread Jim Hatridge
HI Andrew et al...
On Wednesday 20 November 2002 21:09, Andrew Brampton wrote:
 Try going direct to the image's URL, this might show any PHP errors. If
 that doesn't work, you can request the page via telnet and see if any
 errors are appearing

 Andrew

I hate to admit it but I don't understand what you mean. (Please note, I'm new 
with PHP.) All the software is on my personal system. I'm not doing this over 
the 'net. 

There is three test files with this software. I picked it up at  
http://www.phpclasses.org/  Using two files I get only the broken box.  

But when I say http://opus.epost.de/~hatridge/graphs/test_pie.php (this is the 
third test file)  I get this 

###
Warning: Cannot add header information - headers already sent by (output
started at /home/hatridge/public_html/graphs/Piechart.php:159) in
/home/hatridge/public_html/graphs/Graph.php on line 40

Fatal error: Call to undefined function: imagegif() in
/home/hatridge/public_html/graphs/Graph.php on line 43
#

Any ideas?

Thanks 

JIM


 - Original Message -
 From: James Hatridge [EMAIL PROTECTED]
 To: PHP-GEN [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 3:06 PM
 Subject: [PHP] Graph Question..



 Hi all,,

 I d/l'ed a class for graphs last night. When I got the class working
 instead of a line graph I got the netscape symbol for no picture, ie a
 broken box. I must have missed something. Could someone give me a clue what
 I'm doing wrong?

 Thanks

 JIM

-- 
Vielfeind -- Viel Ehr'
Antiamerikanische Propaganda in der Philatelie des 20. Jahrhunderts
  http:/www.fecundswamp.net/~hatridge/stamps/index.html


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




[PHP] OT-Laptops

2002-11-21 Thread Edward Peloke

I know this if off topic but who better to ask this question to than people
who work on a computer everyday.  I can't find any information online so I
thought I would risk getting yelled at and ask.

Does anyone have or know anything about Sotec Laptops?

Thanks,
Eddie


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




Re: [PHP] Graph Question..

2002-11-21 Thread Hugh Danaher
Jim,
on the calling page change
echo p align=\center\image src=\$graphname\/p\n;
to
echo p align=\center\a href=\$graphname\something here/a/p\n;

Now, when you click on the link, the error message should show instead of
the broken box.
Hugh

- Original Message -
From: Jim Hatridge [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 7:29 AM
Subject: Re: [PHP] Graph Question..


HI Andrew et al...
On Wednesday 20 November 2002 21:09, Andrew Brampton wrote:
 Try going direct to the image's URL, this might show any PHP errors. If
 that doesn't work, you can request the page via telnet and see if any
 errors are appearing

 Andrew

I hate to admit it but I don't understand what you mean. (Please note, I'm
new
with PHP.) All the software is on my personal system. I'm not doing this
over
the 'net.

There is three test files with this software. I picked it up at
http://www.phpclasses.org/  Using two files I get only the broken box.

But when I say http://opus.epost.de/~hatridge/graphs/test_pie.php (this is
the
third test file)  I get this

###
Warning: Cannot add header information - headers already sent by (output
  started at /home/hatridge/public_html/graphs/Piechart.php:159) in
/home/hatridge/public_html/graphs/Graph.php on line 40

Fatal error: Call to undefined function: imagegif() in
/home/hatridge/public_html/graphs/Graph.php on line 43
#

Any ideas?

Thanks

JIM


 - Original Message -
 From: James Hatridge [EMAIL PROTECTED]
 To: PHP-GEN [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 3:06 PM
 Subject: [PHP] Graph Question..



 Hi all,,

 I d/l'ed a class for graphs last night. When I got the class working
 instead of a line graph I got the netscape symbol for no picture, ie a
 broken box. I must have missed something. Could someone give me a clue
what
 I'm doing wrong?

 Thanks

 JIM

--
Vielfeind -- Viel Ehr'
Antiamerikanische Propaganda in der Philatelie des 20. Jahrhunderts
  http:/www.fecundswamp.net/~hatridge/stamps/index.html


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



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




Re: [PHP] Graph Question..

2002-11-21 Thread Hugh Danaher
Jim,
Regarding undefined function: imagegif(), It could be that your build of
the GD Library doesn't include gif support.  You can try replacing this
function with imagejpg() or imagepng().  Imagepng() will likely be faster
and sharper than imagejpg().
Hugh
- Original Message -
From: Jim Hatridge [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 7:29 AM
Subject: Re: [PHP] Graph Question..


HI Andrew et al...
On Wednesday 20 November 2002 21:09, Andrew Brampton wrote:
 Try going direct to the image's URL, this might show any PHP errors. If
 that doesn't work, you can request the page via telnet and see if any
 errors are appearing

 Andrew

I hate to admit it but I don't understand what you mean. (Please note, I'm
new
with PHP.) All the software is on my personal system. I'm not doing this
over
the 'net.

There is three test files with this software. I picked it up at
http://www.phpclasses.org/  Using two files I get only the broken box.

But when I say http://opus.epost.de/~hatridge/graphs/test_pie.php (this is
the
third test file)  I get this

###
Warning: Cannot add header information - headers already sent by (output
  started at /home/hatridge/public_html/graphs/Piechart.php:159) in
/home/hatridge/public_html/graphs/Graph.php on line 40

Fatal error: Call to undefined function: imagegif() in
/home/hatridge/public_html/graphs/Graph.php on line 43
#

Any ideas?

Thanks

JIM


 - Original Message -
 From: James Hatridge [EMAIL PROTECTED]
 To: PHP-GEN [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 3:06 PM
 Subject: [PHP] Graph Question..



 Hi all,,

 I d/l'ed a class for graphs last night. When I got the class working
 instead of a line graph I got the netscape symbol for no picture, ie a
 broken box. I must have missed something. Could someone give me a clue
what
 I'm doing wrong?

 Thanks

 JIM

--
Vielfeind -- Viel Ehr'
Antiamerikanische Propaganda in der Philatelie des 20. Jahrhunderts
  http:/www.fecundswamp.net/~hatridge/stamps/index.html


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



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




Re[2]: [PHP] Graph Question..

2002-11-21 Thread Alexander Lazarchuk
Hello Jim,

The problem is with imagegif() function.
Probably, you have PHP with no GD library (available at http://www.boutell.com/gd/)
Or you have GD library version 1.6

With best regards,
Alexander Lazarchuk

**
Alexander Lazarchuk  *
mail:[EMAIL PROTECTED]*
ICQ: 85839546*
homepage:http://www.lassar2000.h1.ru *
**


Thursday, November 21, 2002, 5:29:35 PM, you wrote:

JH HI Andrew et al...
JH On Wednesday 20 November 2002 21:09, Andrew Brampton wrote:
 Try going direct to the image's URL, this might show any PHP errors. If
 that doesn't work, you can request the page via telnet and see if any
 errors are appearing

 Andrew

JH I hate to admit it but I don't understand what you mean. (Please note, I'm new 
JH with PHP.) All the software is on my personal system. I'm not doing this over 
JH the 'net. 

JH There is three test files with this software. I picked it up at  
JH http://www.phpclasses.org/  Using two files I get only the broken box.  

JH But when I say http://opus.epost.de/~hatridge/graphs/test_pie.php (this is the 
JH third test file)  I get this 

JH ###
JH Warning: Cannot add header information - headers already sent by (output
JH started at /home/hatridge/public_html/graphs/Piechart.php:159) in
JH /home/hatridge/public_html/graphs/Graph.php on line 40

JH Fatal error: Call to undefined function: imagegif() in
JH /home/hatridge/public_html/graphs/Graph.php on line 43
JH #

JH Any ideas?

JH Thanks 

JH JIM


 - Original Message -
 From: James Hatridge [EMAIL PROTECTED]
 To: PHP-GEN [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 3:06 PM
 Subject: [PHP] Graph Question..



 Hi all,,

 I d/l'ed a class for graphs last night. When I got the class working
 instead of a line graph I got the netscape symbol for no picture, ie a
 broken box. I must have missed something. Could someone give me a clue what
 I'm doing wrong?

 Thanks

 JIM


--
Best regards,
 Alexandermailto:[EMAIL PROTECTED]


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




Re: [PHP] OT-Laptops

2002-11-21 Thread Chris Hewitt
Edward Peloke wrote:


I know this if off topic but who better to ask this question to than people
who work on a computer everyday.  I can't find any information online so I
thought I would risk getting yelled at and ask.

Does anyone have or know anything about Sotec Laptops?


Not sure where you tried, but I put Sotec Laptop into Google. The 
third item was 
http://www.ibatterystore.com/laptops/laptop_model.asp?PCMID=5688
which has the title Sotec Laptop Computers.

HTH
Chris



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



RE: [PHP] OT-Laptops

2002-11-21 Thread Edward Peloke
yes but I am looking for reviews...

-Original Message-
From: Chris Hewitt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 1:57 PM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] OT-Laptops


Edward Peloke wrote:

I know this if off topic but who better to ask this question to than people
who work on a computer everyday.  I can't find any information online so I
thought I would risk getting yelled at and ask.

Does anyone have or know anything about Sotec Laptops?

Not sure where you tried, but I put Sotec Laptop into Google. The
third item was
http://www.ibatterystore.com/laptops/laptop_model.asp?PCMID=5688
which has the title Sotec Laptop Computers.

HTH
Chris



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



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




RE: [PHP] php programming style

2002-11-21 Thread Beau Hartshorne
 I think that some of the above question might help you out. However,
 from a programming standpoint i like to make sure that my functions
 return the same type at least.  Some feel different about this and
 return various type (ie, int, strings, arrays)...

I agree that it should return a consistent type. I was planning on
returning a populated array on success, or a boolean false on fail.
Instead, I will return an empty (but initialized) array on fail, and use
the count() function to test for failure like this:

?php

function foo()
{
/* if the result set is empty */
return array();
}

$my_array = foo();

if (count($my_array) = 0) {
// nothing in array
echo 'nothing';
} else {
// do something with data
echo 'something';
}

?

Beau



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




[PHP] No Reply From cURL

2002-11-21 Thread Steve Keller
I apologize for being a pest about this, I'm just not getting it.

I'm attempting to open a connection to NetLedger to post an XML file. I'm 
attempting this basic code, which is pretty much what I find everywhere:

	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, https://partners.netledger.com/SmbXml;);
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_VERBOSE, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS,$postData);
	
	$result = curl_exec ($ch);
	curl_close($ch);
	echo $result;

And I'm getting no result back so I can't even see what error I'm getting.

I'm using PHP 4.2.3, with OpenSSL/0.9.5a and compiled as follows:

'./configure' '--with-apxs=/usr/local/www/bin/apxs' 
'--with-mysql=/usr/local/' '--with-gd=/usr/local/' '--with-freetype' 
'--with-imap' '--with-curl'

Also, how do I include a file in the postData? Can someone point me to a 
good page about HTTP where I can read about doing that?
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org


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



[PHP] how can php get the values of a group of checkbox

2002-11-21 Thread Xin Qi
hi there,

if i have a group of checkboxes, and they have the SAME name, when they are
submited into a php script, how can this php file get the value of each
checkbox?

since they have the same name, $_GET[checkbox_name] only returns the last
one.

thanks



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




[PHP] Base 27?

2002-11-21 Thread Leif K-Brooks
I'm trying to make a fairly simple encryption thing.  My idea is to use 
base 27 numbers (the first 27 digits are the alphabet, the 27th is the 
space), and then converting to base 10.  Any one know of a way to do this?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



RE: [PHP] php programming style

2002-11-21 Thread Ernest E Vogelsinger
At 19:54 21.11.2002, Beau Hartshorne said:
[snip]
I agree that it should return a consistent type. I was planning on
returning a populated array on success, or a boolean false on fail.
Instead, I will return an empty (but initialized) array on fail, and use
the count() function to test for failure like this:
[snip] 

I also have the habit of always having my functions returning a comparable
type. Comparable means you can always use the empty(), isset(), or count()
functions with correct result.

This said I'd suggest to return null for non-void functions in case of
failure. 


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] how can php get the values of a group of checkbox

2002-11-21 Thread Ernest E Vogelsinger
At 20:14 21.11.2002, Xin Qi said:
[snip]
if i have a group of checkboxes, and they have the SAME name, when they are
submited into a php script, how can this php file get the value of each
checkbox?

since they have the same name, $_GET[checkbox_name] only returns the last
one.
[snip] 

If you name your checkboxes checkbox_name[] (note the brackets behind the
name) PHP will recognize the parameters being an array so you will have all
(checked) values at your disposal.

For checkboxes this means that _unchecked_ options are NOT transmitted.
Might be a caveat depending on your implementation.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] how can php get the values of a group of checkbox

2002-11-21 Thread Adam Williams
user name=cb[] and PHP will automatically make the array.  then call it
with $_GET[cb][#]

Adam

On Thu, 21 Nov 2002, Xin Qi wrote:

 hi there,

 if i have a group of checkboxes, and they have the SAME name, when they are
 submited into a php script, how can this php file get the value of each
 checkbox?

 since they have the same name, $_GET[checkbox_name] only returns the last
 one.

 thanks






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




Re: [PHP] Base 27?

2002-11-21 Thread Ernest E Vogelsinger
At 20:21 21.11.2002, Leif K-Brooks said:
[snip]
I'm trying to make a fairly simple encryption thing.  My idea is to use 
base 27 numbers (the first 27 digits are the alphabet, the 27th is the 
space), and then converting to base 10.  Any one know of a way to do this?

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized 
attempt to decrypt it will be prosecuted to the full extent of the law.
[snip] 

Why would you want a Base27 encryption if you have the double rot13 in
effect? g

Sorry, couldn't resist...


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




[PHP] Writing a Polling App - Need Some Advice

2002-11-21 Thread Monty
I'm writing a little polling app for a website, they want to run them each
week. They will be the simple choose your favorite kind of multiple-choice
polls.  If anyone has ever written one of these, what is the best way to set
up the poll questions? Do I store each question in a separate table and link
them to a central Poll record? Or do you store the questions all in one
record? Or is there an even better way to do this?

Any suggestions or pointers would be appreciated! Thanks.

Monty



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




Re: [PHP] plus sign has changed to space after POST

2002-11-21 Thread bhkwan
finally, I have this issue solved.

I have recompiled PHP without this

--enable-mbstr-enc-trans

For those who said they have no problem with the + sign, tried to 
compile your PHP with the option above and tried it out!!!  ;)

I know this is not a PHP bug but I am curious how people handle the + 
sign issue when they have this option support in their php..






Chris Shiflett [EMAIL PROTECTED]
11/19/2002 11:32 PM
Please respond to shiflett
 
To: Hugh Danaher [EMAIL PROTECTED], 
[EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] plus sign has changed to space after 
POST


That's a terrible idea.

Not only does this avoid fixing the real issue (tries to fix the
symptom instead of the problem), you're telling him to change all
spaces to + signs.

Imagine a form asking for your name. You enter Hugh Danaher only to
see it translated into Hugh+Danaher on the server.

Chris

--- Hugh Danaher [EMAIL PROTECTED] wrote:
 Just do ereg_replace( ,+,$var) on the receiving end and be done
 with it.

  From: [EMAIL PROTECTED]
 
   After upgrade to 4.2.3, plus + sign has changed to space
   after POST. I have checked the mailing list but can't find any
   help to turn this off forever! is this a bug in PHP?

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




[PHP] Re: Writing a Polling App - Need Some Advice

2002-11-21 Thread Philip Hallstrom
You're best bet is to take a look on zend.com in their application gallery
and find one that does what you want :)  Or at least you could see how
others have done it.

On Thu, 21 Nov 2002, Monty wrote:

 I'm writing a little polling app for a website, they want to run them each
 week. They will be the simple choose your favorite kind of multiple-choice
 polls.  If anyone has ever written one of these, what is the best way to set
 up the poll questions? Do I store each question in a separate table and link
 them to a central Poll record? Or do you store the questions all in one
 record? Or is there an even better way to do this?

 Any suggestions or pointers would be appreciated! Thanks.

 Monty



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



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




[PHP] ImageCreateFromJpeg error

2002-11-21 Thread Scott Nagel
I am trying to use the following piece of code:

$img_resized = imagecreate($img_new_width, $img_new_height);
$img_source =
ImageCreateFromJpeg($pa_strDocroot.$pa_strReadFold./.$this-Name);
imagecopyresized($img_resized, $img_source, 0 , 0 , 0 , 0, $img_new_width,
$img_new_height, $this-Width, $this-Height);

The code runs fine on my Windows machine, but ImageCreateFromJpeg() errors
on the server. I am sharing a server, and they have it set to not show any
errors, so I can't tell you what the exact error message is. I have been
able to establish that:

- GD is installed--the other image functions work;
- I believe it is a later version of GD that supports JPEGs, since
ImageCreateFromJpeg exists as a function [does that follow?];
- The paths are correct, since they work on my machine, and work in other
places;
- The write folder has full permissions set, just to be safe;
- The images in the read folder have read permissions set.

Is there some sort of a temporary directory as well, where permissions have
to be set? A few sites have mentioned a --with-jpeg-dir configuration
setting. Do the permissions for that need to be checked?

Any help would be appreciated.

Scott



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




Re: [PHP] Re: http$B$G%;%C%7%g%s$r3+;O$7$?l9g!(Bhttps$B$X9T$C$F$b7QB3$5$l$k$N$G$7$g$$+!)(B

2002-11-21 Thread -[ Rene Brehmer ]-
Hi BAROILLER Pierre-Emmanuel,

On Sat, 9 Nov 2002 15:34:56 +0100, you wrote about [PHP] Re:
http$B$G%;%C%7%g%s$r3+;O$7$?l9g!(Bhttps$B$X9T$C$F$b7QB3$5$l$k$N$G$7$g$$+!)(B
something that looked like this:

Hi !
Could you write it in english please ?

Yeah ... not alot of people here can read Japanese...


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




[PHP] re: No Reply From cURL

2002-11-21 Thread greg R
I don't think cURL is very intuitive. 
Can you at least echo a response code from your
function, such as

$res = curl_setopt($ch, CURLOPT_URL,
 https://partners.netledger.com/SmbXml;);
echo $res; 
That should at least tell you, if nothing else, that
you could successfully get into the service. If it's a
success, should return a 1, I think. 

GR
 I apologize for being a pest about this, I'm just
 not getting it.
 
 I'm attempting to open a connection to NetLedger to
 post an XML file. I'm 
 attempting this basic code, which is pretty much
 what I find everywhere:
 
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL,
 https://partners.netledger.com/SmbXml;);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_VERBOSE, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS,$postData);
   
   $result = curl_exec ($ch);
   curl_close($ch);
   echo $result;
 
 And I'm getting no result back so I can't even see
 what error I'm getting.
 
 I'm using PHP 4.2.3, with OpenSSL/0.9.5a and
 compiled as follows:
 
 './configure' '--with-apxs=/usr/local/www/bin/apxs' 
 '--with-mysql=/usr/local/' '--with-gd=/usr/local/'
 '--with-freetype' 
 '--with-imap' '--with-curl'


__
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




[PHP] Forgoten

2002-11-21 Thread Cesar Aracena
Hi all,

I’m quite rusty with this sessions stuff (just came from vacations) and
have this strange problem with a session I’m trying to build. Along with
that, I’m making my first lines of code with a new portable computer and
maybe PHP or Apache is not well configured… any ideas? The code goes as
follows and the result page is below that:



?

session_start();

if ($username  $password)
{
$db_conn = mysql_connect(www.icaam.com.ar, icaam,
xxx);
mysql_select_db(icaam, $db_conn);
$query = SELECT * FROM maraadmins WHERE adminuser = '$username'
AND adminpassword = password('$password');
$result = mysql_query($query, $db_conn);
if (mysql_num_rows($result)  0)
{
$row = mysql_fetch_array($result);
$valid_admin = $row['adminid'];
session_register(valid_admin);
header(Location: admin.php);
exit;
}
else
{
header(Location: ../index.html);
exit;
}
}
else
{
header(Location: ../index.html);
exit;
}

?



Resulta at IE:

Warning: open(/tmp\sess_d25ead36103aaf410d8ad254d206ada3, O_RDWR)
failed: No such file or directory (2) in
C:\apache\htdocs\joyeriamara\admin\login.php on line 3

Warning: Cannot add header information - headers already sent by (output
started at C:\apache\htdocs\joyeriamara\admin\login.php:3) in
C:\apache\htdocs\joyeriamara\admin\login.php on line 16

Warning: open(/tmp\sess_d25ead36103aaf410d8ad254d206ada3, O_RDWR)
failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on
line 0



Any thoughts are welcome and appreciated.

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




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




Re: [PHP] How to use string as variable name?

2002-11-21 Thread -[ Rene Brehmer ]-
Hi Adam Voigt,

On 18 Nov 2002 13:11:30 -0500, you wrote about Re: [PHP] How to use
string as variable name? something that looked like this:

$date = 2002-11-22;
$myvar = a . str_replace(-,,$date);
$$myvar = hi;

echo $a20021122;

GREAT ... works right off ..thx a billion ... 

Rene


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




Re: [PHP] Writing a Polling App - Need Some Advice

2002-11-21 Thread Kevin Stone
Somebody suggested downloading a pre-made script that does what you want but
I say that's no way to program.  Simple scripts like this one clear the mind
and are good experience.  Besides nobody ever got good at programming by
using pre-made scripts.  ;-)

Okay down to basics.  You can break up the problem into logical steps.  The
way I would do this is have two tables.  The first table stores the poll_ID,
name (or title), start_date, end_date.  The second table stores poll_ID,
question, hits.  If you need to prevent users from inputing more than one
answer you can store a third table containing, poll_ID, IP.

Your only redundency is the poll_ID value.  This is your associating value
that binds the poll data together.   In the first table this should be your
Primary Key and set it as an auto-incrementing unsigned integer.  In the
second and third tables set it to integer and leave it alone.  You might add
a separate auto-incrementing value to act as the primary key.

So hopefully this gets you started.  If you need help with anything else let
me know.
-Kevin


- Original Message -
From: Monty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 12:30 PM
Subject: [PHP] Writing a Polling App - Need Some Advice


 I'm writing a little polling app for a website, they want to run them each
 week. They will be the simple choose your favorite kind of
multiple-choice
 polls.  If anyone has ever written one of these, what is the best way to
set
 up the poll questions? Do I store each question in a separate table and
link
 them to a central Poll record? Or do you store the questions all in one
 record? Or is there an even better way to do this?

 Any suggestions or pointers would be appreciated! Thanks.

 Monty



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





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




Re: [PHP] No Reply From cURL

2002-11-21 Thread Steve Keller
At 11/21/2002 11:55 AM, greg R wrote:


I don't think cURL is very intuitive.


Well, I'm glad to see someone else say that. Makes me feel less retarded.


Can you at least echo a response code from your
function, such as

$res = curl_setopt($ch, CURLOPT_URL,
 https://partners.netledger.com/SmbXml;);
echo $res;
That should at least tell you, if nothing else, that
you could successfully get into the service. If it's a
success, should return a 1, I think.


Thanks Greg, that's a start. Yes, it's returning a 1.

So where do I go from here with troubleshooting?
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org


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




[PHP] Client IP address

2002-11-21 Thread Ron Smith
I know this is probably easily solved, but I'm trying to locate the PHP 
function which returns the client's IP address when they request a page 
from the server. I'm having no luck searching the php.net function list.

Kindest regards,

Ron

Yes, they were dinking with the DNS last weekend, and it got out to
the internet, then took awhile to 'repair' itself, said my friend.

To which I replied, Well, 'Dinking Happens!'  =


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



Re: [PHP] Client IP address

2002-11-21 Thread Stephen
It's not a function, it's a variable:

$_SERVER[REMOTE_ADDR];


- Original Message - 
From: Ron Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 3:16 PM
Subject: [PHP] Client IP address


 I know this is probably easily solved, but I'm trying to locate the PHP 
 function which returns the client's IP address when they request a page 
 from the server. I'm having no luck searching the php.net function list.
 
 Kindest regards,
 
 Ron
 
  Yes, they were dinking with the DNS last weekend, and it got out to
  the internet, then took awhile to 'repair' itself, said my friend.
 
  To which I replied, Well, 'Dinking Happens!'  =
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




Re: [PHP] No Reply From cURL

2002-11-21 Thread Bret L Conard
I had a devil of a time figuring out how to make it work. After searching
the archives and lots of other sites I came up with the following code:
(FYI - I am using authorize.net, so some of the response parameters may be
different for you)
HTH
Bret

?php
$data =
formfield1_name=formfield1_valueformfield1_name=formfield1_value/*etc*/;
# gets static data merchant info, login, password etc
if($x_Method==CC){
 $data .=
formfield3_name=formfield3_valueformfield4_name=formfield4_value/*etc*/;
 #gets conditional values if Credit Card is selected
 }
else{
 $data .=
formfield5_name=formfield5_valueformfield6_name=formfield6_value/*etc*/;
  #gets conditional values if eCheck is selected
}
$ch = curl_init(https://secure.website.net/script_or_application;); // URL
of gateway for cURL to post to
 $data .=
x_First_Name=$x_First_Namex_Last_Name=$x_Last_Namex_Company=$x_Company;
 $data .=
x_Address=$x_Addressx_City=$x_Cityx_State=$x_Statex_Zip=$x_Zipx_Phone=$
x_Phone;
 //$data = gets the rest of all form data
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info
from response
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // use HTTP POST to send form
data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data
instead of TRUE(1)
$resp = curl_exec($ch); //execute post and get results
curl_close ($ch);
//My responses are delimited with | (pipe)
$parts = explode(|, $resp); //creates array from reponse
?


- Original Message -
From: Steve Keller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 2:03 PM
Subject: [PHP] No Reply From cURL


 I apologize for being a pest about this, I'm just not getting it.

 I'm attempting to open a connection to NetLedger to post an XML file. I'm
 attempting this basic code, which is pretty much what I find everywhere:

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, https://partners.netledger.com/SmbXml;);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS,$postData);

 $result = curl_exec ($ch);
 curl_close($ch);
 echo $result;

 And I'm getting no result back so I can't even see what error I'm getting.

 I'm using PHP 4.2.3, with OpenSSL/0.9.5a and compiled as follows:

 './configure' '--with-apxs=/usr/local/www/bin/apxs'
 '--with-mysql=/usr/local/' '--with-gd=/usr/local/' '--with-freetype'
 '--with-imap' '--with-curl'

 Also, how do I include a file in the postData? Can someone point me to a
 good page about HTTP where I can read about doing that?
 --
 S. Keller
 UI Engineer
 The Health TV Channel, Inc.
 (a non - profit organization)
 3820 Lake Otis Pkwy.
 Anchorage, AK 99508
 907.770.6200 ext.220
 907.336.6205 (fax)
 Email: [EMAIL PROTECTED]
 Web: www.healthtvchannel.org


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




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




Re: [PHP] Client IP address

2002-11-21 Thread Chris Shiflett
It's not a function, merely a variable.

$REMOTE_ADDR

Chris

--- Ron Smith [EMAIL PROTECTED] wrote:
 I know this is probably easily solved, but I'm trying to locate
 the PHP function which returns the client's IP address when they
 request a page from the server.

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




Re: [PHP] No Reply From cURL

2002-11-21 Thread Bret L Conard
-- snip   -
Thanks Greg, that's a start. Yes, it's returning a 1.

So where do I go from here with troubleshooting?
-- snip   -

That is cURL returning a (true) value having completed succesfully. 

Bret


- Original Message - 
From: Steve Keller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 3:20 PM
Subject: Re: [PHP] No Reply From cURL


 At 11/21/2002 11:55 AM, greg R wrote:
 
 I don't think cURL is very intuitive.
 
 Well, I'm glad to see someone else say that. Makes me feel less retarded.
 
 Can you at least echo a response code from your
 function, such as
 
 $res = curl_setopt($ch, CURLOPT_URL,
   https://partners.netledger.com/SmbXml;);
 echo $res;
 That should at least tell you, if nothing else, that
 you could successfully get into the service. If it's a
 success, should return a 1, I think.
 
 Thanks Greg, that's a start. Yes, it's returning a 1.
 
 So where do I go from here with troubleshooting?
 --
 S. Keller
 UI Engineer
 The Health TV Channel, Inc.
 (a non - profit organization)
 3820 Lake Otis Pkwy.
 Anchorage, AK 99508
 907.770.6200 ext.220
 907.336.6205 (fax)
 Email: [EMAIL PROTECTED]
 Web: www.healthtvchannel.org
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




  1   2   >