Re: [PHP] Problems connecting to remote mySQL server

2001-03-21 Thread almir

the only problem could be that yourUser@webhost do not have same permisions
for this db as yourUser@yourHost, check them if you can

-almir



"Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Almir,
>
> Yes I checked the names and they are correct.  Yes I am able to connect
using
> the command prompt from the remote server as I am able to list the
databases,
> tables, etc. remotely.
>
> Thanks,
>
> Floyd
>
> almir wrote:
>
> > when you connect to server issue
> > "show databases" -query then look inside what you can see some servers
are
> > case sensitive
> > i hope that will help,
> > and are you sure that you are connected , it could be that you may not
> > connect at all because of firewalls or something like that
> > -almir
> >
> > "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I am trying to connect to a remote mySQL server through PHP but I get
a
> > > mySQL error of "Unknown Database".  I can connect to the remote mySQL
> > server
> > > using the mysql command but not with PHP.
> > >
> > > 1. How can I debug what the problem is?
> > > 2. Do I need to specify the Port parameter in PHP?
> > > 3. Which mySQL error logs do I examine to help me out - the one on the
> > local
> > > machine or on the remote machine?
> > > 4. And where is the mySQL error logs anyway?
> > >
> > > I tried other lists but no help there.  I hope this list helps!
> > >
> > > Thanks all,
> > >
> > > Floyd Piedad
> > >
> > >
> > > --
> > > 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] PDF reading via IE5.5

2001-03-21 Thread Stewart Taylor

Try,

header("Content-type: application/pdf");
header("Location:$filename");

-Stewart


-Original Message-
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 04:14
To: [EMAIL PROTECTED]
Subject: [PHP] PDF reading via IE5.5


I have searched long and hard to resolve this issue.  I've tried many
variations for the header tag.  However, I cannot seem to get it to work
with IE5.5.

I am trying to read an Acrobat created PDF file that I uploaded into my
MySQL database.

The problem occurs when I print the data via IE5.5.



All I get is echoing of the binary to the browser.

Any ideas or suggestions?

/dkm




-- 
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] Date solved! And now TIME problems : Booking by Date/Time

2001-03-21 Thread Thomas Edison Jr.

i was able to succesfully check for start dates & end
dates before feeding new booking in the database using
the following code :

=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);

  if (mysql_num_rows($result)) {
 ?>
 
 alert('Sorry, the room is already booked for the
period. Please choose a different period');
 history.go(-1);
 
 Thank you! $rooms, has been booked from
$realsdate to $realedate.

** Entries will be deleted 2 weeks after the End
Date.
";
}
 
 ?>

But now - TIME problems. I have to check for the same
on TIME as well - the problem is - he needs to check
for the TIME in that Particular row only...and not as
a whole. For eg :- if there's a Booking from 1st
August 2001 1:00 p.m. to 1st August 2001 3:00 p.m.
(same day), and if someone wants to make a booking for
the same day from 4:00 p.m. to 6:00 p.m., my code
doesn't allow that. Because he checks for the DATE -
and as soon as he will find 1st August, he won't allow
a booking to be made for that same day. What do i do??
I know the changes have to be made here :

$result = mysql_query("select * from booking where
('$realsdate'>=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);


but i dodn't know what changes. Please HELP!!

Cheers,
T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.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] Optional Parameter ?

2001-03-21 Thread Jack Sasportas

Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


-- 
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] Optional Parameter ?

2001-03-21 Thread Stewart Taylor

You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
 do whatever with $maybe
}

-Stewart

-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


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

2001-03-21 Thread Dezider Góra

You could use curl functions to do this. Search the manual for curl
functions, and enable curl extension in php.
hth
Dezider

David Robley wrote:

> On Wed, 21 Mar 2001 17:45, Paul Juliano wrote:
> > Hello,
> >
> > How would I simulate an http post in PHP.  Something like the
> > equivalent of this:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > And how would I be able to read the resulting page.
>
> You might find more info here:
>
> http://marc.theaimsgroup.com/?l=php-general&m=97813345106366&w=2
>
> --
> 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 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] Problems connecting to remote mySQL server

2001-03-21 Thread Floyd Piedad

Hi Almir,

Here is more info:
Server1: where my database resides
Server2: where my script resides
On Server1: I can access the database using mysql command and PHP.
On Server2: I can access the database using mysql -hserver1   I can show all
the tables, select data, etc.  BUT, when running PHP script on this server,
(mysql_connect("server1",user,password)) all that happens is that it still
connects to the mysql in Server2 and not in Server1.

I really cannot understand why.  Being able to access Server1 using Server2
mysql command verifies my access rights right?


I am about to give up on this!

Thanks,

Floyd

almir wrote:

> the only problem could be that yourUser@webhost do not have same permisions
> for this db as yourUser@yourHost, check them if you can
>
> -almir
>
> "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi Almir,
> >
> > Yes I checked the names and they are correct.  Yes I am able to connect
> using
> > the command prompt from the remote server as I am able to list the
> databases,
> > tables, etc. remotely.
> >
> > Thanks,
> >
> > Floyd
> >
> > almir wrote:
> >
> > > when you connect to server issue
> > > "show databases" -query then look inside what you can see some servers
> are
> > > case sensitive
> > > i hope that will help,
> > > and are you sure that you are connected , it could be that you may not
> > > connect at all because of firewalls or something like that
> > > -almir
> > >
> > > "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > I am trying to connect to a remote mySQL server through PHP but I get
> a
> > > > mySQL error of "Unknown Database".  I can connect to the remote mySQL
> > > server
> > > > using the mysql command but not with PHP.
> > > >
> > > > 1. How can I debug what the problem is?
> > > > 2. Do I need to specify the Port parameter in PHP?
> > > > 3. Which mySQL error logs do I examine to help me out - the one on the
> > > local
> > > > machine or on the remote machine?
> > > > 4. And where is the mySQL error logs anyway?
> > > >
> > > > I tried other lists but no help there.  I hope this list helps!
> > > >
> > > > Thanks all,
> > > >
> > > > Floyd Piedad
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP 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] banner exchange, how to?

2001-03-21 Thread Mark Maggelet

On Tue, 20 Mar 2001 21:27:14 -0800, Ed Lazor ([EMAIL PROTECTED])
wrote:
>Hi =)
>
>I'd like to setup a banner exchange with some friends.  Some of them
>don't
>have PHP access, so I'm trying to come up with something that will
>work for
>everyone.  I checked one site that's running a banner exchange and
>saw them
>using a cgi script like this:
>
>http://www.site.com/exchange.cgi?ad=NonSSI&page=XX">

this script logs the clickthrough and redirects to the page using
header("Location: $url")

>http://www.site.com/exchange.cgi?id=siteB&page=XX">

this script logs the impression and redirects (or passes thru) to the
banner

it's really not very hard you can do the whole thing in about 20
lines of code.

>
>
>Looking at that, it suggests the cgi script is some how sending
>image data
>to be used for displaying the banner ad.  Then, on top of that, it's
>some
>how routing the visitor to the correct location when they click on
>the
>ad.  I don't see how they are doing it and figured I'd ask here to
>see if
>anyone has any ideas.
>
>If you're not sure of how they did it, any ideas on how to
>accomplish what
>I'm after?
>
>I came across another site that had the following code and some how
>they
>have it working as well.  It would be cool to figure out how they
>did it.
>
>http://www.lemnet.com/banners/show/?user=qatlantis"
>HEIGHT="77" WIDTH="470" SCROLLING="no" MARGINHEIGHT="0"
>MARGINWIDTH="0"
>FRAMEBORDER="0">
>http://www.lemnet.com/banners/show/?user=qatlantis"
>HEIGHT="77" WIDTH="470">  
>
>
>--
>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: php-list-
>[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] sorri- Non-php question

2001-03-21 Thread John LYC

Sorry guys...
this is not a php question...
but this is by far the best web resource i have seem...so here goes..

does anyone here know of any mailing list for perl or JAVA...?
any great web resrcs/website?

anyway,
so far.. i still think php official website provides the best resource
for their language as compare to the other languages...

thanks
john




-- 
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: Dynamically build a form from mySQL table

2001-03-21 Thread Tim Ward

$result = mysql_db_query("FocusDynamics", "SHOW COLUMNS FROM items");
while($field = mysql_fetch_array($result))
{   $thisfield = $field["field"];
echo("");
echo("$thisfield");
echo("");
}

I'm assuming mysql. You may want to play around with analysing
$field["type"] to get the right input attributes. There may be a slicker
way, but I think this is pretty straight forward and the "SHOW COLUMNS"
query isn't going to be slow.

... also this untested so please treat as pseudo code.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -Original Message-
> From: Martin E. Koss [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 18:06
> To: [EMAIL PROTECTED]
> Subject: Dynamically build a form from mySQL table
> 
> 
> Hi,
> I've been trying to figure this out by looking through the code in
> phpMyAdmin but I'm not getting very far. There's probably 
> some help about it
> somewhere.
> 
> What I want to do is dynamically generate a form where I get 
> a table row
> containing the field name in one cell and the input field in 
> the next cell,
> for example:
> 
> $DatabaseName = "FocusDynamics";
> $TableName = "Items";
> 
> // open the table and get all field names, sizes, etc.,
> 
> // for each Field name, print something like:
> 
> PRINT "\n";
> PRINT "$FieldName\n";
> PRINT " value=\"$FieldValue\"
> maxlength=\"FieldSize\">\n";
> PRINT "";
> 
> How do I get all this info from the table?
> 
> Thanks for any help.
> 
> 
> Martin E. Koss
> M: 07946-706459
> E: [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] Finding every even 100

2001-03-21 Thread Nicklas af Ekenstam

Hi

Propably a really simple question, but my math skills are not up to speed 
anymore:

How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
I could always divide by 100 and have a look at the result and se if it has 
any decimals but I'm guessing this could be done prettier using modulus. Right?

- Nille


-- 
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] Optional Parameter ?

2001-03-21 Thread Neil Kimber

Alternatively, you can use the approach below. There are different benefits
from each approach. The following approach is particularly useful if you
want an unlimited number of parameters (like elipses in C).

function print_this ($value1, $value2)
{

if (3==func_num_args())
{
$maybe3=func_get_arg(2);// args are counted from 0 up
}

..
..
}


-Original Message-
From: Stewart Taylor [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:53
To: 'Jack Sasportas'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Optional Parameter ?


You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
 do whatever with $maybe
}

-Stewart

-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


--
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] Finding every even 100

2001-03-21 Thread Stewart Taylor

If the number divided by 100 hundred has no remainder
e.g.
if (($num % 100) == 0) even_100 = true;

-Stewart

-Original Message-
From: Nicklas af Ekenstam [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 09:38
To: [EMAIL PROTECTED]
Subject: [PHP] Finding every even 100


Hi

Propably a really simple question, but my math skills are not up to speed 
anymore:

How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
I could always divide by 100 and have a look at the result and se if it has 
any decimals but I'm guessing this could be done prettier using modulus.
Right?

- Nille


-- 
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] Post -vs- Get

2001-03-21 Thread Jack Sasportas

I have written a system with authentication to gain access to individual
data.
Since I am using the post method the command line has something like

abc.com?client_no=5

Now even though if that person emails you that url, you won't gain
access to it bascause of authentication that is needed, what can happen
is an authorized user could change the 5 in the url to 8, and then see
the information that is there which belongs to client 8.

Because of this I am thinking in this case I should be using the post
method instead of the get method.

Does anyone have a link to a doc that has a good example in both methods
along with a good explanation so that I can make sure I understand what
it's doing?

Thanks for your help!

Jack


-- 
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] can you have two sql statements on the same page.

2001-03-21 Thread Matt Davis

I want to extract 2 sets of data each from different tables in the same db
but display the results on the same page at the same time. Can I just have
two sql statements like this or do I need to do something else.

   //sql statement 1
$sql1 = "select club_full_name from clubs where club_name = '$id' ";

   //sql statement 2
$sql2 = "select message,message_title from noticeboard where club_name =
'$id' ";

   //execute sql1 query and get results
  $sql_result1 = mysql_query($sql1);

   //execute sql2 query and get results
  $sql_result2 = mysql_query($sql2);

   /*results
  variables for data to be displayed*/

  while ($row = mysql_fetch_array($sql_result1)) {
 $name = $row["club_full_name"];

}


How can I put both sets of results in the while statement.

Any help would be kindly appreciated

Matt.


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




RE: [PHP] Post -vs- Get

2001-03-21 Thread Stewart Taylor

It would be better to use randomly generated strings for your client ids
e.g. md5(uniqid(rand()));
This would be must harder for another use to guess.


Even better would be to store your users details in a session variable so
that the id will never appear in the url at all.


e.g. a very basic example.

session_name("YOURSESSIONID")
session_start();

authenticate etc.. and read user details into $user array/object;

session_register($user);

then as long as your using the same browser session and you have

session_name("YOURSESSIONID");
session_start();

at the beginning of each page you can access $user.


If you open a new window you can do something like

abc.php?session_id=session_id()

abc.php

session_id($session_id);
session_name("YOURSESSIONID");
session_start()

and carry on using $user.


-Stewart





-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 10:02
To: php
Subject: [PHP] Post -vs- Get


I have written a system with authentication to gain access to individual
data.
Since I am using the post method the command line has something like

abc.com?client_no=5

Now even though if that person emails you that url, you won't gain
access to it bascause of authentication that is needed, what can happen
is an authorized user could change the 5 in the url to 8, and then see
the information that is there which belongs to client 8.

Because of this I am thinking in this case I should be using the post
method instead of the get method.

Does anyone have a link to a doc that has a good example in both methods
along with a good explanation so that I can make sure I understand what
it's doing?

Thanks for your help!

Jack


-- 
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] Editing Variables from another script.

2001-03-21 Thread techzeus

What are the functions that can achieve that ?

- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Stewart Taylor"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 12:24 AM
Subject: RE: [PHP] Editing Variables from another script.


