RE: [PHP] Want to send email in html format

2001-04-23 Thread Peter Houchin

have  something like 

mail("$address", "$subject", "$body", "$headers \nContent-Type: text/HTML; 
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit"  )in your mail 

mail(

-Original Message-
From: George Alexander [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 4:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Want to send email in html format


Hi,

I am working on a newsletter module. What I want
to know is that how can we send a newsletter via
email to all the subscribers in html format 
with images in the htm too???

Well I am able to send an html file as attachment
using the php mail() function. But I still can't
see the images in the htm file. What I think is
the mail function just sends the file as text only
and it will not pick up the images in the html file.
So is there a way that I can send the html format 
with images via email.

Please reply asap.

regards
George

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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 do this

2001-04-23 Thread Philip Olson


I missed this thread but check out :

  http://zend.com/zend/tut/drop-down.php

regards,
philip

On Tue, 24 Apr 2001, Adrian D'Costa wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Mon, 23 Apr 2001, Andreas Landmark wrote:
> 
> > > country the corresponding cities should only be listed in the second
> > > dropdown box.  Can some one guide me.  Right below is my table
> > > structure. 
> > 
> > If you want to do this with pure php you'll need to reload the page after
> > the user selects the country from the dropdownbox, to get the webbrowser
> > to switch the cities in the city-dropdown w/o reloading you'll need to
> > use javascript or similar evil measures...
> 
> I want to do it in pure php, how do I do this.  
> 
> I tried it in javascripts but I could not get javascript to pass the
> results back to php.  My knowledge is limited
> 
> TIA
> 
> Adrian
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.2 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE65R4X/f1mUNueu/oRAmMWAJ0fwyRUjYHehZVr2y6yp+7ZcD+HVACeOINX
> 1TUK0JkhUygsXC2uawoxikM=
> =2c/I
> -END PGP SIGNATURE-
> 
> 
> -- 
> 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] Want to send email in html format

2001-04-23 Thread George Alexander

Hi,

I am working on a newsletter module. What I want
to know is that how can we send a newsletter via
email to all the subscribers in html format 
with images in the htm too???

Well I am able to send an html file as attachment
using the php mail() function. But I still can't
see the images in the htm file. What I think is
the mail function just sends the file as text only
and it will not pick up the images in the html file.
So is there a way that I can send the html format 
with images via email.

Please reply asap.

regards
George

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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 do this

2001-04-23 Thread Adrian D'Costa

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 23 Apr 2001, Andreas Landmark wrote:

> > country the corresponding cities should only be listed in the second
> > dropdown box.  Can some one guide me.  Right below is my table
> > structure. 
> 
> If you want to do this with pure php you'll need to reload the page after
> the user selects the country from the dropdownbox, to get the webbrowser
> to switch the cities in the city-dropdown w/o reloading you'll need to
> use javascript or similar evil measures...

I want to do it in pure php, how do I do this.  

I tried it in javascripts but I could not get javascript to pass the
results back to php.  My knowledge is limited

TIA

Adrian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE65R4X/f1mUNueu/oRAmMWAJ0fwyRUjYHehZVr2y6yp+7ZcD+HVACeOINX
1TUK0JkhUygsXC2uawoxikM=
=2c/I
-END PGP SIGNATURE-


-- 
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] BASIC function question

2001-04-23 Thread Philip Olson


Looks like you have a scope issue :

 $a = 'foo';

 function bar()
 { 
   $a = 'bar';
 }

 bar();

 print $a; // prints foo

outside of the function, $a has not been affected.  want it to be?  then
try something like :

 $a = 'foo';

 function bar()
 {
   global $a;

   $a = 'bar';
 }

 bar();

 print $a; // prints bar

see how that works?  now if you're just wanting to get a row count then
try something like :

 function getRowCount($table)
 {
   $r = mysql_query("SELECT count(*) FROM $table");

   return mysql_result($r,0); 
 }

 print getRowCount('tablename');

it's much faster to rely on sql count function as opposed to selecting all
data and using x_num_rows.  regarding functions and scope, see :

  http://www.php.net/manual/en/functions.php
  http://www.php.net/manual/en/language.variables.scope.php


regards,
philip



On Tue, 24 Apr 2001, Martin [ISO-8859-4] Skjöldebrand wrote:

> I have a function on an include page that says
> 
> function update_stuff($database)
> {
> include("includes/connect.inc.php");
> include("config/db.conf.php");
> $query="SELECT * FROM $database";
> $query_res=mysql_query($query, $mysql_link);
> $isequip=mysql_num_rows($query_res);
> }
> 
> If I call it from a script as
> update_stuff(equipment);
> 
> I don't get any result (I want to page to automagically update it's 
> contents) while if I include the query lines after each edit case
> it does update the page contents.
> 
> I'm missing something basic, but what?
> 
> Martin S.
> 
> -- 
> 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] Looping through variables

2001-04-23 Thread Dan Lowe

Previously, Ashley M. Kirchner said:
> 
> I have a bunch of variables (through a POST form) that I need to
> loop through and check for content.  Right now, each one is being
> evaluated separately:
> 
>   if ($var1 == '') {
> $url .= "&var1=";
> $error = 1;
>   } else {
> $url .= "&var1=".urlencode(stripslashes($var1))."";
>   }
> 
> Then repeat for $var2, $var3, etc., etc...
> 
> Is there a better way of doing this looping instead of writing the
> same routine over and over again?

// List of variable names
$var_list = array ( 'var1', 'var2', 'var3', 'var4' );

while (list($key,$val) = each($var_list)) {
if ($$val == '') {
$url .= "&".$val."=";
$error = 1;
} else {
$url .= "&".$val."=". urlencode(stripslashes($$val)) ."";
}
}

Of course, if this is all POST variables then you should be able to just
use the pre-built array $HTTP_POST_VARS (if track_vars is on).  Then you'd
do something like this instead:

while (list($key,$val) = each($HTTP_POST_VARS)) {
if ($val == '') { 
$url .= "&".$key."=";
$error = 1;
} else {
$url .= "&".$key."=".urlencode(stripslashes($val))."";
}   
}

If you're using GET rather than post, just subtitute $HTTP_GET_VARS.

 -d

-- 
If a man is standing in the middle of the forest speaking and there is
no woman around to hear him... is he still wrong? -George Carlin

-- 
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] Using

2001-04-23 Thread David Robley

On Tue, 24 Apr 2001 14:12, Martin Cameron wrote:
> Hi Rene
>
> I think that I first used a submit button about html ver 2.0. I want to
> use a button type - not submit.
>
> regards
> Martin
>
> Rene Maldonado wrote:
> > Hi I think it woulf be better this way:
> >
> > print " > name = 'hello'>";
> > print "";
> > print "";
> >
> >
> > and, the var name is $var_hello
> >
> > this way, the value of your var do not appear in the URL,
> >
> > This work for me...
> >
> > Martin Cameron wrote:
> >> Here is a simple form file that needs to pass a variable - $hello -
> >> from
> >> the form to a new function. Unfortunately, it doesn't.  When you
> >> click
> >> the submit button, the URL looks like this:
> >>
> >>  http://localhost/test5.php?action=1&hello=
> >>
> >>  It should have the variable there after the "hello="
> >>
> >> I suspect it's something to do with parent.location. Looking for a
> >> solution. Here's the script:
> >>
> >>  
> >>  
> >>  
> >>   >>  define(INITIAL_PAGE,0);
> >>  define(SELECT,1);
> >>  function initial_page(){
> >> global $PHP_SELF,$hello;
> >> print " >>  name = 'hello'>";
> >> print "";
> >> print " >>
> >> onClick=\"parent.location='$PHP_SELF?action=1&hello=$hello'\">";
> >>
> >> print "";
> >>  }
> >>
> >>  function select(){
> >> global $hello;
> >> print "Hellooo, $hello!";
> >>  }
> >>
> >>  initial_page();
> >>
> >>  switch($action){
> >>   case INITIAL_PAGE:
> >> initial_page;
> >> break;
> >>   case SELECT:
> >> select();
> >> break;
> >>   default:
> >> die ("Hello, can't find that function.");
> >>  }
> >>  ?>
> >>  
> >>  
> >>
> >> The thing is that if you simply hit "enter" - rather than click the
> >> "submit" button, the first directive in the  tag is invoked,
> >> and
> >> the value of the $hello variable IS passed.
> >>
> >> regards
> >> Martin Cameron

Why are you using the same name for the button and the text field? Surely 
this is going ot cause you a problem. also, you seem to be mixing GET and 
POST when calling the FORM action script; you might be better to pass the 
value action as a hidden field.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
Ensign Pillsbury: He's bread Jim!

-- 
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] Using

2001-04-23 Thread Martin Cameron

Hi Rene

I think that I first used a submit button about html ver 2.0. I want to
use a button type - not submit.

regards
Martin

Rene Maldonado wrote:

> Hi I think it woulf be better this way:
>
> print " name = 'hello'>";
> print "";
> print "";
>
>
> and, the var name is $var_hello
>
> this way, the value of your var do not appear in the URL,
>
> This work for me...
>
>
>
> Martin Cameron wrote:
>
>> Here is a simple form file that needs to pass a variable - $hello -
>> from
>> the form to a new function. Unfortunately, it doesn't.  When you
>> click
>> the submit button, the URL looks like this:
>>
>>  http://localhost/test5.php?action=1&hello=
>>
>>  It should have the variable there after the "hello="
>>
>> I suspect it's something to do with parent.location. Looking for a
>> solution. Here's the script:
>>
>>  
>>  
>>  
>>  >  define(INITIAL_PAGE,0);
>>  define(SELECT,1);
>>  function initial_page(){
>> global $PHP_SELF,$hello;
>> print ">  name = 'hello'>";
>> print "";
>> print ">
>> onClick=\"parent.location='$PHP_SELF?action=1&hello=$hello'\">";
>>
>> print "";
>>  }
>>
>>  function select(){
>> global $hello;
>> print "Hellooo, $hello!";
>>  }
>>
>>  initial_page();
>>
>>  switch($action){
>>   case INITIAL_PAGE:
>> initial_page;
>> break;
>>   case SELECT:
>> select();
>> break;
>>   default:
>> die ("Hello, can't find that function.");
>>  }
>>  ?>
>>  
>>  
>>
>> The thing is that if you simply hit "enter" - rather than click the
>> "submit" button, the first directive in the  tag is invoked,
>> and
>> the value of the $hello variable IS passed.
>>
>> regards
>> Martin Cameron
>



Re: [PHP] Why is it dangerous to have register_globals on?

2001-04-23 Thread Rasmus Lerdorf

> Actually it's not "dangerous" per se.
>
> However if can be very dangerous if you aren't being careful in your code,
> for instance, consider this.
>
> Let's say I've conditionally set $sql somewhere else in the code based upon
> certain conditions, which works fine. But let's say those conditions aren't
> met so $sql doesn't get set to anything since it's not really used. Now
> consider this code:
>
> if ($sql)
> {
> $result = mysql_query($sql);
> }
>
> Now that would be fine for all normal instances. But now what if someone
> appends this onto the end of your url:
>
> ?query=
>
> ...plus something like "DROP databasename". It doesn't take too much
> imagination to see what kind of things could happen if someone just had a
> little bit of knowledge about how your code works.
>
> Thus you have two options. One is of course to turn register_globals off,
> but ALWAYS ALWAYS _ALWAYS_ set a default for every variable you refer to in
> your script at some point before doing anything with it. So if you use $sql
> be 100% sure that it has been set $sql explicitly in your code before doing
> anything with it.

Whether you turn register_globals off or not, you need to always watch
cases like this.  I have seen many people say that register_globals is
inherently insecure and then they turn it off and go through and use
something like $HTTP_POST_VARS['sql'] everywhere they used to use $sql.
This only makes it slightly more tedious to inject bogus variables into
since the attacker now needs to make a trivial little form to inject stuff
into the POST data instead of just sticking it onto the URL.
Security-wise there is no difference whatsoever.

Never never never trust user-supplied data implicitly.  Always check
anything that could possibly come from the user.  For internal variables,
always initialize them and just generally think things through as you
write your scripts.  This is no different in PHP than in any other
scripting language used for web work.

-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] PHP and useradd

2001-04-23 Thread Steve Werby

"Nashirak Bosk" <[EMAIL PROTECTED]> wrote:
> Ok.  I have looked at all my options for creating account dynamically
> from a webpage, and have not come up with much.  I want to create an
> user account that only creates a mail account.  I think I can do this
> with the useradd command (I am running Linux).   Like this:
>
>useradd accountname -s /bin/false   then I could su into the
> accountname and run the passwd command.
>
> Now I could do this, with PHP using the popen() function.  There is only
> 1 problem.  I would have to run all this as root since only root is able
> to run this command.   And even if I could it would be a big no no to
> somehow make PHP become root and then run this command.  Any other
> suggestions on how to create an account dynamically with PHP or how to
> modify what I about the useradd command to get this to work?  Thanks

I would recommend installing PHP as a CGI and making the script that calls
useradd owned by root and implementing some sort of authentication scheme to
prevent unauthorized use or I would write the useradd command to a database
(or text file) and have a bash script owned by root check it for entries
from a cron job and run the commands if entries are found.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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] BASIC function question

2001-04-23 Thread David Robley

On Tue, 24 Apr 2001 12:57, Martin Skjöldebrand wrote:
> I have a function on an include page that says
>
> function update_stuff($database)
> {
> include("includes/connect.inc.php");
> include("config/db.conf.php");
> $query="SELECT * FROM $database";
> $query_res=mysql_query($query, $mysql_link);
> $isequip=mysql_num_rows($query_res);
> }
>
> If I call it from a script as
> update_stuff(equipment);
>
> I don't get any result (I want to page to automagically update it's
> contents) while if I include the query lines after each edit case
> it does update the page contents.
>
> I'm missing something basic, but what?
>
> Martin S.

Your function isn't doing anything to return values of the rows you are 
selecting.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
I'm no stranger, just a friend you haven't met...

-- 
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] Sensitive Information (like CC)

2001-04-23 Thread Aaron D. Turner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Have the email be a "you've got an order" email that has a URL in it which
the then can view the order via SSL.  That way you don't have to put all
the information in the email.  PGP is another option, but I find it beyond
the abilities of many winblows users.

- -- 
Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org>  URI:www.synfin.net
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety. -- Benjamin Franklin

pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749  9A8F 8707 9817 F86E DAE6
All emails by me are PGP signed; a lack of a signature indicates a forgery.
I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80  596E 60BF 451B 20E8 

On Mon, 23 Apr 2001, Ashley M. Kirchner wrote:

