[PHP] virtual() call to CGI script

2001-08-28 Thread Egan

I use the PHP virtual() function to call a CGI script, and that works
fine.  But I need to prevent the CGI from being executed directly, in
case someone tries to access its URL.

Since HTTP_REFERER is unreliable, I was wondering how others have
solved this problem ...


Egan




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




[PHP] MySQL query length

2001-08-28 Thread Niklas Lampén

Can it cause any problems if mySQL query is very long? I have to compare
many words to many fields in my DB and I've done it like
Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE
'%searchword%'.. Query is build by a function, so I don't know the
exact length but it is VERY long. I also have to compare several words to
one field so I've done many of those Field LIKE '%blah%' for those too.
Is there any smarter way to do this?


Niklas Lampén
Internet Developer
PubliCo Oy
Ruoholahdenkatu 8 A
FIN-00180 HELSINKI
P. +358 - 9 - 6866 2541
F. +358 - 9 - 685 2940
E. [EMAIL PROTECTED]
W. www.finlandexports.com




[PHP] session.use_cookie

2001-08-28 Thread Richard Baskett

Could someone tell me how session.use_cookie works?  To me it seems that if
this is enabled and the user has cookies off.. then sessions will not work
period.  Any help on this would be appreciated :)

Rick


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




RE: [PHP] MySQL query length

2001-08-28 Thread Kees Hoekzema

You can alter the packetsize mysql will accept,
you can find out the current setting with a
show variables query, look for the max_allowed_packet var.
You can alter it in your my.cnf file.

(i have it on 25M atm).

- Kees

 -Original Message-
 From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 28, 2001 8:51 AM
 To: Php-General
 Subject: [PHP] MySQL query length


 Can it cause any problems if mySQL query is very long? I have to compare
 many words to many fields in my DB and I've done it like
 Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE
 '%searchword%'.. Query is build by a function, so I don't know the
 exact length but it is VERY long. I also have to compare several words to
 one field so I've done many of those Field LIKE '%blah%' for those too.
 Is there any smarter way to do this?


 Niklas Lampén
 Internet Developer
 PubliCo Oy
 Ruoholahdenkatu 8 A
 FIN-00180 HELSINKI
 P. +358 - 9 - 6866 2541
 F. +358 - 9 - 685 2940
 E. [EMAIL PROTECTED]
 W. www.finlandexports.com




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




Re: [PHP] PCRE Multiline modifier

2001-08-28 Thread _lallous

Thanks!

But I still nned to escape, but only once. I mean '\/pre' instead of
'\\/pre'.

Andrey Hristov [EMAIL PROTECTED] wrote in message
004401c12f02$ae5a2d30$0b01a8c0@ANDreY">news:004401c12f02$ae5a2d30$0b01a8c0@ANDreY...
 I think that is the solution:

 ?
   $mem = prehello world\nI love you all!/pre;
   $re = /pre(.+?)\\/pre/is;

   preg_match_all($re, $mem, $match);

   var_dump($match);
 ?

 The modifier which will work for you is 's', not 'm'. Look at the manual
at :
 http://www.php.net/manual/en/pcre.pattern.modifiers.php

 This produces:
 array(2) {
   [0]=
   array(1) {
 [0]=
 string(16) prehello world
   }
   [1]=
   array(1) {
 [0]=
 string(11) hello world
   }
 }

 In this case it's better your pattern to be : |pre(.+?)/pre|is
 / was changed to |, and there is no need to escape.

 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 99%



 - Original Message -
 From: _lallous [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, August 27, 2001 5:43 PM
 Subject: [PHP] PCRE Multiline modifier


  pre
  ?
$mem = prehello world\nI love you all!/pre;
$re = /pre(.+?)\\/pre/im;
 
preg_match_all($re, $mem, $match);
 
var_dump($match);
  ?
  /pre
 
  and the output is:
  array(2) {
[0]=
array(0) {
}
[1]=
array(0) {
}
  }
 
  if i remove the \n in the $mem var everything works okay.
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




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




[PHP] Re: MySQL query length

2001-08-28 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Niklas lampén) wrote:

 Can it cause any problems if mySQL query is very long? I have to compare
 many words to many fields in my DB and I've done it like
 Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE
 '%searchword%'.. Query is build by a function, so I don't know the
 exact length but it is VERY long. I also have to compare several words to
 one field so I've done many of those Field LIKE '%blah%' for those too.
 Is there any smarter way to do this?

Depending on what you need the comparison to do and how bit the range of 
possible searchwords is, querying against either a fulltext index, an 
enum field, or a set field might work out better for you. (See the 
*MySQL* manual for more info.)

As for the where clause, AFAIK[*] the length of the query should be less of 
a concern than the fact that MySQL is not being allowed to use an index 
(because of the leading %).  It has to do row-by-row comparisons, slowing 
down execution.

[*] Double-check that with the folks on the MySQL.com support list, though.  
It's a question better asked of them anyway...

-- 
CC

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




Re: [PHP] Re: Need help on putting variable into form

2001-08-28 Thread Hugh Danaher

Andy,
I think at one time I tried using double quotes but didn't get good results.
If you have time to answer, why the backslash and what the hell is foo?
- Original Message -
From: Andy Ladouceur [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 8:51 PM
Subject: Re: [PHP] Re: Need help on putting variable into form


 No problem.
 With the space in there, it considered Company as something separate...
 -Andy
 Hugh Danaher [EMAIL PROTECTED] wrote in message
 000801c12f74$62b93020$3907f4d8@win95">news:000801c12f74$62b93020$3907f4d8@win95...
  Andy,
  Thank you.  It Works!
  Hugh
  - Original Message -
  From: Andy Ladouceur [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, August 27, 2001 8:35 PM
  Subject: [PHP] Re: Need help on putting variable into form
 
 
   Well,think about it like this:
   If you did replace $comp name with ABC Company, this is what you'd
get:
  
   input type=text size=30 name=comp_name value=ABC Company
  
   Not quite right, eh? This will solve your  problem:
   print input type=text size=30 name=comp_name value=\$comp_name\;
  
   =)
   -Andy
   Hugh Danaher [EMAIL PROTECTED] wrote in message
   001201c12f71$75a45b40$c1fcb3d1@win95">news:001201c12f71$75a45b40$c1fcb3d1@win95...
   Help.  I have a page with a form with lots of text boxes which can be
  filled
   with data from a text file.  the fopen() and fgets() works, and the
text
   boxes which require numbers have no problems.  But, I have text boxes
  which
   require several words of text and they refuse to work right.  The
first
  word
   makes it in the box, but the rest of the words are lost.
  
   As an example, the data file contains:  ABC Company, Inc. in the spot
 for
   $comp_name.  If I call for this variable elsewhere outside of a text
 box,
  it
   prints in full, but when used by the following, it prints only: ABC
  
   print input type=text size=30 name=comp_name value=$comp_name;
  
   There must be something blindingly obvious that I'm missing.  Please
 help.
   Thanks, Hugh
  
  
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 



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



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




[PHP] ereg()

2001-08-28 Thread Ben Quinn

Hi all

Say i had text similar to below

Cairns  Fine
Mareeba Fine
Innisfail   Fine

I'm using the following code to grab the weather forecast for each of those
towns

$GrabURL = forecast_map_data.txt;
$GrabStart = PROVINCIAL CITY;
$GrabEnd = UV ratings;

$file = fopen($GrabURL, r);
$rf = fread($file, 2);
$grab = eregi($GrabStart(.*)$GrabEnd, $rf, $show);

eregi(Cairns(.*)Mareeba, $show[1], $cairns);

which works fine, but when i then try to grab the forecast for Mareeba using
this

eregi(Mareeba(.*)Innisfail, $show[1], $mareeba);

nothing happens - i figure it's because i've already use Mareeba as a stop
point.  Can anyone recommend a function or a way to do this where i'll be
able to use the same start or stop text more than once?



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




RE: [PHP] file uploads windows clients

2001-08-28 Thread Pere Vineta

I suggest you to check www.zend.com/zend/spotlight/uploading.php
Bst Rgds
Pere

Gerard Samuel [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ok, I tried the to replicate on different browsers.  Microsoft IE 5.5 ,6
 beta  Opera 5 all show this problem.
 Here are some snippets of the code that Im using.  Thanks

 ---snip---
 echo form action=\$PHP_SELF\ method=\POST\
 enctype=\multipart/form-data\\n;

 ---snip---
 echo nbsp nbspinput type=\file\ name=\pic\p\n;

 ---snip---
 if ($pic_type != image/jpeg) {
  echo Please let the picture be in jpeg format.
 Thanks.br\n; exit();
 }


 Gerard Samuel wrote:
  Hey all.  I have a problem.  I made a script that handles file uploads,
  and all the while I was testing on mozilla and netscape, totally forgot
  about IE.  I have it set to only accept jpeg pics.  It works no problem
  on mozilla and netscape, but IE isnt do too well.  When I try to upload
  a jpeg, it spits out that its not a jpeg file.  Not sure if the mime
  type is different for windows about jpegs.  Anyone encountered this
  before.  I didnt find anything in the archive.
  Thanks
 
  php 4.0.6, apache 1.3.20, mysql 3.23.40
  Thanks all.
 
 





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




Re: [PHP] ereg()

2001-08-28 Thread Jack Dempsey

You could try fgets from the fp instead of fread. Then for each line depending
on how well structured it is you have a variety of options, but i think this
would be at least a good start:
www.php.net/preg_split - split on multiple spaces - \s+

jack

Ben Quinn wrote:

 Hi all

 Say i had text similar to below

 Cairns  Fine
 Mareeba Fine
 Innisfail   Fine

 I'm using the following code to grab the weather forecast for each of those
 towns

 $GrabURL = forecast_map_data.txt;
 $GrabStart = PROVINCIAL CITY;
 $GrabEnd = UV ratings;

 $file = fopen($GrabURL, r);
 $rf = fread($file, 2);
 $grab = eregi($GrabStart(.*)$GrabEnd, $rf, $show);

 eregi(Cairns(.*)Mareeba, $show[1], $cairns);

 which works fine, but when i then try to grab the forecast for Mareeba using
 this

 eregi(Mareeba(.*)Innisfail, $show[1], $mareeba);

 nothing happens - i figure it's because i've already use Mareeba as a stop
 point.  Can anyone recommend a function or a way to do this where i'll be
 able to use the same start or stop text more than once?

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



Ben Quinn wrote:

 Hi all

 Say i had text similar to below

 Cairns  Fine
 Mareeba Fine
 Innisfail   Fine

 I'm using the following code to grab the weather forecast for each of those
 towns

 $GrabURL = forecast_map_data.txt;
 $GrabStart = PROVINCIAL CITY;
 $GrabEnd = UV ratings;

 $file = fopen($GrabURL, r);
 $rf = fread($file, 2);
 $grab = eregi($GrabStart(.*)$GrabEnd, $rf, $show);

 eregi(Cairns(.*)Mareeba, $show[1], $cairns);

 which works fine, but when i then try to grab the forecast for Mareeba using
 this

 eregi(Mareeba(.*)Innisfail, $show[1], $mareeba);

 nothing happens - i figure it's because i've already use Mareeba as a stop
 point.  Can anyone recommend a function or a way to do this where i'll be
 able to use the same start or stop text more than once?

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


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




Re: [PHP] Re: Need help on putting variable into form

2001-08-28 Thread Christopher William Wesley

On Tue, 28 Aug 2001, Hugh Danaher wrote:

 I think at one time I tried using double quotes but didn't get good results.
 If you have time to answer, why the backslash and what the hell is foo?

Using the backslash escapes the double quote ... tells php to not use the
double quote (as it does to end a string assignment), but to print it
instead.  And foo is just a seemingly universal place-holder for a
string or something else that you can replace with just about anything.

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


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




Re: [PHP] Multiple JavaScript Windows

2001-08-28 Thread * RzE:

Original message
From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED]
Date: Mon, Aug 27, 2001 at 07:48:06PM -0500
Message-ID: 001201c12f5b$19d05e60$0a505ad1@Nando4
Subject: [PHP] Multiple JavaScript Windows

 Hello All,
 
 I need to have multiple JavaScripts windows with my database PHP script.
 
 The idea is to have a main Page and links to pop-up JavaScript
 Windows to enter information on the database. Once these windows
 are closed the main PHP page need to be automaticaly updated.
 
 The Database is a Report system that depends on 4 tables. One main
 table and 3 other tables that contain information for that report
 such as part number, procedures taken and repairs made. Each
 report can have none to several parts, none to several procedures
 and one to several repairs.
 
 Once the user starts a new report a lot od stuff is add to the
 main table such as CustomerNo, ReportNo, ReportDate, etc. Then,
 the other three tables lists parts, procedures and repairs for a
 Report using the ReportNo as common field.
 
 The help and advice I need consist of beeing able to call pop up
 windows with JavaScript from the main page to add Parts, Repairs
 and Procedures. Once the user finish adding stuff on a Pop Up
 window he would close it by clicking a link and the main Page of
 the Report would be reloaded to reflect the changes he did.
 
 Can anyone help me with this task?
 
 Thank you very much,
 
 Carlos Fernando   [EMAIL PROTECTED]
 
 

/Original message

Reply

Think you're looking for things like:

window.open ('page-to-open', 'WindowName', 'attribs');
(in order to open a (popup)window).

and then, when they've entered all information you submit the form
(still in the same popup) to the PHP that stores it in the db. That
page normally doesn't need to produce any output to the user. So
what you put at the end of that page is:

SCRIPT type=text/javascript
  window.opener.reload(true);   /* reloads the main page */
  window.close();   /* closes the popup */
/SCRIPT

Hope this is what you were looking for...

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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




[PHP] Sessions with MySQL

2001-08-28 Thread Tobias Strauß

I'm using a MySQL-database to store my session variables by using the
following code:

session_set_save_handler

sess_open,
sess_close,
sess_read,
sess_write,
sess_destroy,
sess_gc
);