> Gotya. The why not limit your include file to only contain those values
that
> are important to you. So you get something like:
>
> varsdatabase.inc
>
> $dbhost="x";
> $dbuser="y";
> $dbpass="z";
>
> Then, in your PHP code you just rewrite this simple file. That way you
don't
> have to worry about parsing files etc... Just delete the existing
> varsdatabase.inc and build a new one from scratch. It's no longer
difficult
> because it's only 3 lines long.
>
>
>
>
> > > > $dbhost='localhost';
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 14:26
> To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> Basically, thats not what I'm going to do.
>
> I'm making an administrative script such that admins can change the
location
> and values of the $dbhost, $dbuser, $dbpass in the database.inc with just
a
> form.
>
> Kinda tough eh ?
>
> - Original Message -
> From: "Neil Kimber" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 10:25 PM
> Subject: RE: [PHP] Editing Variables from another script.
>
>
> > It depends upon what your overall aim actually is.
> >
> > If you want a different value depending upon where this file is being
used
> > in your site, then you should probably just set the value accordingly in
> > that part of the site.
> > i.e.
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> >
> > If you want a different value in the same place based upon a different
> > 'user' or other criteria, then you should probably write some logic to
> > handle the situation.
> > i.e.
> >
> > include "database.inc";
> >
> > if (MYCRITERIA)
> > {
> > $dbhost='localhost';
> > }
> >
> > The only reason that I can think of for you wanting to change the
physical
> > file would be if you are writing some code to generate a release for
> > different users. In which case, you'll probably want to build a parser
and
> > use some kind of templating system.
> >
> > Neil
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 20 March 2001 14:08
> > To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > What other ways might there be ?
> >
> >
> > - Original Message -
> > From: "Neil Kimber" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 20, 2001 6:10 PM
> > Subject: RE: [PHP] Editing Variables from another script.
> >
> >
> > > Do you mean that you want to alter the physical contents of
> > 'database.inc'?
> > > This would require you parsing the existing file yourself, writing a
new
> > > version of the file, altering the relevant line of code, removing the
> > > original file and renaming your new file to the original filename.
> > >
> > > This isn't a good approach, are you sure there isn't a different way
for
> > you
> > > acheive your aims?
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: 20 March 2001 10:02
> > > To: Stewart Taylor; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Editing Variables from another script.
> > >
> > >
> > > I think you didn't get what I meant,
> > >
> > > I need a script such that I can change the content of database.inc
from
> an
> > > external script (form or whatever)
> > >
> > >
> > > - Original Message -
> > > From: "Stewart Taylor" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 20, 2001 5:57 PM
> > > Subject: RE: [PHP] Editing Variables from another script.
> > >
> > >
> > > >
> > > >
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> > > >
> > > >
> > > >
> > > > -Stewart
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: 20 March 2001 09:26
> > > > To: Jason Stechschulte
> > > > Cc: 'PHP General List. (E-mail)'
> > > > Subject: Re: [PHP] Editing Variables from another script.
> > > >
> > > >
> > > > Okay, basically,
> > > >
> > > > I'm trying to create a script such that it will change the variables
> > > inside
> > > > of my .inc page.
> > > >
> > > > Something like
> > > >
> > > > lets say I have this file called "database.inc"
> > > > Inside it I have :
> > > >
> > > > $dbhost = 'blah'
> > > > $dbuser= 'blah'
> > > > $dbpass= 'blah'
> > > >
> > > > I would like to make a script such 

Re: [PHP] can you have two sql statements on the same page.

2001-03-21 Thread Jack Sasportas

The simple answer would be 2 while statements, but are you trying to mix the results
or are you keeping them seperate?
By mix there are 2 options

value_db1 Value_db2 Value_db1

or

value_db1
value_db1
value_db2
value_db1

by the simple answer above it would result in something like
Category #1
value_db1
value_db1
value_db1
value_db1
value_db1
Category  #2
value_db2
value_db2
value_db2
value_db2
value_db2

or a side by side thing

Also how many records (approx) are you dealing with ?
you could bring the value from each table into an array and then dump the values
stored in the array.


Hope this helps...

Jack


Matt Davis wrote:

> I want to extract 2 sets of data each from different tables in the same db
> but display the results on the same page at the same time. Can I just have
> two sql statements like this or do I need to do something else.
>
>//sql statement 1
> $sql1 = "select club_full_name from clubs where club_name = '$id' ";
>
>//sql statement 2
> $sql2 = "select message,message_title from noticeboard where club_name =
> '$id' ";
>
>//execute sql1 query and get results
>   $sql_result1 = mysql_query($sql1);
>
>//execute sql2 query and get results
>   $sql_result2 = mysql_query($sql2);
>
>/*results
>   variables for data to be displayed*/
>
>   while ($row = mysql_fetch_array($sql_result1)) {
>  $name = $row["club_full_name"];
>
> }
>
> How can I put both sets of results in the while statement.
>
> Any help would be kindly appreciated
>
> Matt.
>
> --
> 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] Optional Parameter ?

2001-03-21 Thread Rudolf Visagie

Or you can use an array:
function print_this( $ArrayValues ) {

do whatever using count($ArrayValues) to determine the bounds of the
array;

}

-Original Message-
From: Neil Kimber [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 11:44
To: Stewart Taylor; 'Jack Sasportas'; [EMAIL PROTECTED]
Subject: RE: [PHP] Optional Parameter ?


Alternatively, you can use the approach below. There are different benefits
from each approach. The following approach is particularly useful if you
want an unlimited number of parameters (like elipses in C).

function print_this ($value1, $value2)
{

if (3==func_num_args())
{
$maybe3=func_get_arg(2);// args are counted from 0 up
}

..
..
}


-Original Message-
From: Stewart Taylor [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:53
To: 'Jack Sasportas'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Optional Parameter ?


You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
 do whatever with $maybe
}

-Stewart

-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


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

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




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

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




[PHP] function mail()

2001-03-21 Thread Eric Tonicello

Hi !

I'm trying to use the function mail().



I get :

Warning: Failed to Connect in D:\IBOIS\web\test.php on line 1

I'm using the lastest version of PHP on IIS 4.0

What's wrong ?

Should I  change the php.ini ?

If I try to use the snmp library i get lot of errors...

PLease help.me

mcfly




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




FW: [PHP] can you have two sql statements on the same page.

2001-03-21 Thread Jeff Armstrong


Matt,

> put two sets of data in the same while loop...

If there is some logical relationship between the sets of
records then consider adding a join:

$sql = "select club_full_name,message,messate_title "
 "  from clubs,noticeboard "
   "  where clubs.club_name = noticeboard.club_name and clubs.clubname =
'$id' ";

You can then iterate through this result:

$sth = mysql_query($sql);

$last = '';
while ($row = mysql_fetch_array($sql_result1)) {
  if ( $last != $row[club_full_name] ) {
echo "$row["club_full_name"\n";
  }
  echo "$row[message_title] $row[message]\n";
  $last = $row["club_full_name"];
}

Regards
Jeff
-Original Message-
From: Matt Davis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 10:23 AM
To: Php Mailing List
Subject: [PHP] can you have two sql statements on the same page.


I want to extract 2 sets of data each from different tables in the same db
but display the results on the same page at the same time. Can I just have
two sql statements like this or do I need to do something else.

   //sql statement 1
$sql1 = "select club_full_name from clubs where club_name = '$id' ";

   //sql statement 2
$sql2 = "select message,message_title from noticeboard where club_name =
'$id' ";

   //execute sql1 query and get results
  $sql_result1 = mysql_query($sql1);

   //execute sql2 query and get results
  $sql_result2 = mysql_query($sql2);

   /*results
  variables for data to be displayed*/

  while ($row = mysql_fetch_array($sql_result1)) {
 $name = $row["club_full_name"];

}


How can I put both sets of results in the while statement.

Any help would be kindly appreciated

Matt.


--
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] apache problem on startup w/ libmhash

2001-03-21 Thread Dean Hall

(Sorry for the cross-post; I'd like to get this solved, as I haven't been
able to find a solution for several months.)

I have installed mhash and libmcrypt (and mcrypt, for that matter),
configured php with both of the extensions, and compiled PHP (as a DSO), and
apache gives the following error when I attempt to start it:

Cannot load /usr/local/apache/libexec/libphp4.so into server: libmhash.so.2:
cannot open shared object file: No such file or directory

Here are the details:

Webserver:
- apache-1.3.19 compiled with
  (- mm-1.1.3)
  - mod_ssl-2.8.1-1.3.19 (compiled as a static module)


PHP (DSO):
- php-4.0.4pl1 compiled with extensions:
  - libmcrypt-2.4.7
  - mhash-0.8.9

I installed mcrypt-2.2.6 as well, but I soon realized that the PHP
documentation said I should install libmcrypt, not mcrypt. Interestingly,
php never complained that libmcrypt was not installed during configure. I'm
not a *nix guru, and I don't understand completely how the dynamic linking
process works, but this seems wrong.

Any thoughts? I'm pretty desperate here. :-) Otherwise I'll have to start
using the openssl shell command.

Dean Hall.
Apt7.com Web Services




-- 
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] Attachment problem with web based mail - CODE SAMPLE

2001-03-21 Thread Grant Walters

> We hired a developer about a year ago to develop a
> web based email system for us in php. The developer
> is no longer around, so I am having to pick up
> the development on the project...When clicking
> on the attachment link of an email in Internet
> Explorer 5.5 in Windows 98, I get the save as dialog
> and when I select ok, it tries to save the html
> page. If I right click and do save target as, it
> gets the correct file. This all works correctly in
> IE 5.0 and Netscape 4.76, and what's weird is that
> it even works as expected in IE 5.5 running on Win2k.
> Can anyone offer any suggestions? I'll be glad to send
> any code snipplets, or info if anyone can clue me in...
>
> Jack Davis
> Network Admin
> Bootheel Internet Services

I built this a few months ago to handle mail merges with a fixed defied
attachment and it seems to work for most email readers I have tried.  It is
supposed to handle text email clients and MIME clients as well as per the
RFC's (It was templated from an outgoing email attachment from Microsoft
Outlook so it will probably screw something up somewhere).

The site variable is a class variable from an included file that contains
all sorts of default stuff.
class SITE {
  var $mail_from = "[EMAIL PROTECTED]";
  var $mail_reply_to = "[EMAIL PROTECTED]";
} // END SITE CLASS

The get page function
  function get_page($page_name="") {
$return="";
if (file_exists($page_name))

  $fp = fopen("$page_name","r");
  $return .= fread($fp, filesize($page_name));
  fclose($fp);
}
return $return;
  }

The logger function is just a thing thats adds a record to a mysql table to
record the event for later use by my contact management/list procesing
system.

  function
mail_it($subject,$mail_message,$mail_to="[EMAIL PROTECTED]",$mail_
attachment="",$from="",$reply_to="") {
global $site;
if ($from) { $mail_from="From:$from"; } else
 $mail_from="From:".$site->mail_from; }
if ($reply_to) { $mail_reply_to="Reply-To:$reply_to"; } else
 $mail_reply_to="Reply-To:".$site->mail_reply_to; }

$rand=md5(rand());
$boundary="=_NextPart_000_$rand";
$boundary2="=_NextPart_001_$rand";
$mail_headers = "$mail_from\n$mail_reply_to\n";
$mail_headers .= "Content-Type: multipart/mixed;\n
boundary=\"$boundary\"";
$mail_headers .= "\nX-Priority: 3 (Normal)\nX-Mailer: Walters And
Associates WCDS, Build 1.01\nImportance: Normal";
$mail_body = "";
$mail_body .= "  This message is in MIME format.  The first part
should";
$mail_body .= "be readable text,\n  while the remaining parts are";
$mail_body .= "likely unreadable without MIME-aware tools.\n  Send
mail";
$mail_body .= "to [EMAIL PROTECTED] for more information.\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary;
$mail_body .= "\n";
$mail_body .= "Content-Type: multipart/alternative;\n
boundary=\"$boundary2\"\n";
$mail_body .= "\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."\n";
$mail_body .= "Content-Type: text/plain;\n
charset=\"iso-8859-1\"\n";
$mail_body .= "Content-Transfer-Encoding: 7bit\n";
$mail_body .= "\n";
$mail_body .= strip_tags($mail_message)."\n";
$mail_body .= "\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."\n";
$mail_body .= "Content-Type: text/html;\n
charset=\"iso-8859-1\"\n";
$mail_body .= "Content-Transfer-Encoding: quoted-printable\n";
$mail_body .= "\n";
$mail_body .= "$mail_message\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."--\n";
$mail_body .= "\n";

if ($mail_attachment<>"") {
  $content = get_page($mail_attachment);
  if ($content) {
$mail_body .= "--".$boundary."\n";
$mail_body .= "Content-Type: application/octet-stream\n";
$mail_body .= "name=\"".basename($mail_attachment)."\"\n";
$mail_body .= "Content-Transfer-Encoding: base64\n";
$mail_body .= "Content-Description: \"Mail Attachment\"\n";
$mail_body .= "Content-Disposition: attachment;\n";
$mail_body .= "
filename=\"".basename($mail_attachment)."\"\n";
$mail_body .= "\n";
$mail_body .= base64_encode($content)."\n\n";
  }
}
$mail_body .= "--".$boundary."--\n";

if (mail($mail_to,"$subject",$mail_body,$mail_headers)) {
  logger(1,"Mail Success","$subject To $mail_to",$mail_message);
  return TRUE;
} else {
  logger(9,"Mail Failure",$mail_to,$mail_body);
  return FALSE;
}
  }


Hope this Helps.

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] Attachment problem with web based mail

2001-03-21 Thread Grant Walters


> We hired a developer about a year ago to develop a
> web based email system for us in php. The developer
> is no longer around, so I am having to pick up
> the development on the project...When clicking
> on the attachment link of an email in Internet
> Explorer 5.5 in Windows 98, I get the save as dialog
> and when I select ok, it tries to save the html
> page. If I right click and do save target as, it
> gets the correct file. This all works correctly in
> IE 5.0 and Netscape 4.76, and what's weird is that
> it even works as expected in IE 5.5 running on Win2k.
> Can anyone offer any suggestions? I'll be glad to send
> any code snipplets, or info if anyone can clue me in...
>
> Jack Davis
> Network Admin
> Bootheel Internet Services

I built this a few months ago and it seems to work for most things I have
tried.  It is supposed to handle text email clients and MIME clients as
well.

The site variable is a class variable that contains all sorts of stuff.
  var $mail_from = "[EMAIL PROTECTED]";
  var $mail_reply_to = "[EMAIL PROTECTED]";


  function
mail_it($subject,$mail_message,$mail_to="[EMAIL PROTECTED]",$mail_
attachment="",$from="",$reply_to="") {
global $site;
if ($from) { $mail_from="From:$from"; } else
 $mail_from="From:".$site->mail_from; }
if ($reply_to) { $mail_reply_to="Reply-To:$reply_to"; } else
 $mail_reply_to="Reply-To:".$site->mail_reply_to; }

