[PHP] mime emails

2002-02-08 Thread Kunal Jhunjhunwala

hey..
does anyone know of any good classes / functions for handling mime emails? i
am writing a mail checker, and was wondering if there are any pre-written
mime email handling classes out there...
thanks!
Regards,
Kunal Jhunjhunwala

Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought. - Clifford Stoll


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




[PHP] Header / image question

2002-02-08 Thread phantom

I have this really cool script that grabs image data stored in a mysql
bin field and echo's the data into an image file.

01: /* QUERY DB AND LOAD IMAGE DATA */
02: /* must get values for ImgType and ThmData */
03: $Results = mysql_query($Query, $Link)
04: or die (SL3-.mysql_errno().: .mysql_error());
05: $Num_rows = mysql_num_rows($Results);
06: if ($Num_rows==1) { // show image;
07: $ImgType = mysql_result($Results,0,ImgType);
08: $ThmData = mysql_result($Results,0,ThmData);
09: header(Content-Type:  . $ImgType); //$ImgType shoud be
image/jpeg;
10: echo $ThmData;
11:}

However, I have a simple mysql database counter that counts how many
times this image is loaded.  $UpdateQuery = UPDATE Counter SET Ct=Ct=1
WHERE Img = '${Img}';

However everytime I run this script the counter increments by 2 (not
1).  G.

After dicing this script up, the line that is suspect is Line 09:

If I comment out this line (Line 09), the counter increments properly
(by 1).

If I comment out Line 10 and leave Line 09 in, the counter increases by
2 and the image fails to display.  Also Line 09 echos the URL of the
image.  Could this URL be resubmitting the script again, thus
incrementing the counter an extra count???

Any ideas or where I could find more info?  Thanks.


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




RE: [PHP] mime emails

2002-02-08 Thread Jerry Verhoef (UGBI)

http://php.resourceindex.com/detail/00896.html

GOOGLE is the ultimate programmers tool.

And i used this some time ago... :)

 -Original Message-
 From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 9:23 AM
 To: php-list
 Subject: [PHP] mime emails
 
 
 hey..
 does anyone know of any good classes / functions for handling 
 mime emails? i
 am writing a mail checker, and was wondering if there are any 
 pre-written
 mime email handling classes out there...
 thanks!
 Regards,
 Kunal Jhunjhunwala
 
 Minds think with ideas, not information. No amount of data, 
 bandwidth, or
 processing power can substitute for inspired thought. - 
 Clifford Stoll
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




Re: [PHP] Header / image question

2002-02-08 Thread Jason Wong

On Friday 08 February 2002 16:26, phantom wrote:
 I have this really cool script that grabs image data stored in a mysql
 bin field and echo's the data into an image file.

 01: /* QUERY DB AND LOAD IMAGE DATA */
 02: /* must get values for ImgType and ThmData */
 03: $Results = mysql_query($Query, $Link)
 04: or die (SL3-.mysql_errno().: .mysql_error());
 05: $Num_rows = mysql_num_rows($Results);
 06: if ($Num_rows==1) { // show image;
 07: $ImgType = mysql_result($Results,0,ImgType);
 08: $ThmData = mysql_result($Results,0,ThmData);
 09: header(Content-Type:  . $ImgType); //$ImgType shoud be
 image/jpeg;
 10: echo $ThmData;
 11:}

 However, I have a simple mysql database counter that counts how many
 times this image is loaded.  $UpdateQuery = UPDATE Counter SET Ct=Ct=1
 WHERE Img = '${Img}';

Where is this query being used? You're not inadvertently using it twice? 
Could you post the complete code?


 However everytime I run this script the counter increments by 2 (not
 1).  G.

 After dicing this script up, the line that is suspect is Line 09:

 If I comment out this line (Line 09), the counter increments properly
 (by 1).

 If I comment out Line 10 and leave Line 09 in, the counter increases by
 2 and the image fails to display.  Also Line 09 echos the URL of the
 image.  Could this URL be resubmitting the script again, thus
 incrementing the counter an extra count???

I don't see how it can resubmit your script again, it's not using Location:.



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
The future isn't what it used to be.  (It never was.)
*/

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




RE: [PHP] Re: DreamWeaver/PHP ability?

2002-02-08 Thread Matt Williams

 Luke Crouch wrote:

  I know Dreamweaver UltraDev has nice site management features
 for using a
  JSP/SQL type serverdoes it have similar capabilities with PHP/MySQL?
  Does anyone know?
 
  -L

Search the archives on this one.

There is a project called php4ud or something like that but I can't remember
the url.

I've never used it so I couldn't comment

m:


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




RE: [PHP] modDb Contribution

2002-02-08 Thread Jerry Verhoef (UGBI)

unusual??

Don't know ... but i never ever saw a request like this on the list before,
if that is what you mean.