session.gc_probability in the php.ini file is set to 1.

In a book I read that this means that the function sess_gc will then be call
everytime I start a new session by using: session_start();
But the function sess_gc will never be called so my table including the
session variables is growing up and never be cleaned. Only if I call the
sess_gc function myself the old sessions will be deleted. Do I always have
to do this myself or what's wrong with my code?



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




[PHP] str_replace() function help

2001-08-28 Thread Navid Yar

Hello,

I am creating an online text editor for a magazine site and I want to be
able to apply some CSS formatting into it. The following is the script that
adds the br / tags where necessary, then it strips the br / tags by
replacing them with some p tags with CSS formatting. The problem I'm
having is that it will not pick up on those br / tags (2 at a time). I
think it has something to do with the newline (\n) and return (\r) escape
characters not capturing the br / tags. Maybe I didn't set it up
correctly. Below the code is the input (exactly as typed in the online text
editor), the undesired output I'm getting when I run the article through the
script, and the desired output that I want.

Please Note that I am trying to comply with the XHTML standards and will be
converting these into XHTML, therefore all tags must be closed ( example:
p/p ), and all empty tags must be closed in this way: tag / ( example:
br / ). Also note that I am trying to stay away from other pattern
matching and replacing functions. The reason is that str_replace() seems
much faster than the rest. If it is possible, I would like to stick with
str_replace(). But if this turns out to be too complex for str_replace to
handle, then I will consider other options. I am on a Win2000 platform
running PHP 4.0.6 (which may or may not be relevant). Thanks in advance this
anyone who helps me out with this, I would really appreciate it.


THE SCRIPT
__

html
headtitlestr_replace/title/head
body

?php

if ($article) {
   $article = nl2br(htmlspecialchars(stripslashes($article)));
   $article = p class=\arialnn16\\n . $article . /p\n\n;
   $article = str_replace(br /\r\nbr /,/p\np
class=\arialnn16\\n,$article);
   echo $article;
} else {
echo Please include an article before sending.;
}

?

/body
/html



INPUT
___

There are numerous definitions for the word hero. I would like to define
heroes as individuals who inspire us to emulate their level of perseverance
and success. Simply put, heroes are people we look up to.

Life is full of celebrated heroes: sports figures, individuals from all
walks of the entertainment industry, famous and infamous politicians, and
distinguished individuals from the business and science arenas, just to name
a few. But for every celebrated hero, there is at least one unsung hero.
This Spotlight segment is dedicated to the unsung heroes of our time.

Recently, I have been corresponding via email with three very dedicated and
talented students from the University of Toronto whom I consider real life
heroes. Once you read about their accomplishments as well as their trials
and tribulations in life and the positive example they intend to set for the
Afghan youths everywhere, I am sure you will agree with my assessment.



THE UNDESIRED OUTPUT
__

html
headtitlestr_replace/title/head
body

p class=arialnn16
There are numerous definitions for the word hero. I would like to define
heroes as individuals who inspire us to emulate their level of perseverance
and success. Simply put, heroes are people we look up to.
br /

br /
Life is full of celebrated heroes: sports figures, individuals from all
walks of the entertainment industry, famous and infamous politicians, and
distinguished individuals from the business and science arenas, just to name
a few. But for every celebrated hero, there is at least one unsung hero.
This quot;Spotlightquot; segment is dedicated to the unsung heroes of our
time.
br /

br /
Recently, I have been corresponding via email with three very dedicated and
talented students from the University of Toronto whom I consider real life
heroes. Once you read about their accomplishments as well as their trials
and tribulations in life and the positive example they intend to set for the
Afghan youths everywhere, I am sure you will agree with my assessment./p

/body
/html



DESIRED OUTPUT
__

html
headtitlestr_replace/title/head
body

p class=arialnn16
There are numerous definitions for the word hero. I would like to define
heroes as individuals who inspire us to emulate their level of perseverance
and success. Simply put, heroes are people we look up to.
/p

p class=arialnn16
Life is full of celebrated heroes: sports figures, individuals from all
walks of the entertainment industry, famous and infamous politicians, and
distinguished individuals from the business and science arenas, just to name
a few. But for every celebrated hero, there is at least one unsung hero.
This quot;Spotlightquot; segment is dedicated to the unsung heroes of our
time.
/p

p class=arialnn16
Recently, I have been corresponding via email with three very dedicated and
talented students from the University of Toronto whom I consider real life
heroes. Once you read about their accomplishments as well as their trials
and tribulations in life and the positive example they intend to set for the
Afghan youths everywhere, I am sure you will agree with my assessment./p

/body
/html


-- 

RE: [PHP] POST to port 443 (SSL)

2001-08-28 Thread Jon Farmer

Ermm  you are missing SSL encryption. You can't just try and talk to port
443! You have to use something that talks SSL to talk to port 443.
fsockopen() does not talk SSL.

Regards

--
Jon Farmer  տլ
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Patrick Calkins [mailto:[EMAIL PROTECTED]]



Hello,
I am trying to use the UPS Online Tools, the XML version. This requires you
POSTing an XML document to their Tools server, which is SSL enabled. I am
having a problem getting this to connect in PHP (4.0.6) on my server (Apache
1.3.20). In my scripts, I use
$Socket = fsockopen (www.ups.com, 443, $errno, $errstr);

if (!$Socket)
die (Error bla bla bla);

fputs ($Socket, GET /ups.app/xml/Rate HTTP/1.0\r\n\r\n);
...
...
If you point your browser to https://www.ups.com/ups.app/xml/Rate you will
see a response. But this code seems to just time-out. If I change the port
443 to port 80, I will get a response. What am I missing for it to talk to
an SSL port??




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




Re: [PHP] POST to port 443 (SSL)

2001-08-28 Thread Jason Brooke

 Hello,
 I am trying to use the UPS Online Tools, the XML version. This requires
you
 POSTing an XML document to their Tools server, which is SSL enabled. I am
 having a problem getting this to connect in PHP (4.0.6) on my server
(Apache
 1.3.20). In my scripts, I use
 $Socket = fsockopen (www.ups.com, 443, $errno, $errstr);

 if (!$Socket)
 die (Error bla bla bla);

 fputs ($Socket, GET /ups.app/xml/Rate HTTP/1.0\r\n\r\n);
 ...
 ...
 If you point your browser to https://www.ups.com/ups.app/xml/Rate you will
 see a response. But this code seems to just time-out. If I change the port
 443 to port 80, I will get a response. What am I missing for it to talk to
 an SSL port??

The ability to 'speak ssl' instead of plain text

You should probably use the curl functions to do your post via SSL, or some
other tools if using the curl funcs isn't suitable for you. Incidentally,
you're doing a GET anyway when you say that the server requires a post.

jason


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




[PHP] What does PHP stand for?

2001-08-28 Thread Niklas Lampén

It just crossed my mind: I don't know what PHP stands for...so anyone? :)


Niklas



Re: [PHP] What does PHP stand for?

2001-08-28 Thread Adi Wibowo


On Tue, 28 Aug 2001, [iso-8859-1] Niklas Lampén wrote:
 It just crossed my mind: I don't know what PHP stands for...so anyone? :)

PHP stands for ... PHP.

Adi Wibowo -- http://dewey.petra.ac.id
* Work matter: [EMAIL PROTECTED]
* Private matter : [EMAIL PROTECTED]
--


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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread SED

The manual says:

officially PHP: Hypertext Preprocessor

SED

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]] 
Sent: 28. ágúst 2001 10:38
To: Php-General
Subject: [PHP] What does PHP stand for?


It just crossed my mind: I don't know what PHP stands for...so anyone?
:)


Niklas


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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread Seb Frost

Stands for PHP: Hypertext Pre-processor.

I guess they didn't like the sound of just HP.

- seb