> 
> What's the best (secure?) way of transmitting sensitive information
> over email?  I'm helping some friends build an online order form.  They
> have a Thawte certificate and are already using it for the order form,
> but they would like the information to be emailed to them when an order
> is placed.  The problem is, the information contains everything, the
> person's name, address, credit card information.  Obviously I can't just
> email this over over the ether, so how do people deal with this type of
> stuff?
> 
> The server is a unix machine, and they are using winblows to read
> email.
> 
> --
> H | Hi, I'm currently out of my mind.  Please leave a message.  BP!
>   |
>   ~
>   Ashley M. Kirchner    .   303.442.6410 x130
>   Director of Internet Operations / SysAdmin. 800.441.3873 x130
>   Photo Craft Laboratories, Inc. .eFax 248.671.0909
>   http://www.pcraft.com  .3550 Arapahoe Ave, #6
>   .. .  .  . .Boulder, CO 80303, U.S.A.
> 
> 
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

iEYEARECAAYFAjrk9FwACgkQhweYF/hu2uaojACfQB0rb/s6fE2TJdc0JVIfgOAD
ZdkAn15Cly3vZ2cwUwOFZrmEt+T7ZP/G
=fORj
-END PGP SIGNATURE-



-- 
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] is_link() behavior

2001-04-23 Thread J. Jones

On Tue, Apr 24, 2001 at 05:31:04AM +0200, Martin Skjöldebrand wrote:
> > Warning: stat failed for /tmp/this_is_a_symlink (errno=2 - No such file or
> > directory) in ./test.php on line 3.
> 
> Do you have permission to read the /tmp catalog? Otherwise you may get that 
> error I suppose.
> 
> M.

Yes.. the script was executed as root, so permissions aren't an issue. ;)
The error, I believe, is generated from is_link() trying to do a stat() on
the link's target, which doesn't exist.  The symlink is broken the second
time around (foo doesn't exist).


-- 
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] Sensitive Information (like CC)

2001-04-23 Thread Jason Murray

> What's the best (secure?) way of transmitting sensitive 
> information over email?  I'm helping some friends build an online 
> order form.  They have a Thawte certificate and are already using 
> it for the order form, but they would like the information to be 
> emailed to them when an order is placed.  The problem is, the 
> information contains everything, the person's name, address, 
> credit card information.  Obviously I can't just email this over 
> over the ether, so how do people deal with this type of stuff?

Use PGP to encrypt the mail. 

The web server will need to have a PGP environment set up for the 
user running the httpd (usually "nobody" on a Linux box). Thus, PHP
and access and execute PGP.

Set up PGP on the recipients' computer. Probably a good idea to 
make the email address "[EMAIL PROTECTED]" or "sales@", and
not an individual user - makes it easier to manage a bunch of people
receiving orders.

Export the public key for the recipient's address, and send it to
the web server. Have the sysadmin import the public key into the
web server's user's PGP keyring with full trust and privileges, as
this will stop PGP asking "do you really want to trust this user?"
in the middle of a batch process and thus breaking everything.

Once you can PGP encrypt a text file to that public key without 
having PGP ask for confirmation of anything, you need to hook PHP
up to it. You need the environment variable PGPPATH set, so:



Then you can write out the original mail with all the naughty info
in it to a file, run PGP over it to produce an encrypted version, 
delete the original and mail the encrypted version.

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]




Re: [PHP] is_link() behavior

2001-04-23 Thread Martin Skjöldebrand

J. Jones wrote:

> Forgive me for my ignorance, but I've noticed some unwanted behavior (IMO,
> at least) with the is_link() function.  Given the simple code..
> 
> if ( is_link ("/tmp/this_is_a_symlink") )
> print ("Success\n");
> 
> and the file..
> lrwxrwxrwx 1 root root 5 Apr 23 21:19 /tmp/this_is_a_symlink -> /bin/
> the above obviously prints 'Success\n'.
> 
> However, if I break the symlink, with something like the following..
> lrwxrwxrwx 1 root root 4 Apr 23 21:21 /tmp/this_is_a_symlink -> foo
> the script fails with..
> 
> Warning: stat failed for /tmp/this_is_a_symlink (errno=2 - No such file or
> directory) in ./test.php on line 3.

Do you have permission to read the /tmp catalog? Otherwise you may get that 
error I suppose.

M.


-- 
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_exists with remote file???

2001-04-23 Thread J. Jones

On Tue, Apr 24, 2001 at 12:20:01AM -0300, Paulo - Bruc Internet wrote:
> Can anyone help me?
> 
> The sintax of function file_exists is:
> 
> if(file_exists("t.txt"))
> {
> print...
> }
> 
> Does anybody knows how can work with remote files?
> This is not working:
> if(file_exists("http://www.ttt.com/t.txt";))
> {
> print...
> }
> 
> Thanks for any help,
> 
> Paulo Roberto Ens - Brazil
> Bruc Sistemas para Internet Ltda
> mailto:[EMAIL PROTECTED]
> http://www.bruc.com.br
> 
> Diversão ou Cultura? CuritibaWeb.com - O Melhor Guia de Curitiba!
> http://www.curitibaweb.com

>From the manual..
file_exists() will not work on remote files; the file to be examined
must be accessible via the server's filesystem.

Try something like this instead:
if (($fd = fopen ("http://url/file.ext";, "r"))) {
print...
}

-- 
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] BASIC function question

2001-04-23 Thread Martin Skjöldebrand

I have a function on an include page that says

function update_stuff($database)
{
include("includes/connect.inc.php");
include("config/db.conf.php");
$query="SELECT * FROM $database";
$query_res=mysql_query($query, $mysql_link);
$isequip=mysql_num_rows($query_res);
}

If I call it from a script as
update_stuff(equipment);

I don't get any result (I want to page to automagically update it's 
contents) while if I include the query lines after each edit case
it does update the page contents.

I'm missing something basic, but what?

Martin S.

-- 
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] file_exists with remote file???

2001-04-23 Thread Paulo - Bruc Internet

Can anyone help me?

The sintax of function file_exists is:

if(file_exists("t.txt"))
{
print...
}

Does anybody knows how can work with remote files?
This is not working:
if(file_exists("http://www.ttt.com/t.txt";))
{
print...
}

Thanks for any help,

Paulo Roberto Ens - Brazil
Bruc Sistemas para Internet Ltda
mailto:[EMAIL PROTECTED]
http://www.bruc.com.br

Diversão ou Cultura? CuritibaWeb.com - O Melhor Guia de Curitiba!
http://www.curitibaweb.com



[PHP] Sensitive Information (like CC)

2001-04-23 Thread Ashley M. Kirchner


What's the best (secure?) way of transmitting sensitive information
over email?  I'm helping some friends build an online order form.  They
have a Thawte certificate and are already using it for the order form,
but they would like the information to be emailed to them when an order
is placed.  The problem is, the information contains everything, the
person's name, address, credit card information.  Obviously I can't just
email this over over the ether, so how do people deal with this type of
stuff?

The server is a unix machine, and they are using winblows to read
email.

--
H | Hi, I'm currently out of my mind.  Please leave a message.  BP!
  |
  ~
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc. .eFax 248.671.0909
  http://www.pcraft.com  .3550 Arapahoe Ave, #6
  .. .  .  . .Boulder, CO 80303, U.S.A.



-- 
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] date add more 7 days, help needed.

2001-04-23 Thread Maxim Maletsky

hehe ... here I am again:

mySQL? if yes then do date+INTERVAL 8 DAYS.

PHP? then convert everything into UNIX timestamp with mktime() and do a plus
of (60*60*24 for each day) and then reconvert it back into the time format
you want.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com

 

-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date add more 7 days, help needed.


Hi all
I have variable that store date like this :
$First = "$year" . "$month" . "$date"; ( which return 20010201 for Feb
1,2001) . 
I wanna do the loop 8 times that will add 7 more days to the begining date
and keep adding it for 8 times. The looping thing is okay but I am not sure
if I simply plus 7 on top of date value will give me the date value I want
to have. 
I try the sniplet below and it did not work, always return zero. What should
I do here???
**
$First = "$year" . "$month" . "$date";
for ($i=1; $i  < 9 ; ++$i){
  $First = $First + 7 ;
}
***
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"

-- 
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] is_link() behavior

2001-04-23 Thread J. Jones

Forgive me for my ignorance, but I've noticed some unwanted behavior (IMO,
at least) with the is_link() function.  Given the simple code..

if ( is_link ("/tmp/this_is_a_symlink") ) 
print ("Success\n");

and the file..
lrwxrwxrwx 1 root root 5 Apr 23 21:19 /tmp/this_is_a_symlink -> /bin/
the above obviously prints 'Success\n'.

However, if I break the symlink, with something like the following..
lrwxrwxrwx 1 root root 4 Apr 23 21:21 /tmp/this_is_a_symlink -> foo
the script fails with..

Warning: stat failed for /tmp/this_is_a_symlink (errno=2 - No such file or
directory) in ./test.php on line 3.

The file /tmp/this_is_a_symlink is still a symlink, so it seems to me that
the is_link() function should still return true, whether or not the
symlink's target exists.  Is there perhaps a function I have yet to
discover that provides that behavior, without verifying the link's target?

I ask this because much of linux's /proc contains (intentionally) broken symlink's
and is_link()'s behavior is making the scouring of /proc very difficult on
me.  ;)

Thanks for any input..
J. Jones

-- 
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] Now, why doesn't this work? (this thread can die off now)

2001-04-23 Thread Tyler Longren

Yup...it was the table.  I have 2 sets of variables on my config.inc file.
One is for my local servers, the others are for remote servers (the host).
I didn't have $mysql_shows_table defined in the remote servers section.
Sorry about that everyone.

This thread can die now.

Tyler

> -Original Message-
> From: Jason Murray [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 9:27 PM
> To: 'Tyler Longren'
> Subject: RE: [PHP] Now, why doesn't this work?
>
>
> > :)
> > read the updated message..forgot to say that I've done that
> > already in the orig message.
>
> You said you'd executed it yourself - you didn't say that you'd
> executed the SQL that PHP is sending to MySQL. Get it to output
> that SQL, copy it from the web browser and execute it.
>
> I suspect the $mysql_shows_table or whatever it's called is not
> being set.
>
> 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] date add more 7 days, help needed.

2001-04-23 Thread Jacky

Hi all
I have variable that store date like this :
$First = "$year" . "$month" . "$date"; ( which return 20010201 for Feb 1,2001) . 
I wanna do the loop 8 times that will add 7 more days to the begining date and keep 
adding it for 8 times. The looping thing is okay but I am not sure if I simply plus 7 
on top of date value will give me the date value I want to have. 
I try the sniplet below and it did not work, always return zero. What should I do 
here???
**
$First = "$year" . "$month" . "$date";
for ($i=1; $i  < 9 ; ++$i){
  $First = $First + 7 ;
}
***
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] function in if statement not executed ?-->> Help

2001-04-23 Thread PHPhyperboy

actually yes, the r is "register" the l is "login" and r to y is "yes" r to
d is "done" if that makes sense? :)

the actual problem is coming from a missing { or an }
I just actually found a misplaced  "}"
other then that Im still at a loss


- Original Message -
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'PHPhyperboy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 10:25 PM
Subject: RE: [PHP] function in if statement not executed ?-->> Help


> > if($l=="d") {
> > log_user();
> > } else if($r=="d") {
> > add_user();
> > } else {
> > $r ="y";
> > }
>
> looks like:
>
> 1. $l is not set to "d".
>
> 2. $r is not set to "d".
>
> $r may be set to "y" by this code. Did you check it?
>
> Jason



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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] Now, why doesn't this work?

2001-04-23 Thread David Robley