But the ppl on this list are mostly developers and most of them including
me. We don't buy we make :) (at least we try to :)
I understand your frustration. 
But what you could do:
1 try to sell it to various host which provide nuke support. There are
several noted on the nuke site. 
2 release a limited version.
3 release a full version but demand a link to your site (more traffic could
mean more customers
4 contribute to the open source soceity
5 try to sell it to a developer


1. If want to sell this is the place to do it!
2. Very difficult, and mostly annoy ppl 
3. Nice thought but usually ppl don't give credit where the credit belongs
4. YEAH!!! :)
5. We need a demo first with some example coding in how to use it, things
like that (btw i am not interrested i don't use nuke)

I think that this are your options 

HTH
Jerry
 -Original Message-
 From: Vincent - D. Ertner [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 PM
 To: php
 Subject: [PHP] modDb Contribution
 
 
 Hi PHPers,
 
  in late 2001 I had a customer that was interested in a kind of
  universal (my)SQL module for PHPNuke / phpWebsite. Thus I 
 ordered the
  development and - as fair as life is - the customer went 
 straight into
  bankruptcy.
  
  Now I have a first beta of modDb - as we call it - and almost no
  need to push it further. At least - kind fellows - the programmers
  offered to do some additional work on modDb.
  
  Now ... to keep a long story short ... which is the best 
 way to bring
  this to a kind of happy end? Where could I contribute it? On the one
  hand I would love to contribute it under GPL - on the other hand it
  cost something ...
  
  Please let me in on your thoughts about this matter! Thanx 
 in advance
  ...
 
 is it unusual to ask this kind of question? Please let me know ...
 
 -- 
 Cheers,
 
 Vince
 
  '''
  ô¿ô
   -
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




RE: [PHP] determining script url

2002-02-08 Thread Matt Williams

 Hi all,
 How can I get the full URL of the currently running script? 
 $DOCUMENT_ROOT is not what I need, instead I need the url (be it 
 domain if exists, or ip if not).  $SERVER_NAME works but if a 
 domain isn't paired with the server, I could get some useless 
 information (right?).

$SCRIPT_NAME or $SCRIPT_FILENAME

See http://uk.php.net/manual/en/language.variables.predefined.php

For more details

m:



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




[PHP] Full source

2002-02-08 Thread phantom

?
header(Cache-Control: public);
header(Cache-Control: max-age= . $this-allowcache_expire * 60);

$Link = mysql_connect(mysite.com, db_user, db_password)
 or die (SL1-.mysql_errno().: .mysql_error());
mysql_select_db (db_name, $Link)
   or die (SL2-.mysql_errno().: .mysql_error());

/* update Counter Table */
$UpdateCounter = UPDATE Counter SET Ct=Ct+1 WHERE WHERE Img = '${Img}';
mysql_query($UpdateCounter, $Link);

/* get Img data */
$Query = SELECT ImgType, ImgData FROM Photos WHERE Img = '${Img}';
$Results = mysql_query($Query, $Link)
 or die (SL3-.mysql_errno().: .mysql_error());
$Num_rows = mysql_num_rows($Results);

if ($Num_rows==1) {
$ImgType = mysql_result($Results,0,ImgType);
$ImgData = mysql_result($Results,0,ThmData);
header(Content-Type:  . $ImgType);
echo $ImgData;
}
?







Jason Wong wrote:

 On Friday 08 February 2002 16:26, phantom wrote:
  I have this really cool script that grabs image data stored in a mysql
  bin field and echo's the data into an image file.
 
  01: /* QUERY DB AND LOAD IMAGE DATA */
  02: /* must get values for ImgType and ThmData */
  03: $Results = mysql_query($Query, $Link)
  04: or die (SL3-.mysql_errno().: .mysql_error());
  05: $Num_rows = mysql_num_rows($Results);
  06: if ($Num_rows==1) { // show image;
  07: $ImgType = mysql_result($Results,0,ImgType);
  08: $ThmData = mysql_result($Results,0,ThmData);
  09: header(Content-Type:  . $ImgType); //$ImgType shoud be
  image/jpeg;
  10: echo $ThmData;
  11:}
 
  However, I have a simple mysql database counter that counts how many
  times this image is loaded.  $UpdateQuery = UPDATE Counter SET Ct=Ct=1
  WHERE Img = '${Img}';

 Where is this query being used? You're not inadvertently using it twice?
 Could you post the complete code?

  However everytime I run this script the counter increments by 2 (not
  1).  G.
 
  After dicing this script up, the line that is suspect is Line 09:
 
  If I comment out this line (Line 09), the counter increments properly
  (by 1).
 
  If I comment out Line 10 and leave Line 09 in, the counter increases by
  2 and the image fails to display.  Also Line 09 echos the URL of the
  image.  Could this URL be resubmitting the script again, thus
  incrementing the counter an extra count???

 I don't see how it can resubmit your script again, it's not using Location:.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk

 /*
 The future isn't what it used to be.  (It never was.)
 */


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




Re: [PHP] RE: Creating Tab-Delimited Text File

2002-02-08 Thread Peter Janett

To make it download, use header to set your content type:
header(Content-type: text/tab-separated-values\n\n);

Make sure the above is the first this the script outputs, and the only other
thing it outputs is data.

Take your code that spits out the data in html, strip out all the html, then
separate the values with a tab (\t), and a carriage return at the end.
So, while looping through the results:
print $db_1\t$db_2\t$db_3\r;

That gives you tab separated data, with one row per line.

HTH,

Peter Janett

  ~~ New Media One Web Services ~~
Web Hosting for Web Developers

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.0.6, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882

- Original Message -
From: Phillip S. Baker [EMAIL PROTECTED]
To: PHP Email List [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 2:54 PM
Subject: Re: [PHP] RE: Creating Tab-Delimited Text File


 At 01:42 PM 2/7/2002, Andrew Chase wrote:
 Which part are you having trouble with, specifically?  The task as you've
 described it is very straightforward, almost pseudo-code. :)
 
 -Andy

 I know very well how to do the Db query and then loop through the results
 to display the info on an HTML page.
 However I have not done the part about actually creating a new file in the
 text format make sure the results are tab-delimited and then make it
 available for download.

 Can you help me with that part specifically?

 Thanks
 Phillip


   -Original Message-
   From: Phillip S. Baker [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, February 07, 2002 12:32 PM
   To: PHP Email List
   Subject: Creating Tab-Delimited Text File
  
  
   Greetings All,
  
   What I want to do is create a tab-delimited text file for download
from
   records in a database.
   I am not sure on how to do this.
  
   So what I want to do is as follows.
   ON a page a button is clicked.
   Script is activated that pulls records from a database.
From these records a tab-delimited text file is created.
   A save dialogue box appears so the user to save the text file to
   his harddrive.
  
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 Blessings

 Phillip

 Those who give up essential liberty for a little safety,
 deserve neither liberty nor safety.
  - Ben Franklin


 --
 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] horde/imp/sendmail/cyrus

2002-02-08 Thread K H Pang

can anyone help? I am getting the error below:

object(db_error)(10) {
  [error_message_prefix]=
  string(0) 
  [error_prepend]=
  string(0) 
  [error_append]=
  string(0) 
  [mode]=
  int(1)
  [level]=
  int(1024)
  [code]=
  int(-24)
  [message]=
  string(24) DB Error: connect failed
  [debuginfo]=
  string(0) 
  [userinfo]=
  string(86)  [nativecode=Access denied for user: 'horde@localhost' (Using
password: YES)] ** Array
  [callback]=
  NULL
}
[/var/www/html/horde/lib/Prefs/sql.php : 102]


I am attempting this on redhat 7.2,  trying to get the webmail working with
horde2.0, imp3.0, php4.0.6 with mysql support  cyrus as my mta.  The test
page works fine, however when I attempt to logon to the mail server through
imp, I am getting the above...




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




Re: [PHP] Full source

2002-02-08 Thread Jason Wong

On Friday 08 February 2002 17:03, phantom wrote:

 ?
 header(Cache-Control: public);
 header(Cache-Control: max-age= . $this-allowcache_expire * 60);

 $Link = mysql_connect(mysite.com, db_user, db_password)
  or die (SL1-.mysql_errno().: .mysql_error());
 mysql_select_db (db_name, $Link)
or die (SL2-.mysql_errno().: .mysql_error());

 /* update Counter Table */
 $UpdateCounter = UPDATE Counter SET Ct=Ct+1 WHERE WHERE Img = '${Img}';

Why have you got WHERE WHERE? Is it a typo?


 mysql_query($UpdateCounter, $Link);

 /* get Img data */
 $Query = SELECT ImgType, ImgData FROM Photos WHERE Img = '${Img}';
 $Results = mysql_query($Query, $Link)
  or die (SL3-.mysql_errno().: .mysql_error());
 $Num_rows = mysql_num_rows($Results);

 if ($Num_rows==1) {
 $ImgType = mysql_result($Results,0,ImgType);
 $ImgData = mysql_result($Results,0,ThmData);
 header(Content-Type:  . $ImgType);
 echo $ImgData;
 }
 ?


Is this copy  paste direct from your source-code? If so, you have a problem 
with your query:

   $Query = SELECT ImgType, ImgData FROM Photos WHERE Img = '${Img}';

You're selecting ImgType  ImgData. But here

$ImgData = mysql_result($Results,0,ThmData);

you're trying to get ThmData from the results.


But that still doesn't explain why your counter is increasing by 2 :(



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If the King's English was good enough for Jesus, it's good enough for me!
-- Ma Ferguson, Governor of Texas (circa 1920)
*/

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




Re: [PHP] call stack

2002-02-08 Thread S.Murali Krishna


I had a similar requierment. When I searched for it, came to know about
APD ( Advanced PHP Debugger ) its a extension. We need to do some confs in
php.ini for this. APD is somewhat better in tracing stacks.

Try your best.
[EMAIL PROTECTED]

On Fri, 8 Feb 2002, Martin Towell wrote:

 I know this comes up again, and again, and I'm bringing it up again now :)
 There's been requests for a function that displays the current heirachy of
 calls
 I was just thinking about this - php must maintain a stack so that it knows
 what function to return to when another function exits, why can't something
 display this stack - or doesn't this stack contain that type of information?
 
 Is this the right mailing list - maybe I should have sent it to php-dev ???
 
 Martin
 


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




[PHP] Ca$h

2002-02-08 Thread Constantin Baciu

Go to www.nitroclicks.com/join.phtml?referred=johndoe1104 and make lots of
money!



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




Re: [PHP] Web Hosts and PHP 4.10 +

2002-02-08 Thread Neil Freeman

I have a feeling that www.aletia.com use 4.1.1

Don't quote me on that though :)

Neil

Edward Marczak wrote:

 I know the subject of web hosts that support PHP comes up frequently - but
 here's a twist:

 After going through the archives, and checking out many, many hosts, I
 haven't found a web host that is up to PHP 4.10 or better.  Most seem stuck
 at 4.04 or, at best, 4.06.

 Since 4.10 made some important changes/improvments, (and most of my code
 already takes advantage of this), I'd like to find a host supporting 4.10
 and MySQL.

 I understand I could run a dedicated server, but I'm trying to save that as
 a last resort right now.

 Any recommendations?  Thanks.
 --
 Ed Marczak
 [EMAIL PROTECTED]

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

 ***
  This message was virus checked with: SAVI 3.53 Jan 2002
  last updated 30th January 2002
 ***

--

 Email:  [EMAIL PROTECTED]
 [EMAIL PROTECTED]




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




[PHP] Supplement and corrections

2002-02-08 Thread Alexandr Klaus

At sending e-mail there is not a big problem.
It is necessary the sender (field From) and the addressee (field To) to
code, receive so-called encoded-words (RFC 2047).

For example from record
To: ÷ÁÓÑ, ÐÒÏÇÒÁÍÍÉÓÔ [EMAIL PROTECTED]
to receive such as
To: =? koi8-r? B? 8y7h7OXr8 Xl9w ==? = [EMAIL PROTECTED]

The question: there are functions for translation words in encoded-words?

--
Alexandr Klaus



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




Re: [PHP] Web Hosts and PHP 4.10 +

2002-02-08 Thread linux

http://www.acilhost.com/en/index.php

Here you can find what you need.

They also offer custom solutions with the lowest prices in the
world...

On Fri, 08 Feb 2002 11:04:32 +, Neil Freeman wrote:
I have a feeling that www.aletia.com use 4.1.1

Edward Marczak wrote:

already takes advantage of this), I'd like to find a host
supporting 4.10
and MySQL.




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




RE: [PHP] HTTP_POST_VARS problem

2002-02-08 Thread Tim Ward

Make the name of the select an array
e.g. select name='selection[]' ...

then ...
foreach($HTTP_POST_VARS[selection] as $selection)

Tim
www.chessish.com http://www.chessish.com 

--
From:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:  08 February 2002 02:47
To:  [EMAIL PROTECTED]
Subject:  Re: [PHP] HTTP_POST_VARS problem

Please ignore my question - I just figured it out. I had the
method=post
in the input type=submit tag rather than in the form tag. It
works!

However, if one has an HTML select/option menu scrolling list with
multiple
selections, how does one get the number of values for the same name
with
HTTP_POST_VARS? Or how does one scroll through the list of choices
passed?
Thanks,

Eurico

[EMAIL PROTECTED] wrote:

 Hi. I'm a newbie at this and am having problems understanding how
this
 works.

 I have a form with method=post. The server program does display
 REQUEST_STRING as I expect (e.g., choice=yes but displaying
 HTTP_POST_VARS[choice] is null). However, displaying
 HTTP_GET_VARS[choice] does display yes. Running phpinfo()
displays
 that the REQUEST_METHOD = GET. Why is this GET and how do I get it
set
 to POST? How do I get HTTP_POST_VARS to work since my form does
have
 method=post?

 Here are some php.ini settings (I'm running PHP 4.1.1 with Apache
1.3.22

 under Win98):

 variables_order = EGPCS
 register_globals = On
 register_argc_argv = On
 gpc_order = GPC

 Thanks...

 Eurico
 [EMAIL PROTECTED]

 --
 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] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-08 Thread * RzE:

Hi folks,

I don't know if everyone ever knew this, but I haven't been able to
find anything about this, anywhere...

odbc_execute has a very dangerous 'feature'. I would like to call it
a bug, because someone has implemented it on purpose I should call
it a feature...

odbc_execute takes two arguments; the odbc result-ID, and
an array containing the parameters for this statement. So far so
good. Works perfectly. In the parameters you can put any data. Any
data! So you can enter characters like eg. , *, %... you name it.
You can also enter single quotes ('). Nice. Noop... not nice. If you
put a single quote at the start of the parameter and at the end PHP
does something very scary... it reads the _file_(!) and stores it in
the database. So if you would have a parameter:

'myname'

you would get an error telling you that the file myname couldn't
be opened. But... if you use this parameter:

'/etc/passwd'

No problem! The contents of your password file is stored in the
database. Any file readable for your webserver can be 'used' this
way. Any file!

So, imagine you have some site containing a textarea input in the
form, some user can easily type:

'/etc/passwd'

and then submit the form. When you also have the possibility on this
site for the user to take a look at the data he entered (and this is
a very common feature), he gets to see the contents of your password
file. And he can do this with any file(). As long as it's
readable for the webserver, users can very easily get the contents
of the file!

And... is it documented? NO Nowhere. Not the mailinglists, not
the documentation, not the bugreport, not even in the sources
itself. It's just there!

Some security huh?!

-- 

* RzE:

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




RE: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-08 Thread Jerry Verhoef (UGBI)

This is what we call a BUG

Report it on http://bugs.php.net 

thx

 -Original Message-
 From: * RzE: [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 1:44 PM
 To: PHP General Mailinglist
 Subject: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!
 
 
 Hi folks,
 
 I don't know if everyone ever knew this, but I haven't been able to
 find anything about this, anywhere...
 
 odbc_execute has a very dangerous 'feature'. I would like to call it
 a bug, because someone has implemented it on purpose I should call
 it a feature...
 
 odbc_execute takes two arguments; the odbc result-ID, and
 an array containing the parameters for this statement. So far so
 good. Works perfectly. In the parameters you can put any data. Any
 data! So you can enter characters like eg. , *, %... you name it.
 You can also enter single quotes ('). Nice. Noop... not nice. If you
 put a single quote at the start of the parameter and at the end PHP
 does something very scary... it reads the _file_(!) and stores it in
 the database. So if you would have a parameter:
 
   'myname'
 
 you would get an error telling you that the file myname couldn't
 be opened. But... if you use this parameter:
 
   '/etc/passwd'
 
 No problem! The contents of your password file is stored in the
 database. Any file readable for your webserver can be 'used' this
 way. Any file!
 
 So, imagine you have some site containing a textarea input in the
 form, some user can easily type:
 
   '/etc/passwd'
 
 and then submit the form. When you also have the possibility on this
 site for the user to take a look at the data he entered (and this is
 a very common feature), he gets to see the contents of your password
 file. And he can do this with any file(). As long as it's
 readable for the webserver, users can very easily get the contents
 of the file!
 
 And... is it documented? NO Nowhere. Not the mailinglists, not
 the documentation, not the bugreport, not even in the sources
 itself. It's just there!
 
 Some security huh?!
 
 -- 
 
 * RzE:
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-08 Thread * RzE:

Usually I would agree with you. Like I wrote in my message, I would
like to call it a bug, but it was written on purpose. That would
make it a feature!?!
It's an if-block of app. 20 lines that makes sure this happens.
Looks like someone _really_ wanted PHP to do this...

 This is what we call a BUG
 
 Report it on http://bugs.php.net 
 
 thx
 

-- 

* RzE:

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




Re: [PHP] How to find out what country the visitor comes from

2002-02-08 Thread Jon Farmer

One you have the IP you need to do a whois on the RIPE database to work out
who the IP is assigned to and which country they are in.


--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969
PGP Key available, send email with subject: Send PGP Key

- Original Message -
From: SED [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 12:11 PM
Subject: [PHP] How to find out what country the visitor comes from


 Hi,

 I'm trying to find out what country the visitor comes from to offer them
 suitable language (like google.com does) but I haven't found a method
 that works 100%. What I have come up with so far is to use

 $HTTP_X_FORWARDED_FOR

 or

 gethostbyaddr($REMOTE_ADDR)

 Sometime I get domain which does the job (and that works) but often I
 get just IP number which leaves me out in the cold. Is there any other
 way to capture the visitors country?

 Thanks,
 SED



 --
 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] Mcrypt-problems

2002-02-08 Thread Trond Arve Nordheim

Hi!

I'm trying to encrypt some password using TripleDES-encryption here...
I've followed the documentation for the mcrypt-libraries, but I get a
warning (all though it -does- encrypt the text) every time I try to
encrypt something;

Warning: attempt to use an empty IV, which is NOT recommend

My encrypt line looks like this:
$crypted_password = mcrypt_ecb(MCRYPT_TripleDES, secret key, $password, 
MCRYPT_ENCRYPT);

If I echo bin2hex($crypted_password) i get output, so it seems to
work... I'd just like to know why this warning appears...

I'm using Apache 1.3.23, php 4.1.1. Here's the mcrypt version
information:
Mcrypt v.2.5.10 (i686-pc-linux-gnu)
Linked against libmcrypt v.2.4
(the mcrypt-packages are the current available libmcrypt/mcrypt-packages
 in debian testing)

-- 
Trond Arve Nordheim
 - This message is ROT13-encrypted twice for extra security.


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




[PHP] Stripping the first line of a file

2002-02-08 Thread Scott

Hi,

I want to be able to open a file and then strip the first line of it off.  
Example, the first line contains the names for tables in a database and 
all I need is from the second line on.  

if I fopen a file can I strip the line or should I process it and then 
drop the data from the first row?

Thanks,
-Scott


-- 



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




Re: [PHP] How to find out what country the visitor comes from

2002-02-08 Thread bvr



The way Google determines what language to use is by checking the
Accept-Language header which is added by your browser.

The value of this request header is stored automatically in the $_SERVER
array. Check with phpinfo() or print_r($_SERVER);

Although IP may be more reliable to determine the local language of the 
visitor's country, it may not at all be the *preferred* language of the visitor.

This way the user still has full control over what language is used through
browser settings.

bvr.


On Fri, 8 Feb 2002 12:56:52 -, Jon Farmer wrote:

One you have the IP you need to do a whois on the RIPE database to work out
who the IP is assigned to and which country they are in.

 I'm trying to find out what country the visitor comes from to offer them
 suitable language (like google.com does) but I haven't found a method
 that works 100%. What I have come up with so far is to use

 $HTTP_X_FORWARDED_FOR

 or

 gethostbyaddr($REMOTE_ADDR)

 Sometime I get domain which does the job (and that works) but often I
 get just IP number which leaves me out in the cold. Is there any other
 way to capture the visitors country?




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




RE: [PHP] Stripping the first line of a file

2002-02-08 Thread Jerry Verhoef (UGBI)

Use 


$aFile=file(FILENAME);

//$aFile[0] contains the unwanted line
echo $aFile[1]; // displays line 2
echo $aFile[n]; // displays line n where n is an positieve interger and not
greater then the number of lines in the file

http://www.php.net/manual/en/function.file.php

HTH
Jerry


 -Original Message-
 From: Scott [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 4:02 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Stripping the first line of a file
 
 
 Hi,
 
 I want to be able to open a file and then strip the first 
 line of it off.  
 Example, the first line contains the names for tables in a 
 database and 
 all I need is from the second line on.  
 
 if I fopen a file can I strip the line or should I process it 
 and then 
 drop the data from the first row?
 
 Thanks,
 -Scott
 
 
 -- 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




RE: [PHP] Stripping the first line of a file

2002-02-08 Thread Scott

Thank you!  Works.  I have a few more questions!  I am working on 
converting a program from perl to PHP as it is the new language of choice
at our office.

I have been using printf statements in perl to format data.  Is there a 
similar funtion in php?  Here is an example from the perl program:

printf NEW  (%-5.5s,$fields[14]);

This will print exactly 5 characters, I also use this format to make sure
the lines are exactly 255 characters long:

printf NEW  (%-193.193s);

Is there something similar in php.  Thanks for everyone's help and 
patience.

-Scott






On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote:
 $aFile=file(FILENAME);
 
 //$aFile[0] contains the unwanted line
 echo $aFile[1]; // displays line 2
 echo $aFile[n]; // displays line n where n is an positieve interger and not
 greater then the number of lines in the file


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




RE: [PHP] Stripping the first line of a file

2002-02-08 Thread Jerry Verhoef (UGBI)

Yes there is!

Try reading the manual?
http://www.php.net/printf

printf (%-5.5s,$fields[14]);

for the other function to make a line exactly 255 char long? Do you have the
perl Example?

HTH
Jerry
 -Original Message-
 From: Scott [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 4:22 PM
 To: Jerry Verhoef (UGBI)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Stripping the first line of a file
 
 
 Thank you!  Works.  I have a few more questions!  I am working on 
 converting a program from perl to PHP as it is the new 
 language of choice
 at our office.
 
 I have been using printf statements in perl to format data.  
 Is there a 
 similar funtion in php?  Here is an example from the perl program:
 
 printf NEW(%-5.5s,$fields[14]);
 
 This will print exactly 5 characters, I also use this format 
 to make sure
 the lines are exactly 255 characters long:
 
 printf NEW(%-193.193s);
 
 Is there something similar in php.  Thanks for everyone's help and 
 patience.
 
 -Scott
 
 
 
 
 
 
 On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote:
  $aFile=file(FILENAME);
  
  //$aFile[0] contains the unwanted line
  echo $aFile[1]; // displays line 2
  echo $aFile[n]; // displays line n where n is an positieve 
 interger and not
  greater then the number of lines in the file
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




RE: [PHP] Stripping the first line of a file

2002-02-08 Thread Jerry Verhoef (UGBI)

printf NEW  (%-193.193s);

printf (%-193.193s,VARIABLE);

HTH

 -Original Message-
 From: Jerry Verhoef (UGBI) [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 4:35 PM
 To: 'Scott'; Jerry Verhoef (UGBI)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Stripping the first line of a file
 
 
 Yes there is!
 
 Try reading the manual?
 http://www.php.net/printf
 
 printf (%-5.5s,$fields[14]);
 
 for the other function to make a line exactly 255 char long? 
 Do you have the
 perl Example?
 
 HTH
 Jerry
  -Original Message-
  From: Scott [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 08, 2002 4:22 PM
  To: Jerry Verhoef (UGBI)
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] Stripping the first line of a file
  
  
  Thank you!  Works.  I have a few more questions!  I am working on 
  converting a program from perl to PHP as it is the new 
  language of choice
  at our office.
  
  I have been using printf statements in perl to format data.  
  Is there a 
  similar funtion in php?  Here is an example from the perl program:
  
  printf NEW  (%-5.5s,$fields[14]);
  
  This will print exactly 5 characters, I also use this format 
  to make sure
  the lines are exactly 255 characters long:
  
  printf NEW  (%-193.193s);
  
  Is there something similar in php.  Thanks for everyone's help and 
  patience.
  
  -Scott
  
  
  
  
  
  
  On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote:
   $aFile=file(FILENAME);
   
   //$aFile[0] contains the unwanted line
   echo $aFile[1]; // displays line 2
   echo $aFile[n]; // displays line n where n is an positieve 
  interger and not
   greater then the number of lines in the file
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 The information contained in this email is confidential and
 may be legally privileged. It is intended solely for the 
 addressee. Access to this email by anyone else is 
 unauthorized. If you are not the intended recipient, any 
 form of disclosure, production, distribution or any action 
 taken or refrained from in reliance on it, is prohibited and 
 may be unlawful. Please notify the sender immediately.
 
 The content of the email is not legally binding unless 
 confirmed by letter bearing two authorized signatures.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




RE: [PHP] Stripping the first line of a file

2002-02-08 Thread Scott

Thanks Jerry!

In perl I was doing this:
printf NEW  (%-193.193s);

Which I just read the manual and discovered it works in PHP as well.  
Basically prints 193 spaces to make sure the line is 255 after I filled
the line with other characters.



On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote:
 Yes there is!
 Try reading the manual?
 http://www.php.net/printf
 printf (%-5.5s,$fields[14]);
 for the other function to make a line exactly 255 char long? Do you have the
 perl Example?



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




[PHP] check this new site

2002-02-08 Thread Sagar Chand

hi all out there,

just tell me howz this new site
www.linuxfornerds.com
A site meant for ardent linux lovers but every one r
invited to post any views on any open source software.
so get ur voice out

/sagar

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: [PHP] check this new site

2002-02-08 Thread JSheble


looks like every other SLashdot, PHP-Nuke or PHP-Mutant web site out there 
with,just a lot less content...

At 07:52 AM 2/8/2002 -0800, Sagar Chand wrote:
hi all out there,

just tell me howz this new site
www.linuxfornerds.com
A site meant for ardent linux lovers but every one r
invited to post any views on any open source software.
so get ur voice out

/sagar

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.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




[PHP] does header(Location: n) work on non-browser agents?

2002-02-08 Thread Erik Price

My site uses a scheme whereby a session variable (say, $logged_in) is 
checked for.  If the variable is not set to 1, then header(Location: 
./index.php) is used to redirect the browser to index.php, where they 
are offered an opportunity to log in (setting the session variable 
$logged_in to 1).

But then I thought to myself, could this page still be accessed by a 
script or a spider, or some other agent besides a browser?  I don't know 
much about how HTTP works, but I am wondering if this is an adequate 
means of protecting my site from unlogged-in visitors.

TIA,

Erik







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] check this new site

2002-02-08 Thread Jerry Verhoef (UGBI)

LOL

And i just thought it looked like spam Sorry my mistake :)

 -Original Message-
 From: JSheble [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 5:09 PM
 To: php list
 Subject: Re: [PHP] check this new site
 
 
 
 looks like every other SLashdot, PHP-Nuke or PHP-Mutant web 
 site out there 
 with,just a lot less content...
 
 At 07:52 AM 2/8/2002 -0800, Sagar Chand wrote:
 hi all out there,
 
 just tell me howz this new site
 www.linuxfornerds.com
 A site meant for ardent linux lovers but every one r
 invited to post any views on any open source software.
 so get ur voice out
 
 /sagar
 
 __
 Do You Yahoo!?
 Send FREE Valentine eCards with Yahoo! Greetings!
 http://greetings.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
 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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




Re: [PHP] Regex function needed

2002-02-08 Thread Michael Kimsal

Bas Jobsen wrote:
 Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal:
 
Looking for a regex (preg or ereg) to remove
all 1, 2 and 3 character words.

 
 ?
 $string=over deze regex loop ik nu al de hele dag en een uur te piekeren. 't 
 wil niet! of wel! l'a.;
 $string= .$string;
 while (preg_match(/\W\w{1,3}\W/i,$string))
 $string = preg_replace(/\W\w{1,3}\W/i,  , $string); 
 $string=substr($string,1);
 echo $string;
 ?
 



This looks like it should do the trick - thank you.

And thanks to everyone else who replied as well!



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




RE: [PHP] determining script url

2002-02-08 Thread sean

Thanks for the response, but those are just like $DOCUMENT_ROOT, they provide paths in 
the server, I need what is showing up as the URL in the browser - i.e. 
http://www.domain.com/script.php - or if there is no domain, to give me the IP.

any ideas? I can't seem to piece it together with the info from phpinfo() either.

It's so aggravating because the value of what I'm looking for is right on screen, but 
I can't get the php to notice!

Thanks,
Sean

My response for those vars was:
$SCRIPT_NAME: /cgi-bin/php4.cgi
$SCRIPT_FILENAME: /u/httpd/cgi-bin/php4.cgi

-Original Message-
From: Matt Williams [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:00 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] determining script url 


 Hi all,
 How can I get the full URL of the currently running script? 
 $DOCUMENT_ROOT is not what I need, instead I need the url (be it 
 domain if exists, or ip if not).  $SERVER_NAME works but if a 
 domain isn't paired with the server, I could get some useless 
 information (right?).

$SCRIPT_NAME or $SCRIPT_FILENAME

See http://uk.php.net/manual/en/language.variables.predefined.php

For more details

m:


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




[PHP] Trying to put ips into database

2002-02-08 Thread Leif K-Brooks

I'm trying:
$query = mysql_query(select COUNT(*) as rowexists from ips where ip =
'$REMOTE_ADDR');
$result = mysql_fetch_array($query);
if($result['rowexists'] == false){
mysql_query(INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR'));
}


But it keeps putting the ip into tthe array, even if it's already there, and
it only gets the first section of the ip!  What am I doing wrong? 



[PHP] Re: !isset ??

2002-02-08 Thread LaserJetter

If you try and use $var in an operation ( i.e.  .=   == etc) and you
get an error saying Undefined variable then isset($var) = FALSE


LJ


Erik Price [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hm.  I hope I'm not opening an old wound:

 Curious about the proper way to test for the existence of a variable, I
 decided to read up on isset() at php.net's function manual pages.  It
 seems at first to be a way to test whether or not a variable has been
 set.

 But reading the annotations below the documentation is mind boggling.
 Back and forth, it seems to go -- and then to find out that one method
 is to be used to test for POSTed variables, and another to be used for
 GETted variables (for $_POST, use $_POST['var'] !='' , and for $_GET,
 use !isset($_GET['var'])).

 Pretty confusing.  Can anyone shed some light on whether or not there is
 a final definite way to do this?  I've used (!($_POST['var'])) with no
 problems in the past, but does good coding style suggest that I use
 (!isset($_POST['var'])) now?


 Erik





 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]




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




[PHP] how to get js screenresolution passed to a sessionvariable?

2002-02-08 Thread Simon De Deyne

hi,
I am trying to get the screenresolution passed from a javascript
variable to a  PHP variable using sessionvariables, but I can't get it to work,
can you help me out to get some code working?

I was thinking of something like this, but I'm pretty much a newbie
at lots of things, so I'm sure this can be a piece'a cake. Thanks.
Simon

//put the form value in a sessionvariable
session_register('Resolutionx');

//use a hiddenvalue in which js writes the x-resolution
form name=anotherName
input type=hidden name=Resolutionx value=0

//get the resolution
script language=JavaScript!--
x=screen.width;
document.anotherName.Resolutionx.value = x;
//--/script


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




[PHP] Checking to see it a host is up.

2002-02-08 Thread Fifield, Mike

I am looking for  a way to check to see if a website is up, something like a
ping command. Does anyone know of a way to do this?

Mike Fifield
Charles Schwab  Co, Inc.
WARNING: All e-mail sent to or from this address will be received by the
Charles Schwab corporate e-mail system and is subject to archival and review
by someone other than the recipient.



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




[PHP] Fwd: confirm unsubscribe from php-general@lists.php.net

2002-02-08 Thread Carlos René Ponce Novelo




_
MSN Photos es la manera más sencilla de compartir e imprimir sus fotos: 
http://photos.latam.msn.com/Support/WorldWide.aspx


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




Re: [PHP] determining script url

2002-02-08 Thread bvr



I'd say you should store the base url of your site in a variable somewhere.

then append the REQUEST_URI and you have the url.

or ..

you take the SERVER_NAME, SERVER_PORT and REQUEST_URI .. 
and you might need some other variables to make it recognize SSL and
prefix with httpS ..

bvr.


How can I get the full URL of the currently running script? $DOCUMENT_ROOT is not 
what I need, instead I need the url (be it domain if exists, or ip if not).  
$SERVER_NAME works but if a domain isn't paired with the server, I could get some 
useless 
information (right?).







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




[PHP] Checking to see it a host is up.

2002-02-08 Thread Fifield, Mike

Ok let me be more specific. I know I could do this with perl but it is going
to be used on a page that will be loaded hundreds of times a minute, and so
it needs to be fast. I was hoping that php had a function that could be used
to do this, something like perl's webping.

-Original Message-
From: Fifield, Mike [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Checking to see it a host is up.


I am looking for  a way to check to see if a website is up, something like a
ping command. Does anyone know of a way to do this?

Mike Fifield
Charles Schwab  Co, Inc.
WARNING: All e-mail sent to or from this address will be received by the
Charles Schwab corporate e-mail system and is subject to archival and review
by someone other than the recipient.



-- 
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] Newbie Question about PHP / MySQL

2002-02-08 Thread Ron Clark

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello All:

  How do I read all of the data from just one column, then develop a
count based on those items? I think I start with mysql_fetch_field(),
but right there I get stuck. Any ideas to point me in the right
direction?

Thanks in advance,
Ron C.


-BEGIN PGP SIGNATURE-
Version: PGP 7.1

iQA/AwUBPGQIlESpEYIqgLQzEQIzeQCg/JWV1gTtsr0msG3FyUsLK3oaHL8AoNls
m6KXlfmfZPhEIJOdvTX4VBRw
=71Ww
-END PGP SIGNATURE-




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




RE: [PHP] Newbie Question about PHP / MySQL

2002-02-08 Thread Rick Emery

SELECT COUNT(col_name) FROM mytable WHERE some condition

This will return the number of items with that condition in that columne,
name col_name

-Original Message-
From: Ron Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 11:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie Question about PHP / MySQL


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello All:

  How do I read all of the data from just one column, then develop a
count based on those items? I think I start with mysql_fetch_field(),
but right there I get stuck. Any ideas to point me in the right
direction?

Thanks in advance,
Ron C.


-BEGIN PGP SIGNATURE-
Version: PGP 7.1

iQA/AwUBPGQIlESpEYIqgLQzEQIzeQCg/JWV1gTtsr0msG3FyUsLK3oaHL8AoNls
m6KXlfmfZPhEIJOdvTX4VBRw
=71Ww
-END PGP SIGNATURE-




-- 
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] Count concarent logins (newbie)

2002-02-08 Thread Simos

Hello to everyone 

in A web site where logins are managed with php sesions
is it possible to count how many concurent users are loged in ??

I believe that one way is to keep in a mysql table every login
user but how can i delete a loged-in record when user session 
terminates abnormal 

thank you in advance for your help + time

best regards

simos

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




Re: [PHP] Trying to put ips into database

2002-02-08 Thread Dennis Moore

Not sure what your exact problem is but I did notice you had back ticks(`)
in your insert statement.  You should be using (').   You may need a where
clause in your insrt statement unless you want to populate all rows.  Just a
couple of thoughts.

/dkm


- Original Message -
From: Leif K-Brooks [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 11:18 AM
Subject: [PHP] Trying to put ips into database


 I'm trying:
 $query = mysql_query(select COUNT(*) as rowexists from ips where ip =
 '$REMOTE_ADDR');
 $result = mysql_fetch_array($query);
 if($result['rowexists'] == false){
 mysql_query(INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR'));
 }


 But it keeps putting the ip into tthe array, even if it's already there,
and
 it only gets the first section of the ip!  What am I doing wrong?



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




Re: [PHP] Count concarent logins (newbie)

2002-02-08 Thread Dennis Moore


 in A web site where logins are managed with php sesions
 is it possible to count how many concurent users are loged in ??

 I believe that one way is to keep in a mysql table every login
 user but how can i delete a loged-in record when user session
 terminates abnormal


If you use the database, you many have to delete the session after a timeout
period.  Of course that means you you need to update the session table
everytime a page is opened..

/dkm



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




Re: [PHP] Trying to put ips into database

2002-02-08 Thread Matt Drake

On Fri, 8 Feb 2002, Dennis Moore wrote:

 Not sure what your exact problem is but I did notice you had back ticks(`)
 in your insert statement.  You should be using (').   You may need a where
 clause in your insrt statement unless you want to populate all rows.  Just a
 couple of thoughts.

Actually, you don't need quotes around the col. names at all...

mysql_query(INSERT INTO ips (ip) VALUES ('$REMOTE_ADDR'));

As for only getting the first part, are you sure the ip field is big enough?
Try explain ips from a mysql client...it should be at least 15 chars.

Matt


 /dkm


 - Original Message -
 From: Leif K-Brooks [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 08, 2002 11:18 AM
 Subject: [PHP] Trying to put ips into database


  I'm trying:
  $query = mysql_query(select COUNT(*) as rowexists from ips where ip =
  '$REMOTE_ADDR');
  $result = mysql_fetch_array($query);
  if($result['rowexists'] == false){
  mysql_query(INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR'));
  }
 
 
  But it keeps putting the ip into tthe array, even if it's already there,
 and
  it only gets the first section of the ip!  What am I doing wrong?
 


 --
 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] Using functions before they're defined

2002-02-08 Thread Ford, Mike [LSS]

 -Original Message-
 From: Martin Towell [mailto:[EMAIL PROTECTED]]
 Sent: 07 February 2002 22:17
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Using functions before they're defined
 
 I haven't looked at the php's source code, but maybe it's a 
 two pass parser
 (??)  first it gets all the functions then it executes the 
 code 

Executing the code is not parsing!!  Executing the code happens *after* it's been 
parsed.  So, yes, it's a two-stage process, but the stages are parsing and executing.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] Web Hosts and PHP 4.10 +

2002-02-08 Thread anders nawroth

From phpinfo at Aleita.com:
 
PHP Version 4.1.0 

System Linux cobra.nocdns.com 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 
unknown 
Build Date Dec 15 2001 
Configure Command  './configure' '--with-apache=../apache_1.3.22' '--with-mysql' 
'--with-gd' '--with-freetype' '--enable-track-vars' '--with-jpeg-dir=/usr' 
'--enable-ftp' '--enable-sockets' '--with-openssl=/usr' '--with-sysvshm' 
'--with-sysvsem' '--enable-i18n' '--enable-mbregex' '--with-imap' 
'--with-curl=/usr/local' '--with-kerberos=/usr/kerberos' '--with-zlib' '--with-ttf' 
Server API Apache 

But it still can be different on other machines at Aletia, I don't know.

Anders

- Ursprungligt meddelande - 
Från: Neil Freeman [EMAIL PROTECTED]
Till: Edward Marczak [EMAIL PROTECTED]
Kopia: [EMAIL PROTECTED]
Skickat: den 8 februari 2002 12:04
Ämne: Re: [PHP] Web Hosts and PHP 4.10 +


 I have a feeling that www.aletia.com use 4.1.1
 
 Don't quote me on that though :)
 
 Neil
 
 Edward Marczak wrote:
 
  I know the subject of web hosts that support PHP comes up frequently - but
  here's a twist:
 
  After going through the archives, and checking out many, many hosts, I
  haven't found a web host that is up to PHP 4.10 or better.  Most seem stuck
  at 4.04 or, at best, 4.06.
 
  Since 4.10 made some important changes/improvments, (and most of my code
  already takes advantage of this), I'd like to find a host supporting 4.10
  and MySQL.
 
  I understand I could run a dedicated server, but I'm trying to save that as
  a last resort right now.
 
  Any recommendations?  Thanks.
  --
  Ed Marczak
  [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  ***
   This message was virus checked with: SAVI 3.53 Jan 2002
   last updated 30th January 2002
  ***
 
 --
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 
 
 
 
 -- 
 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] Parameters via Link

2002-02-08 Thread Manuel Ritsch

Hey there

I want to make a webpage out of one main pagewith php, if you press on a
link i want that it changes the content of the page, but it doesn't seem to
work, i tried it like this...

link:

a href=index.php?link=home

php code:

if($link == home)
{
include'soundmp3.php';
}

but it doesn't work (i don't get an error, the content of soundmp3.php just
doesn't shows up).
Any Help is Welcome





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




Re: [PHP] eregi

2002-02-08 Thread DL Neil

Hello John

 I'm using eregi to print out parts of a text file, and I was just wondering 
 how you get the code to print out a newline as it appears in the file.


Not quite sure what eregi has to do with it - perhaps I'm missing something.

Would the nl2br function help?

=dn



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




[PHP] Syntax ???

2002-02-08 Thread Ron Clark

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello all again,

  Here is my line in my script:
$ynumber = mysql_query(SELECT COUNT(*) FROM responses WHERE
response=y);

But it returns a blank or empty. How do I convert this MySQL command
to PHP?
mysql SELECT COUNT(*) FROM responses WHERE response=y;

In other words, how do I specify the y at the end without messing
up PHP?

Thanks,
RC

-BEGIN PGP SIGNATURE-
Version: PGP 7.1

iQA/AwUBPGQbIESpEYIqgLQzEQJr4wCeNiIhqHZYloLJWsvNr2ODustuPU0AoPw6
ROvim3yCO9Z9GlyReg6pyMa9
=D1uC
-END PGP SIGNATURE-




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




Re: [PHP] Syntax ???

2002-02-08 Thread Edward van Bilderbeek - Bean IT

just quote the 'y' in your query:

$ynumber = mysql_query(SELECT COUNT(*) As Cnt FROM responses WHERE
response='y');

Edward

- Original Message -
From: Ron Clark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 7:38 PM
Subject: [PHP] Syntax ???


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hello all again,

   Here is my line in my script:
 $ynumber = mysql_query(SELECT COUNT(*) FROM responses WHERE
 response=y);

 But it returns a blank or empty. How do I convert this MySQL command
 to PHP?
 mysql SELECT COUNT(*) FROM responses WHERE response=y;

 In other words, how do I specify the y at the end without messing
 up PHP?

 Thanks,
 RC

 -BEGIN PGP SIGNATURE-
 Version: PGP 7.1

 iQA/AwUBPGQbIESpEYIqgLQzEQJr4wCeNiIhqHZYloLJWsvNr2ODustuPU0AoPw6
 ROvim3yCO9Z9GlyReg6pyMa9
 =D1uC
 -END PGP SIGNATURE-




 --
 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: DreamWeaver/PHP ability?

2002-02-08 Thread Dr. Shim

http://www.geocities.com/php4ud/

Seach google for php4ud

God bless google!







Matt Williams [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Luke Crouch wrote:

  I know Dreamweaver UltraDev has nice site management features
 for using a
  JSP/SQL type serverdoes it have similar capabilities with PHP/MySQL?
  Does anyone know?
 
  -L

Search the archives on this one.

There is a project called php4ud or something like that but I can't remember
the url.

I've never used it so I couldn't comment

m:




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




[PHP] Method writing quesion

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi everyone, 
quick Q on writing Methods on PHP:

If a methods purpose is to take 3 values and do stuff with those values,
should the error checking (eg. that the values dont='') be done /inside/
the Method or by the script that calls it?

It makes more sense to me to have all the error checking and validation
done /before/ passing it to the method as one of the concepts of classes
is that their methods are very simple and specific.

However, I wondered what you all thought on this?
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCTkHpvrrTa6L5oRAlNWAKCYFZPv5OCsfO5cNS0myXJpjeI+TwCgoOof
k1a/n+zDDmQG4Tj3qyLolwI=
=8x5W
-END PGP SIGNATURE-

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




[PHP] Php Projects

2002-02-08 Thread Arik Ashepa

Hi.
I was wondring...
maybe you want to develop a project?
have any ideas?

Arik


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




RE: [PHP] Parameters via Link

2002-02-08 Thread Rick Emery

try:
if( ! strcmp($link, home) )
{
include(soundmp3.php);
}

-Original Message-
From: Manuel Ritsch [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Parameters via Link


Hey there

I want to make a webpage out of one main pagewith php, if you press on a
link i want that it changes the content of the page, but it doesn't seem to
work, i tried it like this...

link:

a href=index.php?link=home

php code:

if($link == home)
{
include'soundmp3.php';
}

but it doesn't work (i don't get an error, the content of soundmp3.php just
doesn't shows up).
Any Help is Welcome





-- 
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] session register!!

2002-02-08 Thread Cristian Cerda

Hi there, hope you can help me with my problem.

I'm trying to set up a PHP/MySQL web site using session variables to
pass information between pages. So far no good.

I did set register_globals to On on the php.ini file. But when i use for
example session_register(the_var) in one page ( using session_start()
at the beginning), i don't get anything on the next page if i do echo
$the_var .

Don't know what's wrong, but my guess is i have something wrong with the
configuration as i copy/pasted most of the code.

I'm using OS X / WebSTAR V / PHP 4.0.6 as a CGI / MySQL

please help

Cristian



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




Re: [PHP] Parameters via Link

2002-02-08 Thread Jason Wong

On Saturday 09 February 2002 02:23, Manuel Ritsch wrote:
 Hey there

 I want to make a webpage out of one main pagewith php, if you press on a
 link i want that it changes the content of the page, but it doesn't seem to
 work, i tried it like this...

 link:

 a href=index.php?link=home

 php code:

 if($link == home)

if ($link == home);



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Trespassers will be shot.  Survivors will be SHOT AGAIN!
*/

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




Re: [PHP] session register!!

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Cristian Cerda declared
 Hi there, hope you can help me with my problem.
 
 I'm trying to set up a PHP/MySQL web site using session variables to
 pass information between pages. So far no good.
 
 I did set register_globals to On on the php.ini file. But when i use for
 example session_register(the_var) in one page ( using session_start()
 at the beginning), i don't get anything on the next page if i do echo
 $the_var .

Did you set your $the_var?

Like:

session_start();
session_register('the_var');

$the_var=is this the problem?;

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCj4HpvrrTa6L5oRAoQJAJ91jzJYx0KV9Su+8/aJuoIURDNEYACeINDf
StxfV0PhCeYfeGNWM17XFOM=
=1Rrm
-END PGP SIGNATURE-

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




Re: [PHP] Php Projects

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Arik Ashepa declared
 Hi.
 I was wondring...
 maybe you want to develop a project?
 have any ideas?

Yes! How about a database backed set of scripts to create world peace
and send a steady supply of beer to my house?

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCmLHpvrrTa6L5oRAk63AKCIidIl7jTdl9weiRbnJau/YVwCKQCcCukg
vfCBVeUKS8xMpnfderSjLXw=
=UDHe
-END PGP SIGNATURE-

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




Re: [PHP] determining script url

2002-02-08 Thread Jason Wong

On Saturday 09 February 2002 00:17, [EMAIL PROTECTED] wrote:
 Thanks for the response, but those are just like $DOCUMENT_ROOT, they
 provide paths in the server, I need what is showing up as the URL in the
 browser - i.e. http://www.domain.com/script.php - or if there is no domain,
 to give me the IP.

 any ideas? I can't seem to piece it together with the info from phpinfo()
 either.

 It's so aggravating because the value of what I'm looking for is right on
 screen, but I can't get the php to notice!


On my system (Apache + php module):

  'http://' . $HTTP_SERVER_VARS['HTTP_HOST'] . $PHP_SELF

gives the the url as displayed by the browser.

But you seem to be using php as CGI so YMMV.



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Life is a grand adventure -- or it is nothing.
-- Helen Keller
*/

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




RE: [PHP] Php Projects

2002-02-08 Thread Rick Emery

Do I detect a bit of Friday-afternoon sarcasm??? GRIN

Actually, a beer sounds good about now

-Original Message-
From: Nick Wilson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Php Projects


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Arik Ashepa declared
 Hi.
 I was wondring...
 maybe you want to develop a project?
 have any ideas?

Yes! How about a database backed set of scripts to create world peace
and send a steady supply of beer to my house?

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCmLHpvrrTa6L5oRAk63AKCIidIl7jTdl9weiRbnJau/YVwCKQCcCukg
vfCBVeUKS8xMpnfderSjLXw=
=UDHe
-END PGP SIGNATURE-

-- 
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 Projects

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Rick Emery declared
 Do I detect a bit of Friday-afternoon sarcasm??? GRIN
 
 Actually, a beer sounds good about now

Friday evening in .dk and php is always best served with a cold one!

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCu5HpvrrTa6L5oRAvdBAJwKRpIZZW8nxCKjITSddxJBjnueYQCffvbh
vtDHIextMtwMfXebV9+Bqkg=
=q8Kg
-END PGP SIGNATURE-

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




[PHP] templates

2002-02-08 Thread Kunal Jhunjhunwala

hey,
which is the best template library out there? does anyone have any
benchmarks? smarty? phplib? any others?
Regards,
Kunal Jhunjhunwala

Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought. - Clifford Stoll


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




Re: [PHP] templates

2002-02-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Kunal Jhunjhunwala declared
 hey,
 which is the best template library out there? does anyone have any
 benchmarks? smarty? phplib? any others?

Hehe, still messing with templates kunal?
There's a good article on PHPLib vs Fastemplate on either devshed or
phpbuilder but from what I've read PHPLib is the way forward.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8ZCyEHpvrrTa6L5oRAl4IAJ9HWbjF8fh4nwOV3AAlz2WSNwEbzwCcC6fz
3fuFP1328LE9SO2Iabj3jZk=
=NU8H
-END PGP SIGNATURE-

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




Re: [PHP] templates

2002-02-08 Thread Kunal Jhunjhunwala

Hey,
Well, I got phplib working.. but i yet think something is missing :) and
have heard a lot of buzz abt smarty... but havent seen any benchmarks...
from the article at devshed.. fast templates should have stayed with perl ;)

anyone else got any suggestions?
Regards,
Kunal Jhunjhunwala

Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought. - Clifford Stoll
- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
To: php-list [EMAIL PROTECTED]
Sent: Saturday, February 09, 2002 1:22 AM
Subject: Re: [PHP] templates


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then Kunal Jhunjhunwala declared
  hey,
  which is the best template library out there? does anyone have any
  benchmarks? smarty? phplib? any others?

 Hehe, still messing with templates kunal?
 There's a good article on PHPLib vs Fastemplate on either devshed or
 phpbuilder but from what I've read PHPLib is the way forward.
 - --

 Nick Wilson

 Tel: +45 3325 0688
 Fax: +45 3325 0677
 Web: www.explodingnet.com



 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)

 iD8DBQE8ZCyEHpvrrTa6L5oRAl4IAJ9HWbjF8fh4nwOV3AAlz2WSNwEbzwCcC6fz
 3fuFP1328LE9SO2Iabj3jZk=
 =NU8H
 -END PGP SIGNATURE-

 --
 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 Projects

2002-02-08 Thread Arik Ashepa

Nope, I'm serius, I have nothing better to do?
So, do you have any ideas?

Arik

Rick Emery wrote:

 Do I detect a bit of Friday-afternoon sarcasm??? GRIN
 
 Actually, a beer sounds good about now
 
 -Original Message-
 From: Nick Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 1:40 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Php Projects
 
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 
 * and then Arik Ashepa declared
 
Hi.
I was wondring...
maybe you want to develop a project?
have any ideas?

 
 Yes! How about a database backed set of scripts to create world peace
 and send a steady supply of beer to my house?
 
 - -- 
 
 Nick Wilson
 
 Tel:  +45 3325 0688
 Fax:  +45 3325 0677
 Web:  www.explodingnet.com
 
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)
 
 iD8DBQE8ZCmLHpvrrTa6L5oRAk63AKCIidIl7jTdl9weiRbnJau/YVwCKQCcCukg
 vfCBVeUKS8xMpnfderSjLXw=
 =UDHe
 -END PGP SIGNATURE-
 
 


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




Re: [PHP] Php Projects

2002-02-08 Thread mike cullerton

on 2/8/02 12:49 PM, Nick Wilson at [EMAIL PROTECTED] wrote:

 Do I detect a bit of Friday-afternoon sarcasm??? GRIN
 
 Actually, a beer sounds good about now
 
 Friday evening in .dk and php is always best served with a cold one!

reminds me of my days as a netadmin. playing with routers late on a friday
night after a few cold ones was always fun :)


 -- mike cullerton   michaelc at bakednotfried dot com



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




[PHP] attachment problem

2002-02-08 Thread Olev Rumm

Hello gurus, need some help here please.
I have mail php script with out attachment possibilities.
How can I add attachment in to this one? 


?
$MailToAddress = [EMAIL PROTECTED];
$MailSubject = subject;
if (!$MailFromAddress) {
$MailFromAddress = [EMAIL PROTECTED];
}
$Header = header;
$Footer = Footer;
?
html
body bgcolor=#FF
font face=Arialcenter
The following information has been delivered:
/center
?
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
echo  b$key/b = $valbr;
$Message .= $key = $val\n;
}
 
if ($Header) {
$Message = $Header.\n\n.$Message;
}

if ($Footer) {
$Message .= \n\n.$Footer;
}

mail( $MailToAddress, $MailSubject, $Message, From: $MailFromAddress);
?
/
last part I changed like this:
mail( $MailToAddress, $MailSubject, $Message, From: $MailFromAddress, 
$attachment);

and there are forms in my html:

FORM name=your_file value=200input name=attachment type=file
input type=text name=MailFromAddress
input type=submit value=Submit

/
I recieve the mail with all the req. fields, but attachment is not picked up,
instead it writes:
Attacment=c:\picture.gif 

So what is wrong?



Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-08 Thread Lars Torben Wilson

On Fri, 2002-02-08 at 04:43, * RzE: wrote:
 Hi folks,
 
 I don't know if everyone ever knew this, but I haven't been able to
 find anything about this, anywhere...
 
 odbc_execute has a very dangerous 'feature'. I would like to call it
 a bug, because someone has implemented it on purpose I should call
 it a feature...
 
 odbc_execute takes two arguments; the odbc result-ID, and
 an array containing the parameters for this statement. So far so
 good. Works perfectly. In the parameters you can put any data. Any
 data! So you can enter characters like eg. , *, %... you name it.
 You can also enter single quotes ('). Nice. Noop... not nice. If you
 put a single quote at the start of the parameter and at the end PHP
 does something very scary... it reads the _file_(!) and stores it in
 the database. So if you would have a parameter:
 
   'myname'
 
 you would get an error telling you that the file myname couldn't
 be opened. But... if you use this parameter:
 
   '/etc/passwd'
 
 No problem! The contents of your password file is stored in the
 database. Any file readable for your webserver can be 'used' this
 way. Any file!
 
 So, imagine you have some site containing a textarea input in the
 form, some user can easily type:
 
   '/etc/passwd'
 
 and then submit the form. When you also have the possibility on this
 site for the user to take a look at the data he entered (and this is
 a very common feature), he gets to see the contents of your password
 file. And he can do this with any file(). As long as it's
 readable for the webserver, users can very easily get the contents
 of the file!

*Always* validate your data. If you validate your data and never trust
anything which comes from the client side of the connection, your
problem goes away. I mean, you wouldn't pass user data to exec() 
or fopen() without some serious checking, would you? ;)

Sure, PHP could try to prevent every possible problem from cropping up,
but that would make the language pretty useless. It's up to the coder
to not program security flaws. 


-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




[PHP] Mail Sent Date

2002-02-08 Thread Pickup, Jordan

We are in the -0700 time zone but whenever I use PHP to send a message it
sends it from +0700 making the message appear to have been sent 14hours
earlier than it was.

 

I can add my own Date header to the mail function with the correct date/time
zone but that means I have to modify all my scripts.

 

Is this a known bug? Have I just made a stupid mistake? I did check to make
sure my server was in the right time zone. :-)

 

Does anyone know a solution?

 

Thanks.

 

Jordan




Re: [PHP] Fwd: confirm unsubscribe from php-general@lists.php.net

2002-02-08 Thread Carlos René Ponce Novelo






_
Hable con sus amigos en línea, pruebe MSN Messenger: http://messenger.msn.es


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




RE: [PHP] Mail Sent Date - more info

2002-02-08 Thread Pickup, Jordan

I just checked the Date function and when you use the 'O' or 'r':
   O - Difference to Greenwich time in hours; i.e. +0200 
   r - RFC 822 formatted date; i.e. Thu, 21 Dec 2000 16:01:07 +0200
it also gives the wrong time zone.

Is there anyway to tell PHP that it is wrong? Is this just a bug in PHP
4.0.4?

Jordan 


-Original Message-
From: Pickup, Jordan [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 08, 2002 1:40 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Mail Sent Date

We are in the -0700 time zone but whenever I use PHP to send a message it
sends it from +0700 making the message appear to have been sent 14hours
earlier than it was.

 

I can add my own Date header to the mail function with the correct date/time
zone but that means I have to modify all my scripts.

 

Is this a known bug? Have I just made a stupid mistake? I did check to make
sure my server was in the right time zone. :-)

 

Does anyone know a solution?

 

Thanks.

 

Jordan


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




Re: [PHP] session register!!

2002-02-08 Thread Cristian Cerda

yes i did.

Nick Wilson wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 * and then Cristian Cerda declared
  Hi there, hope you can help me with my problem.
 
  I'm trying to set up a PHP/MySQL web site using session variables to
  pass information between pages. So far no good.
 
  I did set register_globals to On on the php.ini file. But when i use for
  example session_register(the_var) in one page ( using session_start()
  at the beginning), i don't get anything on the next page if i do echo
  $the_var .

 Did you set your $the_var?

 Like:

 session_start();
 session_register('the_var');

 $the_var=is this the problem?;

 - --

 Nick Wilson

 Tel:+45 3325 0688
 Fax:+45 3325 0677
 Web:www.explodingnet.com

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)

 iD8DBQE8ZCj4HpvrrTa6L5oRAoQJAJ91jzJYx0KV9Su+8/aJuoIURDNEYACeINDf
 StxfV0PhCeYfeGNWM17XFOM=
 =1Rrm
 -END PGP SIGNATURE-

--
Cristián Cerda Pé
[EMAIL PROTECTED]

Impulsando Ltda.
www.impulsando.com
San Pio X 2460  of.604
Providencia - Santiago
Tel: (56 2) 3358978



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




Re: [PHP] Web Hosts and PHP 4.10 +

2002-02-08 Thread anders nawroth

Sorry, should spell aletia.com



From phpinfo at Aleita.com:
 
PHP Version 4.1.0 

System Linux cobra.nocdns.com 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 
unknown 
Build Date Dec 15 2001 
Configure Command  './configure' '--with-apache=../apache_1.3.22' '--with-mysql' 
'--with-gd' '--with-freetype' '--enable-track-vars' '--with-jpeg-dir=/usr' 
'--enable-ftp' '--enable-sockets' '--with-openssl=/usr' '--with-sysvshm' 
'--with-sysvsem' '--enable-i18n' '--enable-mbregex' '--with-imap' 
'--with-curl=/usr/local' '--with-kerberos=/usr/kerberos' '--with-zlib' '--with-ttf' 
Server API Apache 

But it still can be different on other machines at Aletia, I don't know.

Anders

- Ursprungligt meddelande - 
Från: Neil Freeman [EMAIL PROTECTED]
Till: Edward Marczak [EMAIL PROTECTED]
Kopia: [EMAIL PROTECTED]
Skickat: den 8 februari 2002 12:04
Ämne: Re: [PHP] Web Hosts and PHP 4.10 +


 I have a feeling that www.aletia.com use 4.1.1
 
 Don't quote me on that though :)
 
 Neil
 
 Edward Marczak wrote:
 
  I know the subject of web hosts that support PHP comes up frequently - but
  here's a twist:
 
  After going through the archives, and checking out many, many hosts, I
  haven't found a web host that is up to PHP 4.10 or better.  Most seem stuck
  at 4.04 or, at best, 4.06.
 
  Since 4.10 made some important changes/improvments, (and most of my code
  already takes advantage of this), I'd like to find a host supporting 4.10
  and MySQL.
 
  I understand I could run a dedicated server, but I'm trying to save that as
  a last resort right now.
 
  Any recommendations?  Thanks.
  --
  Ed Marczak
  [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  ***
   This message was virus checked with: SAVI 3.53 Jan 2002
   last updated 30th January 2002
  ***
 
 --
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 
 
 
 
 -- 
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] session register!!

2002-02-08 Thread Erik Price


On Friday, February 8, 2002, at 02:15  PM, Cristian Cerda wrote:

 I did set register_globals to On on the php.ini file. But when i use for
 example session_register(the_var) in one page ( using session_start()
 at the beginning), i don't get anything on the next page if i do echo
 $the_var .

I could be wrong about this: did you try restarting Apache?  e.g., 
apachectl graceful ?


Erik




Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] Trying to put ips into database

2002-02-08 Thread Daniel C. BAUFAY

And for efficiency you could convert and store IP addresses in numeric 
format.
See INET_NTOA and INET_ATON.





Subject:

Re: [PHP] Trying to put ips into database
From:

Matt Drake [EMAIL PROTECTED]
Date:

Fri, 8 Feb 2002 11:52:26 -0600 (CST)

To:

[EMAIL PROTECTED]


On Fri, 8 Feb 2002, Dennis Moore wrote:


 Not sure what your exact problem is but I did notice you had back ticks(`)
 in your insert statement.  You should be using (').   You may need a where
 clause in your insrt statement unless you want to populate all rows.  Just a
 couple of thoughts.

 




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




Re: [PHP] session register!!

2002-02-08 Thread Cristian Cerda

yes, and didn't work.

Erik Price wrote:

 On Friday, February 8, 2002, at 02:15  PM, Cristian Cerda wrote:

  I did set register_globals to On on the php.ini file. But when i use for
  example session_register(the_var) in one page ( using session_start()
  at the beginning), i don't get anything on the next page if i do echo
  $the_var .

 I could be wrong about this: did you try restarting Apache?  e.g.,
 apachectl graceful ?

 Erik

 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]


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




RE: [PHP] Trying to put ips into database

2002-02-08 Thread Matthew Walker

What type of field is 'ip'?

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 08, 2002 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Trying to put ips into database

I'm trying:
$query = mysql_query(select COUNT(*) as rowexists from ips where ip =
'$REMOTE_ADDR');
$result = mysql_fetch_array($query);
if($result['rowexists'] == false){
mysql_query(INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR'));
}


But it keeps putting the ip into tthe array, even if it's already there,
and
it only gets the first section of the ip!  What am I doing wrong? 

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

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




[PHP] File Upload Performance

2002-02-08 Thread Linn Kubler

I've setup an upload form for uploading files to my server.  It seems to
work well except the performance is pretty sad.  For example it took 20
minutes to upload a 50MB file over a 100Mb LAN.  This is running on Linux
w/Apache.

At the heart of the script is the copy() function.  Anyone have any
suggestions how to boost performance on this script?  Or, at least explain
why this is happening?

Thanks in advance,
Linn




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




[PHP] Content Management

2002-02-08 Thread karthikeyan

Hi,

  How should i go about to developing a php application to manage the content of a web 
site OR is there allready some ready made script available which i can use in my 
project.

  Looking forward for yours response.

karthikeyan.



Re: [PHP] Php Projects

2002-02-08 Thread hugh danaher

How about an interactive map showing all the commercial breweries in the
world.  I'll input the ones I know about in Antarctica.

- Original Message -
From: mike cullerton [EMAIL PROTECTED]
To: PHP-General [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 12:21 PM
Subject: Re: [PHP] Php Projects


 on 2/8/02 12:49 PM, Nick Wilson at [EMAIL PROTECTED] wrote:

  Do I detect a bit of Friday-afternoon sarcasm??? GRIN
 
  Actually, a beer sounds good about now
 
  Friday evening in .dk and php is always best served with a cold one!

 reminds me of my days as a netadmin. playing with routers late on a friday
 night after a few cold ones was always fun :)


  -- mike cullerton   michaelc at bakednotfried dot 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




[PHP] Re: Execing problems

2002-02-08 Thread Peter Clarke

Make sure that exec() will not get any kind of response from the script if
you want it in the background.
This works for me:

$command = funky script stuff here;
exec ($command /dev/null 21 );

Peter Clarke

Jason Rennie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 I have a seperate perl script that I need to start running from a php
 script. The script does a fork into the backgroup and exits.

 when i do an

 exec(funky script stuff here);

 The page just hangs trying to load again, apparently after I call the
 exec.

 I've also tried

 exec(script stuff )

 but it does the same thing.

 Any ideas anybody ?

 Jason

 --
 Hofstadter's Law : It always takes longer than you expect, even when you
 take Hofstadter's Law into account.



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




[PHP] escaping ?

2002-02-08 Thread Steven Jarvis

I'm trying to do some string replaces on XML files to import them into a 
prprietary db that doesn't understand XML.

I need to strip the XML tags out of the file.

However, when I use this line:

$contents = str_replace('?xml version=1.0?', '', $contents);

The ? in the string ends my php block.


I know there's an easy answer to this, and I'm probably just suffering 
from Friday afternoon burnout, but can someone let me know how to escape 
those so that I can search for them in the string?

thanks,

Steven


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




[PHP] Re: Content Management

2002-02-08 Thread Philip Hallstrom

check the application section of www.zend.com

-philip

On Sat, 9 Feb 2002, karthikeyan wrote:

 Hi,

   How should i go about to developing a php application to manage the content of a 
web site OR is there allready some ready made script available which i can use in my 
project.

   Looking forward for yours response.

 karthikeyan.



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




RE: [PHP] How to keep form inputs from being cleared

2002-02-08 Thread SpamSucks86

With --enable-trans-sid the problem still exists. For example, a user
logs in and cookies are disabled. He browses to a page which doesn't
load the session. Then from there he goes to a page that does use
sessions. Unless I'm mistaken, --enable-trans-sid won't add the session
ID unless the session is started on the page.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 11:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to keep form inputs from being cleared

On Friday 08 February 2002 04:33, CompMan86 wrote:
 I posted about this a few days ago. I received several responses but
 none of them were very helpful (thanks for the effort though). I
finally
 figured out what it was by process of elimination. At the top of my
 registration form, I put session_start() just like I did for all my
 other scripts. Well it turns out that by doing this, for some reason,
it
 clears the form. I have a hunch that the cookie request by
 session_start() has something to do with it. Well, the only reason
 someone would be at the registration form would be if he/she was not a
 member, therefore the session ID would be pointless.

 This is the major flaw of PHP's built in sessions imho: If a user
 disables cookies, the session functions assign the session ID to the
 constant SID. However, if the SID is not passed on religiously, a new
 session will be made. In an instance like this where session_start()
 cannot be used, you can't pass on the SID. It seems like I'm just
going
 to resort to requiring that my users enable session cookies. The
hastle
 of making the code to use both SID and/or cookies just doesn't seem
 worth it. If anyone has any ideas of a resolution to this problem,
feel
 free to post here or email me.

If you have full access to your server you can recompile php with the 
--enable-trans-sid option. Once this is done the SID will be 
*automagically* be propagated via the URL or hidden form elements. An 
extremely useful feature if you need sessions and cannot rely on the
user 
having enabled cookies.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Type louder, please.
*/


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




RE: [PHP] Content Management

2002-02-08 Thread sean

We'd need some more information, as Content Management is as varied as web pages, 
but depending on your needs:
http://www.roadsend.com/siteManager/home/treeMenu.php
is a hot script.

Look around on-line or on php.net for some leads that suite your complexity 
requirements, or fill us in on the scope of your project.

- sean

---
   I N T E R C O N N E C T
  Internet Image Development
   Tel: 505 989 3749
 http://www.InterConnect.is.it
--- 

-Original Message-
From: karthikeyan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Content Management


Hi,

  How should i go about to developing a php application to manage the content of a web 
site OR is there allready some ready made script available which i can use in my 
project.

  Looking forward for yours response.

karthikeyan.



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




Re: [PHP] Content Management

2002-02-08 Thread Justin Farnsworth

You might check out binarycloud.  This is a platform
but there is probably going to be an app for content
management very soon as this is being worked on.

SEE: http://binarycloud.tigris.org/
SEE: http://www.binarycloud.com/

_justin

karthikeyan wrote:
 
 Hi,
 
   How should i go about to developing a php application to manage the content of a 
web site OR is there allready some ready made script available which i can use in my 
project.
 
   Looking forward for yours response.
 
 karthikeyan.

-- 
Justin Farnsworth
Eye Integrated Communications
321 South Evans - Suite 203
Greenville, NC 27858 | Tel: (252) 353-0722

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




Re: [PHP] escaping ?

2002-02-08 Thread Jeff Sheltren

Hi, try this:

str_replace(?xml version=\1.0\?

Jeff

At 03:45 PM 2/8/2002 -0600, Steven Jarvis wrote:
I'm trying to do some string replaces on XML files to import them into a 
prprietary db that doesn't understand XML.

I need to strip the XML tags out of the file.

However, when I use this line:

$contents = str_replace('?xml version=1.0?', '', $contents);

The ? in the string ends my php block.


I know there's an easy answer to this, and I'm probably just suffering 
from Friday afternoon burnout, but can someone let me know how to escape 
those so that I can search for them in the string?

thanks,

Steven


--
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] How to keep form inputs from being cleared

2002-02-08 Thread Jason Wong

On Saturday 09 February 2002 06:56, SpamSucks86 wrote:
 With --enable-trans-sid the problem still exists. For example, a user
 logs in and cookies are disabled. He browses to a page which doesn't
 load the session. Then from there he goes to a page that does use
 sessions. Unless I'm mistaken, --enable-trans-sid won't add the session
 ID unless the session is started on the page.


All you have to do is ensure that in all your pages you initialise the 
session. This can also be done automatically through the session.auto_start 
setting in php.ini.



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
While money can't buy happiness, it certainly lets you choose your own
form of misery.
*/

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




[PHP] Math rounding problem

2002-02-08 Thread Charlie Killian

For an arbitrary large number I need to round() it up to the hundreds place
if it is not divisible by 100 and leave it untouched if it is.

So 1100 would round to 1100 and
1101 would round to 1200.

Is there a clean way to do this?

Currently I'm:
$scale = round($scale+49, -2); // round up to hundreds.

But this is messy.

Charlie



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




[PHP] Re: Math rounding problem

2002-02-08 Thread Philip Hallstrom

Something like this...?

if( $n % 100 != 0 )  {
  $n += 100 - ($n % 100);
}

Although I don't think your example is any messier...  maybe ceil/floor
should have a precision field added...

-philip

On Fri, 8 Feb 2002, Charlie Killian wrote:

 For an arbitrary large number I need to round() it up to the hundreds place
 if it is not divisible by 100 and leave it untouched if it is.

 So 1100 would round to 1100 and
 1101 would round to 1200.

 Is there a clean way to do this?

 Currently I'm:
 $scale = round($scale+49, -2); // round up to hundreds.

 But this is messy.

 Charlie



 --
 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] secure form handling

2002-02-08 Thread Paul Roberts

I think you mean that you want to display the total as text but have the total on the 
form hidden so they can't edit it (and give themselves a discount), you can  use a 
hidden form field, sessions or cookies.

input type=hidden value= name=total


Paul Roberts
[EMAIL PROTECTED]


- Original Message - 
From: wm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 1:36 AM
Subject: [PHP] secure form handling


 hi,
 
 i'm fairly new to this.
 
 what i want to do is use a form so the user can specify a few different
 choices
 of things they want to buy. maybe a few radio buttons with dollar
 amounts and
 then possibly a couple of quantity fields for items.
 
 this can then be passed to a script and total added up etc. and the user
 
 can input
 their billing data. what i don't want is for the user to be able to see
 the amount of
 the transaction in the source code in a hidden field.
 
 how do i hide this data while still passing it to the credit card script
 
 along with all
 the other info?
 
 thanks.
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



Re: [PHP] Math rounding problem

2002-02-08 Thread DL Neil

Charlie,

 For an arbitrary large number I need to round() it up to the hundreds place
 if it is not divisible by 100 and leave it untouched if it is.
 
 So 1100 would round to 1100 and
 1101 would round to 1200.
 
 Is there a clean way to do this?
 
 Currently I'm:
 $scale = round($scale+49, -2); // round up to hundreds.
 
 But this is messy.


You thought that was messy? Try:

if ( ( intval( $scale  / 100 ) * 100 )  $scale )
{   
   $scale = 1 + ( intval( $scale  / 100 ) * 100 );
}

Regards,
=dn



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




RE: [PHP] Math rounding problem

2002-02-08 Thread Charlie Killian

This equation  from Bogdan is simple and working:

$scale=ceil($scale/100)*100;

Thanks to all those who helped,

Charlie


 -Original Message-
 From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
 
 $scale=ceil($scale/100)*100, maybe?
 
 Bogdan

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




[PHP] die! die! directory!

2002-02-08 Thread hugh danaher

Help!

I've been beating on a problem all day and think I've isolated the problem to the 
following line:

   print input type=image src=./maps/map1.jpg name=coordinate ;

If I call the statement as is, I get a little red x where my map should be.  In 
earlier calls to the same directory, I can get a server error, misconfiguration...

if I change the line to:

   print input type=image src=map1.jpg name=coordinate ;

I see the image.

is there a way to declare the path before asking for the file, or a better way to 
state the file location.

Any help will be greatly appreciated.

Hugh



[PHP] Re: die! die! directory!

2002-02-08 Thread hugh danaher

Phil, Thanks for the suggestion.  I tried it and it worked the first time,
but as I changed to a second directory ./maps2/ it fell apart again.

Also, what I didn't state at the start, was that map1.jpg is actually a
variable, $map.  It's just that when I was pounding on it, I settled on
using hard names instead of variables figuring that I was at least limiting
the source for error.  The problem is the same though, it seems to work then
dies.  Not my machine either, I ftp the file to olm and see the results on
line.

Thanks for your help.  If you have any other suggestions, please let me
know.
Hugh



- Original Message -
From: Philip Hallstrom [EMAIL PROTECTED]
To: hugh danaher [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 5:05 PM
Subject: Re: die! die! directory!


 what if you do this:

 print input type=image src=\./maps/map1.jpg\ name=coordinate ;

 ??

 On Fri, 8 Feb 2002, hugh danaher wrote:

  Help!
 
  I've been beating on a problem all day and think I've isolated the
problem to the following line:
 
 print input type=image src=./maps/map1.jpg name=coordinate ;
 
  If I call the statement as is, I get a little red x where my map should
be.  In earlier calls to the same directory, I can get a server error,
misconfiguration...
 
  if I change the line to:
 
 print input type=image src=map1.jpg name=coordinate ;
 
  I see the image.
 
  is there a way to declare the path before asking for the file, or a
better way to state the file location.
 
  Any help will be greatly appreciated.
 
  Hugh
 



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




[PHP] Search Page

2002-02-08 Thread Georgie Casey

I'm making a search page on my site where users enter certain criteria and I
ouput the results like many other webistes: By first telling how many
results were generated, then having dynamic pages to view, say, 10 results
at a time.

So first I have to SQL the database to get totalresults, then cancel that
query and query again with a LIMIT tag on the end to display the first 10
results. Is there a more efficient way of doing what I'm trying to do?

I coded it myself so its probably poor, design-wise. Am I going about it the
right way?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



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




  1   2   >