-Original Message-
From: Adi Wibowo [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 11:54
To: Niklas Lampén
Cc: Php-General
Subject: Re: [PHP] What does PHP stand for?



On Tue, 28 Aug 2001, [iso-8859-1] Niklas Lampén wrote:
 It just crossed my mind: I don't know what PHP stands for...so anyone? :)

PHP stands for ... PHP.

Adi Wibowo -- http://dewey.petra.ac.id
* Work matter: [EMAIL PROTECTED]
* Private matter : [EMAIL PROTECTED]
--


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread Jon Haworth

PHP Hypertext Preprocessor (yes, it's recursive)

HTH
Jon


-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 11:38
To: Php-General
Subject: [PHP] What does PHP stand for?


It just crossed my mind: I don't know what PHP stands for...so anyone? :)


Niklas

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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread Niklas Lampén

Funny that there is no meanin for the first P.


Niklas

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 13:57
To: 'Niklas Lampén'; Php-General
Subject: RE: [PHP] What does PHP stand for?


PHP Hypertext Preprocessor (yes, it's recursive)

HTH
Jon


-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 11:38
To: Php-General
Subject: [PHP] What does PHP stand for?


It just crossed my mind: I don't know what PHP stands for...so anyone? :)


Niklas

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


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




[PHP] cancellation cleanup handlers in PHP4?

2001-08-28 Thread alvarez


Is it possible to register functions to be executed at program termination
as in unix's onexit() and pthread_cleanup_push facilities ?

  D. Alvarez Arribas [EMAIL PROTECTED]

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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread SED

I suggest this for the PHP ;)

Professional Hypertext Preprocessor

SED

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]] 
Sent: 28. ágúst 2001 11:11
To: Php-General
Subject: RE: [PHP] What does PHP stand for?


So PHP stands for Personal Home Pages Hypertext Preprocessor. What a
nice name! :)


Niklas


-Original Message-
From: Jon Farmer [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 14:04
To: Niklas Lampén; Php-General
Subject: RE: [PHP] What does PHP stand for?


Well I guess Rasmus is the guy who knows but as I understand it, it was
originally

Personal Home Pages

and became

PHP Hypertext Preprocessor  later

Regards

jon

--
Jon Farmer  Õ¿Õ¬
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 11:38
To: Php-General
Subject: [PHP] What does PHP stand for?


It just crossed my mind: I don't know what PHP stands for...so anyone?
:)


Niklas


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


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


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




[PHP] PHPUK Meeting - Cancelled

2001-08-28 Thread James Moore

Hi everyone,

Im sorry to inform you that I have decided to cancel the meeting on the 8th
of September, this is due to having very little response and it seems
pointless to have a meeting that large for literally 8 to 10 people, if
there are still people who want to meet on that day then perhaps we can size
it down and meet in a pub for the afternoon and have a chat but the original
plan of a full scale meeting with talks etc is now NOT going to happen.
Please contact me if you still feel you want to come and meet in a pub for a
chat etc and Ill see what interest there is in that.

If you have sent monies for tickets etc please contact me and they will be
returned promptly.

Sorry for any inconvience caused.

Thanks,

- James
--
James Moore
[EMAIL PROTECTED]


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




[PHP] Problem using session

2001-08-28 Thread Rosen

Hi,
I'm creating system with user registration. I want to use sessions without cookies.
My cookies are disabled.

this is my login.php:

global $curusr, $curpass, $registered;


if (lExistUser( $usr, $pwd ) == false )// is user exist ?
{
echo $usr . $pwd;
echo  - Error;
session_destroy();
$curusr=;
$curpass=;
$registered=false;
exit;

}
// all ok ! user Exist
$curusr=$usr;
$curpass=$pwd;
$registered=true;

session_start();
session_register(curusr, curpass, registered );

$web=http://www.somedomain.com;;   // my site
header(Location: $web);
exit;


But when I get control in my index.php there are no the variables.

Any ideas why ?

Thanks,

Rosen Marinov









Re: [PHP] cancellation cleanup handlers in PHP4?

2001-08-28 Thread pierre-yves

Hello,
From the manual:
http://www.php.net/manual/en/function.register-shutdown-function.php

py

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 7:37 AM
Subject: [PHP] cancellation cleanup handlers in PHP4?



 Is it possible to register functions to be executed at program termination
 as in unix's onexit() and pthread_cleanup_push facilities ?

   D. Alvarez Arribas [EMAIL PROTECTED]

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




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




Re: [PHP] Disabling certain functions per directory

2001-08-28 Thread pierre-yves

You will find the answer to that question in the archives. Someone answer
this question a couple of days ago.
Can't remember the address of the archive tho, anyone can help me here?
py


- Original Message -
From: Andy Ladouceur [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 12:10 AM
Subject: [PHP] Disabling certain functions per directory


 I'd like to use the disable_functions command from the php.ini file to
 disable certain functions for certain directories. I know it has to do
with
 the httpd.conf file, but have no clue on how to go about doing it, can
 someone please post an example for me?With the directory I want things
 disabled in as '/var/www/htdocs/example/' and the base directory being
 '/var/ww/htdocs/'
 I hope someone can help, thanks..
 -Andy



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




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




[PHP] haX0Ring exercise :)

2001-08-28 Thread alvarez


I want a function or macro to return executable code yielding syntax
preprocessing of binary trees. Because the Macro Processor seems to be
somewhat messy I though a regular function might be capable of doing the job.

  e.g.

   btree ('((a, b)(c, d))')

   should be expanded to

   array (array (a, b)
  array (c, d)


  How can I archieve this? 

  D. Alvarez Arribas [EMAIL PROTECTED]

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




[PHP] How do I read the first n lines from a file?

2001-08-28 Thread Tauntz

hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]



RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

You can do this:

$i = 0;
$fp = fopen("list.txt", "r");
while (!feof($fp)  $i  10) {
$i++;
$Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
print "$Textbr\n";
};


Niklas

-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 14:13
To: [EMAIL PROTECTED]
Subject: [PHP] How do I read the first n lines from a file?


hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]


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




[PHP] Re: Problem using session

2001-08-28 Thread Rosen

And one question:
Should I use session_start() in every php file on my site ?

Thanks,
Rosen





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




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

Oops.. Forgot to close the file. Put as last line:
fclose($fp);


Niklas

-Original Message-
From: Niklas Lampn [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 15:29
To: Tauntz; Php-General
Subject: RE: [PHP] How do I read the first n lines from a file?


You can do this:

$i = 0;
$fp = fopen("list.txt", "r");
while (!feof($fp)  $i  10) {
$i++;
$Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
print "$Textbr\n";
};


Niklas

-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 14:13
To: [EMAIL PROTECTED]
Subject: [PHP] How do I read the first n lines from a file?


hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]


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




[PHP] Re: Re: cancellation cleanup handler

2001-08-28 Thread alvarez


Hello,
From the manual:
http://www.php.net/manual/en/function.register-shutdown-function.php
 
py 

   Thanks (but)...

  I was referring to functions that are executed in a fully functional
  PHP environment including output using echo. The crippled shutdown
  thing does not serve for my purposes. set_error_handler () is
  functionally appropriate, but I do not know of an error event being
  raised on regular program termination.


  D. Alvarez Arribas [EMAIL PROTECTED]

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




RE: [PHP] What does PHP stand for?

2001-08-28 Thread Jon

Hmm although the answer was Personal Home Page Tools and is now Hypertext
Preprocessor when people ask me, I say Pre-Hypertext Processor

Its the same meaning, and puts the letters in the correct order, so as not to
confuse people.

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




Re: [PHP] Re: Problem using session

2001-08-28 Thread Frank Loewenthal

On Tuesday 28 August 2001 02:20 pm, you wrote:
 And one question:
 Should I use session_start() in every php file on my site ?

 Thanks,
 Rosen

Yes! 


-- 
SFI Technology Services AG
Dr. F. Loewenthal
Stettbachstrasse 10
CH-8600 Dübendorf
Switzerland

[EMAIL PROTECTED]
www.sfi.ch
+41/1-824 49 00

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




[PHP] PHP and Java issues. Desperate please help.

2001-08-28 Thread Bill Koch

I have dug through several forums trying to find a solution to this issue.
I have configured PHP4.0.6 with Sun's JDK1.3.1 on RH7.1.  I keep receiving a
the following error message:

Fatal error:  Unable to load Java Library /usr/java/jdk1.3.1/jre/lib/i386
/classic/libjvm.so, error:
/usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so: un
defined symbol: jdk_sem_post in /tmp/php-4.0.6/ext/java/jver.php on line

My php.ini file looks like the following:

[Java]
java.class.path=/usr/local/lib/php/php_java.jar:/usr/share/kaffe/worldpac_fu
lfil
lment.jar
java.home=/usr/java/jdk1.3.1
java.library=/usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so
java.library.path=/usr/local/lib/php/extensions/no-debug-non-zts-20001222:/u
sr/j
ava/jdk1.3.1/jre/lib/i386:/usr/java/jdk1.3.1/jre/lib/i386/classic:/usr/java/
jdk1
.3.1/jre/lib/i386/hotspot:/usr/java/jdk1.3.1/jre/lib/i386/native_threads
extension=libphp_java.so

And when I ldd -d libjvm.so I receive the following:

/usr/bin/ldd -d libjvm.so
libm.so.6 = /lib/i686/libm.so.6 (0x4009a000)
libnsl.so.1 = /lib/libnsl.so.1 (0x400be000)
libdl.so.2 = /lib/libdl.so.2 (0x400d5000)
libc.so.6 = /lib/i686/libc.so.6 (0x400d9000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x2000)
undefined symbol: jdk_sem_post  (./libjvm.so)
undefined symbol: jdk_sem_init  (./libjvm.so)
undefined symbol: jdk_pthread_sigmask   (./libjvm.so)
undefined symbol: jdk_sem_wait  (./libjvm.so)
undefined symbol: jdk_pthread_sigmask   (./libjvm.so)

I pretty much understand that the issue is with the JDK but I cannot figure
out how to fix it.  I have tried the the ld.so.conf( and ran ldconfig, also
did a reboot) which is as follows:

/usr/lib
/usr/kerberos/lib
/usr/X11R6/lib
/usr/local/lib
/usr/java/jdk1.3.1/jre/lib/i386
/usr/java/jdk1.3.1/jre/lib/i386/classic
/usr/java/jdk1.3.1/jre/lib/i386/native_threads
/usr/java/jdk1.3.1/jre/lib/i386/green_threads

This has gotten to be a major holdup.  I have read through several posts and
tried all they suggest to no avail.  I am going nuts, I know this can work
because others have done it.  The only thing left that I haven't looked into
is this error message from the php debug.log:

/usr/bin/ld: warning: libstdc++-libc6.1-1.so.2, needed by
/usr/java/jdk1.3.1/jre
/lib/i386/hotspot/libjvm.so, not found (try using -rpath or -rpath-link)
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to
`__che
ck_eh_spec'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to
`__thr
ow'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to
`termi
nate(void)'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to
`__cp_
pop_exception'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to
`__cp_
eh_info'
collect2: ld returned 1 exit status

I don't have libstdc++-libc6.1-1.so.2 on my system.  So I will go back and
try install it and see what happens.  Any ideas would be greatly
appreciated.

Bill

PS Alex I apologize greatly for the direct email.  But I am desperate, I saw
your name on several php forums and you seem to be the guru on this issue.
I switched from kaffe ( which I had running smoothly) because the project I
am working on requires certain pre done Java API's that were calling Java
classes that kaffe didn't seem to have.





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




Re: [PHP] Re: Problem using session

2001-08-28 Thread hassan el forkani

yes and be carefull to put that before any aoutput is sent to the browser 
(even a blank space is an output)

regards

At 14:20 28/08/01, Rosen wrote:
And one question:
Should I use session_start() in every php file on my site ?

Thanks,
Rosen





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



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




[PHP] Re: payflow pro hosed

2001-08-28 Thread Bill Koch

Dan,

Check the php.ini file.  You need to be sure the payflow library is being
loaded.  The following should be listed under extensions in your php.ini
directory:

extension=pfpro.so
extension=libpfpro.so

Also be sure that the path to the php/module file is listed as well.

Bill



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




SV: [PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread anders nawroth

installation for the other 400 customers using the server. Then they have to
take the server down to install the new build. Is it any wonder that they
just say no?

I have to go with the (few) extensions/librarys provided by my ISP.
If you don't run your own server, that's how it works with
most ISPs, I think. Some ISP don't even run PHP4, they still use PHP3.

If you don't agree that this is a major issue that needs to be addressed, I
fear for the future of PHP.

I agree 100%.


Anders Nawroth

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[EMAIL PROTECTED]
http://www.nawroth.com/


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




Re: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Tauntz

hey.. thank you..
but is it possible to read the last lets say 10 lines from a file ?


- Original Message -
From: "Niklas Lampn" [EMAIL PROTECTED]
To: "Tauntz" [EMAIL PROTECTED]; "Php-General" [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 3:28 PM
Subject: RE: [PHP] How do I read the first n lines from a file?


 You can do this:

 $i = 0;
 $fp = fopen("list.txt", "r");
 while (!feof($fp)  $i  10) {
 $i++;
 $Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
 print "$Textbr\n";
 };


 Niklas

 -Original Message-
 From: Tauntz [mailto:[EMAIL PROTECTED]]
 Sent: 28. elokuuta 2001 14:13
 To: [EMAIL PROTECTED]
 Subject: [PHP] How do I read the first n lines from a file?


 hi !

 I have a simmple question :)..

 Lets say that I have a file called:
 list.txt
 and I want to take the first 10 lines from it  echo it to the browser ?

 thank you
 [EMAIL PROTECTED]



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




[PHP] How can I Get Text as it Set

2001-08-28 Thread Alawi Albaity

when a person write in a text area 

i want to get it string and format it as it set 

for example 

when he write 

---

how are all world 
i do not see you 

---

i want to store it as it set in my database 

i not want it to be 


how are all world i do not see you 
--- 


Thanks 

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

Yes. Then you have to do it a bit differently:

$file = file("list.txt"); // $file is now an array of lines in "list.txt"

for ($i = count($file); $i  count($file) - 10; $i--) {
print "$file[$i]br";
};


That should do. Didn't try it thou. That prints the lines in order last,
last-1, last-2


Niklas


-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 15:00
To: php
Subject: Re: [PHP] How do I read the first n lines from a file?


hey.. thank you..
but is it possible to read the last lets say 10 lines from a file ?


- Original Message -
From: "Niklas Lampn" [EMAIL PROTECTED]
To: "Tauntz" [EMAIL PROTECTED]; "Php-General" [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 3:28 PM
Subject: RE: [PHP] How do I read the first n lines from a file?


 You can do this:

 $i = 0;
 $fp = fopen("list.txt", "r");
 while (!feof($fp)  $i  10) {
 $i++;
 $Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
 print "$Textbr\n";
 };


 Niklas

 -Original Message-
 From: Tauntz [mailto:[EMAIL PROTECTED]]
 Sent: 28. elokuuta 2001 14:13
 To: [EMAIL PROTECTED]
 Subject: [PHP] How do I read the first n lines from a file?


 hi !

 I have a simmple question :)..

 Lets say that I have a file called:
 list.txt
 and I want to take the first 10 lines from it  echo it to the browser ?

 thank you
 [EMAIL PROTECTED]



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


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




RE: [PHP] zlib1.1.3 and ob_gzhandler

2001-08-28 Thread Martin Helie

I was using ob_gzhandler with PHP4.0.4, and everything was fine. I was using
an older version of gd and zlib, though (I think 1.8.3 and 1.1.2,
respectively -- but I'm not certain).

There are no errors in the apache log.

-Original Message-
From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 04:07
To: Martin Helie
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] zlib1.1.3 and ob_gzhandler


Were you using output compression with previous versions of PHP?  Did it
work with images in these versions?
Also, are you seeing any errors in your Web server's error log?

Zeev

At 00:24 25-08-01, Martin Helie wrote:
Hello everyone,

I'm a newbie here, so please forgive me if this topic has been discussed
previously (I could find no mention of it).

I recently compiled PHP4.0.6 with gd1.8.4 and zlib 1.1.3 and experienced no
problems --except! If you use ob_gzhandler as your output handler, you'll
want to make sure any image functions you use in PHP return valid images
for
Netscape (I tried Netscape Communicator 4.7 on Linux, Irix and Windows and
got broken images). Funny thing is, if you right-clicked on the image and
did view image, the browser would show it correctly.

After much frustration, I realized that using _no_ output handler (at least
not ob_gzhandler) solved the problem.

I assume this is due to a different way of gzipping data in either PHP or
zlib from previous versions.

I hope someone finds this information useful -- or can provide the real
explanation, maybe even a better solution.

Martin



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

--
Zeev Suraski [EMAIL PROTECTED]
CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


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




Re: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Data Driven Design

You might be better off using the file() function which reads a file into an
array, then you can use the indexes to get whatever lines you want

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

Data Driven Design
1506 Tuscaloosa Ave
Holly Hill, Florida 32117

http://www.datadrivendesign.com
Phone: (386) 226-8979

Websites That WORK For You
- Original Message -
From: "Tauntz" [EMAIL PROTECTED]
To: "php" [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 7:59 AM
Subject: Re: [PHP] How do I read the first n lines from a file?


 hey.. thank you..
 but is it possible to read the last lets say 10 lines from a file ?


 - Original Message -
 From: "Niklas Lampn" [EMAIL PROTECTED]
 To: "Tauntz" [EMAIL PROTECTED]; "Php-General" [EMAIL PROTECTED]
 Sent: Tuesday, August 28, 2001 3:28 PM
 Subject: RE: [PHP] How do I read the first n lines from a file?


  You can do this:
 
  $i = 0;
  $fp = fopen("list.txt", "r");
  while (!feof($fp)  $i  10) {
  $i++;
  $Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
  print "$Textbr\n";
  };
 
 
  Niklas
 
  -Original Message-
  From: Tauntz [mailto:[EMAIL PROTECTED]]
  Sent: 28. elokuuta 2001 14:13
  To: [EMAIL PROTECTED]
  Subject: [PHP] How do I read the first n lines from a file?
 
 
  hi !
 
  I have a simmple question :)..
 
  Lets say that I have a file called:
  list.txt
  and I want to take the first 10 lines from it  echo it to the browser ?
 
  thank you
  [EMAIL PROTECTED]
 


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




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




[PHP] Listserv

2001-08-28 Thread Phil Spitler

Does anyone know of a good listserv written in PHP?

Thanks!

-
Phil Spitler [Vice President]
Web Hut Design, Inc.
c 704-451-1324
mailto:[EMAIL PROTECTED] 

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




[PHP] mcrypt

2001-08-28 Thread Power Programmer

I use mcrypt to encrypt passwords,  I saw somewhere international users had
trouble with the high ascii.  is the any functions that can convert the high
ascii to hex or something ?

Thanks

Randy

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001


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




RE: [PHP] How can I Get Text as it Set

2001-08-28 Thread Seb Frost

can't you just explode the string with \n as the separator?  Look up
explode function at php.net.

- seb

-Original Message-
From: Alawi Albaity [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 14:06
To: [EMAIL PROTECTED]
Subject: [PHP] How can I Get Text as it Set


when a person write in a text area

i want to get it string and format it as it set

for example

when he write

---

how are all world
i do not see you

---

i want to store it as it set in my database

i not want it to be


how are all world i do not see you
---


Thanks

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 16:38:14 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

 I use the PHP virtual() function to call a CGI script, and that works
 fine.  But I need to prevent the CGI from being executed directly, in
 case someone tries to access its URL.

 Since HTTP_REFERER is unreliable, I was wondering how others have
 solved this problem ...

move it out of the document tree if you don't want it executed via http, and
use system or exec or something instead of virtual

Thanks for the idea, but ...

That would cause the script to be executed with permissions of the web
server, and for security, that is generally prohibited by the ISP (we
are the ISP).  The only exception to that rule is public scripts which
reside in:

  safe_mode_exec_dir = /host/runphp

and are thus allowed to execute with permissions of the web server.

To provide for the execution of private user CGIs, each user has their
own /cgi directory.  Apache is configured to recognize /cgi in any URL
as an executable CGI, and wraps all user CGIs with SuEXEC, to run them
with permissions of the user, not the web server.

But of course that means user scripts are accessible via URL.  So the
question remains, how to limit their access.

As the ISP, we could use any feature of the web server for our own
CGIs, but we intentionally avoid that.  We have a hosting environment
with a rich set of customer accessible tools, and we demonstrate that
fact by using only those tools ourselves.  IOW, we use what we sell.

I have some techniques for limiting access to user CGIs, but I still
wonder how others have approached this problem ...


Egan




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




[PHP] php 4 installation error

2001-08-28 Thread Olivier VIGAND

i try to install php 4.0.6 on a linux redhat 6.0 with apache 1.3.20 and
apxs.
when i  execute the make command i have then following message

make[1]: Entering directory `/usr/local/php-4.0.6'
/bin/sh /usr/local/php-4.0.6/libtool --silent --mode=link
gcc  -I. -I/usr/local/php-4.0.6/ -I/usr/local/php-4.0.6/main -I/usr/local/ph
p-4.0.6 -I/usr/local/apache/include -I/usr/local/php-4.0.6/Zend -I/usr/local
/php-4.0.6/ext/mysql/libmysql -I/usr/local/php-4.0.6/ext/xml/expat/xmltok -I
/usr/local/php-4.0.6/ext/xml/expat/xmlparse -I/usr/local/php-4.0.6/TSRM  -DL
INUX=22 -DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 
  -o libphp4.la -rpath /usr/local/php-4.0.6/libs -avoid-version   stub.lo
Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la
ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posix/libposix.la
ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la
TSRM/libtsrm.la -lpam -ldl -lcrypt -lresolv -lm -ldl -lnsl -lresolv
/usr/bin/ld: cannot open -lclntsh: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/usr/local/php-4.0.6'
make: *** [all-recursive] Error 1

thanks

Olivier VIGAND
TEXA Services
Le Naurouze - hall b
Rue CARMIN - bp 304
31313 LABEGE Cedex
Tél : 05.62.48.40.23 Fax : 05.62.48.40.11
e-mail : [EMAIL PROTECTED]


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