$rand=md5(rand());
$boundary="=_NextPart_000_$rand";
$boundary2="=_NextPart_001_$rand";
$mail_headers = "$mail_from\n$mail_reply_to\n";
$mail_headers .= "Content-Type: multipart/mixed;\n
boundary=\"$boundary\"";
$mail_headers .= "\nX-Priority: 3 (Normal)\nX-Mailer: Walters And
Associates WCDS, Build 1.01\nImportance: Normal";
$mail_body = "";
$mail_body .= "  This message is in MIME format.  The first part
should";
$mail_body .= "be readable text,\n  while the remaining parts are";
$mail_body .= "likely unreadable without MIME-aware tools.\n  Send
mail";
$mail_body .= "to [EMAIL PROTECTED] for more information.\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary;
$mail_body .= "\n";
$mail_body .= "Content-Type: multipart/alternative;\n
boundary=\"$boundary2\"\n";
$mail_body .= "\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."\n";
$mail_body .= "Content-Type: text/plain;\n
charset=\"iso-8859-1\"\n";
$mail_body .= "Content-Transfer-Encoding: 7bit\n";
$mail_body .= "\n";
$mail_body .= strip_tags($mail_message)."\n";
$mail_body .= "\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."\n";
$mail_body .= "Content-Type: text/html;\n
charset=\"iso-8859-1\"\n";
$mail_body .= "Content-Transfer-Encoding: quoted-printable\n";
$mail_body .= "\n";
$mail_body .= "$mail_message\n";
$mail_body .= "\n";
$mail_body .= "--".$boundary2."--\n";
$mail_body .= "\n";

if ($mail_attachment<>"") {
  $content = get_page($mail_attachment);
  if ($content) {
$mail_body .= "--".$boundary."\n";
$mail_body .= "Content-Type: application/octet-stream\n";
$mail_body .= "name=\"".basename($mail_attachment)."\"\n";
$mail_body .= "Content-Transfer-Encoding: base64\n";
$mail_body .= "Content-Description: \"Mail Attachment\"\n";
$mail_body .= "Content-Disposition: attachment;\n";
$mail_body .= "
filename=\"".basename($mail_attachment)."\"\n";
$mail_body .= "\n";
$mail_body .= base64_encode($content)."\n\n";
  }
}
$mail_body .= "--".$boundary."--\n";

if (mail($mail_to,"$subject",$mail_body,$mail_headers)) {
  logger(1,"Mail Success","$subject To $mail_to",$mail_message);
  return TRUE;
} else {
  logger(9,"Mail Failure",$mail_to,$mail_body);
  return FALSE;
}
  }




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] Response.Write [OK]

2001-03-21 Thread AJDIN BRANDIC

Hi,

I have built a shopping cart and have made connection to an Internet 
payment company.  Now once transaction is processed they want from my 
confirmation page to receive an "[OK]".  How can I do this with php3/4?

Response.Write"[OK]" is what ASP uses, I think???


Thanks

Ajdin 

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




Re: [PHP] Post -vs- Get

2001-03-21 Thread Michael Hall


> abc.com?client_no=5
> 
> Now even though if that person emails you that url, you won't gain
> access to it bascause of authentication that is needed, what can happen
> is an authorized user could change the 5 in the url to 8, and then see
> the information that is there which belongs to client 8.
> 
> Because of this I am thinking in this case I should be using the post
> method instead of the get method.

Even then a user could save the source code of your form, alter the POST
information, and send it back with the same effect.

You should probably look at having some kind of individualised 
authentication scheme rather than a blanket one, using sessions/cookies
perhaps.
POST alone is not the solution.

Mick


-- 
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] Response.Write [OK]

2001-03-21 Thread Jon Haworth

You could investigate www.php.net/echo, I think it's what you're after.

Cheers
Jon


-Original Message-
From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 12:05
To: [EMAIL PROTECTED]
Subject: [PHP] Response.Write [OK]


Hi,

I have built a shopping cart and have made connection to an Internet 
payment company.  Now once transaction is processed they want from my 
confirmation page to receive an "[OK]".  How can I do this with php3/4?

Response.Write"[OK]" is what ASP uses, I think???


Thanks

Ajdin 


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
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] Response.Write [OK]

2001-03-21 Thread AJDIN BRANDIC

You think I need to do something like

echo'Response.Write[OK]';

This will print Response.Write [OK] on he screen or

Ajdin


On Wed, 21 Mar 2001, Jon Haworth wrote:

> You could investigate www.php.net/echo, I think it's what you're after.
> 
> Cheers
> Jon
> 
> 
> -Original Message-
> From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> Sent: 21 March 2001 12:05
> To: [EMAIL PROTECTED]
> Subject: [PHP] Response.Write [OK]
> 
> 
> Hi,
> 
> I have built a shopping cart and have made connection to an Internet 
> payment company.  Now once transaction is processed they want from my 
> confirmation page to receive an "[OK]".  How can I do this with php3/4?
> 
> Response.Write"[OK]" is what ASP uses, I think???
> 
> 
> Thanks
> 
> Ajdin 
> 
> 
> **
> 'The information included in this Email is of a confidential nature and is 
> intended only for the addressee. If you are not the intended addressee, 
> any disclosure, copying or distribution by you is prohibited and may be 
> unlawful. Disclosure to any party other than the addressee, whether 
> inadvertent or otherwise is not intended to waive privilege or confidentiality'
> 
> **
> 
> -- 
> 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] Lostpassword script Error

2001-03-21 Thread techzeus

Hi there, I need some help here.

I have uploaded all the files necessary into my server. grab it at 
www.frozened.com/zeus/lostpassword.zip

This is a lostpassword script whereby when the user inputs his email address, the 
script will check if his email is a valid email ( [EMAIL PROTECTED] ) after which it will 
use the database to search for the email and if there his email is in the db, it will 
send him a mail telling him so.

In this script I haven't add the mail() but replaced it with a echo() so that I know 
that the form has been processed.

When I run the script and input a 'non-valid' email address ( no @ sign ), the 
errormsg will appear as normal but when I type a valid email or a email that is in the 
database, the form will just clear it self and reappear.

Mind if someone help me debug (I'm new to PHP).

Thanks :)


Zeus





Re: [PHP] Response.Write [OK]

2001-03-21 Thread techzeus

no.

Imagine Response.write as echo.

so it will be

echo "OK";

PHP doesn't parse ASP tags

- Original Message -
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: "Jon Haworth" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 8:24 PM
Subject: RE: [PHP] Response.Write [OK]


> You think I need to do something like
>
> echo'Response.Write[OK]';
>
> This will print Response.Write [OK] on he screen or
>
> Ajdin
>
>
> On Wed, 21 Mar 2001, Jon Haworth wrote:
>
> > You could investigate www.php.net/echo, I think it's what you're after.
> >
> > Cheers
> > Jon
> >
> >
> > -Original Message-
> > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > Sent: 21 March 2001 12:05
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Response.Write [OK]
> >
> >
> > Hi,
> >
> > I have built a shopping cart and have made connection to an Internet
> > payment company.  Now once transaction is processed they want from my
> > confirmation page to receive an "[OK]".  How can I do this with php3/4?
> >
> > Response.Write"[OK]" is what ASP uses, I think???
> >
> >
> > Thanks
> >
> > Ajdin
> >
> >
> > **
> > 'The information included in this Email is of a confidential nature and
is
> > intended only for the addressee. If you are not the intended addressee,
> > any disclosure, copying or distribution by you is prohibited and may be
> > unlawful. Disclosure to any party other than the addressee, whether
> > inadvertent or otherwise is not intended to waive privilege or
confidentiality'
> >
> > **
> >
> > --
> > 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] function mail()

2001-03-21 Thread Tobias Talltorp

See the SMTP value in your PHP.ini and set it to a valid outgoing mail
server

Another thing I have noticed, perhaps this is only me, is that if the
TO-address isn´t valid it will fail.
Try to send an email to your own email address...

// Tobias


""Eric Tonicello"" <[EMAIL PROTECTED]> wrote in message
99a1hq$tns$[EMAIL PROTECTED]">news:99a1hq$tns$[EMAIL PROTECTED]...
> Hi !
>
> I'm trying to use the function mail().
>
> 
>
> I get :
>
> Warning: Failed to Connect in D:\IBOIS\web\test.php on line 1
>
> I'm using the lastest version of PHP on IIS 4.0
>
> What's wrong ?
>
> Should I  change the php.ini ?
>
> If I try to use the snmp library i get lot of errors...
>
> PLease help.me
>
> mcfly
>
>
>
>
> --
> 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 post

2001-03-21 Thread Tobias Talltorp

No can do...

You can send a post to another page, but not go to that page.

In order to go to the page the form was was posted, the information must
come from the client. You can use javascript for this, but it is not a very
stable solution.

// Tobias

""Paul Juliano"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello,
>
> How would I simulate an http post in PHP.  Something like the equivalent
> of this:
>
> 
> 
> 
> 
> 
> 
>
> And how would I be able to read the resulting page.
>
> __
> www.edsamail.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
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] Response.Write [OK]

2001-03-21 Thread Matt Williams


> 
> I have built a shopping cart and have made connection to an Internet 
> payment company.  Now once transaction is processed they want from my 
> confirmation page to receive an "[OK]".  How can I do this with php3/4?
> 
> Response.Write"[OK]" is what ASP uses, I think???

try 

echo "alert('OK')";

I think this is the same thing

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] apache problem on startup w/ libmhash

2001-03-21 Thread Yasuo Ohgaki
At first find where is libmhash.so.2. Then edit your ld.so.conf.
Then run ldconfig.

Filename and command name may vary, I can't tell since you didn't
mention your OS.

Alternatively, you can build into PHP if you have static lib. I prefer this
way for non standard libs to make sure web server starts up even
w/o shared libs.

Regards,
--
Yasuo Ohgaki


""Dean Hall"" <[EMAIL PROTECTED]> wrote in message
99a2gd$b2v$[EMAIL PROTECTED]">news:99a2gd$b2v$[EMAIL PROTECTED]...
> (Sorry for the cross-post; I'd like to get this solved, as I haven't been
> able to find a solution for several months.)
>
> I have installed mhash and libmcrypt (and mcrypt, for that matter),
> configured php with both of the extensions, and compiled PHP (as a DSO), and
> apache gives the following error when I attempt to start it:
>
> Cannot load /usr/local/apache/libexec/libphp4.so into server: libmhash.so.2:
> cannot open shared object file: No such file or directory
>
> Here are the details:
>
> Webserver:
> - apache-1.3.19 compiled with
>   (- mm-1.1.3)
>   - mod_ssl-2.8.1-1.3.19 (compiled as a static module)
>
>
> PHP (DSO):
> - php-4.0.4pl1 compiled with extensions:
>   - libmcrypt-2.4.7
>   - mhash-0.8.9
>
> I installed mcrypt-2.2.6 as well, but I soon realized that the PHP
> documentation said I should install libmcrypt, not mcrypt. Interestingly,
> php never complained that libmcrypt was not installed during configure. I'm
> not a *nix guru, and I don't understand completely how the dynamic linking
> process works, but this seems wrong.
>
> Any thoughts? I'm pretty desperate here. :-) Otherwise I'll have to start
> using the openssl shell command.
>
> Dean Hall.
> Apt7.com Web Services
>
>
>
>
> --
> 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] Perl and PHP

2001-03-21 Thread Yasuo Ohgaki

I'm not sure what you really want to do, but you can use system() (or others) to
execute something on your web server. (You may not be able to do that. It
depends on server config)

Regards,

--
Yasuo Ohgaki


"Calin Rotaru" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
>
> Is possible to execute a file which was write in Perl from inside a PHP file?
> If yes, how can I do that?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Sessions help please

2001-03-21 Thread KPortsmout

Hi,

I am going to use sessions to authenticate and protect my pages, this is what 
I have so far...

User logs in via form, this is checked via a SQL call, if the correct 
username and password are entered I run the following:

session_start();
session_register("UserName","Password");
header ("Location: Http://www.domain.com/members/index.php");

The bit where I get lost is 1) how to authenticate this on each page and 2) 
How to close the session after the browser has closed. I have tried many 
tutorials etc but none seem to go into great detail in those areas. Anyone 
know of any decent tutorials or any snippets I can learn from.

Thanks

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




Re: [PHP] session.gc_maxlifetime

2001-03-21 Thread Yasuo Ohgaki

It depends on your requirement. For me 1440 sec is too short.
I'll set it to little over 1 hour because login timeout is 1 hour.

If you have login/logout system using session, the value better to be
larger than login timeout.

Regards,

PS: You might want to set gc probability around 10%. Depends on your
requirement, though.

--
Yasuo Ohgaki


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> what is the standard with setting the amount of time in
> session.gc_maxlifetime it has defaulted to 1440 (24 mins) is that considered
> long enough?
>
> Peter Houchin
> [EMAIL PROTECTED]
> =
>  _  __   /\
> /_/_/_\/  |_/  \
>/_/_/___  __  __   __  / \
>\_/_/_\  /_/ /_/ /_/  /_/  \   _ /
>  ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/v
>     
> /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>/_/_ _/_/ __  __   __  /_/   __ __
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\/_//_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
> /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/
> =
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> * We rent the dot in .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] Response.Write [OK]

2001-03-21 Thread AJDIN BRANDIC

OK

I have done this.  

Thanks guys

Ajdin

On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:

> no.
> 
> Imagine Response.write as echo.
> 
> so it will be
> 
> echo "OK";
> 
> PHP doesn't parse ASP tags
> 
> - Original Message -
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: "Jon Haworth" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 21, 2001 8:24 PM
> Subject: RE: [PHP] Response.Write [OK]
> 
> 
> > You think I need to do something like
> >
> > echo'Response.Write[OK]';
> >
> > This will print Response.Write [OK] on he screen or
> >
> > Ajdin
> >
> >
> > On Wed, 21 Mar 2001, Jon Haworth wrote:
> >
> > > You could investigate www.php.net/echo, I think it's what you're after.
> > >
> > > Cheers
> > > Jon
> > >
> > >
> > > -Original Message-
> > > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > > Sent: 21 March 2001 12:05
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Response.Write [OK]
> > >
> > >
> > > Hi,
> > >
> > > I have built a shopping cart and have made connection to an Internet
> > > payment company.  Now once transaction is processed they want from my
> > > confirmation page to receive an "[OK]".  How can I do this with php3/4?
> > >
> > > Response.Write"[OK]" is what ASP uses, I think???
> > >
> > >
> > > Thanks
> > >
> > > Ajdin
> > >
> > >
> > > **
> > > 'The information included in this Email is of a confidential nature and
> is
> > > intended only for the addressee. If you are not the intended addressee,
> > > any disclosure, copying or distribution by you is prohibited and may be
> > > unlawful. Disclosure to any party other than the addressee, whether
> > > inadvertent or otherwise is not intended to waive privilege or
> confidentiality'
> > >
> > > **
> > >
> > > --
> > > 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] Header Problem

2001-03-21 Thread Pierre-Yves Lemaire

Hello,
Yes this should work, but if like me, you still have no redirection and
you are working with IE 4.0, put exit; after header.
$URL="domain.com";
header ("Location: Http://www.$URL/members/index.php");
exit;