On Tue, 24 Apr 2001 11:50, Tyler Longren wrote:
> Hello everybody,
>
> My host seems to be having some weird problems.
> Here's a piece of code:
>
> if (($this_month_sql = mysql_query("SELECT * FROM $mysql_shows_table
> WHERE month = '$thismonth' ORDER BY timestamp ASC")) &&
> ($next_month_sql = mysql_query("SELECT * FROM $mysql_shows_table WHERE
> month = '$nextmonth' ORDER BY timestamp ASC"))) {
>   do this();
> }
> else {
>   print ("MySQL query DIDN'T RETURN
> DATAError No.:".  mysql_errno(). "MySQL Error:".
> mysql_error(). "");
> }
>
> Now, this is the error that I get from this:
> MySQL query DIDN'T RETURN DATA
> Error No.:1064
> MySQL Error:You have an error in your SQL syntax near 'WHERE month =
> '4' ORDER BY timestamp ASC' at line 1
>
> Why I get this, I don't know.  The code hasn't changed in a few days,
> and it just started doing that today.  This also works on my home Win2k
> box, and Slackware box.  The versions of PHP, MySQL, and apache are the
> same on my host and on my Linux box.  The version of php and mysql are
> the same on ALL of the machines (host, Win2k, Slackware).
>
> Any ideas?
>
> Thanks everyone,
> Tyler

IIRC the syntax error is just before the snippet returned by mysqlerror 
so you might check the value in $mysql_shows_table is correct.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] function in if statement not executed ?-->> Help

2001-04-23 Thread Jason Murray

> if($l=="d") {
> log_user();
> } else if($r=="d") {
> add_user();
> } else {
> $r ="y";
> }

looks like:

1. $l is not set to "d".

2. $r is not set to "d".

$r may be set to "y" by this code. Did you check it?

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]




RE: [PHP] Now, why doesn't this work (update)?

2001-04-23 Thread Tyler Longren

Also, I ran this SQL on the regular mysql client, and it returned the
correct data...for some reason if I run it in PHP, I get the SQL syntax
error.

Tyler

> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 9:20 PM
> To: PHP-General
> Subject: [PHP] Now, why doesn't this work?
>
>
> Hello everybody,
>
> My host seems to be having some weird problems.
> Here's a piece of code:
>
> if (($this_month_sql = mysql_query("SELECT * FROM $mysql_shows_table WHERE
> month = '$thismonth' ORDER BY timestamp ASC")) && ($next_month_sql =
> mysql_query("SELECT * FROM $mysql_shows_table WHERE month = '$nextmonth'
> ORDER BY timestamp ASC"))) {
>   do this();
> }
> else {
>   print ("MySQL query DIDN'T RETURN
> DATAError No.:".  mysql_errno(). "MySQL Error:".
> mysql_error().
> "");
> }
>
> Now, this is the error that I get from this:
> MySQL query DIDN'T RETURN DATA
> Error No.:1064
> MySQL Error:You have an error in your SQL syntax near 'WHERE month = '4'
> ORDER BY timestamp ASC' at line 1
>
> Why I get this, I don't know.  The code hasn't changed in a few
> days, and it
> just started doing that today.  This also works on my home Win2k box, and
> Slackware box.  The versions of PHP, MySQL, and apache are the same on my
> host and on my Linux box.  The version of php and mysql are the
> same on ALL
> of the machines (host, Win2k, Slackware).
>
> Any ideas?
>
> Thanks everyone,
> Tyler
>
>
> --
> 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] Now, why doesn't this work?

2001-04-23 Thread Jason Murray

> Any ideas?

Yes - get it to output the actual SQL that's running. 

That way you can execute it yourself, and see what's going wrong.

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]




Re: [PHP] date plus 7 more days

2001-04-23 Thread David Robley

On Tue, 24 Apr 2001 23:44, Jacky wrote:
> Hi all
> I have variable that store date like this :
> $First = "$year" . "$month" . "$date"; ( which return 20010201 for Feb
> 1,2001) . I wanna do the loop 8 times that will add 7 more days to the
> begining date and keep adding it for 8 times. The looping thing is okay
> but I am not sure if I simply plus 7 on top of date value will  give me
> the date value I want to have. Is this sniplet below okay?
> **
> $First = "$year" . "$month" . "$date";
> for ($i=1; $i  < 9 ; ++$i){
>   $First = $First + 7 ;
> }
> ***

Try it and you'll see why it won't work as you expect. Then check the 
manual for mktime which can do what you want.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] function in if statement not executed ?-->> Help

2001-04-23 Thread PHPhyperboy

hey guys, I have this simple if else statement going and depending on a var
it executes a funtion, but for some reason its not running the function or
so I think...
heres code snippet :


-
TIA

Andy


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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]




[PHP] Now, why doesn't this work?

2001-04-23 Thread Tyler Longren

Hello everybody,

My host seems to be having some weird problems.
Here's a piece of code:

if (($this_month_sql = mysql_query("SELECT * FROM $mysql_shows_table WHERE
month = '$thismonth' ORDER BY timestamp ASC")) && ($next_month_sql =
mysql_query("SELECT * FROM $mysql_shows_table WHERE month = '$nextmonth'
ORDER BY timestamp ASC"))) {
do this();
}
else {
print ("MySQL query DIDN'T RETURN
DATAError No.:".mysql_errno(). "MySQL Error:". mysql_error().
"");
}

Now, this is the error that I get from this:
MySQL query DIDN'T RETURN DATA
Error No.:1064
MySQL Error:You have an error in your SQL syntax near 'WHERE month = '4'
ORDER BY timestamp ASC' at line 1

Why I get this, I don't know.  The code hasn't changed in a few days, and it
just started doing that today.  This also works on my home Win2k box, and
Slackware box.  The versions of PHP, MySQL, and apache are the same on my
host and on my Linux box.  The version of php and mysql are the same on ALL
of the machines (host, Win2k, Slackware).

Any ideas?

Thanks everyone,
Tyler


-- 
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] date plus 7 more days

2001-04-23 Thread Jacky

Hi all
I have variable that store date like this :
$First = "$year" . "$month" . "$date"; ( which return 20010201 for Feb 1,2001) . 
I wanna do the loop 8 times that will add 7 more days to the begining date and keep 
adding it for 8 times. The looping thing is okay but I am not sure if I simply plus 7 
on top of date value will  give me the date value I want to have. Is this sniplet 
below okay?
**
$First = "$year" . "$month" . "$date";
for ($i=1; $i  < 9 ; ++$i){
  $First = $First + 7 ;
}
***
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] PHP and useradd

2001-04-23 Thread Plutarck

One way is to use a cron job to handle the account adding from a text file,
which PHP will write the data into.

Since the cron job will use only the account name and password the user
submitted it's much less of a security risk.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Nashirak Bosk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok.  I have looked at all my options for creating account dynamically
> from a webpage, and have not come up with much.  I want to create an
> user account that only creates a mail account.  I think I can do this
> with the useradd command (I am running Linux).   Like this:
>
>useradd accountname -s /bin/false   then I could su into the
> accountname and run the passwd command.
>
> Now I could do this, with PHP using the popen() function.  There is only
> 1 problem.  I would have to run all this as root since only root is able
> to run this command.   And even if I could it would be a big no no to
> somehow make PHP become root and then run this command.  Any other
> suggestions on how to create an account dynamically with PHP or how to
> modify what I about the useradd command to get this to work?  Thanks
>
>
>
> --
> ---
>
> Clayton Bluhm
>
> Computer Engineering Student
>
> [EMAIL PROTECTED] (School)
> [EMAIL PROTECTED] (home)
>
>
>



-- 
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] Question on installation

2001-04-23 Thread Nashirak Bosk

Well if you are using Linux you could try looking for a .o file or I think they have 
RPMs for some of these that just have a .o file in them and then configure php for 
you.  Basically what you are looking for is a php_$whatever_module.  Like I downloaded
php_imap_mod.rpm and php_mysql_mod.rpm  I am sure they have an ODBC.  If not then you 
will have to do it the hard way and find a ODBC.o or something that has been compiled 
with php before, put it in the correct directory (I cant remember which) and then edit
/etc/php.ini to load in the module when php is run.  If you still cant find any of 
this for a module you want sorry you will have to recompile.  :)  Oh by the way 
all the stuff I described above is a sinch with Debian Linux :) (not that I am 
partial).

Good Luck,



Jason Lam wrote:

> I have installed the RPM version of PHP that came with a Linux dist. Obviously, it 
>didn't came with a lot of the goodies, like ODBC. Now, if I have to install those 
>modules, is there anyway I can "JUST" compile those modules and install it with 
>/etc/php.ini ?
>
> Is this a recommended way? Or should I just re-compile everything? That will really 
>defeat the purpose of a packaging system
>
> Jason Lam

--
---

Clayton Bluhm

Computer Engineering Student

[EMAIL PROTECTED] (School)
[EMAIL PROTECTED] (home)





Re: [PHP] preg_replace on array with "E (PCRE_DOLLAR_ENDONLY)" modifier

2001-04-23 Thread CC Zona

In article <9c2j66$1nt$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Plutarck") wrote:

> If you are trying to match a $ in your code, just use a backspace to escape
> it.

Or enclose it in square braces.  [$]

Or use preg_quote().

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




[PHP] PHP and useradd

2001-04-23 Thread Nashirak Bosk

Ok.  I have looked at all my options for creating account dynamically
from a webpage, and have not come up with much.  I want to create an
user account that only creates a mail account.  I think I can do this
with the useradd command (I am running Linux).   Like this:

   useradd accountname -s /bin/false   then I could su into the
accountname and run the passwd command.

Now I could do this, with PHP using the popen() function.  There is only
1 problem.  I would have to run all this as root since only root is able
to run this command.   And even if I could it would be a big no no to
somehow make PHP become root and then run this command.  Any other
suggestions on how to create an account dynamically with PHP or how to
modify what I about the useradd command to get this to work?  Thanks



--
---

Clayton Bluhm

Computer Engineering Student

[EMAIL PROTECTED] (School)
[EMAIL PROTECTED] (home)





[PHP] gif and jpeg support

2001-04-23 Thread Dan Phoenix


Downloaded the latest snapshot so postgres would work.
ALl is fine except i cannot get gif and jpeg to work at same time.
http://www.ranman.huggle.com/gd_plus_gif.txt

i followed those instructions when i tried at first to build stable.
and yes i did compile jpeg etc into gd.

my configure line is

CFLAGS='-O2' ./configure --with-mysql=/usr/local/mysql
--with-gd=/usr/local/gd --enable-inline-optimization --with-gnu-ld
--with-apache=../apache_1.3.19 --enable-track-vars --disable-debug
--with-ttf --with-config-file-path=/usr/local/apache --enable-xml
--with-pgsql=/usr/local/pgsql --with-jpeg-dir=/usr/local

problem is when i do --with-jpeg-dir=/usr/local i loose gif support.
when i take the jpeg line out of configure i get gif support back but
no jpeg..anyone run into this can help me out?

I would be interested in hearing from anyone that got them both working.

ps. I am not on any of these lists...please email me directly.


Regards,


--
Dan

+--+ 
|  BRAVENET WEB SERVICES   |
| [EMAIL PROTECTED] |
|  screen;cd /usr/src;make buildworld;cd ~ |
| cp MYKERNEL /sys/conf/i386;cd /usr/src   |
|make buildkernel KERNCONF=MYKERNEL|
|make installkernel KERNCONF=MYKERNEL;make installworld|
+__+


-- 
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] trouble reading a database (fwd)

2001-04-23 Thread johndmiller

Thanks for the pointer about  ' vs ". I have changed my code to used
these.  The code is a lot cleaner.  I am still getting a not found error.
Below is the new "cleaner" messages that I display.  One point that may be
important, FLD_Name and FLD_Path are the primary key.  Couple of
questions, can I recreate the same key and use just one name (looks like
I could) and would this help with the problem.

Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = 'IceCastle.jpg' and FLD_Path = 
'/var/www/html/slidecollection/WinterCarnival'
Error Results
Result of read Resource id #2
Number or Rows 0
Insert Sql INSERT INTO TBL_Picture  VALUES ('IceCastle.jpg', 
'/var/www/html/slidecollection/WinterCarnival', '1984', 'This is a picture of an Ice 
Castle at night.', 'Ice Castle')
Error Results Duplicate entry 
'/var/www/html/slidecollection/WinterCarnival-IceCastle.jpg' for key 1

Can I set up my primary key On Tue, 24 Apr 2001, Jason Murray wrote:

> > Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName =
> > "SailBoat.jpg"and FLD_Path ="
> /var/www/html/slidecollection/WinterCarnival"
>
> This is a little hideous.
>
> For one thing, you should probably use ' and not ". It may not
> make a difference to MySQL, but it does to other databases you
> may use in the future.
>
> For the FLD_Path comparison, you are looking for something that
> specifically STARTS with a space. I'd bet this is why the script
> is getting 0 rows back - probably none of your FLD_Path's start
> with a space.
>
> 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]




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Joe Brown

IMHO, an ideal default is the path up to php.exe with a conf/php.ini

This would be a good default for unix/windows both, and maintain some
resembelence consistency with Apache if not anything else.

Then I could throw php.ini in the apache conf dir and php.exe would find it
there, w/o me having to tell it where.

If instead I have a c:\php or a c:\php4 I know a directory conf beneath
should contain the appropriate php.ini.

Also works well for /usr/local/php/conf/php.ini
or where ever php ends up.

Global .ini files can be difficult to manage if you've got mutiple versions
with different setting requirements.  Or just "knowing" where to find the
damn thing.

-Joe

"Daniel Beulshausen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Monday, April 23, 2001, 10:19:36 PM, you wrote:
> > It should be the Program Files directory, concatenated with 'PHP';
Under
> > Windows, we should behave like Windows apps...
>
> we should use registry entries to determine/set the path(s), if those
> entries aren't present it could default to some hardcoded values...
>
> daniel
>
> > Zeev
> >
> > At 21:50 23/4/2001, James Moore wrote:
> >>how about defaulting to SystemDrive\\php4 but also allowing a
envromental
> >>variable to be set so
> >>
> >>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
> >>
> >>or somthing like that which works in C
> >>
> >>- James
> >>
> >> > -Original Message-
> >> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> >> > Sent: 23 April 2001 19:24
> >> > To: James Moore
> >> > Cc: [EMAIL PROTECTED]
> >> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
> >> >
> >> >
> >> > Hi James,
> >> >
> >> > No problem. I change it to
> >> >
> >> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
> >> >
> >> > What about all the other directories ? These should be configureable
too.
> >> >
> >> > - Frank
> >> >
> >> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
> >> > > >
> >> > > >   Modified files:
> >> > > > /php4/mainconfig.w32.h php_ini.c
> >> > > > +
> >> > > > +/* Define directory constants for php and pear */
> >> > > > +#define PHP_BINDIR "c:\\php4"
> >> > > > +#define PHP_LIBDIR "c:\\php4"
> >> > > > +#define PHP_DATADIR "c:\\php4"
> >> > > > +#define PHP_SYSCONFDIR "c:\\php4"
> >> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
> >> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> >> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> >> > >
> >> > > Ugh thats very very ugly.. I dont want my files there can you
please use
> >> > > SYSROOT instead of c:\\winnt please.
> >> > >
> >> > > - James
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > PHP CVS 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 CVS 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 CVS 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]
>
> ZS> --
> ZS> Zeev Suraski <[EMAIL PROTECTED]>
> ZS> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
>
> /*--
> daniel beulshausen - [EMAIL PROTECTED]
> using php on windows? http://www.php4win.de
>
>
>
> --
> PHP CVS 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 CVS 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] newbie migration issues

2001-04-23 Thread Plutarck

Check out the FAQ on php.net to see about migration issues. They have a
section in there...or is it in the manual...well it's in one of those
somewhere.

First, what security issues are you having? If code is being displayed to
the browser it's because the extension is probably not correctly figured.
When you start with PHP4 I believe the standard is it will use .php3 and
.php, but leave off .php4 and .inc. So you'll need to add those into your
server configuration files.

On the final question, great care was taken to make PHP4 compatible with
PHP3, but certain things are just blasted impossible. Preserving complete
compatibility would be little more than a big speed-bump in the road of
progress, so to speak :)


Then again, it's easy for me to not complain because I started learning on
PHP4, hehe.


--
Plutarck
Should be working on something...
...but forgot what it was.


""S.J. Black"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi, all -
>
> Hoping someone can help me with this..I have a client who has a webiste
> with a number of  php3 scripts in it, and we're having a spate of
> problems relating to migration to php4.
>
> 1) I need to know what needs to be done to convert php3 scripts to be
> compatible with php4.
>These are scripts largely to do with counters, statistics, date &
> time functions, and thelike. What needs to be done to their
> extensions as well?
>
> 2) Not having access to that info at the time, we decided to go back to
> php3 - and then ran into a host of security issues re visibility of
> the html directory. The requisite
>libraries were there, apache was configured to work with php3, and so
> forth. If anyone
>can explain how security issues arose, and give me some faint clue as
> to how to prevent
>that from ever happening again,I will try to send maple syrup. 8)
>
> 3) Can anyone begin to explain the rationale for making php3 and php4 so
> utterly
>incompatible?
>
> Thanks in advance,
>
> Alpha
>
> --
> 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-CVS] cvs: php4 /sapi/caudium caudium.c

2001-04-23 Thread David Hedbor

neotron Mon Apr 23 18:08:35 2001 EDT

  Modified files:  
/php4/sapi/caudium  caudium.c 
  Log:
  Disable use of th_farm since it doesn't seem to work. Uses a Pike layer
  thread farm now instead.
  
Index: php4/sapi/caudium/caudium.c
diff -u php4/sapi/caudium/caudium.c:1.10 php4/sapi/caudium/caudium.c:1.11
--- php4/sapi/caudium/caudium.c:1.10Sun Feb 25 22:07:36 2001
+++ php4/sapi/caudium/caudium.c Mon Apr 23 18:08:35 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: caudium.c,v 1.10 2001/02/26 06:07:36 andi Exp $ */
+/* $Id: caudium.c,v 1.11 2001/04/24 01:08:35 neotron Exp $ */
 
 #include "php.h"
 #ifdef HAVE_CAUDIUM