[PHP] Refresh Main frame

2001-08-28 Thread Rosen

Hi,
how can I tell to refresh the main frame ( index.php ) from some subframe
 I use frames ) ?

Thanks,
Rosen




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




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Jason Brooke

if you're using apache, something along the lines of the following untested
directives should prevent anyone but the localhost (which is where your
virtual() calls should be coming from) from accessing the cgi's via http

Directory /path/to/usr/cgi
order deny, allow
deny from all
allow from localhost
/Directory

 Thanks for the idea, but ...

 That would cause the script to be executed with permissions of the web
 server, and for security, that is generally prohibited by the ISP (we
 are the ISP).  The only exception to that rule is public scripts which
 reside in:

   safe_mode_exec_dir = /host/runphp

 and are thus allowed to execute with permissions of the web server.

 To provide for the execution of private user CGIs, each user has their
 own /cgi directory.  Apache is configured to recognize /cgi in any URL
 as an executable CGI, and wraps all user CGIs with SuEXEC, to run them
 with permissions of the user, not the web server.

 But of course that means user scripts are accessible via URL.  So the
 question remains, how to limit their access.

 As the ISP, we could use any feature of the web server for our own
 CGIs, but we intentionally avoid that.  We have a hosting environment
 with a rich set of customer accessible tools, and we demonstrate that
 fact by using only those tools ourselves.  IOW, we use what we sell.

 I have some techniques for limiting access to user CGIs, but I still
 wonder how others have approached this problem ...


 Egan




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




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Jon Farmer

If you are on a unix box you might want to use the tail command... if you
use exec() the output will be in an array...

--
Jon Farmer  ??
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 12:13
To: [EMAIL PROTECTED]
Subject: [PHP] How do I read the first n lines from a file?


hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]


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




[PHP] Using Ingres II Functions

2001-08-28 Thread Jason G Ngo

The php manual mentions about compiling php with Open API headers for Ingres. We are 
using the commercial version of Ingres II for NT. Is this a different animal from 
Ingres for Linux or should I contact Computer Associates to get those headers? How do 
I get php to access directly to Ingres II for NT aside from going through ODBC?

__
www.edsamail.com

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




Re: [PHP] mcrypt

2001-08-28 Thread Jason Brooke

 I use mcrypt to encrypt passwords,  I saw somewhere international users
had
 trouble with the high ascii.  is the any functions that can convert the
high
 ascii to hex or something ?

 Thanks

 Randy

Have a squiz here:

http://www.php.net/manual/en/ref.strings.php




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




Re: [PHP] Refresh Main frame

2001-08-28 Thread * RzE:

Original message
From: Rosen [EMAIL PROTECTED]
Date: Tue, Aug 28, 2001 at 04:29:05PM +0300
Message-ID: [EMAIL PROTECTED]
Subject: [PHP] Refresh Main frame

 Hi,
 how can I tell to refresh the main frame ( index.php ) from some subframe
  I use frames ) ?
 
 Thanks,
 Rosen

/Original message

Reply

SCRIPT type=text/javascript
  window.parent.name-of-mainframe.reload(true);
/SCRIPT

That should be what you're looking for...

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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




RE: [PHP] mcrypt

2001-08-28 Thread Power Programmer

I looked at those and still don't know which one i should use   any ideas??

-Original Message-
From: Jason Brooke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 6:49 AM
To: Power Programmer
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mcrypt


 I use mcrypt to encrypt passwords,  I saw somewhere international users
had
 trouble with the high ascii.  is the any functions that can convert the
high
 ascii to hex or something ?

 Thanks

 Randy

Have a squiz here:

http://www.php.net/manual/en/ref.strings.php




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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001


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




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 23:38:30 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

if you're using apache, something along the lines of the following untested
directives should prevent anyone but the localhost (which is where your
virtual() calls should be coming from) from accessing the cgi's via http

Directory /path/to/usr/cgi
order deny, allow
deny from all
allow from localhost
/Directory


We don't define any virtual hosts in httpd.conf; instead, we use a
custom handler hooked into post-read-request.  So I won't be able to
define /path/to/usr/cgi in httpd.conf.

But if that concept will work in user .htaccess files, it would be an
improvement over my current techniques.  I'll give it a try ...

Thanks for the idea!


Egan




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




[PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread Geoff Caplan

Rasmus wrote

 This is solved by people who roll distributions.  Debian, Mandrake,
 RedHat, FreeBSD, etc.  It is very simple to add new features to an
 existing PHP setup through these binary distributions of PHP, even for
 newbies.  Once you know your way around PHP and its build system, you will
 probably want to build you own though.  It's not that difficult.


Rasmus, I really am concerned if you think that this problem is solved. In
my own experience, talking to ISPs and developers, this is a major roadblock
to the development of PHP as a platform for both sophisticated solutions on
shared servers, and major mission critical systems.

I felt that the contribution by Dan Harrington was an eloquent description
of the kind of issues that arise. My own ISP is pushing people towards Perl
and Java for precisely this reason, if they want more than the functionality
in the core build of PHP.

Look at it from their point of view. Say, as a customer, you want to use
library X. The ISP looks around and eventually find it lives on a personal
site in Greece or Hungary. Not very confidence inspiring. The ftp on this
site is broken, so they email  the author and wait a couple of days before
they can download. The documentation may be thin or non-existent. There is
no guarantee that this library has been tested to work with the release of
PHP they are running, or that it will be maintained in the future. To
install it they have to rebuild their PHP setup. There is, so far as I am
aware, no regression test they can run to be sure they have not broken their
installation for the other 400 customers using the server. Then they have to
take the server down to install the new build. Is it any wonder that they
just say no?

Now compare this with Perl or Java, where they simply plug in the new
functionality without any significant risk of breaking their server setup.

All this surely applies with even more force for a corporate IT department
evaluating PHP for a mission critical project.

If you don't agree that this is a major issue that needs to be addressed, I
fear for the future of PHP.

If I was Zend, with a major interest in promoting PHP as a professional
enterprise solution, I would be supporting something like the following:

1) Propose a library documentation standard based, say, on CPAN and get it
adopted by the community
2) Set up a site to act as a central repository for PHP libraries
3) Actively encourage library developers to provide plugin binaries, or do
it for them if need be, at least for the most important libraries
4) Do a regression test for each library once installed, and certify that it
does not break the core PHP application

An initiative of this kind would go some way to helping PHP to catch up with
competitive platforms.

However, judging from this current thread, the development team don't see
this as a priority, so I guess that it won't happen unless the user
community makes a strong case for it.

What do people think?

Geoff Caplan



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




[PHP] PHP/Sendmail interaction : how to get rid of wrong emails

2001-08-28 Thread Sebastian Stadtlich

Hi all
 
I'm facing the Problem that lots of my users are too stupid to write
their email correct.
When i mail them with php a return email is send to me by their
mailserver, which
results in LOTS of mail for the root account.
Can i get sendmail to put the returned emails in a file? so that i can
check that file with php
and delete those mails from my DB ?
or is there a way to check the email when they enter it in a form
(online versus their mailserver)?
i already check for wrong email syntax, but that does not solve the
problem...
 
Sebastian

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




Re: [PHP] Refresh Main frame

2001-08-28 Thread Rosen

Can I send params to main frame ?

Thanks,
Rosen

* RZe: [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Original message
 From: Rosen [EMAIL PROTECTED]
 Date: Tue, Aug 28, 2001 at 04:29:05PM +0300
 Message-ID: [EMAIL PROTECTED]
 Subject: [PHP] Refresh Main frame

  Hi,
  how can I tell to refresh the main frame ( index.php ) from some
subframe
   I use frames ) ?
 
  Thanks,
  Rosen

 /Original message

 Reply

 SCRIPT type=text/javascript
   window.parent.name-of-mainframe.reload(true);
 /SCRIPT

 That should be what you're looking for...

 /Reply

 --

 * RzE:


 -- 
 -- Renze Munnik
 -- DataLink BV
 --
 -- E: [EMAIL PROTECTED]
 -- W: +31 23 5326162
 -- F: +31 23 5322144
 -- M: +31 6 21811143
 --
 -- Stationsplein 82
 -- 2011 LM  HAARLEM
 -- Netherlands
 --
 -- http://www.datalink.nl
 -- 



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




RE: [PHP] PHP/Sendmail interaction : how to get rid of wrong emails

2001-08-28 Thread Jon Farmer

Well on submission of the email you could try contacting their mail server
and pretend to a have a mail for them using SMTP.

If you get a recipient ok or similar message.. ,thre is a code for it,
then at least the server accepts mail for that address. You might be better
off croning this rather than have the user wait on a http request.
Alternatively there is a perl mod that does this as well.

Secondly you could write a script that downloads the mail from root and
deletes out the database anything that bounces. You could even delete these
messages from the root account once done

HTH

Regards

Jon


--
Jon Farmer  տլ
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 15:08
To: 'Php-General (E-Mail)
Subject: [PHP] PHP/Sendmail interaction : how to get rid of wrong emails


Hi all

I'm facing the Problem that lots of my users are too stupid to write
their email correct.
When i mail them with php a return email is send to me by their
mailserver, which
results in LOTS of mail for the root account.
Can i get sendmail to put the returned emails in a file? so that i can
check that file with php
and delete those mails from my DB ?
or is there a way to check the email when they enter it in a form
(online versus their mailserver)?
i already check for wrong email syntax, but that does not solve the
problem...

Sebastian

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


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




[PHP] LAN Scripts/Functions

2001-08-28 Thread ReDucTor