I have not seen this anywhere, but putting exit; after a redirection
was the only way to get my redirection with header to work.

py

- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 7:45 AM
Subject: Re: [PHP] Header Problem


> Should work just fine.
>
> On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:
>
> > Hi,
> >
> > I`m having whats probably a very basic problem but just can`t get my
head
> > around it this late in the day, anyone have any idea why this won`t
work?
> >
> > $URL="domain.com";
> >
> > header ("Location: Http://www.$URL/members/index.php");
> >
> > $URL changes so I can`t write it directly into the header line, anyone?
> >
> > --
> > 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] apache problem on startup w/ libmhash

2001-03-21 Thread Dean Hall

""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> At first find where is libmhash.so.2. Then edit your ld.so.conf.
> Then run ldconfig.

I'm trying this, and I'll get back to you on whether it works.

> Filename and command name may vary, I can't tell since you didn't
> mention your OS.

RedHat Linux.

> Alternatively, you can build into PHP if you have static lib. I prefer
this
> way for non standard libs to make sure web server starts up even
> w/o shared libs.

Okay, do you mean if PHP is compiled as a static module? It's compiled as a
DSO on my box, so this is not an option. I have other modules installed
statically and dynamically, and I'd rather not recompile Apache every time a
new php comes out.

Thanks much for your help. I may need more. :-) I've tried modifying
ld.so.conf on a previous install, and it didn't help.

Dean.



-- 
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 /tests/lang 018.phpt 019.phpt 020.phpt 021.phpt 022.phpt 023.phpt 024.phpt 025.phpt 028.phpt

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 04:47:34 2001 EDT

  Modified files:  
/php4/tests/lang018.phpt 019.phpt 020.phpt 021.phpt 022.phpt 
023.phpt 024.phpt 025.phpt 028.phpt 
  Log:
  more win32 fixes
  
  

Index: php4/tests/lang/018.phpt
diff -u php4/tests/lang/018.phpt:1.1 php4/tests/lang/018.phpt:1.2
--- php4/tests/lang/018.phpt:1.1Sun Aug 27 12:46:05 2000
+++ php4/tests/lang/018.phptWed Mar 21 04:47:33 2001
@@ -14,7 +14,6 @@
   echo $i."\n";
 }
 --EXPECT--
-
 hey
 0
 hey
Index: php4/tests/lang/019.phpt
diff -u php4/tests/lang/019.phpt:1.1 php4/tests/lang/019.phpt:1.2
--- php4/tests/lang/019.phpt:1.1Sun Aug 27 12:46:05 2000
+++ php4/tests/lang/019.phptWed Mar 21 04:47:33 2001
@@ -16,7 +16,6 @@
   $i++;
 }
 --EXPECT--
-
 hey, this is a regular echo'd eval()
 hey, this is a function inside an eval()!
 hey, this is a regular echo'd eval()
Index: php4/tests/lang/020.phpt
diff -u php4/tests/lang/020.phpt:1.1 php4/tests/lang/020.phpt:1.2
--- php4/tests/lang/020.phpt:1.1Sun Aug 27 12:46:05 2000
+++ php4/tests/lang/020.phptWed Mar 21 04:47:33 2001
@@ -46,7 +46,6 @@
 }
 ?>
 --EXPECT--
-
 In branch 1
 Inner default...
 blah=100
Index: php4/tests/lang/021.phpt
diff -u php4/tests/lang/021.phpt:1.1 php4/tests/lang/021.phpt:1.2
--- php4/tests/lang/021.phpt:1.1Sun Aug 27 12:46:05 2000
+++ php4/tests/lang/021.phptWed Mar 21 04:47:33 2001
@@ -33,7 +33,6 @@
 echo "hi\n";
 ?>
 --EXPECT--
-
 i=0
 In branch 0
 i=1
Index: php4/tests/lang/022.phpt
diff -u php4/tests/lang/022.phpt:1.2 php4/tests/lang/022.phpt:1.3
--- php4/tests/lang/022.phpt:1.2Mon Oct 23 00:40:05 2000
+++ php4/tests/lang/022.phptWed Mar 21 04:47:33 2001
@@ -33,7 +33,6 @@
 }
 ?>
 --EXPECT--
-
 zero
 one
 2
Index: php4/tests/lang/023.phpt
diff -u php4/tests/lang/023.phpt:1.2 php4/tests/lang/023.phpt:1.3
--- php4/tests/lang/023.phpt:1.2Thu Aug 31 15:21:47 2000
+++ php4/tests/lang/023.phptWed Mar 21 04:47:33 2001
@@ -23,8 +23,6 @@
 } else {
   echo "Limor Ullmann is now Limor Baruch :I\n";
 }
-
-
 ?>
 --EXPECT--
 PHP Regression Test
@@ -154,7 +152,6 @@
 ${test22}[0] = 4
 ${test22}[1] = 5
 ${test22}[2] = 6
-
 *
 
 *** hash test... ***
Index: php4/tests/lang/024.phpt
diff -u php4/tests/lang/024.phpt:1.3 php4/tests/lang/024.phpt:1.4
--- php4/tests/lang/024.phpt:1.3Mon Oct 23 00:40:05 2000
+++ php4/tests/lang/024.phptWed Mar 21 04:47:33 2001
@@ -5,9 +5,7 @@
 --FILE--
 
-
-
+?>
 
 
 
-
+} ?>
 --EXPECT--
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -602,8 +598,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -829,8 +823,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -1056,8 +1048,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -1283,8 +1273,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -1510,8 +1498,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -1737,8 +1723,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -1964,8 +1948,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -2191,8 +2173,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -2418,8 +2398,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -2645,8 +2623,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -2872,8 +2848,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -3099,8 +3073,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -3326,8 +3298,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -3553,8 +3523,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -3780,8 +3748,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -4007,8 +3973,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -4234,8 +4198,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments and variable aliasing: ***
@@ -4461,8 +4423,6 @@
 
 
 Tests completed.
-
-
 
 
 *** Testing assignments 

[PHP] file height and width

2001-03-21 Thread george

I want to restrict the height and width of a file a user will upload to the
how do I do this, is there a function for this.

TIA

--
george
[EMAIL PROTECTED]
remove my_pants to reply

P@tty's excellent DW tutorial site
http://www.thepattysite.com/dreamweaver/
 Jhinuk Chowdhury 's DW FAQ
http://people.unt.edu/~jhinuk/DW_FAQ.htm






-- 
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] apache problem on startup w/ libmhash

2001-03-21 Thread Dean Hall


""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> At first find where is libmhash.so.2. Then edit your ld.so.conf.
> Then run ldconfig.

Well, this seems to have worked. I don't know why it didn't work when I
tried doing it a few years ago -- and I really have no idea why /usr/lib and
/usr/local/lib were not already in ld.so.conf -- is this a RedHat thing? --
'cause those directories seem to be pretty standard for shared libraries.

Thanks for the help.
Dean.



-- 
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] apache problem on startup w/ libmhash

2001-03-21 Thread Dean Hall


""Dean Hall"" <[EMAIL PROTECTED]> wrote in message
99a9kk$hnp$[EMAIL PROTECTED]">news:99a9kk$hnp$[EMAIL PROTECTED]...
>
> ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
> 99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> > At first find where is libmhash.so.2. Then edit your ld.so.conf.
> > Then run ldconfig.
>
> Well, this seems to have worked. I don't know why it didn't work when I
> tried doing it a few years ago

Oops, "months", not "years". :-)

Dean.



-- 
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: [PHP-DB] Transmitting Arrays

2001-03-21 Thread Rudolf Visagie

Try using array variable names in HTML:

$rs is a statement from a select sql. This code snippet puts the values of
the columns returned in an array $field.

if (OCIFetch($rs)) {
for ($i = 0; $i <= $NFields; $i++) {
$field[$i] = OCIResult($rs, $i+1);
}
}

Somewhere further on the following code gets executed:
echo "";
for ($i = 0; $i <= $NFields; $i++) {
echo "";
echo "";
echo "";
}

You could use a  in the above code as well, just to
pass the values. When the form is posted the values in f gets sent back as
an array. This code comes comes from a script I wrote that updates a
database like you want to do.

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: Mick Lloyd [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 10:20
To: Mark Collin
Cc: Database Help PHP
Subject: Re: [PHP-DB] Transmitting Arrays


Mark

I've had similar problems in the past. It's my understanding that you can't
pass arrays between scripts, except when using sessions. They seem to
transfer in, for example:

include("script.php");
require("script.php");

but not in:

 Pass

but I would love to be corrected on this by a PHP expert!

Regards

Mick Lloyd
[EMAIL PROTECTED]
Tel: +44 (0)1684 560224
- Original Message -
From: Mark Collin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 9:44 PM
Subject: [PHP-DB] Transmitting Arrays


> I have a form which dynamically builds a table by taking data out of a
mysql
> database
>
> http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1
>
> but i'm having problems whn i try to modify the data i'm trying to put all
> the data into arrays serialize it, urlencode it then send it on to the
next
> page to put it into database and then send back to the original page when
> its done, i'm having a problem actually sendig my arrays around though,
the
> second page doesn't seem to get any data after i have unserialized it and
> urlunecoded it.
>
> anyone have any ideas, i've been fiddleing about a load with the code and
> there is a good chance i have totally messed it up now heres the state its
> in atm though if you would like to look
>
> http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt
> http://www.fyrespray.net/screenshots/admin/modify.txt
>
> (prolly need to save the first page if your browser is picking up the html
> bits and making half of a web page up like mine does)
>
>
> --
> 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] Sessions help please

2001-03-21 Thread Hardy Merrill

[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote:
> Hi,
> 
> I am going to use sessions to authenticate and protect my pages, this is what 
> I have so far...
> 
> User logs in via form, this is checked via a SQL call, if the correct 
> username and password are entered I run the following:
> 
> session_start();
> session_register("UserName","Password");

You have to register each "field" like this:

  session_register("UserName");   // register UserName as a session var
  $UserName = $new_value_for_username; // give UserName session var a
  new value.
  session_register("Password");   // register Password as a session var
  $Password = $new_value_of_password; // give Password session var a
 new value.

Then in the next script, after you do session_start();, you
will have access to those previously registered session
variables by just using $UserName and $Password.

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

> header ("Location: Http://www.domain.com/members/index.php");
> 
> The bit where I get lost is 1) how to authenticate this on each page and 2) 
> How to close the session after the browser has closed. I have tried many 
> tutorials etc but none seem to go into great detail in those areas. Anyone 
> know of any decent tutorials or any snippets I can learn from.
> 
> Thanks
> 
> -- 
> 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 /tests/strings 001.phpt 002.phpt 003.phpt

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 04:47:46 2001 EDT

  Modified files:  
/php4/tests/strings 001.phpt 002.phpt 003.phpt 
  Log:
  more win32 fixes
  
  
Index: php4/tests/strings/001.phpt
diff -u php4/tests/strings/001.phpt:1.1 php4/tests/strings/001.phpt:1.2
--- php4/tests/strings/001.phpt:1.1 Sun Aug 27 12:46:06 2000
+++ php4/tests/strings/001.phpt Wed Mar 21 04:47:46 2001
@@ -191,7 +191,6 @@
 
 ?>
 --EXPECT--
-
 Testing strtok: passed
 Testing strstr: passed
 Testing strrchr: passed
Index: php4/tests/strings/002.phpt
diff -u php4/tests/strings/002.phpt:1.1 php4/tests/strings/002.phpt:1.2
--- php4/tests/strings/002.phpt:1.1 Sun Aug 27 12:46:06 2000
+++ php4/tests/strings/002.phpt Wed Mar 21 04:47:46 2001
@@ -37,7 +37,6 @@
 
 ?>
 --EXPECT--
-
 printf test 1:simple string
 printf test 2:42
 printf test 3:3.33
Index: php4/tests/strings/003.phpt
diff -u php4/tests/strings/003.phpt:1.2 php4/tests/strings/003.phpt:1.3
--- php4/tests/strings/003.phpt:1.2 Thu Feb 22 10:35:22 2001
+++ php4/tests/strings/003.phpt Wed Mar 21 04:47:46 2001
@@ -9,6 +9,5 @@
 echo htmlentities ("<>\"&åÄ\n");
 ?>
 --EXPECT--
-
 <>"&åÄ
 <>"&åÄ



-- 
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] cvs: php4 / run-tests.php

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 04:52:33 2001 EDT

  Modified files:  
/php4   run-tests.php 
  Log:
  win32 fixes again
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.18 php4/run-tests.php:1.19
--- php4/run-tests.php:1.18 Tue Mar 20 22:33:00 2001
+++ php4/run-tests.php  Wed Mar 21 04:52:32 2001
@@ -25,7 +25,6 @@
  * - do not test PEAR components if base class and/or component class cannot be 
instanciated
  */
 
-set_time_limit(0);
 ob_implicit_flush();
 
 define('TEST_PASSED', 0);



-- 
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] cvs: php4 / run-tests.php

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 05:00:34 2001 EDT

  Modified files:  
/php4   run-tests.php 
  Log:
  fighting against the cvs client, it does not want to let the win32 binary safe 
change go in...
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.19 php4/run-tests.php:1.20
--- php4/run-tests.php:1.19 Wed Mar 21 04:52:32 2001
+++ php4/run-tests.php  Wed Mar 21 05:00:33 2001
@@ -72,14 +72,10 @@
 dowrite("$str\n");
 }
 