@@ -37,10 +37,13 @@
  *
  */
 #define NO_PIKE_SHORTHAND
-/* Define to run w/o th_farm. This allows for A LOT easier
- * debugging due to stupid gdb...
+
+/* Ok, we are now using Pike level threads to handle PHP4 since
+ * the nice th_farm threads aren't working on Linux with glibc 2.2
+ * (why this is I don't know).
  */
-/*#define TEST_NO_THREADS*/
+#define USE_PIKE_LEVEL_THREADS
+
 #include 
 #include 
 #include 
@@ -439,7 +442,7 @@
 {
   /*  char buf[512]; */
   php_info_print_table_start();
-  php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.10 
2001/02/26 06:07:36 andi Exp $");
+  php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.11 
+2001/04/24 01:08:35 neotron Exp $");
   /*  php_info_print_table_row(2, "Build date", Ns_InfoBuildDate());
   php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile());
   php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog());
@@ -553,10 +556,11 @@
 static void php_caudium_module_main(php_caudium_request *ureq)
 {
   int res;
-  int cnt = 0;
   zend_file_handle file_handle;
+#ifndef USE_PIKE_LEVEL_THREADS
   struct thread_state *state;
   extern struct program *thread_id_prog;
+#endif
   SLS_FETCH();
   CLS_FETCH();
   PLS_FETCH();
@@ -569,30 +573,32 @@
   THIS->request_data = ureq->request_data;
   free(ureq);
 
-#ifndef TEST_NO_THREADS
+#ifndef USE_PIKE_LEVEL_THREADS
   mt_lock_interpreter();
   init_interpreter();
 #if PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION < 1
+  thread_id = low_clone(thread_id_prog);
+  state = OBJ2THREAD(thread_id);
   Pike_stack_top=((char *)&state)+ (thread_stack_size-16384) * STACK_DIRECTION;
   recoveries = NULL;
-  thread_id = low_clone(thread_id_prog);
   call_c_initializers(thread_id);
-  SWAP_OUT_THREAD(OBJ2THREAD(thread_id));
-  OBJ2THREAD(thread_id)->swapped=0;
   OBJ2THREAD(thread_id)->id=th_self();
   num_threads++;
   thread_table_insert(thread_id);
+  state->status=THREAD_RUNNING;
 #else
+  Pike_interpreter.thread_id = low_clone(thread_id_prog);
+  state = OBJ2THREAD(Pike_interpreter.thread_id);
   Pike_interpreter.stack_top=((char *)&state)+ (thread_stack_size-16384) * 
STACK_DIRECTION;
   Pike_interpreter.recoveries = NULL;
-  Pike_interpreter.thread_id = low_clone(thread_id_prog);
   call_c_initializers(Pike_interpreter.thread_id);
-  SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id));
-  OBJ2THREAD(Pike_interpreter.thread_id)->swapped=0;
-  OBJ2THREAD(Pike_interpreter.thread_id)->id=th_self();
+  state->id=th_self();
+  //  SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id));
   num_threads++;
   thread_table_insert(Pike_interpreter.thread_id);
+  state->status=THREAD_RUNNING;
 #endif
+  state->swapped = 0;
 #endif 
   SG(request_info).query_string = lookup_string_header("QUERY_STRING", 0);
   SG(server_context) = (void *)1; /* avoid server_context == NULL */
@@ -621,9 +627,11 @@
* Pike threads to run. We wait since the above would otherwise require
* a lot of unlock/lock.
*/
-#ifndef TEST_NO_THREADS
-  SWAP_OUT_CURRENT_THREAD();
+#ifndef USE_PIKE_LEVEL_THREADS
+  SWAP_OUT_THREAD(state);
   mt_unlock_interpreter();
+#else
+  THREADS_ALLOW();
 #endif
 
 #ifdef VIRTUAL_DIR
@@ -637,13 +645,14 @@
   
   file_handle.type = ZEND_HANDLE_FILENAME;
   file_handle.filename = THIS->filename->str;
+  file_handle.opened_path = NULL;
   file_handle.free_filename = 0;
+
   THIS->written = 0;
   res = php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC);
 
   if(res == FAILURE) {
 THREAD_SAFE_RUN({
-  
   apply_svalue(&THIS->done_cb, 0);
   pop_stack();
   free_struct(SLS_C);
@@ -660,18 +669,19 @@
   free_struct(SLS_C);
 }, "positive run response");
   }
-#ifndef TEST_NO_THREADS
+
+#ifndef USE_PIKE_LEVEL_THREADS
   mt_lock_interpreter();
-  SWAP_IN_CURRENT_THREAD();
+  SWAP_IN_THREAD(state);
 #if PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION < 1
-  OBJ2THREAD(thread_id)->status=THREAD_EXITED;
-  co_signal(& OBJ2THREAD(thread_id)->status_change);
+  state->status=THREAD_EXITED;
+  co_signal(& state->status_change);
   thread_table_delete(thread_id);
   free_object(thread_id);
   thread_id=NULL;
 #else
-  OBJ2THREAD(Pike_interpreter.thread_id)->status=THREAD_EXITED;
-  co_signal(& OBJ2THREAD(Pike_interpreter.thread_id)

Re: [PHP] newbie migration issues

2001-04-23 Thread Jack Dempsey

S.J.

Basic syntax that you would be using in things like counters,
statistics, date and time functions hasn't changed much at all...I don't
have personal experience with php3, but i know that the developers of
php4 have tried hard to make php4 very compatible with php3...i'm sure
you'll get an e-mail in a second from several others saying the same
thingas far as security issues, that's not very descriptive, so its
hard to understand exactly what's happening...explain what you're doing
better and you'll get a more helpful response...

all the best,
jack

"S.J. Black" wrote:
> 
> Hi, all -
> 
> Hoping someone can help me with this..I have a client who has a webiste
> with a number of  php3 scripts in it, and we're having a spate of
> problems relating to migration to php4.
> 
> 1) I need to know what needs to be done to convert php3 scripts to be
> compatible with php4.
>These are scripts largely to do with counters, statistics, date &
> time functions, and thelike. What needs to be done to their
> extensions as well?
> 
> 2) Not having access to that info at the time, we decided to go back to
> php3 - and then ran into a host of security issues re visibility of
> the html directory. The requisite
>libraries were there, apache was configured to work with php3, and so
> forth. If anyone
>can explain how security issues arose, and give me some faint clue as
> to how to prevent
>that from ever happening again,I will try to send maple syrup. 8)
> 
> 3) Can anyone begin to explain the rationale for making php3 and php4 so
> utterly
>incompatible?
> 
> Thanks in advance,
> 
> Alpha
> 
> --
> 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] Printing

2001-04-23 Thread Plutarck

Any data can be sent to the viewer's browser using print or echo in PHP.
>From then on you'll need javascript to do any conditional displaying once it
hits the user's browser.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Dmitry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello, all!
>
> Do you know, can I print some page using PHP or
> JavaScript?
>
>   Dmitry.
>  [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] Re: Method Not Allowed

2001-04-23 Thread Steve Maroney


I just deleted a post that I wanted to reply to.



Try reading the FAQ on apache.org


Click here or go here  -> http://httpd.apache.org/docs/misc/FAQ.html#POSTnotallowed


Hope this helps,
Steve



-- 
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] newbie migration issues

2001-04-23 Thread S.J. Black

Hi, all -

Hoping someone can help me with this..I have a client who has a webiste
with a number of  php3 scripts in it, and we're having a spate of
problems relating to migration to php4.

1) I need to know what needs to be done to convert php3 scripts to be
compatible with php4.
   These are scripts largely to do with counters, statistics, date &
time functions, and thelike. What needs to be done to their
extensions as well?

2) Not having access to that info at the time, we decided to go back to
php3 - and then ran into a host of security issues re visibility of
the html directory. The requisite
   libraries were there, apache was configured to work with php3, and so
forth. If anyone
   can explain how security issues arose, and give me some faint clue as
to how to prevent
   that from ever happening again,I will try to send maple syrup. 8) 

3) Can anyone begin to explain the rationale for making php3 and php4 so
utterly  
   incompatible?

Thanks in advance, 

Alpha

-- 
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] preg_replace on array with "E (PCRE_DOLLAR_ENDONLY)" modifier

2001-04-23 Thread Plutarck

Try switing the modifier to "e". "E" is not a supported modifier according
to the manual. Only the following are supported:

i
m
s
x
e
A
D
S
U
X

If you are trying to match a $ in your code, just use a backspace to escape
it. But I don't think that was your problem...


--
Plutarck
Should be working on something...
...but forgot what it was.



""Grant Walters"" <[EMAIL PROTECTED]> wrote in message
003801c0cc59$7d2b01a0$[EMAIL PROTECTED]">news:003801c0cc59$7d2b01a0$[EMAIL PROTECTED]...
> Hi,
>
> I'm having problems stopping preg_replace from losing $ signs and
following text when replacing with array variables.  I am trying
> to use the E modifier and keep getting:
>
> "Warning: Unknown modifier 'E' in script.WEB.php3 on line 413"
>
> $template=array(
>   "/({PAGETOP})/E",
>   "/({PAGEMIDDLE})/E",
>   "/({PAGEBOTTOM})/E"
> );
>
> $pagevars=array(
>   "PAGETOP" => $pagetop,
>   "PAGEMIDLE" => $pagetop,
>   "PAGEBOTTOM" => $pagenavbar,
> );
>
> Text from assorted sources such as database records or external files are
placed into the variables $pagetop ...
>
> $page = "{PAGETOP}{PAGEMIDDLE}{PAGEBOTTOM}";
> $page = preg_replace($template,$pagevars,$page);
>
> Other modifiers seem to be accepted.  Any help appreciated.
>
> Regards
>
> Grant Walters
> Brainbench 'Most Valuable Professional' for Unix Admin
> Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
> Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989
>
>
> --
> 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] web page grab

2001-04-23 Thread Plutarck

The eregi_replace syntax would be:

$string = eregi_replace(".*Wish(.+)numbers", "\\1", $page);

It should be noted that I prefer preg_replace, but that's neither here nor
there.

That _should_ work. It looks fine to me, but test it out to make sure.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Ed Lazor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi =)
>
> I'm trying to grab content from another web page.  After having browsed
> through the mailing list archives and such, it looks like I'll need to use
> the eregi_replace function, but I'm not sure how to properly format the
> command.  The goal is to get rid of everything from the start of the page
> up to the word "Wish" and everything after the word "numbers".  Or,
another
> way of phrasing it, I'm wanting to get a web page and only use the content
> between the words "Wish" and "numbers".  What would be the best way of
> going about this?
>
> Thanks,
>
> -Ed
>
>
> --
> 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] preg_replace on array with "E (PCRE_DOLLAR_ENDONLY)" modifier

2001-04-23 Thread Grant Walters

Hi,

I'm having problems stopping preg_replace from losing $ signs and following text when 
replacing with array variables.  I am trying
to use the E modifier and keep getting:

"Warning: Unknown modifier 'E' in script.WEB.php3 on line 413"

$template=array(
  "/({PAGETOP})/E",
  "/({PAGEMIDDLE})/E",
  "/({PAGEBOTTOM})/E"
);

$pagevars=array(
  "PAGETOP" => $pagetop,
  "PAGEMIDLE" => $pagetop,
  "PAGEBOTTOM" => $pagenavbar,
);

Text from assorted sources such as database records or external files are placed into 
the variables $pagetop ...

$page = "{PAGETOP}{PAGEMIDDLE}{PAGEBOTTOM}";
$page = preg_replace($template,$pagevars,$page);

Other modifiers seem to be accepted.  Any help appreciated.

Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989


-- 
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] logging in (online?!)

2001-04-23 Thread Plutarck

> Write to MySQL (last logged in) ?

Best, fastest, least error causing way. Yes.


--
Plutarck
Should be working on something...
...but forgot what it was.


""FredrikAT"" <[EMAIL PROTECTED]> wrote in message
9c19n1$li2$[EMAIL PROTECTED]">news:9c19n1$li2$[EMAIL PROTECTED]...
> Hi!
>
> I have users logging in on my site (they write news)..
> What is the best way to show how's online?
>
> Write to MySQL (last logged in) ?
> Somehow use the sessions to this ?
>
>
> -
> Fredrik A. Takle
> [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] Having trouble executing unzip from PHP script

2001-04-23 Thread David Robley

On Tue, 24 Apr 2001 09:51, Dexter wrote:
> Hi PHP ers,
>
> Cant unzip a file from a PHP script. It does nothing.
>
> It works on the command line. Added paths to both the zip file and
> unzip program nothing happens
>
> exec("/usr/bin/unzip  $IMAGE_TEMP_DIR/phpxXTN3T ");
>
> Thanks
>
> Dexter

What about permissions? Remember that scripts run as the webserver user, 
possibly nobody.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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_replace: Help!

2001-04-23 Thread Plutarck

This works:

$str = '';

echo eregi_replace("", "Replaced", $str);



--
Plutarck
Should be working on something...
...but forgot what it was.


"Erica Douglass" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have one ereg_replace problem that I cannot seem to fix.
>
> I need to delete an IMG tag. The only thing I know about this tag is that
> it will contain
>
> SRC="images/headers
>
> in the string. Here is an example:
>
> 
>
> I tried this, but it didn't work:
>
> $contents = ereg_replace ("", "", $contents);
>
> Can someone please help?
>
> Thanks,
> Erica
>
>
> --
> 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_replace: Help!

2001-04-23 Thread Erica Douglass

I have one ereg_replace problem that I cannot seem to fix.

I need to delete an IMG tag. The only thing I know about this tag is that 
it will contain

SRC="images/headers

in the string. Here is an example:



I tried this, but it didn't work:

$contents = ereg_replace ("", "", $contents);

Can someone please help?

Thanks,
Erica


-- 
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] Using

2001-04-23 Thread Jason Murray

> One question though. Why does your  have a name 
> attribute at all? 

Probably so it can be addressed through JavaScript.

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]




Re: [PHP] How to turn off warnings ???

2001-04-23 Thread Plutarck

And just thought I'd add in that you should _almost_ never allow a warning
to be sent in your script as it's just begging for something to go wrong
without you knowing why.

And for your reading enjoyment (if you call reading about errors
enjoyable...which I of course, do):