Well to start I am lazy(so pls don't tell me to go make everything) :D

Now I am after Scripts and/or Functions that would be handy to use on at a
LAN, or on a Website Related to LANs...here are just a few things I have
thought up...

- Game Related
   - Game Stats
   - Clan Management
- Sharing(List of Demos, Mods, etc People can Post what they have, what they
want, etc)
   - IP/Hostname Logging(To protect Agianst, Spammers and Illigal Stuff)
   - Find All Computers on the Network(with Hostnames, etc)
   - MP3 Management
- FAQ, Help, etc Mangement(For People having trouble setting up networks)

   And anything else...

   - James ReDucTor Mitchell


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




RE: [PHP] Refresh Main frame

2001-08-28 Thread Jon Farmer

Yes but you would have to dynamically build the javascript statement up
using php with the query string you wanted and use

window.parent.name-of-frame.location.href=index.php??echo
$querystring?



--
Jon Farmer  Õ¿Õ¬
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 15:04
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Refresh Main frame


Can I send params to main frame ?

Thanks,
Rosen

* RZe: [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Original message
 From: Rosen [EMAIL PROTECTED]
 Date: Tue, Aug 28, 2001 at 04:29:05PM +0300
 Message-ID: [EMAIL PROTECTED]
 Subject: [PHP] Refresh Main frame

  Hi,
  how can I tell to refresh the main frame ( index.php ) from some
subframe
   I use frames ) ?
 
  Thanks,
  Rosen

 /Original message

 Reply

 SCRIPT type=text/javascript
   window.parent.name-of-mainframe.reload(true);
 /SCRIPT

 That should be what you're looking for...

 /Reply

 --

 * RzE:


 -- 
 -- Renze Munnik
 -- DataLink BV
 --
 -- E: [EMAIL PROTECTED]
 -- W: +31 23 5326162
 -- F: +31 23 5322144
 -- M: +31 6 21811143
 --
 -- Stationsplein 82
 -- 2011 LM  HAARLEM
 -- Netherlands
 --
 -- http://www.datalink.nl
 -- 



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


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




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Jason Brooke

 We don't define any virtual hosts in httpd.conf; instead, we use a
 custom handler hooked into post-read-request.  So I won't be able to
 define /path/to/usr/cgi in httpd.conf.

 But if that concept will work in user .htaccess files, it would be an
 improvement over my current techniques.  I'll give it a try ...

 Thanks for the idea!


 Egan

Ah ok

It will work in .htaccess if you enable it, or you might even be able to use
something like:
DirectoryMatch ^/path/to/.*/cgi

(untested again)




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




Re: [PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread Rasmus Lerdorf

 Look at it from their point of view. Say, as a customer, you want to use
 library X. The ISP looks around and eventually find it lives on a personal
 site in Greece or Hungary. Not very confidence inspiring. The ftp on this
 site is broken, so they email  the author and wait a couple of days before
 they can download. The documentation may be thin or non-existent. There is
 no guarantee that this library has been tested to work with the release of
 PHP they are running, or that it will be maintained in the future. To
 install it they have to rebuild their PHP setup. There is, so far as I am
 aware, no regression test they can run to be sure they have not broken their
 installation for the other 400 customers using the server. Then they have to
 take the server down to install the new build. Is it any wonder that they
 just say no?

But the situation is exactly the same for Perl or Python or even Java for
that matter.  None of these environments ship all the 3rd party libaries
that they connect to.  And asking us to maintain 200+ libraries is
unrealistic.

 Now compare this with Perl or Java, where they simply plug in the new
 functionality without any significant risk of breaking their server setup.

How so?  If you want Perl DBD-DBI for Oracle, you need to first go find
the Oracle client libs.  The same is true for most other Perl addons.
Chances are the ISPs are just slightly more familiar with the bits they
need to go find for Perl.  The situation is actually quite a bit messier
for Perl as there are currently over 100 time handling classes in CPAN,
for example.  PHP has a single standard one that ships with PHP.

 1) Propose a library documentation standard based, say, on CPAN and get it
 adopted by the community

Already done in PEAR

 2) Set up a site to act as a central repository for PHP libraries

See PEAR.  Unless you mean all the 3rd-party libraries like Oracle
liboci8, libmysqlclient, libgd, openldap, ucd-snmp, etc..  That simply
won't happen.

 3) Actively encourage library developers to provide plugin binaries, or do
 it for them if need be, at least for the most important libraries

You mean PHP extensions?

 4) Do a regression test for each library once installed, and certify that it
 does not break the core PHP application

Impossible to do on the 50+ platforms PHP runs on.

 An initiative of this kind would go some way to helping PHP to catch up with
 competitive platforms.

 However, judging from this current thread, the development team don't see
 this as a priority, so I guess that it won't happen unless the user
 community makes a strong case for it.

Surely there are things we can improve upon, but the current statement of
the problem whichs assumes that Perl and Java are lightyears ahead of PHP
when it comes to extending their functionality just isn't true.  They face
many of the same problems PHP does.  When you have something that can
interface with literally hundreds of 3rd-party libraries, the build system
is going to be complex.  And there are going to be versions of libraries
that don't work with certain versions of other libraries.  If Oracle
decides to export a global symbol in liboci8 that clashes with a global
symbol in some other 3rd-party library, then the PHP build breaks.  There
isn't much we can do about this.  We do not control these 3rd-party
libraries nor is there any way we possibly could control these.  We can
try to come up with a workaround, of course, but that is about the extent
of it.  The Perl, Python and Java camps have *exactly* the same issues.

-Rasmus


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




Re: [PHP] Refresh Main frame

2001-08-28 Thread * RzE:

Original message
From: Rosen [EMAIL PROTECTED]
Date: Tue, Aug 28, 2001 at 05:03:50PM +0300
Message-ID: [EMAIL PROTECTED]
Subject: Re: [PHP] Refresh Main frame

 Can I send params to main frame ?
 
 Thanks,
 Rosen

/Original message

Reply

Well... yes, you can. You'll have to use a different kind of
construction though:

SCRIPT type=text/javascript
  window.parent.name-of-mainframe.location.href = 
URL-of-mainpage?params-as-you-know;
/SCRIPT

Depending on the construction as you use it in your PHP, you can do
it in a better way. If you want to refresh the mainframe after eg
submitting a form in a subframe you can just use the reload-thing as
I sent earlier and then use sessions. Then you don't need to send
params over the URL.
But like I say... that totaly depends on the construction as you use
it.

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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




RE: [PHP] LAN Scripts/Functions

2001-08-28 Thread Erik H. Mathy

 Now I am after Scripts and/or Functions that would be handy to use on at a
 LAN, or on a Website Related to LANs...here are just a few things I have
 thought up...

el snippo!

Get thy lazy behind to Freshmeat and Sourceforge. ;)

http://www.freshmeat.net
http://sourceforge.net/

Enjoy!
- Erik

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




AW: [PHP] PHP/Sendmail interaction : how to get rid of wrong emails

2001-08-28 Thread Sebastian Stadtlich