-// use this function to consistently work with '/' divided dirs instead of '\' 
divided ones
-function win_safe_path(&$str)  {
-$str=str_replace('\\','/',$str);
-}
-
 function create_compiled_in_modules_list()  {
 global $php,$compiled_in_modules;
 $ret=`$php -m`;
+   
 $compiled_in_modules=explode("\n",$ret);
 foreach ($compiled_in_modules AS $key => $value) {
 if (!$value
@@ -133,19 +129,18 @@
 
 $windows_p = (substr(php_uname(), 0, 7) == "Windows");
 if ($windows_p) {
-if (file_exists('Release_TS_inline/php.exe')) {
-$php = 'Release_TS_inline\php.exe';
-} elseif (file_exists('Release_TS/php.exe')) {
-$php = 'Release_TS\php.exe';
+if (file_exists('Release_TS_inline\\php.exe')) {
+$php = 'Release_TS_inline\\php.exe';
+} elseif (file_exists('Release_TS\\php.exe')) {
+$php = 'Release_TS\\php.exe';
 } else {
-$php=trim($windows_p ? `cd`:`pwd`).'/php';
-win_safe_path($php);
+$php=trim($windows_p ? `cd`:`pwd`).'\\php';
 }
 } else {
 // $php = $GLOBALS["TOP_BUILDDIR"]."/php"; // where should be the origin of 
this variable
-$php=trim($windows_p ? `cd`:`pwd`).'/php';
-win_safe_path($php);
+$php=trim(`pwd`).'/php';
 }
+
 create_compiled_in_modules_list();

 if (!is_executable($php)) {
@@ -384,14 +379,16 @@
 while (!(feof($fp1) || feof($fp2))) {
 if (!feof($fp1) && trim($line1 = fgets($fp1, 10240)) != "") {
 //print "adding line1 $line1\n";
-$data1 .= $line1;
+   
+$data1 .= trim($line1);
 }
 if (!feof($fp2) && trim($line2 = fgets($fp2, 10240)) != "") {
 //print "adding line2 $line2\n";
-$data2 .= $line2;
+
+$data2 .= trim($line2);
 }
 }
-   
+   echo strlen($data1).'|'.strlen($data2);
 fclose($fp1);
 fclose($fp2);
 if ((trim($data1) != trim($data2))
@@ -414,15 +411,14 @@
 return TEST_INTERNAL_ERROR;
 }
 $tmpdir = dirname($file);
-win_safe_path($tmpdir);
 $tmpfix = "phpt.";
 $tmpfile["FILE"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["SKIPIF"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["POST"] = tempnam($tmpdir, $tmpfix);
+   
 $tmpfile["EXPECT"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["OUTPUT"] = tempnam($tmpdir, $tmpfix);
 
-array_walk($tmpfile,'win_safe_path');
 
 while ($line = fgets($fp, 4096)) {
 if (preg_match('/^--([A-Z]+)--/', $line, $matches)) {
@@ -489,6 +485,8 @@
 putenv("CONTENT_LENGTH=");
 }
 if (isset($fps["POST"])) {
+   
+// XXX Fix me, I do not work on win32 (?)
 $cmd = "$php -q $tmpfile[FILE] < $tmpfile[POST]";
 } else {
 $cmd = "$php -q $tmpfile[FILE]";
@@ -499,6 +497,7 @@
 delete_tmpfiles();
 return TEST_INTERNAL_ERROR;
 }
+//echo $cmd;
 $cp = popen($cmd, "r");
 if (!$cp) {
 dowriteln("Error: could not execute: $cmd");



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

2001-03-21 Thread Jason Stechschulte

On Tue, Mar 20, 2001 at 10:05:06PM -0800, [EMAIL PROTECTED] wrote:
> Why wouldn't this redirect?  The query works, but the page won't redirect. I
> have used the same two lines successfully on other pages.  I'm very tired,
> it's probably obvious.
> 
>  // assuming $uid, $itemid, $week, $cur_wk in querystring
> 
> //connect to db
> $db = mysql_connect ("localhost","user","password");
> mysql_select_db("mydb",$db);
> 
> //update item - weekX to Taken and record buyer
> $sql = "update items set week" . $week . " = 'T', buyerID = " . $uid .
>" where itemID = " . $itemid;
> $result = mysql_query($sql);
> 
> $redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid;
> header ($redirurl);
> ?>

It appears your code is missing the "Location: " part of the header.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
It's getting harder and harder to think out loud.  One of these days
someone's gonna go off and kill Thomas a'Becket for me...
 -- Larry Wall in <[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 /ext/standard basic_functions.c

2001-03-21 Thread Sean Bright

elixer  Wed Mar 21 05:53:39 2001 EDT

  Modified files:  
/php4/ext/standard  basic_functions.c 
  Log:
  Fix for bug #9698.
  # Anyone that can think of a way to fix long2ip(), feel free.
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.318 
php4/ext/standard/basic_functions.c:1.319
--- php4/ext/standard/basic_functions.c:1.318   Mon Mar 19 13:20:02 2001
+++ php4/ext/standard/basic_functions.c Wed Mar 21 05:53:38 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.318 2001/03/19 21:20:02 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.319 2001/03/21 13:53:38 elixer Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -924,6 +924,7 @@
 PHP_FUNCTION(ip2long)
 {
zval **str;
+   char tmp_buff[16];
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -931,7 +932,9 @@
 
convert_to_string_ex(str);
 
-   RETURN_LONG(ntohl(inet_addr(Z_STRVAL_PP(str;
+   sprintf(tmp_buff, "%u", ntohl(inet_addr(Z_STRVAL_PP(str;
+
+   RETURN_STRING(tmp_buff,1);
 }
 /* }}} */
 



-- 
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] Sessions help please

2001-03-21 Thread Jeff Armstrong

Apologies for the long post.

I use this approach: (simplified) at the top of every page,
before any HTML. Pop it into an include right at the top.
I have not included all the util function e.g. LogQuietAlert()


regards
Jeff

");
gotoPage("/login");
  }
}

#===

function login( $UserName, $Password ) {
  # Checks username/password
  global $sesh, $message, $REMOTE_ADDR;

  $sesh[_user]= $UserName;
  $sesh[_loggedin]= 0;
  $sesh[_user_id] = '';
  $sesh[_role]= '';
  $sesh[_name]= '';
  $sesh[_client_id]   = '';

  if ( !$UserName or !$Password ) {
return 0;
  }

  $UserName = strtolower( $UserName );
  $sth = runSQL('get_user_login',array(
where =>   "user='$UserName' and
password=PASSWORD('MySalt$Password')"
  ));

  $rows = mysql_num_rows( $sth );
  if (!$rows) {
# Invalid UserName/Password - log a quiet alert
LogAlert("Login failure: $UserName from $REMOTE_ADDR tried
'$Password'");
$message = "Invalid username/password [from $REMOTE_ADDR]";
return 0;
  }
  $rec = mysql_fetch_array( $sth, MYSQL_ASSOC );

  $sesh[_loggedin]= 1;
  $sesh[_user_id] = $rec[user_id];
  $sesh[_email]   = $rec[email];
  $sesh[_role]= $rec[role];
  $sesh[_name]= $rec[name];
  $sesh[_client_id]   = $rec[client_id];

  return 1;
}

#===

function gotoPage( $page = "/index" ) {
   header("Location: $page");
   exit; # Old browsers get no further!
}
#===

function isUtilityPage() {
  global $PHP_SELF;
  # returns true if this is a utility page
  # ie index, login, unavailable or error
  if ( stristr($PHP_SELF, 'login'))   return 1;
  if ( stristr($PHP_SELF, 'index'))   return 1;
  if ( stristr($PHP_SELF, 'unavail')) return 1;
  if ( stristr($PHP_SELF, 'error'))   return 1;
  if ( stristr($PHP_SELF, 'disclaimer'))  return 1;
  return 0;
}
#===

?>


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

2001-03-21 Thread Yasuo Ohgaki

"Jason Stechschulte" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tue, Mar 20, 2001 at 10:05:06PM -0800, [EMAIL PROTECTED] wrote:
SNIP
> >
> > $redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid;
> > header ($redirurl);
> > ?>
>
> It appears your code is missing the "Location: " part of the header.

In addition to this, you probably better off using absolute URI. (Unless you are
using Apache)
Refer to RFC for details.

--
Yasuo Ohgaki



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




Re: [PHP] Post -vs- Get

2001-03-21 Thread Yasuo Ohgaki

Since original poster requests where to look.
http://www.php.net/manual/en/language.variables.external.php
PHP manual is great reference for PHP programmers. If you haven't read, it is
recommended to read.

Another link in zend.com
http://www.zend.com/zend/tut/
There are many useful links in www.zend.com

You get more links here
http://www.php.net/links.php

--
Yasuo Ohgaki


"Jack Sasportas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have written a system with authentication to gain access to individual
> data.
> Since I am using the post method the command line has something like
>
> abc.com?client_no=5
>
> Now even though if that person emails you that url, you won't gain
> access to it bascause of authentication that is needed, what can happen
> is an authorized user could change the 5 in the url to 8, and then see
> the information that is there which belongs to client 8.
>
> Because of this I am thinking in this case I should be using the post
> method instead of the get method.
>
> Does anyone have a link to a doc that has a good example in both methods
> along with a good explanation so that I can make sure I understand what
> it's doing?
>
> Thanks for your help!
>
> Jack
>
>
> --
> 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] Setting up mail() for WinXX

2001-03-21 Thread Yasuo Ohgaki

Why you are using IP address? (No DNS MX record for the host??)
Anyway, SMTP server can work w/ IP address, but many programs tries to look up
DNS MX records for SMTP server. I guess PHP trying to get MX records for the IP.
I didn't look into code, I can easily be wrong.
(SMTP server should have MX record(s), if it is configured properly.)

Try to use name (i.e. mail.example.com) instead.

Regards,

--
Yasuo Ohgaki


"Todd Cary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am getting a "Failed to connect" error when I try to send an email.
> In the php.ini, I have the IP of the ISP's mail server e.g.
>
> SMTP = 209.204.199.1
>
> This IP works for other programs I use and for test programs I have
> created with Delphi.
>
> Any suggestions??
>
> Many thanks..
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [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] OCI8 server errors -> client

2001-03-21 Thread Hardy Merrill

I have an Oracle client on a webserver talking to an Oracle
server through Oracle networking and the PHP OCI8 interface.
When an error occurs on the server, the 'message' that
OCIError receives on the client is

Error while trying to retrieve text for error ORA-03113

This seems to happen with the Oracle "Programmers" client
install.  There was only one client install that had more stuff
than "Programmer" and I think that was "Administrator".

Why am I not getting proper Oracle error 'message's on the
client when the Oracle server has an error?  Is this normal,
or did I do something wrong?

TIA.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.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] Status on ISAPI PHP

2001-03-21 Thread Yasuo Ohgaki

I've recently installed PHP4.0.4 and PHP4.0.5-RC1 for IIS5 (CGI and ISAPI)
CGI version works ok so far. However, ISAPI version is very unstable. I haven't
use it much, but it is not ready for production use for sure.

--
Yasuo Ohgaki


""Carsten Gehling"" <[EMAIL PROTECTED]> wrote in message
01a001c0b151$bd309940$[EMAIL PROTECTED]">news:01a001c0b151$bd309940$[EMAIL PROTECTED]...
> What is the status on the ISAPI version of PHP?
>
> Last I looked (4.0.1) it was still rather unstable.
>
> - Carsten
>


-- 
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] email an ms-word attachment (please)

2001-03-21 Thread Jen Hall

Hi Rick
I have advised my client of all of the risk you mention.
They still want to go ahead.  They feel that the bulk of their website visitors are
trustworthy (huge assumption on their part), and they tell me they will assume all
responsibility for virus checking, etc.

I still need to know how to do it - technically - to allow an attachment of the kind 
they
desire

thanks
-jen
.

[EMAIL PROTECTED] wrote:

> Addressed to: Jen Hall <[EMAIL PROTECTED]>
>   [EMAIL PROTECTED]
>
> ** Reply to note from Jen Hall <[EMAIL PROTECTED]> Tue, 20 Mar 2001 19:59:26 
>-0500
> >
> > Hi there
> > I am trying to build an application where a user can use an
> > HTML form, fill out some fields, select a file from their
> > hard drive, and have it emailed as an attachment with the
> > contents of the form.  (essentially, fill in your name and
> > address, use my module to attach ms-word file of your
> > resume, send email of all).
>
>
> > I am able to make it work with an image as the attachment,
> > but when I select an MS-WORD document, which is the goal of
> > this application, it still thinks it's an image, and doesn't
> > work properly.
>
> Emailing a .doc file is a VERY BAD idea.  VB for applications which is
> embedded in word is very powerful.  What happens when some hacker
> decides to use your page to send a vba script like the naked wife virus
> thru your program?
>
>Oh, here is a resume...  lets take a look.
>
>Open the attachemnt.
>
>A burst of network activity while the vb script sends a
>copy of itself to everyone in the victim's address book.
>
>Then the hard drive light comes on as the program deletes
>a bunch of important files from the \windows\system directory.
>
>Finally the computer crashes because windows can't run
>without the missing files.  Even though the machine won't
>boot, the computer forensics people recover the email, and
>trace it back to you.
>
>The victim's lawyers come knocking on your door asking for
>damages because you let some hacker release a virus thru
>your program that wiped out several computers at the victim's
>company, some of their customers, as well as several of
>his friends.
>
>You are forced out of business because the damages are more
>than the value of your entire company.
>
> Not good.
>
> Don't believe me?  How about one of them:
>
>http://www.gcn.com/state/vol5_no11/enterprise/491-1.html
>
>http://members.door.net/kls/virusinfo.htm
>
>http://venus.soci.niu.edu/~cudigest/CUDS11/cud1120.html
>
>http://www.jwolsen.com/wtip035.htm
>
> Want more? - search for 'macro virus' on your favorite search engine.
>
> NEVER send .doc, .exe, .com, .bat or .vbs files as attachments, and
> never - ever open them if one is sent to you.  Not even from someone you
> trust. Melissa, Anna and Naked Wife all depend on the fact that the
> virus often comes from a trusted individual as part of their tactics,
> and it works!  Are you sure your anti-virus software is up to date?
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.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] Session Help for newbie plz

2001-03-21 Thread insight

I am looking for help with session handling.
I have modified Joe Jarosciak`s password script slightly, so that instead of
logging in to d/l files, you login to one or two secure area`s. (depending
on the access level of password used)

How and where can i modify this more, so that a session will be created, and
the logged-in users data will be passed over to the two secure area`s??

e.g. pass the login information to the two secure area pages, so they can
evaluate if the user is allowed to view them or not!



Heres the sript so far:

<--- index.php--->






  

  Authorized Access
Only

  
  

 
 
  Name:
   
   
  Password:
  












<-secure.php->

';
 //echo $username;
 //echo '   :   ';
 //echo $password;
 //echo '';


   if (( $username == "$PHP_AUTH_USER" ) && ( $password ==
"$PHP_AUTH_PW" )) {
$auth = true;
break;
}
}
}


// ==Header + IP Checking==
$updated_from=getenv("REMOTE_ADDR");
print ('

  

   Connected from (IP): ');

print '';
print $updated_from;

print '  |
 Your username -  ';
print '';
print $PHP_AUTH_USER;
print ' 
  ';
// ==end - Header + IP Checking==







// ==on support or not===
if (! $auth)
 {
echo ' You used username: ';
echo $PHP_AUTH_USER;
echo ' You used password: ';
echo $PHP_AUTH_PW;
echo '';
echo '';
echo '';
echo 'Sorry, but this is wrong.
Authorization with right username and password is Required!';
exit;
  }


if (($auth) and ($tc == '1'))
 {
   print '- You are authorized for access
area 1.' ;
 }


if (($auth) and ($fc == '1'))
 {
   print '- You are authorized for access
area 2.' ;
 }


if (($auth) and ($tc == '0'))
 {
   print '- You are not authorized for
access area 1.' ;
 }


if (($auth) and ($fc == '0'))
 {
   print '- You are not authorized for
access area 2.' ;
 }
// ==end -- on support or not===





// ==buttons===

if (($auth) and ($tc == '1'))
 {
   print 'Area 1
';
 }

if (($auth) and ($fc == '1'))
 {
   print 'Area 2
';
 }
// ==end buttons===



if ($auth)
 {
echo 'Thank you. You were authorized with
right username and password!';
 }

?>

<---end secure.php->







<-access_area1.htm->




Access Area 1




  

  
Secure
  Area 1
  

  










Access Area 2




  

  
Secure
  Area 2
  

  













joe:19741:1:0:
tony:928gt:1:1:
murray:fsSS92:1:1:
greg:2NNg8ed:1:1:
mitch:dopro:0:0:
nick:cmuk:1:0:
guest:RxegXHNEV9GpM:1:1:
tom:JJft54Dcv:0:1:





Thankyou very much for any help!

[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-CVS] cvs: php4 / run-tests.php

2001-03-21 Thread Thies C. Arntzen

On Wed, Mar 21, 2001 at 12:52:33PM -, André Langhorst wrote:
> andre Wed Mar 21 04:52:33 2001 EDT
> 
>   Modified files:  
> /php4 run-tests.php 
>   Log:
>   win32 fixes again
>   
> Index: php4/run-tests.php
> diff -u php4/run-tests.php:1.18 php4/run-tests.php:1.19
> --- php4/run-tests.php:1.18   Tue Mar 20 22:33:00 2001
> +++ php4/run-tests.phpWed Mar 21 04:52:32 2001
> @@ -25,7 +25,6 @@
>   * - do not test PEAR components if base class and/or component class cannot be 
>instanciated
>   */
>  
> -set_time_limit(0);

out of curiousity - why is removing set_time_limit(0) needed?

tc

-- 
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-CVS] cvs: php4 /ext/standard basic_functions.c

2001-03-21 Thread Stanislav Malyshev

SB>>   Fix for bug #9698.
SB>>   # Anyone that can think of a way to fix long2ip(), feel free.

I don't think there's any good way to fix this - PHP "long" value is
signed long, and it cannot hold unsigned long.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
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-CVS] cvs: php4 /ext/standard basic_functions.c

2001-03-21 Thread Bright, Sean

How do I merge these changes into the RC2 branch?

""Sean Bright"" <[EMAIL PROTECTED]> wrote in message
news:...
> elixerWed Mar 21 05:53:39 2001 EDT
> 
>   Modified files:  
> /php4/ext/standardbasic_functions.c 
>   Log:
>   Fix for bug #9698.
>   # Anyone that can think of a way to fix long2ip(), feel free.
>   
>   
> Index: php4/ext/standard/basic_functions.c
> diff -u php4/ext/standard/basic_functions.c:1.318
php4/ext/standard/basic_functions.c:1.319
> --- php4/ext/standard/basic_functions.c:1.318 Mon Mar 19 13:20:02 2001
> +++ php4/ext/standard/basic_functions.c   Wed Mar 21 05:53:38 2001
> @@ -17,7 +17,7 @@
>
+--+
>   */
>  
> -/* $Id: basic_functions.c,v 1.318 2001/03/19 21:20:02 andrei Exp $ */
> +/* $Id: basic_functions.c,v 1.319 2001/03/21 13:53:38 elixer Exp $ */
>  
>  #include "php.h"
>  #include "php_main.h"
> @@ -924,6 +924,7 @@
>  PHP_FUNCTION(ip2long)
>  {
>   zval **str;
> + char tmp_buff[16];
>  
>   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) ==
FAILURE) {
>   WRONG_PARAM_COUNT;
> @@ -931,7 +932,9 @@
>  
>   convert_to_string_ex(str);
>  
> - RETURN_LONG(ntohl(inet_addr(Z_STRVAL_PP(str;
> + sprintf(tmp_buff, "%u", ntohl(inet_addr(Z_STRVAL_PP(str;
> +
> + RETURN_STRING(tmp_buff,1);
>  }
>  /* }}} */
>  
> 
> 
> 
> -- 
> 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-CVS] cvs: php4 /ext/standard basic_functions.c

2001-03-21 Thread Sascha Schumann

On Wed, 21 Mar 2001, Bright, Sean wrote:

> How do I merge these changes into the RC2 branch?
>

Please DON'T.  Only well-tested fixes for _critical_ bugs
should be merged automatically.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
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] New Site for PHP Beginners

2001-03-21 Thread Jeff Oien

PHP >start here
Internet resources and book reviews for those just starting out
with PHP and MySQL
http://www.webdesigns1.com/php/
Jeff Oien

-- 
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] Create a Bulletin Board

2001-03-21 Thread John Huggins

You mean something like this:

http://www.astronomy.net/forums/



> -Original Message-
> From: Jimmy Bäckström [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 4:54 PM
> To: PHP General List
> Subject: [PHP] Create a Bulletin Board
>
>
> Yo!
> I'm thinking of writing a bulletin board and I wonder about
> threads. I want the board to be built on threads but I don't know
> how to do it. I want it to look something like this:
>
> subject 1
>|
>|__ reply1 to 'subject 1'
>|   |
>|   |__ reply1 to 'reply1 to subject 1'
>|   |
>|   |__ reply2 to 'reply1 to subject 1'
>|
>|__ reply2 to 'subject 1'
>
> This is important to me so I'm thankful for any help I can get!
>
> //Broder
>


-- 
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: [Q] Parser behavior in a string

2001-03-21 Thread Tim Ward

I just spotted this, so apologies if it's already been answered.

PHP will try to treat first in $arr[first] as a constant. if it doesn't find
a constant with this name it will treat it as a string. There may be an
error reporting level which throws this up as an error. $arr['first'] is
therefore lees ambiguous and so safer (and may even be a nano second
faster).

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -Original Message-
> From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 08:17
> To: [EMAIL PROTECTED]
> Subject: [Q] Parser behavior in a string
> 
> 
> I noticed that PHP4 accepts and does not raise error (notice 
> messages) for
> following code.
> 
> $arr = array('first' => 'one');
> $str = "This is first element of array: $arr[first]";
> 
> Question: Is this expected behavior that PHP parse w/o errors?
> 
> If this is not a expected behavior and subject to change, I'm 
> not going to use
> array w/o ' or " for assoc arrays. Because I log all error 
> messages for
> production system including notice messages.
> 
> Thank you.
> 
> [Note for those who are not familiar with use of {} in PHP]
> {} can be used to resolve ambiguity not only for arrays, but 
> also for variables
> in strings.
> 
> $str = "This is first element of array: {$arr['first']}"; // 
> works as it should.
> $str = "This is first element of array: $arr['first']"; // 
> parse error.
> 
> You can use {} for multi-dimensional array and nested objects 
> properties in
> strings also.
> i.e. "Text {$obj->foo->var} Text" works like 'Text '. 
> $obj->foo->var .' Text'.
> 
> --
> Yasuo Ohgaki
> 
> 
> 
> 

-- 
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: [Q] Parser behavior in a string

2001-03-21 Thread Tim Ward

I just spotted this, so apologies if it's already been answered.

PHP will try to treat first in $arr[first] as a constant. if it doesn't find
a constant with this name it will treat it as a string. There may be an
error reporting level which throws this up as an error. $arr['first'] is
therefore lees ambiguous and so safer (and may even be a nano second
faster).

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -Original Message-
> From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 08:17
> To: [EMAIL PROTECTED]
> Subject: [Q] Parser behavior in a string
> 
> 
> I noticed that PHP4 accepts and does not raise error (notice 
> messages) for
> following code.
> 
> $arr = array('first' => 'one');
> $str = "This is first element of array: $arr[first]";
> 
> Question: Is this expected behavior that PHP parse w/o errors?
> 
> If this is not a expected behavior and subject to change, I'm 
> not going to use
> array w/o ' or " for assoc arrays. Because I log all error 
> messages for
> production system including notice messages.
> 
> Thank you.
> 
> [Note for those who are not familiar with use of {} in PHP]
> {} can be used to resolve ambiguity not only for arrays, but 
> also for variables
> in strings.
> 
> $str = "This is first element of array: {$arr['first']}"; // 
> works as it should.
> $str = "This is first element of array: $arr['first']"; // 
> parse error.
> 
> You can use {} for multi-dimensional array and nested objects 
> properties in
> strings also.
> i.e. "Text {$obj->foo->var} Text" works like 'Text '. 
> $obj->foo->var .' Text'.
> 
> --
> Yasuo Ohgaki
> 
> 
> 
> 

-- 
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] Finding every even 100

2001-03-21 Thread Rick St Jean


$i % 100 = 0

At 10:37 AM 3/21/01 +0100, Nicklas af Ekenstam wrote:
>Hi
>
>Propably a really simple question, but my math skills are not up to speed 
>anymore:
>
>How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
>I could always divide by 100 and have a look at the result and se if it 
>has any decimals but I'm guessing this could be done prettier using 
>modulus. Right?
>
>- Nille
>
>
>--
>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]

##
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##


-- 
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-CVS] cvs: CVSROOT / cvsusers gen_acl_file.m4

2001-03-21 Thread Andrei Zmievski

On Wed, 21 Mar 2001, Stig Bakken wrote:
> Index: CVSROOT/cvsusers
> diff -u CVSROOT/cvsusers:1.240 CVSROOT/cvsusers:1.241
> --- CVSROOT/cvsusers:1.240Sat Mar 17 16:37:01 2001
> +++ CVSROOT/cvsusers  Tue Mar 20 22:48:06 2001
> @@ -283,3 +283,4 @@
>  sfox  Steph Fox   [EMAIL PROTECTED]
>PHP-GTK docs
>  jskinner  Jared Skinner   [EMAIL PROTECTED]  
>PHP-GTK website maintenance
>  ohrn  Fredrik Öhrn[EMAIL PROTECTED]YP 
>and ClibPDF
> +mboeren   Marc Boeren [EMAIL PROTECTED]"dbx" 
>db.abstraction extension
> Index: CVSROOT/gen_acl_file.m4
> diff -u CVSROOT/gen_acl_file.m4:1.126 CVSROOT/gen_acl_file.m4:1.127
> --- CVSROOT/gen_acl_file.m4:1.126 Mon Mar 19 10:41:46 2001
> +++ CVSROOT/gen_acl_file.m4   Tue Mar 20 22:48:06 2001
> @@ -119,5 +119,6 @@
>  avail|phanto|php4/win32
>  avail|brad|php4/ext/notes
>  avail|spages|php4/ext/cybermut
> +avail|mboeren|php4/ext/dbx
>  dnl
>  dnl

You also need to run m4 gen_ac_file.m4 > avail and commit that.

-Andrei
* Reality isn't all it's cracked up to be. *

--
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] cvs: php4 /ext/midgard article.c

2001-03-21 Thread Emiliano Heyns

emile   Wed Mar 21 06:53:29 2001 EDT

  Modified files:  
/php4/ext/midgard   article.c 
  Log:
  Disallow duplicate article names under one parent
  
  
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.17 php4/ext/midgard/article.c:1.18
--- php4/ext/midgard/article.c:1.17 Fri Mar 16 07:01:35 2001
+++ php4/ext/midgard/article.c  Wed Mar 21 06:53:28 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.17 2001/03/16 15:01:35 emile Exp $
+/* $Id: article.c,v 1.18 2001/03/21 14:53:28 emile Exp $
 Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -556,6 +556,11 @@
RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED);
}
 
+   if (mgd_exists_id(mgd_handle(), "article", "topic=$d AND name=$q",
+ (*topic)->value.lval, (*name)->value.str.val)) {
+  RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE);
+   }
+
php_midgard_create(return_value, "article",
   "up,topic,name,title,abstract,content,author,"
   "url,calstart,caldays,icon,view,print,"
@@ -857,6 +862,11 @@
   upval = atol((*up)->value.str.val);
   if (upval != 0 && !mgd_exists_id(mgd_handle(), "article", "id=$d", upval))
  RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   }
+
+   if (mgd_exists_id(mgd_handle(), "article", "topic=$d AND name=$q AND id<>$d",
+ (*topic)->value.lval, (*name)->value.str.val, (*id)->value.lval)) {
+  RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE);
}
 
if (!istopicowner((*topic)->value.lval)) {



-- 
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] PHP Verbindung zu mysql

2001-03-21 Thread denis mettler

Hi,

Habe folgendes Problem:

Suse 7.1
Standardmässig ist Apache mit PHP installiert.
Das läuft auch alles solange ich nicht versuche eine DB anzubinden bzw. 
abzufragen.

Ich bekomme dann immer folgende Meldung:

Warning: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3 on 
line 5

Leider konnte ich in den Archiven und Manuals nichts finden.
Und der Verweis in meiner php3.ini im verzeichnis /etc/httpd/
zu mysql.sock ist auch richtig gesetzt.

Kann mir da jemand weiterhelfen?

Besten Dank im voraus.
Denis

-- 
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 Verbindung zu mysql

2001-03-21 Thread denis mettler

Hi Remco,

That's not the Problem.
But I don't have the mysql.sock in this directory.

Regards
Denis


On Wednesday 21 March 2001 16:36, you wrote:
> denis mettler <[EMAIL PROTECTED]> writes:
> > Hi,
> >
> > Habe folgendes Problem:
>
> 
>
> > Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3
> > on line 5
>
> As root, do a chmod +x /var/lib/mysql/
>
> That might do the trick, as the mysql directory is not always readable
> for the 'nobody' user where your HTTPd runs under.
>
> regards,
> Remco

-- 
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] email an ms-word attachment (please)

2001-03-21 Thread Grant Walters

> [EMAIL PROTECTED] wrote:
>
> > Addressed to: Jen Hall <[EMAIL PROTECTED]>
> >   [EMAIL PROTECTED]
> >
> > ** Reply to note from Jen Hall <[EMAIL PROTECTED]> Tue,
> 20 Mar 2001 19:59:26 -0500
> > >
> > > Hi there
> > > I am trying to build an application where a user can use an
> > > HTML form, fill out some fields, select a file from their
> > > hard drive, and have it emailed as an attachment with the
> > > contents of the form.  (essentially, fill in your name and
> > > address, use my module to attach ms-word file of your
> > > resume, send email of all).
> >
> >
> > > I am able to make it work with an image as the attachment,
> > > but when I select an MS-WORD document, which is the goal of
> > > this application, it still thinks it's an image, and doesn't
> > > work properly.
> >
> > Emailing a .doc file is a VERY BAD idea.  VB for applications which is
> > embedded in word is very powerful.  What happens when some hacker
> > decides to use your page to send a vba script like the naked wife virus
> > thru your program?
> >
> >Oh, here is a resume...  lets take a look.
> >
> >Open the attachemnt.
> >
> >A burst of network activity while the vb script sends a
> >copy of itself to everyone in the victim's address book.
> >
> >Then the hard drive light comes on as the program deletes
> >a bunch of important files from the \windows\system directory.
> >
> >Finally the computer crashes because windows can't run
> >without the missing files.  Even though the machine won't
> >boot, the computer forensics people recover the email, and
> >trace it back to you.
> >
> >The victim's lawyers come knocking on your door asking for
> >damages because you let some hacker release a virus thru
> >your program that wiped out several computers at the victim's
> >company, some of their customers, as well as several of
> >his friends.
> >
> >You are forced out of business because the damages are more
> >than the value of your entire company.
> >
> > Not good.
> >
> > Don't believe me?  How about one of them:
> >
> >http://www.gcn.com/state/vol5_no11/enterprise/491-1.html
> >
> >http://members.door.net/kls/virusinfo.htm
> >
> >http://venus.soci.niu.edu/~cudigest/CUDS11/cud1120.html
> >
> >http://www.jwolsen.com/wtip035.htm
> >
> > Want more? - search for 'macro virus' on your favorite search engine.
> >
> > NEVER send .doc, .exe, .com, .bat or .vbs files as attachments, and
> > never - ever open them if one is sent to you.  Not even from someone you
> > trust. Melissa, Anna and Naked Wife all depend on the fact that the
> > virus often comes from a trusted individual as part of their tactics,
> > and it works!  Are you sure your anti-virus software is up to date?
> >
> > Rick Widmer
> > Internet Marketing Specialists
> > http://www.developersdesk.com
>
> Hi Rick
> I have advised my client of all of the risk you mention.
> They still want to go ahead.  They feel that the bulk of their
> website visitors are
> trustworthy (huge assumption on their part), and they tell me
> they will assume all
> responsibility for virus checking, etc.
>
> I still need to know how to do it - technically - to allow an
> attachment of the kind they
> desire
>

If you check my post on RE: [PHP] Attachment problem with web based mail -
CODE SAMPLE from earlier today you will find the code that will send the
file.  You can always virus scanners the document before you send it (even
on a Unix box).

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-CVS] cvs: php4 / run-tests.php

2001-03-21 Thread André Langhorst

>> -set_time_limit(0);
> 
> 
> out of curiousity - why is removing set_time_limit(0) needed?

in case you did not notice... it was not in there before, Sebastian 
added it due to a misbehaviour I introduced with pathnames containing 
spaces, but it is fixed now and is not needed anymore

andré

-- 
· André Langhorstt: +49 331 5811560 ·
· [EMAIL PROTECTED]  m: +49 173 9558736 ·
* PHP Quality Assurance  http://qa.php.net  *


-- 
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 Verbindung zu mysql

2001-03-21 Thread Julie Meloni

denis mettler wrote:

> But I don't have the mysql.sock in this directory.

Is mysqld running at all?

++
| Julie Meloni ([EMAIL PROTECTED]) |
||
| "PHP Essentials" and "PHP Fast & Easy" |
|   http://www.thickbook.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 Digest 21 Mar 2001 15:58:26 -0000 Issue 580

2001-03-21 Thread php-general-digest-help


php-general Digest 21 Mar 2001 15:58:26 - Issue 580

Topics (messages 44867 through 44963):

Re: Cache
44867 by: Matt Stone
44868 by: Tyrone Mills
44869 by: Matt Stone

PDF reading via IE5.5
44870 by: Dennis Moore
44902 by: Stewart Taylor

PHP/MySQL & Control Structures -> if (mysql_query())
44871 by: Mike Gifford
44874 by: David Robley
44879 by: Mike Gifford
44886 by: Don Read
44887 by: David Robley

Email validation
44872 by: Mike Gifford
44873 by: Jason Murray

Professional Selling SkillMap(tm)
44875 by: Frontline Learning

session.gc_maxlifetime
44876 by: Peter Houchin
44937 by: Yasuo Ohgaki

banner exchange, how to?
44877 by: Ed Lazor
44878 by: Gfunk
44908 by: Mark Maggelet

Booking with Date/Time in mySQL : My Code!!
44880 by: Thomas Edison Jr.

Re: Booking by Date/Time in mySQL
44881 by: Thomas Edison Jr.
44882 by: Thomas Edison Jr.

header redirection
44883 by: dean.aaddesign.com
44885 by: Jason Murray
44946 by: Jason Stechschulte
44948 by: Yasuo Ohgaki

Booking by Date/Time in mySQL : my CoDe!!
44884 by: Thomas Edison Jr.

Re: Create a Bulletin Board
44888 by: mwaples.waples.net
44956 by: John Huggins

Re: update two frames at once?
44889 by: Kathleen A. Ferraro

Newsletter kindaa thing
44890 by: Dhaval Desai
44891 by: John LYC
44892 by: David Robley

Re: email an ms-word attachment (please)
44893 by: php3.developersdesk.com
44953 by: Jen Hall
44962 by: Grant Walters

PHP post
44894 by: Paul Juliano
44895 by: David Robley
44906 by: Dezider Góra
44932 by: Tobias Talltorp

Perl and PHP
44896 by: Calin Rotaru
44935 by: Yasuo Ohgaki

Re: presentation software used by Rasmus Lerdorf
44897 by: php3.developersdesk.com

Header Problem
44898 by: KPortsmout.aol.com
44899 by: Rasmus Lerdorf
44939 by: Pierre-Yves Lemaire

Re: fatal: Symbol referencing errors.
44900 by: Jimmy Lantz

Re: Problems connecting to remote mySQL server
44901 by: almir
44907 by: Floyd Piedad

Date solved! And now TIME problems : Booking by Date/Time
44903 by: Thomas Edison Jr.

Optional Parameter ?
44904 by: Jack Sasportas
44905 by: Stewart Taylor
44912 by: Neil Kimber
44919 by: Rudolf Visagie

sorri- Non-php question
44909 by: John LYC

Re: Dynamically build a form from mySQL table
44910 by: Tim Ward

Finding every even 100
44911 by: Nicklas af Ekenstam
44913 by: Stewart Taylor
44959 by: Rick St Jean

Post -vs- Get
44914 by: Jack Sasportas
44916 by: Stewart Taylor
44926 by: Michael Hall
44949 by: Yasuo Ohgaki

can you have two sql statements on the same page.
44915 by: Matt Davis
44918 by: Jack Sasportas
44921 by: Jeff Armstrong

Re: Editing Variables from another script.
44917 by: techzeus.pacific.net.sg

function mail()
44920 by: Eric Tonicello
44931 by: Tobias Talltorp

apache problem on startup w/ libmhash
44922 by: Dean Hall
44934 by: Yasuo Ohgaki
44940 by: Dean Hall
44942 by: Dean Hall
44943 by: Dean Hall

Re: Attachment problem with web based mail - CODE SAMPLE
44923 by: Grant Walters

Re: Attachment problem with web based mail
44924 by: Grant Walters

Response.Write [OK]
44925 by: AJDIN BRANDIC
44927 by: Jon Haworth
44928 by: AJDIN BRANDIC
44930 by: techzeus.pacific.net.sg
44933 by: Matt Williams
44938 by: AJDIN BRANDIC

Lostpassword script Error
44929 by: techzeus.pacific.net.sg

Sessions help please
44936 by: KPortsmout.aol.com
44945 by: Hardy Merrill
44947 by: Jeff Armstrong

file height and width
44941 by: george

Re: [PHP-DB] Transmitting Arrays
44944 by: Rudolf Visagie

Re: Setting up mail() for WinXX
44950 by: Yasuo Ohgaki

OCI8 server errors -> client
44951 by: Hardy Merrill

Re: Status on ISAPI PHP
44952 by: Yasuo Ohgaki

Session Help for newbie plz
44954 by: insight

New Site for PHP Beginners
44955 by: Jeff Oien

Re: [Q] Parser behavior in a string
44957 by: Tim Ward
44958 by: Tim Ward

PHP Verbindung zu mysql
44960 by: denis mettler
44961 by: denis mettler
44963 by: Julie Meloni

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



That goes in the PHP code no?

-Original Message-
From: Tyrone Mills [mailto:[EMAIL PROTE

Re: [PHP] file height and width

2001-03-21 Thread Chris Lee

you *could* limit them, imaesx() and imagesy() are what your looking for. what I would 
say is why? why limit someones image upload when you can easily resize it.

display_thumbnail.inc


should be able to hack it up :)


-- 

 Chris Lee
 [EMAIL PROTECTED]



""george"" <[EMAIL PROTECTED]> wrote in message 
99a9eu$fek$[EMAIL PROTECTED]">news:99a9eu$fek$[EMAIL PROTECTED]...
I want to restrict the height and width of a file a user will upload to the
how do I do this, is there a function for this.

TIA

--
george
[EMAIL PROTECTED]
remove my_pants to reply

P@tty's excellent DW tutorial site
http://www.thepattysite.com/dreamweaver/
 Jhinuk Chowdhury 's DW FAQ
http://people.unt.edu/~jhinuk/DW_FAQ.htm






-- 
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-CVS] cvs: php4 / run-tests.php

2001-03-21 Thread Sebastian Bergmann

André Langhorst wrote:
> in case you did not notice... it was not in there before, Sebastian
> added it due to a misbehaviour I introduced with pathnames containing
> spaces, but it is fixed now and is not needed anymore

  run-tests.php will still need more than 30 seconds (default) on some
systems. If not now, then when more tests are added, etc.

  IMHO it should be in there.

-- 
 sebastian bergmann[EMAIL PROTECTED]
   http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.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] header redirection

2001-03-21 Thread Chris Lee


header("Location: http://$SERVER_NAME/$redirurl");


or better

header("Location: http://$SERVER_NAME/$redirurl?$SID");

where $SID = "PHPSESSID=". session_id();

this way your sessions will carry if your not using cookies and are using 
--enable-trans-sid

i

<[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Why wouldn't this redirect?  The query works, but the page won't redirect. I
have used the same two lines successfully on other pages.  I'm very tired,
it's probably obvious.



G'Night
 Dean


-- 
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 /ext/standard mail.c

2001-03-21 Thread Ben Mansell

joostersWed Mar 21 07:15:31 2001 EDT

  Modified files:  
/php4/ext/standard  mail.c 
  Log:
  
  UnixWare 7.1 does not have EX_TEMPFAIL or (as far as I can tell)
  a concept of a temporary failure response to pclose().
  
  
Index: php4/ext/standard/mail.c
diff -u php4/ext/standard/mail.c:1.31 php4/ext/standard/mail.c:1.32
--- php4/ext/standard/mail.c:1.31   Sun Feb 25 22:07:23 2001
+++ php4/ext/standard/mail.cWed Mar 21 07:15:31 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mail.c,v 1.31 2001/02/26 06:07:23 andi Exp $ */
+/* $Id: mail.c,v 1.32 2001/03/21 15:15:31 joosters Exp $ */
 
 #include 
 #include 
@@ -174,7 +174,11 @@
}
fprintf(sendmail, "\n%s\n", message);
ret = pclose(sendmail);
+#if defined(EX_TEMPFAIL)
if ((ret != EX_OK)&&(ret != EX_TEMPFAIL)) {
+#else
+   if (ret != EX_OK) {
+#endif
return 0;
} else {
return 1;



-- 
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] include virtual, file or exec cgi?

2001-03-21 Thread Christian Dechery

Can't I

 or
 or
 ???

I'm trying to, the script works fine if I load it normally, but as an include
in a shtml (server parsed) file it always returns "error ocurred bla bla
bla".

What am I doing wrong?


. [ Christian Dechery  ]
. Webdeveloper @ Tá Na Mesa!
. Listmaster @ Gaita-L
. http://www.tanamesa.com.br



--
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(PHP_4_0_5) / run-tests.php

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 07:35:07 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4   run-tests.php 
  Log:
  synchronizing with CVS
  
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.16.2.1 php4/run-tests.php:1.16.2.2
--- php4/run-tests.php:1.16.2.1 Tue Mar 20 22:17:13 2001
+++ php4/run-tests.php  Wed Mar 21 07:35:07 2001
@@ -72,14 +72,10 @@
 dowrite("$str\n");
 }
 
-// use this function to consistently work with '/' divided dirs instead of '\' 
divided ones
-function win_safe_path(&$str)  {
-$str=str_replace('\\','/',$str);
-}
-
 function create_compiled_in_modules_list()  {
 global $php,$compiled_in_modules;
 $ret=`$php -m`;
+   
 $compiled_in_modules=explode("\n",$ret);
 foreach ($compiled_in_modules AS $key => $value) {
 if (!$value
@@ -133,19 +129,18 @@
 
 $windows_p = (substr(php_uname(), 0, 7) == "Windows");
 if ($windows_p) {
-if (file_exists('Release_TS_inline/php.exe')) {
-$php = 'Release_TS_inline\php.exe';
-} elseif (file_exists('Release_TS/php.exe')) {
-$php = 'Release_TS\php.exe';
+if (file_exists('Release_TS_inline\\php.exe')) {
+$php = 'Release_TS_inline\\php.exe';
+} elseif (file_exists('Release_TS\\php.exe')) {
+$php = 'Release_TS\\php.exe';
 } else {
-$php=trim($windows_p ? `cd`:`pwd`).'/php';
-win_safe_path($php);
+$php=trim($windows_p ? `cd`:`pwd`).'\\php';
 }
 } else {
 // $php = $GLOBALS["TOP_BUILDDIR"]."/php"; // where should be the origin of 
this variable
-$php=trim($windows_p ? `cd`:`pwd`).'/php';
-win_safe_path($php);
+$php=trim(`pwd`).'/php';
 }
+
 create_compiled_in_modules_list();

 if (!is_executable($php)) {
@@ -384,14 +379,15 @@
 while (!(feof($fp1) || feof($fp2))) {
 if (!feof($fp1) && trim($line1 = fgets($fp1, 10240)) != "") {
 //print "adding line1 $line1\n";
-$data1 .= $line1;
+   
+$data1 .= trim($line1);
 }
 if (!feof($fp2) && trim($line2 = fgets($fp2, 10240)) != "") {
 //print "adding line2 $line2\n";
-$data2 .= $line2;
+
+$data2 .= trim($line2);
 }
 }
-   
 fclose($fp1);
 fclose($fp2);
 if ((trim($data1) != trim($data2))
@@ -414,15 +410,14 @@
 return TEST_INTERNAL_ERROR;
 }
 $tmpdir = dirname($file);
-win_safe_path($tmpdir);
 $tmpfix = "phpt.";
 $tmpfile["FILE"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["SKIPIF"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["POST"] = tempnam($tmpdir, $tmpfix);
+   
 $tmpfile["EXPECT"] = tempnam($tmpdir, $tmpfix);
 $tmpfile["OUTPUT"] = tempnam($tmpdir, $tmpfix);
 
-array_walk($tmpfile,'win_safe_path');
 
 while ($line = fgets($fp, 4096)) {
 if (preg_match('/^--([A-Z]+)--/', $line, $matches)) {
@@ -489,6 +484,8 @@
 putenv("CONTENT_LENGTH=");
 }
 if (isset($fps["POST"])) {
+   
+// XXX Fix me, I do not work on win32 (?)
 $cmd = "$php -q $tmpfile[FILE] < $tmpfile[POST]";
 } else {
 $cmd = "$php -q $tmpfile[FILE]";
@@ -499,6 +496,7 @@
 delete_tmpfiles();
 return TEST_INTERNAL_ERROR;
 }
+//echo $cmd;
 $cp = popen($cmd, "r");
 if (!$cp) {
 dowriteln("Error: could not execute: $cmd");



-- 
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] file height and width

2001-03-21 Thread george


Chris,

   It's going straigt into a db and is then pulled out and
displayed on the page. I want the image to be a specific size.

Thanks

george





-- 
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] include virtual, file or exec cgi?

2001-03-21 Thread Brian V Bonini

Is there a reason you not using PHP's include method
to do this?
Rename your shtml file to have a PHP extension, replace
the SSI instructions with PHP functions. You should
be good to go.



-Brian
***

> -Original Message-
> From: Christian Dechery [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include virtual, file or exec cgi?
>
>
> Can't I
>
>  or
>  or
>  ???
>
> I'm trying to, the script works fine if I load it normally, but
> as an include
> in a shtml (server parsed) file it always returns "error ocurred bla bla
> bla".
>
> What am I doing wrong?
>
>
> . [ Christian Dechery  ]
> . Webdeveloper @ Tá Na Mesa!
> . Listmaster @ Gaita-L
> . http://www.tanamesa.com.br
>
>
>
> --
> 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] include virtual, file or exec cgi?

2001-03-21 Thread Jon Haworth

Wow, error messages are getting better these days ;-)

Are you running PHP as a CGI interpreter or a server module?


-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 16:20
To: [EMAIL PROTECTED]
Subject: [PHP] include virtual, file or exec cgi?


Can't I

 or
 or
 ???

I'm trying to, the script works fine if I load it normally, but as an
include
in a shtml (server parsed) file it always returns "error ocurred bla bla
bla".

What am I doing wrong?


. [ Christian Dechery  ]
. Webdeveloper @ Tá Na Mesa!
. Listmaster @ Gaita-L
. http://www.tanamesa.com.br



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



**
'The information included in this Email is of a confidential nature and isi
 ntended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

--
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 / run-tests.php

2001-03-21 Thread André Langhorst

andre   Wed Mar 21 08:01:53 2001 EDT

  Modified files:  
/php4   run-tests.php 
  Log:
  I don't like to commit this over and over either, but this client definitely seems 
to dislike branches
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.20 php4/run-tests.php:1.21
--- php4/run-tests.php:1.20 Wed Mar 21 05:00:33 2001
+++ php4/run-tests.php  Wed Mar 21 08:01:52 2001
@@ -388,7 +388,6 @@
 $data2 .= trim($line2);
 }
 }
-   echo strlen($data1).'|'.strlen($data2);
 fclose($fp1);
 fclose($fp2);
 if ((trim($data1) != trim($data2))



-- 
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] FW: Returned mail: User unknown

2001-03-21 Thread Brian V Bonini

Why do I always get his when posting to the list?

The original message was sent to [EMAIL PROTECTED]

-Original Message-
From: Mail Delivery Subsystem [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 3:38 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Returned mail: User unknown


The original message was received at Wed, 21 Mar 2001 12:38:25 -0800
from adnin [202.190.176.4]

   - The following addresses had delivery problems -
cose@naim  (unrecoverable error)
(expanded from: <[EMAIL PROTECTED]>)

   - Transcript of session follows -
... while talking to naim.iiu.edu.my:
>>> RCPT To:<[EMAIL PROTECTED]>
<<< 550 5.0.0 <[EMAIL PROTECTED]>... Quota exceeded
550 [EMAIL PROTECTED] User unknown

   - Message header follows -
Received: from iiu.edu.my (adnin [202.190.176.4]) by inet.iiu.edu.my
(950413.SGI.8.6.12/950213.SGI.AUTOCF) via SMTP id MAA11611 for
<[EMAIL PROTECTED]>; Wed, 21 Mar 2001 12:38:25 -0800
Return-Path: <[EMAIL PROTECTED]>
Received: from toye.php.net (va.php.net [198.186.203.51]) by iiu.edu.my
(950413.SGI.8.6.12/950213.SGI.AUTOCF) via SMTP id XAA10006 for
<[EMAIL PROTECTED]>; Wed, 21 Mar 2001 23:38:24 -0800
Received: (qmail 32276 invoked by uid 1013); 21 Mar 2001 16:33:56 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 32270 invoked from network); 21 Mar 2001 16:33:56 -
Errors-To: <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
From: "Brian V Bonini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Date: Wed, 21 Mar 2001 11:50:24 -0500
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Importance: Normal
In-Reply-To: <[EMAIL PROTECTED]>
Subject: RE: [PHP] include virtual, file or exec cgi?

   - Message body suppressed -



-- 
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: CVSROOT / avail gen_acl_file.m4

2001-03-21 Thread Stig Bakken

ssb Wed Mar 21 08:10:38 2001 EDT

  Modified files:  
/CVSROOTavail gen_acl_file.m4 
  Log:
  * give mboeren access to phpdoc too
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.123 CVSROOT/avail:1.124
--- CVSROOT/avail:1.123 Tue Mar 20 22:58:25 2001
+++ CVSROOT/avail   Wed Mar 21 08:10:38 2001
@@ -7,7 +7,7 @@
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,hholzgra|functable
 avail|rasmus,sterling,jimw|pres
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective|phpdoc
+avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,mboeren|phpdoc
 avail|andrei,fmk,zimt,jan,changelog|php-gtk
 avail|jmoore,adrianz,protoman,sfox|php-gtk/docs
 avail|andrei,fmk,jmoore,jskinner|php-gtk-web
Index: CVSROOT/gen_acl_file.m4
diff -u CVSROOT/gen_acl_file.m4:1.127 CVSROOT/gen_acl_file.m4:1.128
--- CVSROOT/gen_acl_file.m4:1.127   Tue Mar 20 22:48:06 2001
+++ CVSROOT/gen_acl_file.m4 Wed Mar 21 08:10:38 2001
@@ -3,7 +3,7 @@
 dnl PHP Developers (full access to the source trees)
 define(`php_dev', 
`php_group,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn')
 dnl PHP Documentation Group
-define(`php_doc', 
`chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,m

[PHP] Central Inbox

2001-03-21 Thread Tim Haynes

Collect your email anytime and anywhere with http://www.centralinbox.co.uk,
if you register you can check upto 5 email accounts, allowing you to read
your emails and attachments as well as sending email with attachments.
Their is also a calendar that you can enter important dates so you don't
miss an appointment of birthday.

As this a new site we are looking for improvments all the time and we would
appreciate feedback into what you think would be a useful feature, for
instance we are working on a WAP feature allowing you to read your email
from a phone.

Please visit us and see what you think and maybe suggest a few
modifications.

It's totally FREE so why not.

http://www.centralinbox.co.uk



-- 
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] Simple question about mail() limitations (if any :)

2001-03-21 Thread SED

Hi,

Before I try it myself and kill my server :), is it safe to send via mail()
function multiply e-mails like:

while (expr) {
mail ($to, $subject, $message);
}

Are there any limitation in this? (e.g. 100 mails? 100.000? 1.000.000?) If
so, is it possible to work around the limitation by using delay between
sending certain amount of mails?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is <- New Homepage!
--


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

2001-03-21 Thread Andrei Zmievski

andrei  Wed Mar 21 08:19:55 2001 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Fixing news.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.617 php4/NEWS:1.618
--- php4/NEWS:1.617 Tue Mar 20 18:09:20 2001
+++ php4/NEWS   Wed Mar 21 08:19:54 2001
@@ -8,11 +8,11 @@
   Now you need not provide a path to the file containing the typelib, you can
   also provide the GUID of the TypeLib - entry or an IID for preloading
   type - information. (phanto)
-- rewrite of domxml. It's now mostly DOM Level 2 conform (Uwe)
+- Rewrite of domxml. It's now mostly DOM Level 2 conform (Uwe)
 - Added array_map() function that applies a callback to the elements
   of given arrays and returns the result. It can also be used with a
   null callback to transpose arrays. (Andrei)
-- New FastCGI server module
+- New FastCGI server module. (Ben Mansell)
 - Added array_filter(), which allows filtering of array elements via
   the specified callback. (Andrei)
 - Fixed all relevant array functions to avoid moving the internal array



-- 
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] A NETWORK MARKETER?

2001-03-21 Thread Phillip Bow

Geez, where can I buy stock?  This is gonna be HUGE! ;-)
--
phill
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
>
> ATTENTION:  ANY SERIOUS NETWORK MARKETER
> TAKE A LOOK AT THE FOLLOWING OPPORTUNITY I CAME ACROSS!!
> IF YOU PLUG INTO THEIR PROVEN SYSTEM, THEY GUARANTEE YOU SUCCESS,
> AND PROVIDE YOU WITH FREE LEADS TO BUILD YOUR GROUP!!
>
>
> DO NOT LET THIS SLIP AWAY!!  CLICK BELOW AND FIND OUT AS I DID,
> WHY THESE GUYS ARE THE LEADERS IN THE INDUSTRY!!
>
>
>
> http://www.geocities.com/businessupdates2000
>
>
>
>
> *
> THIS EMAIL COMPLIES WITH ALL REGULATIONS.  TO BE REMOVED WITHIN
> 24 Hours, SIMPLYEMAIL [EMAIL PROTECTED] FOR IMMEDIATE
> REMOVAL FROM ANY FUTURE EMAILS FROM OUR COMPANY.
> *
>
> --
> 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] include virtual, file or exec cgi?

2001-03-21 Thread Christian Dechery

>Is there a reason you not using PHP's include method
>to do this?
>Rename your shtml file to have a PHP extension, replace
>the SSI instructions with PHP functions. You should
>be good to go.

I don't wanna rename all my shtml files (which are a LOT) and change all
my links to .php in files like this that processess nothing only run a few
"includes" (all built in C)...

but I'd like to be able now to run PHP made stuff... can't I?




. [ Christian Dechery  ]
. Webdeveloper @ Tá Na Mesa!
. Listmaster @ Gaita-L
. http://www.tanamesa.com.br



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




[PHP] MySQL "DISTINCT" query

2001-03-21 Thread Jared Howard

I need to retrive all column information from a DISTINCT query.  But so
far, I only can get one column to show by using this:

SELECT DISTINCT my_column FROM my_table;

which then gives me a list of my_column information and is correct, but I
need all information from all columns.  Querying this:

SELECT DISTINCT my_column, my_column2, my_column3, my_column4 FROM my_table;

was my guess at it, but doesn't work how I'd like.


-- 
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 an WinNT-Filesystem

2001-03-21 Thread Dirk Ritters

Hi,

i have to install a php-tool on an IIS4.0 NT-server owned by our customer. I
would like to write into a directory with a script but i always receive an
error:

Warning:
fopen("d:\InetPub\blabla\pages\news\admin\data\210301192417.dat","a") -
Permission denied in d:\InetPub\blabla\pages\news\admin\publish.php on line
17

I gave writing permission to the directory \data\ but it doesn't work. Can
you tell me please, what i have to do!

Tanks a lot

Dirk Ritters



-- 
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] Custom Session Handlers with Oracle?

2001-03-21 Thread Michael Champagne

Has anyone out there implemented custom session handlers using Oracle?  If so,
is there any code out there that might point me on how to do this.  I've found
the article on phpbuilder.net that details doing this for with DBM but I can't
find anything for doing this with Oracle.  Thanks!

-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

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




RE: [PHP] MySQL "DISTINCT" query

2001-03-21 Thread Jack Dempsey

I'm not sure what you're trying to do, but have you tried SELECT DISTINCT *
FROM tablename; ?

jack

-Original Message-
From: Jared Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL "DISTINCT" query


I need to retrive all column information from a DISTINCT query.  But so
far, I only can get one column to show by using this:

SELECT DISTINCT my_column FROM my_table;

which then gives me a list of my_column information and is correct, but I
need all information from all columns.  Querying this:

SELECT DISTINCT my_column, my_column2, my_column3, my_column4 FROM my_table;

was my guess at it, but doesn't work how I'd like.


--
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-CVS] cvs: php4 / run-tests.php

2001-03-21 Thread André Langhorst

>   run-tests.php will still need more than 30 seconds (default) on some
> systems. If not now, then when more tests are added, etc.
> 
>   IMHO it should be in there.

ok. maybe a good idea to put it there, but set_time_limit(900) will be 
sufficient

andré

-- 
· André Langhorstt: +49 331 5811560 ·
· [EMAIL PROTECTED]  m: +49 173 9558736 ·
* PHP Quality Assurance  http://qa.php.net  *


-- 
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] session destroy???

2001-03-21 Thread Miguel Loureiro

Hello all,
when using sessions, if use command session_destroy shouldn't all variables related 
with used session destroyed???
It seams that is a crazy question, but, after make a logout(session_destroy()), I use 
the browser buttons to go back to inicial page and forward  until logout page, it 
continues appers sessions data, it's bad because someone can enter in my browser after 
me and make fully things in my page
How can I solve this problem? I already try  to use OnLoad and UnOnload events in 
Javascript
T.Y all
Best Regards
Miguel Loureiro < [EMAIL PROTECTED] >



[PHP] URIs as variables

2001-03-21 Thread Issac Goldstand

Newbie question here.  I am trying to pass a varaible containing a URI
across a few scripts.  Basically, the first script get's a query string
including the URI (eg
http://foo.bar/script1.php?url=script2.php?var1=a&var2=b).
Now, script1 contains a form pointing to script3 so basically, I have the
user form and then:

";
?>

(I have register-gloabls enabled and am not sure whether the call to script1
will be POST or GET)

This creates a slight problem, as, using the above example once again, PHP
will send the browser the line:



But it totally chops off everything from the "&" and onwards.  How can I fix
it to get the entire URI?

Thanks,
Issac


--
Internet is a wonderful mechanism for making a fool of
yourself in front of a very large audience.
  --Anonymous

Moving the mouse won't get you into trouble...  Clicking it might.
  --Anonymous

PGP Key 0xE0FA561B - Fingerprint:
7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B




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