http://www.php.net/manual/en/features.error-handling.php


--
Plutarck
Should be working on something...
...but forgot what it was.


"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can put a @ in front of you function.  Example
>
>  @function("Test");
> ?>
> -Original Message-
> From: Greg Donald [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 3:05 PM
> To: [EMAIL PROTECTED]; Php-General
> Subject: RE: [PHP] How to turn off warnings ???
>
>
>
> > I am a newbie to PHP and I am trying to get a number of scripts to work.
> >
> > Whenever I try to execute some code I receive 'warnings', that basically
> > clutter up the screen. Since I am assuming that these are not fatal - is
> > there  any way to turn them off?
> >
> > Any help would be appreciated.
>
> The manual details the settings for the php.ini here:
> http://www.php.net/manual/en/configuration.php
>
> You may want to alter your error reporting level there, or at the top of
> each script as needed.
>
> 
> destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
> internet addict, 3. lover of late 80's heavy metal music, 4. Activist
> for the terminally un-elite; see also - cool guy, des, mr. php...
>
> It's 4:00am, your web site is still up, why are you?
> http://phplinks.org/ http://destiney.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]
>
>
> --
> 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] Using

2001-04-23 Thread Plutarck

In addition, it's worth of note that whenever something has a name attribute
it that will show up as a variable in your script. More or less.

One question though. Why does your  have a name attribute at all? And
naming it the same as a variable, for whatever reason, isn't a good idea if
for no other reason than it's confusing. It got a weird look from me...not
that that makes it very unusual...


--
Plutarck
Should be working on something...
...but forgot what it was.

"Rene Maldonado" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi I think it woulf be better this way:
>
> print " = 'hello'>";
> print "";
> print "";
>
>
> and, the var name is $var_hello
>
> this way, the value of your var do not appear in the URL,
>
> This work for me...
>
>
>
> Martin Cameron wrote:
>
> > Here is a simple form file that needs to pass a variable - $hello - from
> > the form to a new function. Unfortunately, it doesn't.  When you click
> > the submit button, the URL looks like this:
> >
> >  http://localhost/test5.php?action=1&hello=
> >
> >  It should have the variable there after the "hello="
> >
> > I suspect it's something to do with parent.location. Looking for a
> > solution. Here's the script:
> >
> >  
> >  
> >  
> >   >  define(INITIAL_PAGE,0);
> >  define(SELECT,1);
> >  function initial_page(){
> > global $PHP_SELF,$hello;
> > print " >  name = 'hello'>";
> > print "";
> > print " >  onClick=\"parent.location='$PHP_SELF?action=1&hello=$hello'\">";
> >
> > print "";
> >  }
> >
> >  function select(){
> > global $hello;
> > print "Hellooo, $hello!";
> >  }
> >
> >  initial_page();
> >
> >  switch($action){
> >   case INITIAL_PAGE:
> > initial_page;
> > break;
> >   case SELECT:
> > select();
> > break;
> >   default:
> > die ("Hello, can't find that function.");
> >  }
> >  ?>
> >  
> >  
> >
> > The thing is that if you simply hit "enter" - rather than click the
> > "submit" button, the first directive in the  tag is invoked, and
> > the value of the $hello variable IS passed.
> >
> > regards
> > Martin Cameron
>






> --
> 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] trouble reading a database (fwd)

2001-04-23 Thread Jason Murray

> Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = 
> "SailBoat.jpg"and FLD_Path ="
/var/www/html/slidecollection/WinterCarnival"

This is a little hideous.

For one thing, you should probably use ' and not ". It may not 
make a difference to MySQL, but it does to other databases you
may use in the future.

For the FLD_Path comparison, you are looking for something that
specifically STARTS with a space. I'd bet this is why the script
is getting 0 rows back - probably none of your FLD_Path's start 
with a space.

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] trouble reading a database (fwd)

2001-04-23 Thread johndmiller


I have posted the following message a couple of times on the php-db
list and have not gotten
a response. I am hoping someone here is willing to help.

Thank you
John


Below is the output and code for my problem.  When the database gets read,
it returns 0 rows.  When it writes, it says it can't because of duplicate
entry.  FLD_FileName and FDL_Path are the Primary key.

Two questions, what I am doing wrong and is there a better way to create a
string of text then the one used below.

TIA
John

Read_sql SELECT * FROM TBL_Picture WHERE FLD_FileName = "SailBoat.jpg"and
FLD_Path =" /var/www/html/slidecollection/WinterCarnival"
Result of read Resource id #2
Error Results 0
Number or Rows 0
Insert Sql INSERT INTO TBL_Picture VALUES 
("SailBoat.jpg","/var/www/html/slidecollection/WinterCarnival",
"1234","gfgfdgfddg","gfdgfd")
Error Results Duplicate entry 
'/var/www/html/slidecollection/WinterCarnival-SailBoat.jpg'
for key 1Result is of 2 is

//reading the database to see if record already exists
  $result = mysql_select_db ("Picture_DB", $link) or die ("Could not get the 
database");
  $read_sql  = "SELECT * FROM TBL_Picture WHERE FLD_FileName = \"";
  $read_sql .= $fn_FileName;
  $read_sql .= "\"and FLD_Path =\" ";
  $read_sql .= $fn_Path;
  $read_sql .= "\"";
  echo " Read_sql ";
  echo $read_sql;
  $result = mysql_query($read_sql, $link) or die("could not read the table");
  echo "Result of read ";
  echo $result;
  echo " Error Results ";
  echo mysql_errno ($link);
  $number_of_rows = mysql_num_rows($result);
  echo " Number or Rows ";
  echo $number_of_rows;
//if return no rows then we need to add the record
  if  ($number_of_rows == 0){
$insert_sql  = "INSERT INTO TBL_Picture  VALUES (\"";
$insert_sql .= $fn_FileName;
$insert_sql .= "\",\"";
$insert_sql .= $fn_Path;
$insert_sql .= "\",\"";
$insert_sql .= $fn_Year;
$insert_sql .= "\",\"";
$insert_sql .= $fn_DescriptiveText;
$insert_sql .= "\",\"";
$insert_sql .= $fn_PictureName;
$insert_sql .= "\")";
echo " Insert Sql ";
echo $insert_sql;
$result2 = mysql_query($insert_sql, $link);
 // or die("could not write to the table ");
  echo " Error Results ";
  echo mysql_error ($link);
echo "Result is of 2 is";
echo $result2;




-- 
PHP Database 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 Database 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] PHP 4.0.5

2001-04-23 Thread Plutarck

Or it could be RC8 that will be the last one :)


Then again, that's why it's called an RC (Release Candidate...or something
similar). Nice to know that when you get a new version it's been hammered to
death to squish all the latent bugs. Unlike some people...*cough*


--
Plutarck
Should be working on something...
...but forgot what it was.


"Henrik Hansen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Felix Kronlage <[EMAIL PROTECTED]> wrote:
>
>  > On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
>  >
>  > > I asked when the new version of PHP was comming out at the beginning
of the
>  > > month and some one told me that it was comming out the week after.
Haven't
>  > > seen it yet, anyone knows the release date??
>  >
>  > RC7 got out a few days ago (Thursday I believe), and I think I recall
that unless
>  > lot's of things went wrong this is the last RC
>
> RC8 too :)
>
> --
> Henrik Hansen
>
>
> --
> 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]PHP script and new window.

2001-04-23 Thread Plutarck

First of all, I believe since you are using javascript on your button you
shouldn't use type="submit". Change it to type="button", which means it will
have no effect for browsers that don't have javascript enabled when clicked.
That could be an error, for one. But then again, it might not.

It might cause it to be submitted to one page and opened on another, which
very well may be what you want to happen. However it might be that the
window is being opened first then the data is submitted second, thus the
error that's being caused. To fix it just add the window.open function in
the  area of your document, so that as soon as the page is viewed the
window pops up. Annoying if the user hits refresh, but what you could do is
use a Meta-Refresh to take them from the page that pops up the window to the
page that user should be normally seing.

Next, how is it that you are getting the data and what data are you getting?
For instance, are you using the id you are submitting to the other page to
see how that user voted? Or are you just tracking who's viewing that page?

Further, does what you are displaying depend on what id is being submitted?

Lastly, view source on your HTML page and ensure all the fields are getting
filled out like you expect them to. It happens all the time that by using
View Source I find what my problem was.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Angerer, Chad"" <[EMAIL PROTECTED]> wrote in message
9E35C54B0C7AD411B5C1009027DE539940B5EF@MSPMX01">news:9E35C54B0C7AD411B5C1009027DE539940B5EF@MSPMX01...
> I have searched high and low for thos but with no luck.  Hopefully someone
> will give me some good pointers.
>
> I have a poll on a page that I am building which uses php.  I would like
to
> have a new window open when the submit and view results links are
selected.
> I am using an onClick and the view results window works fine.  It is the
> submit button I am having trouble with.  The new window won't populate
with
> any info.
>
> Here is the form that I have on my page
>
> 
> 
> 
>  ?>
>  ?>
>  ?>
> 
> view
> results
> 
onClick="window.open('http://www.askedagain.com/vote.php','vote','toolbar=no
>
,status=no.location=no,menubar=no,top=50,left=50,height=250,width=200,scroll
> bars=no'); return false;">
> 
>
> The vote script works fine as if I just have it load in the current
browser
> window.  Is there something that I am missing?  Any help and/or ideas are
> much appreciated.
>
> Thanks again.
>
> CAA
>
>
> --
> 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] newbie question: duplicate emails

2001-04-23 Thread Plutarck

The best way is to use an email list manager. I remember someone suggesting
one, but I've totally forgotten it now.

Personally the way I would do it is take the first list and load all the
email addys into the Bcc field. Or break them up into small chunks of less
than 50 at a time, since trying to pop out an email with 1000 recipients
will get you flagged as spamming (which is at least an inconvenience to have
to talk with your admin) and could cause SMTP to choke.

But less than 50 at a time shouldn't do any harm.

Then finish up with all the emails in that list, then go to another function
to spit another round.

So I'd set up the function to take the ID of the list to email, which would
email all the users as mentioned above.

I'd have the function in a loop which checks how many lists there are, then
feeds them one at a time to the function.


Easy to alter later, and it's a weensy bit easier to debug.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
9c27h6$ift$[EMAIL PROTECTED]">news:9c27h6$ift$[EMAIL PROTECTED]...
> Yes, that is a sound approach. However I've checked it again, and again,
and
> again, and nothing pops up. It would be easier if I had an error
generated.
>
> I'll try to get my hands on the SMTP logs, will talk to the server admin
> about that. My code is sending data to the SMTP socket and monitoring
> responses for the SMTP server, and no error there. Here is how it goes
>
> HELO xxx
> MAIL FROM: (me)
> RCPT TO: (recipient 1)
> DATA
> (body)
> .
> RSET
> MAIL FROM: (me)
> RCPT TO: (recipient 2)
> DATA
> (body)
> .
> (and so on...)
> QUIT
>
> I've noticed that the error shows up when the server load is high: for
e.g.
> when I am sending out emails to the lists, generally the first list goes
> through without a problem (i.e. one email per person). But when it moves
on
> to the second list, it starts sending two copies. But sometimes the second
> list goes okay, and the third generates duplicates.
>
> What _is_ the best way to send one email body to a dynamically generated
> list of email addresses???
>
> ""Phillip Bow"" <[EMAIL PROTECTED]> wrote in message
> 9c2570$56q$[EMAIL PROTECTED]">news:9c2570$56q$[EMAIL PROTECTED]...
> > Whenever you are positive its nto your code then check it again.  That
> being
> > said are there any SMTP logs you can check?  Have you monitored the
exact
> > data being sent to the SMTP server(maybe set up a dummy socket that
> repeats
> > back the data sent to it then have your program try to connect to that)?
> > --
> > phill
> >
> > ""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
> > 9c1ujm$868$[EMAIL PROTECTED]">news:9c1ujm$868$[EMAIL PROTECTED]...
> > > Hello people,
> > >
> > > I am having a peculiar problem with my mailing list and hope you can
> help
> > me
> > > out. I have a mySQL database with a table of email addresses for the
> > mailing
> > > lists. I have many lists, and my (PHP) code runs various queries on
this
> > > table to generate lists of email addresses to which the mail has to be
> > sent.
> > >
> > > The email body is combined with this generated list, and then I use
> mail()
> > > to send this message out to each recipient. I also add on a few
headers
> > such
> > > as From:, Errors-To, Reply-To and Return-Path to the message.
> > >
> > > Now the problem is that every recipient of my mail is getting two
copies
> > of
> > > the message. I am positive that it's not my code which is causing the
> > > problem, the script runs once and terminates. I've also tried to send
> mail
> > > by opening a socket connection to port 25 on the mail machine and
> sending
> > > SMTP commands, but still the result is the same. And there is no SMTP
> > error
> > > generated.
> > >
> > > Can anybody help me out here? or perhaps suggest a more efficient way
of
> > > sending out mail to my users? I'm really in a spot here...
> > >
> > > - Nikhil
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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]




Re: [PHP] Calculating the difference between two dates

2001-04-23 Thread Plutarck

Try mkdate. You'll have to make sure it's in a format it knows, but it
works.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Stuart Rees"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Please can someone tell me there is a nice function that can calculate the
> difference between two dates. If there isn't such a function I'm sure
> someone could tell me how I can do a different way.
>
>
> --
> 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] How to find the object name in a class?

2001-04-23 Thread Plutarck

*sigh* I'm thinking so too ;(

Doh!

However, I have at least a usable hack around.

In the constructor of your class, add:

function Class ($object_name)
{
global $pge;

$pge = $object_name;
}

Then when you use create a new object of that type you must use:

$objectname = new Class('objectname');

Then in your code you just use ${$pge}-> to refer to it.

Sucks, doesn't it?


--
Plutarck
Should be working on something...
...but forgot what it was.


""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > So is there ANY way to get the name of the object in PHP code without
> > knowing the name of the object ahead of time?
>
> I went through this exact thing not too long ago with an error class
> I wrote.  Unfortunately, there is no way to know.  What you can do,
> however, is do a check to see if that object exists before you access
> the variable.  Other than that, I think you're outta luck. :/
>
> Chris
>



-- 
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-CVS] cvs: php4 /build build2.mk

2001-04-23 Thread Zeev Suraski

zeevMon Apr 23 16:50:56 2001 EDT

  Modified files:  
/php4/build build2.mk 
  Log:
  Remove unnecessary tab (was killing Tru64 make)
  
  