any hint where to find the perl mod or some php-code that
contacts mailservers like you described?

 -Ursprüngliche Nachricht-
 Von: Jon Farmer [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 28. August 2001 16:14
 An: Sebastian Stadtlich; 'Php-General (E-Mail)
 Betreff: RE: [PHP] PHP/Sendmail interaction : how to get rid of wrong
 emails
 
 
 Well on submission of the email you could try contacting 
 their mail server
 and pretend to a have a mail for them using SMTP.
 
 If you get a recipient ok or similar message.. ,thre is a 
 code for it,
 then at least the server accepts mail for that address. You 
 might be better
 off croning this rather than have the user wait on a http request.
 Alternatively there is a perl mod that does this as well.
 
 Secondly you could write a script that downloads the mail 
 from root and
 deletes out the database anything that bounces. You could 
 even delete these
 messages from the root account once done
 
 HTH
 
 Regards
 
 Jon
 
 
 --
 Jon Farmer  Õ¿Õ¬
 Systems Programmer, Entanet www.enta.net
 Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
 PGP Key available, send blank email to [EMAIL PROTECTED]
 
 -Original Message-
 From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
 Sent: 28 August 2001 15:08
 To: 'Php-General (E-Mail)
 Subject: [PHP] PHP/Sendmail interaction : how to get rid of 
 wrong emails
 
 
 Hi all
 
 I'm facing the Problem that lots of my users are too stupid to write
 their email correct.
 When i mail them with php a return email is send to me by their
 mailserver, which
 results in LOTS of mail for the root account.
 Can i get sendmail to put the returned emails in a file? so that i can
 check that file with php
 and delete those mails from my DB ?
 or is there a way to check the email when they enter it in a form
 (online versus their mailserver)?
 i already check for wrong email syntax, but that does not solve the
 problem...
 
 Sebastian
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

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




[PHP] javascript code beautification

2001-08-28 Thread alvarez


Does someone know of a PHP-function to reformat Sources of C-like langs?
I need to generate syntactically uniform Javascripts independent of the
specific user input.

  Thanks,

  D. Alvarez Arribas [EMAIL PROTECTED]

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




[PHP] PWS

2001-08-28 Thread frank clarke

I have installed PHP CGI 4.0 on my Win 98 machine with
PWS and tried this script that I put in the wwwroot
directory and called test.php3:
html

body



?php

$myvar = Hello World;

echo $myvar;

?



/body

/html

I called the page from my browser like this:

http://localhost/test.php3

The page came up, but was blank. I gave the wwwroot
dir read,exe,script  privlages. The PHP CGI install
prog was supposed to take care of all config stuff,
and set up the php.ini file, however in the php.ini
file there was no entry for document root so I put
in inetpup/wwwroot but still the test.php3 page does
not work.

any ideas?

thanx
frank  www.jerseyshoreweb.com

 

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




Re: [PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread Rasmus Lerdorf

 Something which seems to not be a viable option for most things is SO
 files.  For some reason, the only real way (documented) to get
 things into PHP is to compile them all into PHP.  I've used the pdflib
 SO file and just used dl() to bring it in - works like a champ. Pity I
 can't do that for gd and other things.  I don't NEED these things
 compiled in to PHP for every page request, yet the only method that's
 ever worked for me is by compiling them directly in.  Most packages
 don't give PHP specific instructions, and even the couple that do
 don't appear to give instructions on how to make SO files.

Hrm..  Something like

./configure --with-gd=shared,/home/rasmus/gd-2.0.1 --with-jpeg-dir=/usr

Doesn't work?  If not, please file a bug report.  It certainly should.

I am not disagreeing that things could be improved, but I would like to
see some realistic suggestions.  We cannot maintain all 3rd-party libaries
that PHP connects to.  That should be obvious.  We don't have the
resources, nor are we legally able to in some cases.

-Rasmus


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




[PHP] maito function

2001-08-28 Thread Mark Lo

Hi,

   I would like to know how to use the mailto function calling the mail
client and at the same time having the subject filled with something.


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




RE: [PHP] PHP/Sendmail interaction : how to get rid of wrong emails

2001-08-28 Thread Jon Farmer

For perl look at

http://www.cpan.org/modules/by-category/19_Mail_and_Usenet_News/Mail/Mail-Ch
eckUser-1.02.readme

As for php you would need to open a socket connection.. My advice would be
to use the perl module and call a perl script from php.

Regards

Jon

--
Jon Farmer  Õ¿Õ¬
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 15:26
To: 'Php-General (E-Mail)
Subject: AW: [PHP] PHP/Sendmail interaction : how to get rid of wrong
emails


any hint where to find the perl mod or some php-code that
contacts mailservers like you described?

 -Ursprüngliche Nachricht-
 Von: Jon Farmer [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 28. August 2001 16:14
 An: Sebastian Stadtlich; 'Php-General (E-Mail)
 Betreff: RE: [PHP] PHP/Sendmail interaction : how to get rid of wrong
 emails


 Well on submission of the email you could try contacting
 their mail server
 and pretend to a have a mail for them using SMTP.

 If you get a recipient ok or similar message.. ,thre is a
 code for it,
 then at least the server accepts mail for that address. You
 might be better
 off croning this rather than have the user wait on a http request.
 Alternatively there is a perl mod that does this as well.

 Secondly you could write a script that downloads the mail
 from root and
 deletes out the database anything that bounces. You could
 even delete these
 messages from the root account once done

 HTH

 Regards

 Jon


 --
 Jon Farmer  Õ¿Õ¬
 Systems Programmer, Entanet www.enta.net
 Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
 PGP Key available, send blank email to [EMAIL PROTECTED]

 -Original Message-
 From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
 Sent: 28 August 2001 15:08
 To: 'Php-General (E-Mail)
 Subject: [PHP] PHP/Sendmail interaction : how to get rid of
 wrong emails


 Hi all

 I'm facing the Problem that lots of my users are too stupid to write
 their email correct.
 When i mail them with php a return email is send to me by their
 mailserver, which
 results in LOTS of mail for the root account.
 Can i get sendmail to put the returned emails in a file? so that i can
 check that file with php
 and delete those mails from my DB ?
 or is there a way to check the email when they enter it in a form
 (online versus their mailserver)?
 i already check for wrong email syntax, but that does not solve the
 problem...

 Sebastian

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


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


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


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




[PHP] mailto function with this subject line filled.

2001-08-28 Thread Mark Lo

Hi,

   I would like to know how to use the mailto function calling the mail
client and most importantly having the subject filled with something.

   Etc. Subject: abc inquiry


Thank you

Mark



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




Re: [PHP] LAN Scripts/Functions

2001-08-28 Thread ReDucTor

Arr...Might as well search Sourceforge and Freshmeat :D hehe But hopfully
posting here will get people to step out, and might hand out things that
have been working on similar...I know there was a person on here before,
looking for a thing to browse computers shares thro PHP...

  - James ReDucTor Mitchell
- Original Message -
From: Erik H. Mathy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 12:20 AM
Subject: RE: [PHP] LAN Scripts/Functions


  Now I am after Scripts and/or Functions that would be handy to use on at
a
  LAN, or on a Website Related to LANs...here are just a few things I have
  thought up...

 el snippo!

 Get thy lazy behind to Freshmeat and Sourceforge. ;)

 http://www.freshmeat.net
 http://sourceforge.net/

 Enjoy!
 - Erik

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



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




Re: [PHP] mailto function with this subject line filled.

2001-08-28 Thread Tyler Longren

Well, if you're just doing this with an anchor tag:
a href=mailto:[EMAIL PROTECTED]?subject=TheSubject;Mail me/a

If you're looking for php's mail function, look at www.php.net.

Tyler Longren
[EMAIL PROTECTED]
Captain Jack Communications
www.captainjack.com

- Original Message -
From: Mark Lo [EMAIL PROTECTED]
To: php general [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 9:44 AM
Subject: [PHP] mailto function with this subject line filled.


 Hi,

I would like to know how to use the mailto function calling the
mail
 client and most importantly having the subject filled with something.

Etc. Subject: abc inquiry


 Thank you

 Mark



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


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




Re: [PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread Michael Kimsal



Rasmus Lerdorf wrote:

Look at it from their point of view. Say, as a customer, you want to use
library X. The ISP looks around and eventually find it lives on a personal
site in Greece or Hungary. Not very confidence inspiring. The ftp on this
site is broken, so they email  the author and wait a couple of days before
they can download. The documentation may be thin or non-existent. There is
no guarantee that this library has been tested to work with the release of
PHP they are running, or that it will be maintained in the future. To
install it they have to rebuild their PHP setup. There is, so far as I am
aware, no regression test they can run to be sure they have not broken their
installation for the other 400 customers using the server. Then they have to
take the server down to install the new build. Is it any wonder that they
just say no?


But the situation is exactly the same for Perl or Python or even Java for
that matter.  None of these environments ship all the 3rd party libaries
that they connect to.  And asking us to maintain 200+ libraries is
unrealistic.

Now compare this with Perl or Java, where they simply plug in the new
functionality without any significant risk of breaking their server setup.


How so?  If you want Perl DBD-DBI for Oracle, you need to first go find
the Oracle client libs.  The same is true for most other Perl addons.
Chances are the ISPs are just slightly more familiar with the bits they
need to go find for Perl.  The situation is actually quite a bit messier
for Perl as there are currently over 100 time handling classes in CPAN,
for example.  PHP has a single standard one that ships with PHP.


perl -MCPAN -e shell
install Bundle::Apache

^^^
Actually I forget if that's an actual package or not.  :)

But that's *generally* as easy as it is for many Perl packages I need. 
 (I've hit a few snags,
but not as many as in PHP).  The DBD::MySQL stuff went out and grabbed 
appropriate
MySQL libraries and compiled them on my system.  PHP ships with MySQL 
stuff now,
but for other packages where I have to compile stuff (which *rarely* 
works as directed,
because, no matter WHAT version of Linux I'm using, it's not a real 
distro) this step
is always a huge pain.




1) Propose a library documentation standard based, say, on CPAN and get it
adopted by the community


Already done in PEAR

2) Set up a site to act as a central repository for PHP libraries


See PEAR.  Unless you mean all the 3rd-party libraries like Oracle
liboci8, libmysqlclient, libgd, openldap, ucd-snmp, etc..  That simply
won't happen.


It probably should, somehow.  I don't think anyone is necessarily laying 
this at
your door, Rasmus, but it's something that's vitally needed.



Surely there are things we can improve upon, but the current statement of
the problem whichs assumes that Perl and Java are lightyears ahead of PHP
when it comes to extending their functionality just isn't true.  They face
many of the same problems PHP does.  When you have something that can
interface with literally hundreds of 3rd-party libraries, the build system
is going to be complex.  And there are going to be versions of libraries
that don't work with certain versions of other libraries.  If Oracle
decides to export a global symbol in liboci8 that clashes with a global
symbol in some other 3rd-party library, then the PHP build breaks.  There
isn't much we can do about this.  We do not control these 3rd-party
libraries nor is there any way we possibly could control these.  We can
try to come up with a workaround, of course, but that is about the extent
of it.  The Perl, Python and Java camps have *exactly* the same issues.

My understanding of Java workings (others here use it - I don't) is that 
extending
is often as simple as adding another JAR file in your classpath.  Except 
for things
like PDFLib which provide an SO file, it's pretty much never that easy.  





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




[PHP] How do I get the file size of a file on my server?

2001-08-28 Thread Joseph Bannon

How do I get the file size of a file on my server using PHP?

Thanks,
Joseph

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




[PHP] Best Way?

2001-08-28 Thread Gary

Hi All,
  I have a php/mysql authentication page where 10 people can login. Each 
person has thier own page that they update daily. What would be the best 
way to take them to their update area? I thought of cookies but that 
requires them haveing cookies turned on.

TIA
Gary


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




Re: [PHP] Re: The future of PHP - accessory libraries

2001-08-28 Thread Michael Kimsal



Rasmus Lerdorf wrote:

Something which seems to not be a viable option for most things is SO
files.  For some reason, the only real way (documented) to get
things into PHP is to compile them all into PHP.  I've used the pdflib
SO file and just used dl() to bring it in - works like a champ. Pity I
can't do that for gd and other things.  I don't NEED these things
compiled in to PHP for every page request, yet the only method that's
ever worked for me is by compiling them directly in.  Most packages
don't give PHP specific instructions, and even the couple that do
don't appear to give instructions on how to make SO files.


Hrm..  Something like

./configure --with-gd=shared,/home/rasmus/gd-2.0.1 --with-jpeg-dir=/usr

Doesn't work?  If not, please file a bug report.  It certainly should.

I am not disagreeing that things could be improved, but I would like to
see some realistic suggestions.  We cannot maintain all 3rd-party libaries
that PHP connects to.  That should be obvious.  We don't have the
resources, nor are we legally able to in some cases.


That's not allowing me to simply dl() an SO file, because I don't have the
SO file to start with - that's what I was trying to get at.  If I have 
to reconfigure
everything, there's not much point, I don't think.  Unless I'm missing 
something
obvious.  I'd like to be able to simply have an SO file I can dl() 
without recompiling.
Or are you saying that that configure statement WILL create an SO file 
that can
be dl()ed later, without recompiling PHP?




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




Re: [PHP] How do I get the file size of a file on my server?

2001-08-28 Thread Andrey Hristov

filesize()

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message - 
From: Joseph Bannon [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 5:37 PM
Subject: [PHP] How do I get the file size of a file on my server?


 How do I get the file size of a file on my server using PHP?
 
 Thanks,
 Joseph
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] PWS

2001-08-28 Thread John Meyer

At 07:27 AM 8/28/01 -0700, you wrote:
I have installed PHP CGI 4.0 on my Win 98 machine with
PWS and tried this script that I put in the wwwroot
directory and called test.php3:
?php $myvar = Hello World; echo $myvar; ?
I called the page from my browser like this:

http://localhost/test.php3


Why not just name the page test.php?


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




Re: [PHP] What does PHP stand for?

2001-08-28 Thread Michael Kimsal

It stands for freedom of choice, liberty, mom and apple pie,
as far I can tell, though probably not in that order.

Niklas Lampén wrote:

It just crossed my mind: I don't know what PHP stands for...so anyone? :)


Niklas




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




Re: [PHP] How do I get the file size of a file on my server?

2001-08-28 Thread Jeff Lewis

$file_size = filesize(FILENAME);
if ($file_size = 1073741824) {
$file_size = round($file_size / 1073741824 * 100) / 100 . g;
} elseif ($file_size = 1048576) {
$file_size = round($file_size / 1048576 * 100) / 100 . m;
} elseif ($file_size = 1024) {
$file_size = round($file_size / 1024 * 100) / 100 . k;
} else {
$file_size = $file_size . b;
}

is a code snippet from the PHP manual which allows you to display the file
size rounded and then GB. MB, or KB :)

Use the absolute file path for the file you want looked at.

Jeff
- Original Message -
From: Joseph Bannon [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 10:37 AM
Subject: [PHP] How do I get the file size of a file on my server?


 How do I get the file size of a file on my server using PHP?

 Thanks,
 Joseph

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





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




Re: [PHP] Best Way?

2001-08-28 Thread Andrey Hristov

Read about SESSIONs in PHP4, they are flexible. If cookies are set off then the 
session_id is added transparantly to every URL on
the parsed page(must be switched on in php.ini, and all hrefs have to be relative like 
'/cgi-bin/some_script.php' , not
'http://www.server.com/cgi-bin/some_script.php. In the second case PHP will not 
recognize that this URL points to the same server
and will not add phpsessid=asjkdfg8912were899 in the URL.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 6:56 PM
Subject: [PHP] Best Way?


 Hi All,
   I have a php/mysql authentication page where 10 people can login. Each
 person has thier own page that they update daily. What would be the best
 way to take them to their update area? I thought of cookies but that
 requires them haveing cookies turned on.

 TIA
 Gary


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




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




Re: [PHP] maito function

2001-08-28 Thread Jason Brooke

 Hi,

I would like to know how to use the mailto function calling the
mail
 client and at the same time having the subject filled with something.

This is not a php question, it's html and easily answered by looking at a
html reference, but the answer is:
a href=mailto:user@host?subject=The Subjectclick here to email/a

jason


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




[PHP] remote hosts

2001-08-28 Thread Joseph Bannon

I run a community website with a bulletin board which I wrote in PHP. Each
member gets a profile and can submit a picture with it. However, those
members with pictures on geocites are having problems. Seems their server
denies remote hosts. Is there a way with PHP to tell their server to let
images be viewed on my website?

Thanks,
Joseph

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




[PHP] PHP on Win NT , IIS

2001-08-28 Thread Sridhar Moparthy

Hi Friends,

I am kind of new to PHP.
I am planning to install  PHP4 on Windows NT with IIS as web server and
Oracle as database. Could you please help me to understand some of the
following.

What web server is better on NT with PHP?
What PHP installation mode performs better i.e. CGI,  SAPI Module , build or
not build etc ?
What 'S' in SAPI?
Any suggestions on PHP configuration for Oracle, IIS, and LDAP?

Also I am planning to use PHP scripts to run some jobs from scheduler. Is it
a bad idea?  If not what need to be considered while installing PHP.

Any information or pointers for my above questions is a very big help.


Thank you in advance.
Sridhar Moparthy





[PHP] iODBC Troubles

2001-08-28 Thread Jonathan Hilgeman

I first tried unixODBC in order to get ODBC functionality on my FreeBSD 4.2
box with PHP 4.0.3 on Apache 1.3.14. It didn't work too well, and I kept
getting an error about undefined symbols like pthread_mutex_init or
something when trying to run command-line sample applications. So someone
suggested I use iODBC instead and I responded:

Okay, I uninstalled unixODBC and tried iODBC ( I actually began to try it
before, but then thought of something that might work on unixODBC, so I went
back to it ).

Now iODBC's odbctest application works with myODBC installed. However, after
I recompile PHP with iodbc parameters, I try to run the odbc_connect
function. If I misspell the DSN or use a non-existent one, I will get the
following message:

Warning: SQL error: [iODBC][Driver Manager]Data source name not found and no
default driver specified. Driver could not be loaded, SQL state IM002 in
SQLConnect

Now, if I spell the defined DSN correctly and reload the page, the
application just hangs. If I look at my error logs I see this:

/usr/libexec/ld-elf.so.1: /usr/local/lib/libmyodbc.so: Undefined symbol
pthread_mutex_init

Once for every time I reload the page. This is odd, because this was a
problem message I was receiving when testing unixODBC on the command line.
After I installed iODBC, the command-line application was able to connect
and query perfectly! So what gives? Why does one application work and
another does not?

I set the following environment vars - some may not make sense, but I've
been trying everything:

$EnvVars[LD_LIBRARY_PATH] = /usr/local/lib:/usr/include;
$EnvVars[LD_RUN_PATH] = /usr/local/lib:/usr/include;
$EnvVars[ODBCINI] = /usr/local/src/odbcsdk/doc/odbc.ini;
$EnvVars[PATH] =
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/hom
e/suroot/bin:/usr/libexec:/usr/include;

foreach($EnvVars as $Key = $Val)
{
 putenv($Key=$Val);
 $HTTP_ENV_VARS[$Key] = $Val;
}

I can see via phpinfo() that they are getting set. Any more ideas?

- Jonathan



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




[PHP] concatenate?

2001-08-28 Thread Jeremy Morano


Hello,

I was just wondering if there was a simple function like str_con or
something like that to concatenate strings?


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




RE: [PHP] PHP on Win NT , IIS

2001-08-28 Thread Hoover, Josh


 What web server is better on NT with PHP?

I'm sure everyone has their own opinion, but if you're using NT, then you're
probably just as well using IIS until Apache 2.0 has a final release out.

 What PHP installation mode performs better i.e. CGI,  SAPI 
 Module , build or
 not build etc ?

SAPI modules are going to typically be faster, but you don't want to use
ISAPI on IIS/NT due to stability issues.  Setup PHP as a CGI with IIS.

 What 'S' in SAPI?
 Any suggestions on PHP configuration for Oracle, IIS, and LDAP?

Server API I believe.

 Also I am planning to use PHP scripts to run some jobs from 
 scheduler. Is it
 a bad idea?  If not what need to be considered while installing PHP.

It's not a bad idea.  You just have to have PHP installed, which you will
with your setup anyway.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 



RE: [PHP] concatenate?

2001-08-28 Thread Seb Frost

$string0 = hello;
$string1 = goodbye;

$string2 = $string0 .  and  . $string1;

result:$string2 = hello and goodbye

- seb


-Original Message-
From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 16:28
To: [EMAIL PROTECTED]
Subject: [PHP] concatenate?



Hello,

I was just wondering if there was a simple function like str_con or
something like that to concatenate strings?


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




Re: [PHP] Best Way?

2001-08-28 Thread Michael Kimsal

So require them to have cookies turned on.  If it's YOUR system, you
can require whatever you want.  If this is something for your company, 
presumably
it's a business tool of some sort, and you can then require them to do 
whatever
you need to go get the job done.



Gary wrote:

 Hi All,
  I have a php/mysql authentication page where 10 people can login. 
 Each person has thier own page that they update daily. What would be 
 the best way to take them to their update area? I thought of cookies 
 but that requires them haveing cookies turned on.

 TIA
 Gary





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




Re: [PHP] Best Way?

2001-08-28 Thread Andrew Brampton

Make a login screen that can save cookies (so they don't have to type
username again) and keep a Session Varible of their username/password so u
know if they are Auth to enter certain areas...

This way if they don't have cookies they can login anyway... but if they do
allow cookies then it saves them writing their password each day

Andrew
- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 4:56 PM
Subject: [PHP] Best Way?


 Hi All,
   I have a php/mysql authentication page where 10 people can login. Each
 person has thier own page that they update daily. What would be the best
 way to take them to their update area? I thought of cookies but that
 requires them haveing cookies turned on.

 TIA
 Gary


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




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




[PHP] parse error AFTER end of included file??

2001-08-28 Thread Jaxon

Hi,

Can anyone tell me why I have a parse error here?

I'm including this file, which is 16 lines, but the error being thrown by
the including page reports a parse error in this file on line 17 ???:
?php
if (!isset($page_type))
{
$page_type = foo;
}

if (!isset($page_id))
{
$sql=select page_id from table where fieldname = $value;
$link_id = mysql_connect($host, $usr, $pass) or die (mysql_error());
mysql_select_db($database, $link_id); //select database catalog
$result = mysql_query ($sql, $link_id) or die (mysql_error());
//return result set to php
if (!$result) echo wait - no result set!;

$page_id = mysql_result($result, 0, fieldname);
?

cheers,
jaxon


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




RE: [PHP] parse error AFTER end of included file??

2001-08-28 Thread Johnson, Kirk

You need to close off this bit of code with a brace '}':

if (!isset($page_id))
{

Kirk

 -Original Message-
 From: Jaxon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 28, 2001 9:34 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] parse error AFTER end of included file??
 
 
 Hi,
 
 Can anyone tell me why I have a parse error here?
 
 I'm including this file, which is 16 lines, but the error 
 being thrown by
 the including page reports a parse error in this file on line 17 ???:
 ?php
 if (!isset($page_type))
 {
 $page_type = foo;
 }
 
 if (!isset($page_id))
 {
 $sql=select page_id from table where fieldname = $value;
 $link_id = mysql_connect($host, $usr, $pass) or die 
 (mysql_error());
 mysql_select_db($database, $link_id); //select 
 database catalog
 $result = mysql_query ($sql, $link_id) or die (mysql_error());
 //return result set to php
 if (!$result) echo wait - no result set!;
 
 $page_id = mysql_result($result, 0, fieldname);
 ?
 
 cheers,
 jaxon

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




RE: [PHP] parse error AFTER end of included file??

2001-08-28 Thread Jaxon

doh!  

thanks for spotting that Kirk!

cheers,
j


 -Original Message-
 From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 28, 2001 11:49 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] parse error AFTER end of included file??
 
 
 You need to close off this bit of code with a brace '}':
 
 if (!isset($page_id))
 {
 
 Kirk
 
  -Original Message-
  From: Jaxon [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 28, 2001 9:34 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] parse error AFTER end of included file??
  
  
  Hi,
  
  Can anyone tell me why I have a parse error here?
  
  I'm including this file, which is 16 lines, but the error 
  being thrown by
  the including page reports a parse error in this file on line 17 ???:
  ?php
  if (!isset($page_type))
  {
  $page_type = foo;
  }
  
  if (!isset($page_id))
  {
  $sql=select page_id from table where fieldname = $value;
  $link_id = mysql_connect($host, $usr, $pass) or die 
  (mysql_error());
  mysql_select_db($database, $link_id); //select 
  database catalog
  $result = mysql_query ($sql, $link_id) or die (mysql_error());
  //return result set to php
  if (!$result) echo wait - no result set!;
  
  $page_id = mysql_result($result, 0, fieldname);
  ?
  
  cheers,
  jaxon
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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




[PHP] Re: parse error AFTER end of included file??

2001-08-28 Thread James Holloway

Jaxon,

do you have a line of white space after your closing tag?

Anyway, this looks fishy to me:

if (!isset($page_id))
{
$sql=select page_id from table where fieldname = $value;
$link_id = mysql_connect($host, $usr, $pass) or die (mysql_error());
mysql_select_db($database, $link_id); //select database catalog
$result = mysql_query ($sql, $link_id) or die (mysql_error());
//return result set to php
if (!$result) echo wait - no result set!;

$page_id = mysql_result($result, 0, fieldname);

// Where is the closing } for if (!isset($page_id)){ ?
// added it below
}

I think you'd benefit from using braces more often too, so your style is
consistent. so changing

if (!$result) echo wait - no result set!;

to

if (!$result)
{
echo wait - no result set!;
}

might mean that you're able to spot things like this more easily.

Just my opinion ;)

James

Jaxon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 Can anyone tell me why I have a parse error here?

 I'm including this file, which is 16 lines, but the error being thrown by
 the including page reports a parse error in this file on line 17 ???:
 ?php
 if (!isset($page_type))
 {
 $page_type = foo;
 }

 if (!isset($page_id))
 {
 $sql=select page_id from table where fieldname = $value;
 $link_id = mysql_connect($host, $usr, $pass) or die
(mysql_error());
 mysql_select_db($database, $link_id); //select database catalog
 $result = mysql_query ($sql, $link_id) or die (mysql_error());
 //return result set to php
 if (!$result) echo wait - no result set!;

 $page_id = mysql_result($result, 0, fieldname);
 ?

 cheers,
 jaxon




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




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Wed, 29 Aug 2001 00:16:10 +1000, Jason Brooke [EMAIL PROTECTED] wrote:

It will work in .htaccess if you enable it, or you might even be able to use
something like:
DirectoryMatch ^/path/to/.*/cgi

(untested again)


After testing this I see that:

Apache uses the IP address of the remote host to determine whether to
allow or deny access.

Even though PHP is running on localhost, and making a request via the
virtual() function, Apache still knows the IP address of the remote
host, and uses that.

So what happens is that denying localhost makes it impossible to run
the CGI at all, unless you are running lynx from a local shell.  Not
exactly what I had in mind.

Unless there is some way that Apache can be tricked into believing a
request originates from the IP address of localhost, it appears that
allow/deny directives will not solve the problem of preventing direct
access to user CGIs.

It sounded like a good idea, though!


Egan




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




  1   2   3   >