Index: php4/build/build2.mk
diff -u php4/build/build2.mk:1.18 php4/build/build2.mk:1.19
--- php4/build/build2.mk:1.18   Tue Mar  6 08:51:53 2001
+++ php4/build/build2.mkMon Apr 23 16:50:56 2001
@@ -14,7 +14,7 @@
 #  | Authors: Sascha Schumann <[EMAIL PROTECTED]>|
 #  +--+
 #
-# $Id: build2.mk,v 1.18 2001/03/06 16:51:53 sas Exp $ 
+# $Id: build2.mk,v 1.19 2001/04/23 23:50:56 zeev Exp $ 
 #
 
 include generated_lists
@@ -61,7 +61,7 @@
aclocal
 
 SUPPRESS_WARNINGS = (egrep -v '(warning: AC_TRY_RUN called without default to allow 
cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*)'||true)
-   
+
 $(config_h_in): configure acconfig.h
 # explicitly remove target since autoheader does not seem to work 
 # correctly otherwise (timestamps are not updated)



-- 
PHP CVS 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 to find the object...(clarification)

2001-04-23 Thread Plutarck

Before anyone get's confused I thought I should note that $this won't work
because I need the name of the object for use _outside_ of the class itself
too.

For instance I have a group of about 30 functions in a seperate file which
directly modify $front_page. $front_page will now be inside of an object,
and I _could_ just change them to $pge->front_page, but here's the problem.

I'm doing all this so I can have variable function output. So for now I use
the object name $pge to output data, but in the future I may need to use
$xml or $pge_error. But I don't want to go through all the functions and
change the names, so I use a variable variable. But I don't know how to get
the variable variable name!

So what I want is to see what name $this is holding, then declare what comes
after $ as the value of a global variable which I will use in a variable
variable.


I know, I know, it's really complicated. But it really is the most
non-constraining way of going about it, as I'm probably going to use this
class many times in the future.

So I'm still stumped. Am I going to have to just use a hack-around till a
version of PHP includes such an odd class function, of which I know of know
other such existing function in any language? :(


--
Plutarck
Should be working on something...
...but forgot what it was.



""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9c21ks$cp$[EMAIL PROTECTED]">news:9c21ks$cp$[EMAIL PROTECTED]...
> I've been using a function to output HTML to the user's browser, and now
my
> use has made it neccessary to put it all inside a class.
>
> All's going find and dandy and I've got it all working. However one of
it's
> variables is $front_page.
>
> Now in other pages there are references to $front_page, and I want to
change
> them to something like $objectname->front_pagee.
>
> The problem is that I can't know what the object will be named ahead of
> time!
>
> So my hack-around is in the class constructor I set a global variable
called
> $pge with the value submitted to the constructor. So someone would do
this:
>
> $somename = new Display(somename);
>
> But if someone typos the and the name of the variable is different from
the
> one submitted to the constructor, all the code will break! That's because
> I'm using a variable variable to refer to $front_page, like this:
>
> ${$pge}->front_page
>
> I told you it was a hack-around, and it isn't a good one.
>
>
> So is there ANY way to get the name of the object in PHP code without
> knowing the name of the object ahead of time?
>
> I'm really stumped!
>
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
>
>
>
> --
> 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] Calculating the difference between two dates

2001-04-23 Thread Stuart Rees

Please can someone tell me there is a nice function that can calculate the
difference between two dates. If there isn't such a function I'm sure
someone could tell me how I can do a different way.


-- 
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] Posting to a form

2001-04-23 Thread Jack Dempsey

it looks like you left off the quotes around the value that you're
echoing...try putting it in like this



-jack

Wade wrote:
> 
> I'm trying to do the following
> 
>  
>  echo strtoupper($Aname);
> ?>
> 
> But when Aname is multiple words, such as "Wade Williams", everything from
> the whitespace on gets cut off.
> 
> Any ideas how to fix this?
> 
> Thanks
> Wade
> 
> --
> 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] Posting to a form

2001-04-23 Thread Philip Olson



value="foo bar" as opposed to value=foo bar


regards,
philip

On Mon, 23 Apr 2001, Wade wrote:

> I'm trying to do the following
> 
>  
>  echo strtoupper($Aname);
> ?>
> 
> But when Aname is multiple words, such as "Wade Williams", everything from
> the whitespace on gets cut off.
> 
> Any ideas how to fix this?
> 
> Thanks
> Wade
> 
> 
> 
> -- 
> 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: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Zeev Suraski

I think environment variables aren't any better than registry entries under 
Windows.  It's not as if it's easier to configure environment variables 
than it is to run regedit...

Zeev

At 01:10 24/4/2001, Frank M. Kromann wrote:
>We can not use regestry settingns unless we have an installer or at least 
>a reg file to help users configure these.
>
>I woud suggest the method with environment variables as step one.
>
>- Frank
>
> > Monday, April 23, 2001, 10:19:36 PM, you wrote:
> > > It should be the Program Files directory, concatenated with 'PHP';  Under
> > > Windows, we should behave like Windows apps...
> >
> > we should use registry entries to determine/set the path(s), if those
> > entries aren't present it could default to some hardcoded values...
> >
> > daniel
> >
> > > Zeev
> > >
> > > At 21:50 23/4/2001, James Moore wrote:
> > >>how about defaulting to SystemDrive\\php4 but also allowing a envromental
> > >>variable to be set so
> > >>
> > >>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
> > >>
> > >>or somthing like that which works in C
> > >>
> > >>- James
> > >>
> > >> > -Original Message-
> > >> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> > >> > Sent: 23 April 2001 19:24
> > >> > To: James Moore
> > >> > Cc: [EMAIL PROTECTED]
> > >> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
> > >> >
> > >> >
> > >> > Hi James,
> > >> >
> > >> > No problem. I change it to
> > >> >
> > >> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
> > >> >
> > >> > What about all the other directories ? These should be 
> configureable too.
> > >> >
> > >> > - Frank
> > >> >
> > >> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
> > >> > > >
> > >> > > >   Modified files:
> > >> > > > /php4/mainconfig.w32.h php_ini.c
> > >> > > > +
> > >> > > > +/* Define directory constants for php and pear */
> > >> > > > +#define PHP_BINDIR "c:\\php4"
> > >> > > > +#define PHP_LIBDIR "c:\\php4"
> > >> > > > +#define PHP_DATADIR "c:\\php4"
> > >> > > > +#define PHP_SYSCONFDIR "c:\\php4"
> > >> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
> > >> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> > >> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> > >> > >
> > >> > > Ugh thats very very ugly.. I dont want my files there can you 
> please use
> > >> > > SYSROOT instead of c:\\winnt please.
> > >> > >
> > >> > > - James
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > PHP CVS 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 CVS 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 CVS 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]
> >
> > ZS> --
> > ZS> Zeev Suraski <[EMAIL PROTECTED]>
> > ZS> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
> >
> > /*--
> > daniel beulshausen - [EMAIL PROTECTED]
> > using php on windows? http://www.php4win.de
> >
> >
> >
> >

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


-- 
PHP CVS 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] Using

2001-04-23 Thread Rene Maldonado


Hi I think it woulf be better this way:
    print "";
    print "";
    print "";
 
and, the var name is $var_hello
this way, the value of your var do not appear in the URL,
This work for me...
 
 
Martin Cameron wrote:
Here is a simple form file that needs to pass a variable
- $hello - from
the form to a new function. Unfortunately, it doesn't.  When you
click
the submit button, the URL looks like this:
 http://localhost/test5.php?action=1&hello=
 It should have the variable there after the
"hello="
I suspect it's something to do with parent.location. Looking for a
solution. Here's the script:
 
 
 
  define(INITIAL_PAGE,0);
 define(SELECT,1);
 function initial_page(){
    global $PHP_SELF,$hello;
    print " name = 'hello'>";
    print "";
    print " >";
    print "";
 }
 function select(){
    global $hello;
    print "Hellooo,
$hello!";
 }
 initial_page();
 switch($action){
  case INITIAL_PAGE:
    initial_page;
    break;
  case SELECT:
    select();
    break;
  default:
    die ("Hello, can't find
that function.");
 }
 ?>
 
 
The thing is that if you simply hit "enter" - rather than click the
"submit" button, the first directive in the  tag is invoked,
and
the value of the $hello variable IS passed.
regards
Martin Cameron


-- 
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_replace: Replacing only first occurrence

2001-04-23 Thread ~~~i LeoNid ~~

On 23 Apr 2001 13:04:36 -0700 impersonator of
[EMAIL PROTECTED] ("Erica Douglass") planted &I saw in
php.general:

>I want to only replace the first occurrence of a string in a file using
>ereg_replace. Should I use a loop to do this? Any suggestions? Please email
>me at [EMAIL PROTECTED] with suggestions.
>
>Thanks,
>Erica
>
I think, begining from some php >4, preg_replace allows to do this,
Otherwise, you could use preg_match to find first match then strpos() to
find it position, and, finaly substr() with concatenation to your
replacement. This loong way was the first, that came to my mind for cases,
where regexp realy needed. (If they are not needed, str_replace() would
work faster/simlier, you know o'cos:). 

Note: for some strings I experience hangup, especially  w/ereg_replace,
but also, for long ones, w/preg0. Regards. Leonid.

-- 
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] Site Structure

2001-04-23 Thread Steve Werby

"Toby Miller" <[EMAIL PROTECTED]> wrote:
> While it is true that you don't have to put your files in the web
directory
> at all and it is a more secure option there is still one very large
> inconvenience that prevents me from going with that option. You lose the
> usefulness of just including "$DOCUMENT_ROOT/yourfolder/yourfilename".
This
> is the main reason that I do put my files in the root web directory. So
how
> do you tell all of your files where your included content is? Do you hard
> code the path in every page? If so, do you also have development, stage,
and
> live environments that mimic the exact same directory structures? If not,
do
> you always change the include strings by hand every time you move from one
> environment to another? Do you run into these problems? What kind of
> solutions/workarounds have you implemented?

Here's a solution I've used with a lot of success.  I concocted it myself a
year or so ago after trying a number of other alternatives.

// Set INC_PATH.
ereg( '(.*)htdocs.*', $SCRIPT_FILENAME, $regs );
define( 'INC_PATH', $regs[1] . 'inc/' );

// Include files.
include( INC_PATH . "inc_common.php" );
...
include( INC_PATH . "inc_db.php" );

Nearly all of the sites I design are controlled from a single PHP file using
some Apache AliasMatch magic so I usually only have to set the INC_PATH
constant
in one file and include the main include files in the same place. So the
include directory (inc) is parallel to my web docs directory.  The parent of
both is a directory called 'production', which has directories parallel to
it called 'development' and 'staging' which allows me to run 3 versions of
the site, each on 3 separate ports and copy code from one version to the
other and run them with no modifications.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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]




[PHP] Posting to a form

2001-04-23 Thread Wade

I'm trying to do the following



But when Aname is multiple words, such as "Wade Williams", everything from
the whitespace on gets cut off.

Any ideas how to fix this?

Thanks
Wade



-- 
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 to turn off warnings ???

2001-04-23 Thread Brandon Orther

You can put a @ in front of you function.  Example


-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 3:05 PM
To: [EMAIL PROTECTED]; Php-General
Subject: RE: [PHP] How to turn off warnings ???



> I am a newbie to PHP and I am trying to get a number of scripts to work.
>
> Whenever I try to execute some code I receive 'warnings', that basically
> clutter up the screen. Since I am assuming that these are not fatal - is
> there  any way to turn them off?
>
> Any help would be appreciated.

The manual details the settings for the php.ini here:
http://www.php.net/manual/en/configuration.php

You may want to alter your error reporting level there, or at the top of
each script as needed.


destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.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]


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

2001-04-23 Thread Henrik Hansen

Martín Marqués <[EMAIL PROTECTED]> wrote:

 > On Lun 23 Abr 2001 22:13, Felix Kronlage wrote:
 > > On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
 > > > I asked when the new version of PHP was comming out at the beginning of
 > > > the month and some one told me that it was comming out the week after.
 > > > Haven't seen it yet, anyone knows the release date??
 > >
 > > RC7 got out a few days ago (Thursday I believe), and I think I recall that
 > > unless lot's of things went wrong this is the last RC
 > >
 > > -fkr
 > >
 > > ps. I guess, it's released once it works fine :)
 > 
 > Why don't the publicate the RC's. I had a hard time getting RC5.

they are freely avaialiable on the net for download. or you always
have cvs :)

-- 
Henrik Hansen


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

2001-04-23 Thread Henrik Hansen

Felix Kronlage <[EMAIL PROTECTED]> wrote:

 > On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
 > 
 > > I asked when the new version of PHP was comming out at the beginning of the
 > > month and some one told me that it was comming out the week after. Haven't
 > > seen it yet, anyone knows the release date??
 > 
 > RC7 got out a few days ago (Thursday I believe), and I think I recall that unless
 > lot's of things went wrong this is the last RC

RC8 too :)

-- 
Henrik Hansen


-- 
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] Site Structure

2001-04-23 Thread Meir kriheli

On Monday 23 April 2001 22:47, Jaxon wrote:
> Hmm...
>
> Is there any way to set something like include_path on the fly, so you just
> define all your possible direcories at once in what is essential a 'site
> environment' variable, and then you can include/require your files without
> putting any path info in?
>
> regards,
> jaxon

Sure you can, set the include_path in your php.ini file.


-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

>
> > -Original Message-
> > From: Toby Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 23, 2001 3:44 PM
> > To: indrek siitan
> > Cc: PHP General Mailing List
> > Subject: Re: [PHP] Site Structure
> >
> >
> > While it is true that you don't have to put your files in the web
> > directory
> > at all and it is a more secure option there is still one very large
> > inconvenience that prevents me from going with that option. You lose the
> > usefulness of just including
> > "$DOCUMENT_ROOT/yourfolder/yourfilename". This
> > is the main reason that I do put my files in the root web
> > directory. So how
> > do you tell all of your files where your included content is? Do you hard
> > code the path in every page? If so, do you also have development,
> > stage, and
> > live environments that mimic the exact same directory structures?
> > If not, do
> > you always change the include strings by hand every time you move from
> > one environment to another? Do you run into these problems? What kind of
> > solutions/workarounds have you implemented?
> >
> > I have always used this style of including documents because it enables
> > me to do my mockup ideas on my Windows machine with PWS. Then I can move
> > onto my Linux test box and try the site in my home account. Then I can
> > push the exact same code to the dev server which uses www as the root web
> > directory.
> > Then I can push the exact same code to the staging server for
> > clients to see
> > which has wwwroot as the root web directory and the live
> > environment mimics
> > the stage environment so that move makes little to no difference. Now if
> > someone else was working on the same project and checked the files out of
> > CVS they would have to tweak their copy to work in their special
> > environment
> > instead of just running and developing the files. This just seems like a
> > whole lot of extra work to me. Correct me if I'm wrong, but the only way
> > anyone can see the source code of a php file if the extension is
> > associated
> > with the PHP interpreter is if you provide a phps file that they
> > can see or
> > if someone uninstalls the PHP interpreter (which bypasses the situation
> > because the first condition is no longer being met).
> >
> > I'm really curious to see how other developers handle these kind of
> > development situations.
> >
> > - Original Message -
> > From: "indrek siitan" <[EMAIL PROTECTED]>
> > To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
> > <[EMAIL PROTECTED]>
> > Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
> > Sent: Monday, April 23, 2001 1:22 PM
> > Subject: RE: [PHP] Site Structure
> >
> > > Hi,
> > >
> > > > Also, it's not a good idea to use the .inc extension unless you've
> > > > associated it with PHP. The reason is if I type the URL directly to
> > > > /includes/header.inc I will get the source code for that file in text
> > > > format.
> > >
> > > you don't have to keep your .inc files in the web server document
> > > root folder at all...
> > >
> > >
> > > Rgds,
> > >   Tfr
> > >
> > >  --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
> > >==--

-- 
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 script and new window.

2001-04-23 Thread Angerer, Chad

I have searched high and low for thos but with no luck.  Hopefully someone
will give me some good pointers.

I have a poll on a page that I am building which uses php.  I would like to
have a new window open when the submit and view results links are selected.
I am using an onClick and the view results window works fine.  It is the
submit button I am having trouble with.  The new window won't populate with
any info.  

Here is the form that I have on my page








view
results
http://www.askedagain.com/vote.php','vote','toolbar=no
,status=no.location=no,menubar=no,top=50,left=50,height=250,width=200,scroll
bars=no'); return false;">


The vote script works fine as if I just have it load in the current browser
window.  Is there something that I am missing?  Any help and/or ideas are
much appreciated.

Thanks again.

CAA


-- 
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: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Frank M. Kromann

We can not use regestry settingns unless we have an installer or at least a reg file 
to help users configure these.

I woud suggest the method with environment variables as step one.

- Frank

> Monday, April 23, 2001, 10:19:36 PM, you wrote:
> > It should be the Program Files directory, concatenated with 'PHP';  Under
> > Windows, we should behave like Windows apps...
> 
> we should use registry entries to determine/set the path(s), if those
> entries aren't present it could default to some hardcoded values...
> 
> daniel
> 
> > Zeev
> >
> > At 21:50 23/4/2001, James Moore wrote:
> >>how about defaulting to SystemDrive\\php4 but also allowing a envromental
> >>variable to be set so
> >>
> >>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
> >>
> >>or somthing like that which works in C
> >>
> >>- James
> >>
> >> > -Original Message-
> >> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> >> > Sent: 23 April 2001 19:24
> >> > To: James Moore
> >> > Cc: [EMAIL PROTECTED]
> >> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
> >> >
> >> >
> >> > Hi James,
> >> >
> >> > No problem. I change it to
> >> >
> >> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
> >> >
> >> > What about all the other directories ? These should be configureable too.
> >> >
> >> > - Frank
> >> >
> >> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
> >> > > >
> >> > > >   Modified files:
> >> > > > /php4/mainconfig.w32.h php_ini.c
> >> > > > +
> >> > > > +/* Define directory constants for php and pear */
> >> > > > +#define PHP_BINDIR "c:\\php4"
> >> > > > +#define PHP_LIBDIR "c:\\php4"
> >> > > > +#define PHP_DATADIR "c:\\php4"
> >> > > > +#define PHP_SYSCONFDIR "c:\\php4"
> >> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
> >> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> >> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> >> > >
> >> > > Ugh thats very very ugly.. I dont want my files there can you please use
> >> > > SYSROOT instead of c:\\winnt please.
> >> > >
> >> > > - James
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > PHP CVS 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 CVS 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 CVS 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]
> 
> ZS> --
> ZS> Zeev Suraski <[EMAIL PROTECTED]>
> ZS> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
> 
> /*--
> daniel beulshausen - [EMAIL PROTECTED]
> using php on windows? http://www.php4win.de
> 
> 
> 
> 




-- 
PHP CVS 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

2001-04-23 Thread Martin Cameron

Here is a simple form file that needs to pass a variable - $hello - from
the form to a new function. Unfortunately, it doesn't.  When you click
the submit button, the URL looks like this:

 http://localhost/test5.php?action=1&hello=

 It should have the variable there after the "hello="

I suspect it's something to do with parent.location. Looking for a
solution. Here's the script:

 
 
 
 ";
print "";
print "";

print "";
 }

 function select(){
global $hello;
print "Hellooo, $hello!";
 }

 initial_page();

 switch($action){
  case INITIAL_PAGE:
initial_page;
break;
  case SELECT:
select();
break;
  default:
die ("Hello, can't find that function.");
 }
 ?>
 
 


The thing is that if you simply hit "enter" - rather than click the
"submit" button, the first directive in the  tag is invoked, and
the value of the $hello variable IS passed.

regards
Martin Cameron



[PHP] Question on installation

2001-04-23 Thread Jason Lam

I have installed the RPM version of PHP that came with a Linux dist. Obviously, it 
didn't came with a lot of the goodies, like ODBC. Now, if I have to install those 
modules, is there anyway I can "JUST" compile those modules and install it with 
/etc/php.ini ? 

Is this a recommended way? Or should I just re-compile everything? That will really 
defeat the purpose of a packaging system

Jason Lam



php-general Digest 23 Apr 2001 22:00:36 -0000 Issue 645

2001-04-23 Thread php-general-digest-help


php-general Digest 23 Apr 2001 22:00:36 - Issue 645

Topics (messages 49827 through 49944):

Why is it dangerous to have register_globals on?
49827 by: Greig, Euan
49923 by: Plutarck

PHP Sydney meeting for April
49828 by: info.phpsydney.com

Re: crypt() and md5
49829 by: Niklas Neumann

Re: IMAP Help
49830 by: Sigitas Paulavicius

Re: php-general Digest 23 Apr 2001 09:53:51 - Issue 644
49831 by: alter ego

MySql / sql help plz!
49832 by: elias
49834 by: Sigitas Paulavicius
49851 by: Brian S. Dunworth

how do I do this
49833 by: Adrian D'Costa
49862 by: Andreas Landmark

reading apache log into MySQL
49835 by: Markus Maussner

gd-jpeg-support and php-3.0.18
49836 by: Felix Kronlage

if... then... else with HTML
49837 by: Martin Thoma
49838 by: Martin Thoma
49839 by: Taylor, Stewart
49840 by: Geir Eivind Mork
49841 by: Tyler Longren
49842 by: Avetis Avagyan
49843 by: Fredrik Wahlberg
49844 by: elias
49871 by: Richard Crawford

Re: SSL SSL SSL SSL -- READ THIS!!
49845 by: Scott Fletcher

PHP   sort()
49846 by: Scott Fletcher
49847 by: Scott Fletcher
49865 by: Andreas Landmark

Re: Connecting to a MS Access database
49848 by: Andrew Hill

logging in (online?!)
49849 by: FredrikAT

'XML To Array' Class
49850 by: php.swifte.net
49854 by: Serge Vleugels

Re: PHP Error
49852 by: jessica
49917 by: Plutarck

ALERTE: VIRUS DETECTE DANS UN MESSAGE ENVOYE PAR 
[EMAIL PROTECTED]
49853 by: root.pop-1.nordnet.fr

Re: Getting a binary file from URL
49855 by: Christian Reiniger

Re: 'XML To Array' Class  (Array Problem)
49856 by: php.swifte.net

Problem with session vars !
49857 by: Nicolas Guilhot

Re: include file using .htaccess
49858 by: Keyur Kalaria

Site Structure
49859 by: Jordan Elver
49860 by: Renzi, Sebastian
49861 by: Martin Gottlieb
49866 by: Jordan Elver
49869 by: John Huggins
49886 by: Toby Miller
49889 by: indrek siitan
49890 by: Kurth Bemis
49897 by: John Huggins
49921 by: Toby Miller
49925 by: Jaxon
49926 by: Martin Gottlieb

PHP4 session management and internal HTML links
49863 by: Anna Lyse

Newbie Question
49864 by: Wade
49870 by: Taylor, Stewart
49872 by: Wade
49875 by: Geir Eivind Mork

Fatal Errors and Error Handling
49867 by: Svein Roar Nilsen
49878 by: Geir Eivind Mork

XML/Array Class
49868 by: php.swifte.net

print and echo
49873 by: Wade
49874 by: Angerer, Chad
49876 by: Wade

anyone know of a dicitionary for bad site content?
49877 by: Dennis Gearon
49883 by: Christian Reiniger

Building as an Apache module
49879 by: Hasan Niyaz
49882 by: Phil Driscoll

Re: Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.
49880 by: B. van Ouwerkerk

XML/Array Class  (Possible Bug??)
49881 by: php.swifte.net

Cannot remove module mod_php4.c: not found in module list
49884 by: Markus Held
49885 by: Rasmus Lerdorf

Associative arrays in strings
49887 by: Boget, Chris
49891 by: CC Zona
49892 by: Phil Driscoll

compiling with stronghold
49888 by: charles.lunarmedia.net

insert data to mysql
49893 by: shawn
49895 by: Thomas Deliduka
49896 by: Richard Crawford
49928 by: shawn
49931 by: Philip Olson
49934 by: shawn

Problems compiling DBG debugger
49894 by: Geoff Caplan

Encryption (Browser Side)
49898 by: Jason Mowat
49899 by: Plutarck

Method Not Allowed
49900 by: Tym Rehm

Icq Message
49901 by: Christopher Allen
49911 by: Shawn J. Wallace
49914 by: Plutarck

Re: --enable-trans-sid
49902 by: Boget, Chris

Query Analyzer For MySQL with PHP?
49903 by: Brandon Orther
49906 by: Kurth Bemis
49907 by: Plutarck
49910 by: Chris Mulcahy
49924 by: Philip Olson
49933 by: Renzi, Sebastian

Re: Newbie Question (and an odd bug)
49904 by: Plutarck

PHP 4.0.5
49905 by: Dominique Paquin
49909 by: Felix Kronlage
49935 by: Martín Marqués

newbie question: duplicate emails
49908 by: Nikhil Goyal
49938 by: Phillip Bow
49940 by: Nikhil Goyal

Conflict between zlib and t1lib ?
49912 by: Shawn J. Wallace

IP Chains
49913 by: Faryal
49915 by: Shawn J. Wallace

looking for a good shopping cart - catalog system
49916 by: Roee Rubin
49920 by: Chris Cocuzzo
49936 by: Ralph Guzman

Looping through variables
49918 by: Ashley M. Kirchner
49919 by: Phillip Bow

Re: WDDX Deserialisation 

RE: [PHP] How to turn off warnings ???

2001-04-23 Thread Greg Donald


> I am a newbie to PHP and I am trying to get a number of scripts to work.
>
> Whenever I try to execute some code I receive 'warnings', that basically
> clutter up the screen. Since I am assuming that these are not fatal - is
> there  any way to turn them off?
>
> Any help would be appreciated.

The manual details the settings for the php.ini here:
http://www.php.net/manual/en/configuration.php

You may want to alter your error reporting level there, or at the top of
each script as needed.


destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.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]




[PHP-CVS] cvs: php4 /ext/imap php_imap.c

2001-04-23 Thread Chuck Hagenbuch

chagenbuMon Apr 23 14:58:44 2001 EDT

  Modified files:  
/php4/ext/imap  php_imap.c 
  Log:
  Fix for bug 9908: check that the result of mail_sort is not 0 before trying
  to dereference the pointer. :)
  
  Also, free sort programs - this might have been a memory leak.
  
  
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.64 php4/ext/imap/php_imap.c:1.65
--- php4/ext/imap/php_imap.c:1.64   Sat Apr  7 18:13:07 2001
+++ php4/ext/imap/php_imap.cMon Apr 23 14:58:44 2001
@@ -25,7 +25,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.64 2001/04/08 01:13:07 jon Exp $ */
+/* $Id: php_imap.c,v 1.65 2001/04/23 21:58:44 chagenbu Exp $ */
 
 #define IMAP41
 
@@ -2745,12 +2745,17 @@
mypgm->next = NIL;

slst = mail_sort(imap_le_struct->imap_stream, NIL, spg, mypgm, myargc >= 4 ? 
Z_LVAL_PP(flags) : NIL);
-   
+   if (spg) {
+   mail_free_searchpgm(&spg);
+   }
+
array_init(return_value);
-   for (sl = slst; *sl; sl++) { 
-   add_next_index_long(return_value, *sl);
+   if (slst != NIL && slst != 0) {
+   for (sl = slst; *sl; sl++) { 
+   add_next_index_long(return_value, *sl);
+   }
+   fs_give ((void **) &slst);
}
-   fs_give ((void **) &slst); 
 }
 /* }}} */
 
@@ -3547,14 +3552,14 @@
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
-   efree(search_criteria);
+   efree(search_criteria);
RETURN_FALSE;
}

IMAPG(imap_messages) = NIL;
mail_search_full(imap_le_struct->imap_stream, NIL, 
mail_criteria(search_criteria), flags);
if (IMAPG(imap_messages) == NIL) {
-   efree(search_criteria);
+   efree(search_criteria);
RETURN_FALSE;
}

@@ -3565,7 +3570,7 @@
cur = cur->next;
}
mail_free_messagelist(&IMAPG(imap_messages));
-efree(search_criteria);
+   efree(search_criteria);
 }
 /* }}} */
 



-- 
PHP CVS 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 install issues on IIS

2001-04-23 Thread Martin Gottlieb


You probably need to go into the IIS console ( mmc ) and go to 
properties on the directory in question and make sure either the
"execute" or "script" checkbox is checked.  You may also need to
verify the actual file permissions, but I believe this is more of
a configuration issue.

Martin Gottlieb

-Original Message-
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 5:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php install issues on IIS


Some of my co-workers are trying to install
php and when I run
phpinfo() I get this error, any ideas ?
I've only setup php on unix systems, so I am
at a loss here.

HTTP Error 403
403.1 Forbidden: Execute Access Forbidden

This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed.

Please contact the Web server's administrator if the problem persists.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.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]



[PHP] How to turn off warnings ???

2001-04-23 Thread Roee Rubin

Hello,

I am a newbie to PHP and I am trying to get a number of scripts to work.

Whenever I try to execute some code I receive 'warnings', that basically
clutter up the screen. Since I am assuming that these are not fatal - is
there  any way to turn them off?

Any help would be appreciated.



Roee Rubin
Irubin Consulting
[EMAIL PROTECTED]
www.irubin.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]




[PHP] php install issues on IIS

2001-04-23 Thread Jerry Lake

Some of my co-workers are trying to install
php and when I run
phpinfo() I get this error, any ideas ?
I've only setup php on unix systems, so I am
at a loss here.

HTTP Error 403
403.1 Forbidden: Execute Access Forbidden

This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed.

Please contact the Web server's administrator if the problem persists.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.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] newbie question: duplicate emails

2001-04-23 Thread Nikhil Goyal

Yes, that is a sound approach. However I've checked it again, and again, and
again, and nothing pops up. It would be easier if I had an error generated.

I'll try to get my hands on the SMTP logs, will talk to the server admin
about that. My code is sending data to the SMTP socket and monitoring
responses for the SMTP server, and no error there. Here is how it goes

HELO xxx
MAIL FROM: (me)
RCPT TO: (recipient 1)
DATA
(body)
.
RSET
MAIL FROM: (me)
RCPT TO: (recipient 2)
DATA
(body)
.
(and so on...)
QUIT

I've noticed that the error shows up when the server load is high: for e.g.
when I am sending out emails to the lists, generally the first list goes
through without a problem (i.e. one email per person). But when it moves on
to the second list, it starts sending two copies. But sometimes the second
list goes okay, and the third generates duplicates.

What _is_ the best way to send one email body to a dynamically generated
list of email addresses???

""Phillip Bow"" <[EMAIL PROTECTED]> wrote in message
9c2570$56q$[EMAIL PROTECTED]">news:9c2570$56q$[EMAIL PROTECTED]...
> Whenever you are positive its nto your code then check it again.  That
being
> said are there any SMTP logs you can check?  Have you monitored the exact
> data being sent to the SMTP server(maybe set up a dummy socket that
repeats
> back the data sent to it then have your program try to connect to that)?
> --
> phill
>
> ""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
> 9c1ujm$868$[EMAIL PROTECTED]">news:9c1ujm$868$[EMAIL PROTECTED]...
> > Hello people,
> >
> > I am having a peculiar problem with my mailing list and hope you can
help
> me
> > out. I have a mySQL database with a table of email addresses for the
> mailing
> > lists. I have many lists, and my (PHP) code runs various queries on this
> > table to generate lists of email addresses to which the mail has to be
> sent.
> >
> > The email body is combined with this generated list, and then I use
mail()
> > to send this message out to each recipient. I also add on a few headers
> such
> > as From:, Errors-To, Reply-To and Return-Path to the message.
> >
> > Now the problem is that every recipient of my mail is getting two copies
> of
> > the message. I am positive that it's not my code which is causing the
> > problem, the script runs once and terminates. I've also tried to send
mail
> > by opening a socket connection to port 25 on the mail machine and
sending
> > SMTP commands, but still the result is the same. And there is no SMTP
> error
> > generated.
> >
> > Can anybody help me out here? or perhaps suggest a more efficient way of
> > sending out mail to my users? I'm really in a spot here...
> >
> > - Nikhil
> >
> >
> >
> >
> >
> >
> >
> > --
> > 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] Having trouble executing unzip from PHP script

2001-04-23 Thread Dexter

Hi PHP ers,

Cant unzip a file from a PHP script. It does nothing.

It works on the command line. Added paths to both the zip file and unzip program 
nothing happens 

exec("/usr/bin/unzip  $IMAGE_TEMP_DIR/phpxXTN3T ");

Thanks

Dexter





Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Daniel Beulshausen

Monday, April 23, 2001, 10:19:36 PM, you wrote:
> It should be the Program Files directory, concatenated with 'PHP';  Under
> Windows, we should behave like Windows apps...

we should use registry entries to determine/set the path(s), if those
entries aren't present it could default to some hardcoded values...

daniel

> Zeev
>
> At 21:50 23/4/2001, James Moore wrote:
>>how about defaulting to SystemDrive\\php4 but also allowing a envromental
>>variable to be set so
>>
>>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
>>
>>or somthing like that which works in C
>>
>>- James
>>
>> > -Original Message-
>> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
>> > Sent: 23 April 2001 19:24
>> > To: James Moore
>> > Cc: [EMAIL PROTECTED]
>> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
>> >
>> >
>> > Hi James,
>> >
>> > No problem. I change it to
>> >
>> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
>> >
>> > What about all the other directories ? These should be configureable too.
>> >
>> > - Frank
>> >
>> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
>> > > >
>> > > >   Modified files:
>> > > > /php4/mainconfig.w32.h php_ini.c
>> > > > +
>> > > > +/* Define directory constants for php and pear */
>> > > > +#define PHP_BINDIR "c:\\php4"
>> > > > +#define PHP_LIBDIR "c:\\php4"
>> > > > +#define PHP_DATADIR "c:\\php4"
>> > > > +#define PHP_SYSCONFDIR "c:\\php4"
>> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
>> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
>> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
>> > >
>> > > Ugh thats very very ugly.. I dont want my files there can you please use
>> > > SYSROOT instead of c:\\winnt please.
>> > >
>> > > - James
>> > >
>> > >
>> > >
>> > > --
>> > > PHP CVS 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 CVS 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 CVS 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]

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

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de



-- 
PHP CVS 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] newbie question: duplicate emails

2001-04-23 Thread Phillip Bow

Whenever you are positive its nto your code then check it again.  That being
said are there any SMTP logs you can check?  Have you monitored the exact
data being sent to the SMTP server(maybe set up a dummy socket that repeats
back the data sent to it then have your program try to connect to that)?
--
phill

""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
9c1ujm$868$[EMAIL PROTECTED]">news:9c1ujm$868$[EMAIL PROTECTED]...
> Hello people,
>
> I am having a peculiar problem with my mailing list and hope you can help
me
> out. I have a mySQL database with a table of email addresses for the
mailing
> lists. I have many lists, and my (PHP) code runs various queries on this
> table to generate lists of email addresses to which the mail has to be
sent.
>
> The email body is combined with this generated list, and then I use mail()
> to send this message out to each recipient. I also add on a few headers
such
> as From:, Errors-To, Reply-To and Return-Path to the message.
>
> Now the problem is that every recipient of my mail is getting two copies
of
> the message. I am positive that it's not my code which is causing the
> problem, the script runs once and terminates. I've also tried to send mail
> by opening a socket connection to port 25 on the mail machine and sending
> SMTP commands, but still the result is the same. And there is no SMTP
error
> generated.
>
> Can anybody help me out here? or perhaps suggest a more efficient way of
> sending out mail to my users? I'm really in a spot here...
>
> - Nikhil
>
>
>
>
>
>
>
> --
> 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] Method Not Allowed - Solved!!!!

2001-04-23 Thread Tym Rehm

I feel soo dumb. The problem was that the mod_php.rpm wasn't installed. I
installed it, restarted apache and the scripts worked. I also upgraded to
PHP4 while I was at it. Hope this will help someone.

- Original Message -
From: "Tym Rehm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 2:36 PM
Subject: [PHP] Method Not Allowed


> I'm trying to get a script working and I get a 405 Method Not Allowed
error
> every time I run the script. I understand this is a apache configuration
> issue, but I don't know what I need to do to fix this. I'm running RH7.0,
> Apache 1.3.12 and PHP3 all from RPMs. Thanks.
>
> ***
> THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL
> OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN
> INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT
> FROM DISCLOSURE UNDER APPLICABLE LAW.
> If the reader of this message is not the intended
> recipient, or the employee or agent responsible for
> delivering the message to the intended recipient, you are
> hereby notified that any dissemination, distribution,
> forwarding, or copying of this communication is strictly
> prohibited.  If you have received this communication in
> error, please notify the sender immediately by e-mail or
> telephone, and delete the original message immediately.
> Thank you.
> ***
>
>
> --
> 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] looking for a good shopping cart - catalog system

2001-04-23 Thread Ralph Guzman

if you looking for a ready out-of-the box solution, this is one of the best
I've seen:

www.theexchangeproject.org

you may also want to look into the following:

http://www.phpshop.org

http://share.whichever.com/index.php?SCREEN=freetrade

-Original Message-
From: Roee Rubin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 12:26 PM
To: Php-General
Subject: [PHP] looking for a good shopping cart - catalog system


Hello,

I am looking for a good shopping cart / catalog system open source solution
to be implemented for an ecommerce web site.

Any recommendation will be appreciated.

Thanks in advance.

Roee Rubin
Irubin Consulting
www.irubin.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]


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

2001-04-23 Thread Martín Marqués

On Lun 23 Abr 2001 22:13, Felix Kronlage wrote:
> On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
> > I asked when the new version of PHP was comming out at the beginning of
> > the month and some one told me that it was comming out the week after.
> > Haven't seen it yet, anyone knows the release date??
>
> RC7 got out a few days ago (Thursday I believe), and I think I recall that
> unless lot's of things went wrong this is the last RC
>
> -fkr
>
> ps. I guess, it's released once it works fine :)

Why don't the publicate the RC's. I had a hard time getting RC5.

Saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-
Martin Marques  |[EMAIL PROTECTED]
Programador, Administrador  |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
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: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Zeev Suraski

It should be the Program Files directory, concatenated with 'PHP';  Under 
Windows, we should behave like Windows apps...

Zeev

At 21:50 23/4/2001, James Moore wrote:
>how about defaulting to SystemDrive\\php4 but also allowing a envromental
>variable to be set so
>
>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
>
>or somthing like that which works in C
>
>- James
>
> > -Original Message-
> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> > Sent: 23 April 2001 19:24
> > To: James Moore
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
> >
> >
> > Hi James,
> >
> > No problem. I change it to
> >
> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
> >
> > What about all the other directories ? These should be configureable too.
> >
> > - Frank
> >
> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
> > > >
> > > >   Modified files:
> > > > /php4/mainconfig.w32.h php_ini.c
> > > > +
> > > > +/* Define directory constants for php and pear */
> > > > +#define PHP_BINDIR "c:\\php4"
> > > > +#define PHP_LIBDIR "c:\\php4"
> > > > +#define PHP_DATADIR "c:\\php4"
> > > > +#define PHP_SYSCONFDIR "c:\\php4"
> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> > >
> > > Ugh thats very very ugly.. I dont want my files there can you please use
> > > SYSROOT instead of c:\\winnt please.
> > >
> > > - James
> > >
> > >
> > >
> > > --
> > > PHP CVS 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 CVS 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 CVS 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 CVS 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] insert data to mysql

2001-04-23 Thread shawn

define "not work" like is there an error?  data not inserting?  also, read
and bookmark this tutorial, it'll help this and future endeavers :

  http://www.zend.com/zend/tut/using-strings.php

The error is that the data isnt being written to the MySQL database. This is taking 
variables from a form, and emailing them to a recipient, also it is supposed to write 
the data to a database. The email works fine, but it just isnt writting to the 
database?

Shawn
"thanks for the link"



RE: [PHP] Query Analyzer For MySQL with PHP?

2001-04-23 Thread Renzi, Sebastian

Create a mysql odbc acces and download the winsql.exe program that works
with odbc connections ,its a great sql client !!

Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A


> -Mensaje original-
> De:   Philip Olson [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 23 de abril de 2001 16:47
> Para: Brandon Orther
> CC:   PHP User Group
> Asunto:   Re: [PHP] Query Analyzer For MySQL with PHP?
> 
> 
> Use the mysql monitor, from shell:
> 
>   mysql -u username -p dbname
> 
> That'll log you in, now run some queries :
> 
>   mysql>SELECT * FROM tablename;
> 
> At this point everything is selected and displayed from table tablename.
> In otherwords, we can run and view SQL queries from this console, much
> like MySQL does it for PHP. Here are a couple tutorials that should help :
> 
>   MySQL Monitor Tutorial :
> http://www.mysql.com/doc/T/u/Tutorial.html
> 
>   MySQL Tutorial (demonstrates monitor) :
> http://www.devshed.com/Server_Side/MySQL/Intro/
> 
> Also, phpMyAdmin has a place to enter and view such queries via a form.
> 
>   phpMyAdmin :
> http://www.phpwizard.net/projects/phpMyAdmin/
> 
> 
> Regards,
> Philip
> 
> 
> 
> On Mon, 23 Apr 2001, Brandon Orther wrote:
> 
> > Hello,
> > I recently took an ANSI SQL class to better familiarize my self with
> SQL in
> > general.  In the class we used MSSQL SERVER 7 and to do queries we used
> the
> > Query Analyzer.  Does anyone know of a PHP script that works like the
> Query
> > Analyzer so I can test Queries in a Browser?  Like A Text Area where I
> can
> > put the query and a simple form that sends it to MySQL.
> > 
> > Thanks,
> > Brandon
> > 
> > 
> > -- 
> > 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_replace: Replacing only first occurrence

2001-04-23 Thread Erica Douglass

I want to only replace the first occurrence of a string in a file using
ereg_replace. Should I use a loop to do this? Any suggestions? Please email
me at [EMAIL PROTECTED] with suggestions.

Thanks,
Erica



-- 
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: insert data to mysql

2001-04-23 Thread Philip Olson


> I did that but it still doesnt work? Is there something else that I
> should be passing to the script to let it know to write to fields
> within the table?

define "not work" like is there an error?  data not inserting?  also, read
and bookmark this tutorial, it'll help this and future endeavers :

  http://www.zend.com/zend/tut/using-strings.php

and for kicks, right under your line that begins with $result put this :

  echo mysql_error();

mysql_error() prints the last mysql error (in human readable format), you
may have one.

regards,
philip




-- 
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 to find the object name in a class?

2001-04-23 Thread Boget, Chris

> So is there ANY way to get the name of the object in PHP code without
> knowing the name of the object ahead of time?

I went through this exact thing not too long ago with an error class
I wrote.  Unfortunately, there is no way to know.  What you can do,
however, is do a check to see if that object exists before you access
the variable.  Other than that, I think you're outta luck. :/

Chris



[PHP] How to find the object name in a class?

2001-04-23 Thread Plutarck

I've been using a function to output HTML to the user's browser, and now my
use has made it neccessary to put it all inside a class.

All's going find and dandy and I've got it all working. However one of it's
variables is $front_page.

Now in other pages there are references to $front_page, and I want to change
them to something like $objectname->front_pagee.

The problem is that I can't know what the object will be named ahead of
time!

So my hack-around is in the class constructor I set a global variable called
$pge with the value submitted to the constructor. So someone would do this:

$somename = new Display(somename);

But if someone typos the and the name of the variable is different from the
one submitted to the constructor, all the code will break! That's because
I'm using a variable variable to refer to $front_page, like this:

${$pge}->front_page

I told you it was a hack-around, and it isn't a good one.


So is there ANY way to get the name of the object in PHP code without
knowing the name of the object ahead of time?

I'm really stumped!



--
Plutarck
Should be working on something...
...but forgot what it was.





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