RE: [PHP] fullname

2002-07-29 Thread David Freeman

 >   is there some other easyer way to do in one line than this?:
 > 
 > $fullname = $session["f_name"];
 > $fullname .= " ";
 > $fullname .= $session["l_name"];  

$fullname = $session["f_name"] . " " . $session["l_name"];

CYA, Dave




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




RE: [PHP] MySQL password()

2002-07-29 Thread David Freeman


 > Mmm.. think you misinterpreted my question...
 > 
 > 
 > http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
 > 
 > PASSWORD(str)
 > how do you unPASSWORD(str) in PHP?

Basically, you don't.

Instead, what you do is use the password that was provided as user
input.  You create a suitable database query where one of the select
criteria is PASSWORD(user_input_password) - then if you get a match they
must have entered the right password.

CYA, Dave




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




Re: [PHP] fullname

2002-07-29 Thread Wee Keat

Is this easier for you?

$fullname = $session["f_name"]." ".$session["l_name"];  



- Original Message - 
From: "Mantas Kriauciunas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 30 July, 2002 7:11 PM
Subject: [PHP] fullname


> Hey php-general,
> 
>   is there some other easyer way to do in one line than this?:
> 
> > $fullname .= " ";
> $fullname .= 
> 
> P.S the thing is to add line in the middle of the first and last names
> :)
> 
> Thanks
> -- 
> Best regards,
>  Mantas  
> 
> Contacts:
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] fullname

2002-07-29 Thread Mantas Kriauciunas

Hey php-general,

  is there some other easyer way to do in one line than this?:

$fullname = $session["f_name"];
$fullname .= " ";
$fullname .= $session["l_name"];  

P.S the thing is to add line in the middle of the first and last names
:)

Thanks
-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]


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




[PHP] Re: MySQL password()

2002-07-29 Thread Lars Olsson

To my knowledge it isn't possible to "decrypt" the PASSWORD function in 
MySQL (you need to use MySQL ENCRYPT/DECRYPT for that). However, it's 
possible to use PASSWORD on the user-provided string too. You could try 
the following code:

$query="SELECT * FROM users where username='$PHP_AUTH_USER' AND 
passwd=PASSWORD('$PHP_AUTH_PW');

$result = mysql_query($query)
   or die("Couldn't execute query!");

if (mysql_num_rows($result) > 0) {
   // user exists
}
else {
   // user don't exist
}

Kindly

/lasso ([EMAIL PROTECTED])



Liam Mackenzie wrote:
> Hi all,
> I do this:
> 
> 
>  dbconnect();
>   $query="SELECT * FROM users where username='$PHP_AUTH_USER'";
>   $result=mysql_query($query);
>   $list=mysql_fetch_array($result);
>   if ($PHP_AUTH_PW !== $list[passwd] || "" == $PHP_AUTH_PW || "all" !=
> $list[domain]){
>Header("WWW-authenticate: basic realm=\"EMM\"");
>   Header( "HTTP/1.0 401 Unauthorized");
>   unauthorized();
>   exit;
>   }
>  }
> 
> 
> 
> 
> Noe this bit:
> if ($PHP_AUTH_PW !== $list[passwd]
> 
> My problem is that the password stored in MySQL was done with password(), so
> it comes out similar to this as plain text:
> 
> 072g307j9236a82h3u
> 
> 
> How do I Un password() it?
> 
> I have RTFM but to no avail.
> 
> If you tell me to RTFM again, at least tell me what to search for  ;-)
> 
> Cheers,
> Liam
> 
> 
> 


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




[PHP] php extension problem

2002-07-29 Thread p . williams

We've successfully installed and run PHP 4.0.6. However when we add an
extension for win9x printing we get the message "PHP Warning: Unable to load
dynamic library 'c:\php\extensions/php_printer.dll' a device attached to the
system is not functioning".

The php.ini file has extension_dir=c:\php\extensions and includes the
statement extension=php_printer.dll

Any ideas would be most welcome!

Cheers

Peter Williams
Analyst Programmer
Calvary Health Care Tasmania


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




[PHP] Image out of LDAP

2002-07-29 Thread Manuel Vazquez

Good morning,

I'm running a OpenLDAP database which includes JPEG photos for some entries.
The purpose is to view these images on a web page. Unfortunately I do not
have much experience with PHP so any help would be very appreciated.

Thanks in advance,
Manuel Vazquez


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




Re: [PHP] MySQL password()

2002-07-29 Thread Liam MacKenzie

Mmm.. think you misinterpreted my question...


http://www.mysql.com/doc/M/i/Miscellaneous_functions.html

PASSWORD(str)
how do you unPASSWORD(str) in PHP?




- Original Message -
From: "Negrea Mihai" <[EMAIL PROTECTED]>
To: "Liam MacKenzie" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 4:31 PM
Subject: Re: [PHP] MySQL password()


> Try doing on the first time this:
> $query="SELECT * FROM users where username='$PHP_AUTH_USER' and passwd
> =password($PHP_AUTH_PW)";
> then with mysql_num_rows you find out if the query returned any row.. or
with
> is_resource()
> if it returned then the authentication was successfull.. if not.. not :)
>
>
> On Tuesday 30 July 2002 09:28 am, Liam MacKenzie wrote:
> > Hi all,
> > I do this:
> >
> >
> >  dbconnect();
> >   $query="SELECT * FROM users where username='$PHP_AUTH_USER'";
> >   $result=mysql_query($query);
> >   $list=mysql_fetch_array($result);
> >   if ($PHP_AUTH_PW !== $list[passwd] || "" == $PHP_AUTH_PW || "all" !=
> > $list[domain]){
> >Header("WWW-authenticate: basic realm=\"EMM\"");
> >   Header( "HTTP/1.0 401 Unauthorized");
> >   unauthorized();
> >   exit;
> >   }
> >  }
> >
> >
> >
> >
> > Noe this bit:
> > if ($PHP_AUTH_PW !== $list[passwd]
> >
> > My problem is that the password stored in MySQL was done with
password(),
> > so it comes out similar to this as plain text:
> >
> > 072g307j9236a82h3u
> >
> >
> > How do I Un password() it?
> >
> > I have RTFM but to no avail.
> >
> > If you tell me to RTFM again, at least tell me what to search for  ;-)
> >
> > Cheers,
> > Liam
>
> --
> Negrea Mihai
> web: http://www.negrea.net
>
>
>




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




[PHP] Re: ORDER BY from 2 tables

2002-07-29 Thread Paul Dionne

I am not sure what exactly you mean.  If you are talking about a regular 
query then:
SELECT tblTable1.hits, tblTable2.hits FROM tblTable1, tblTable2 ORDER BY 
tblTable1.hits;

If you are talking about combining the two tables so that all your 'hits' 
are in one column then there are a few ways to skin that cute little 
kitten (in order of difficulty):
1) Check to see if your databae supports UNION clauses. 
2) If not, make a table with the data from the first table then append the 
data from the second table.  Then query for your combined results and 
delete the table from the database.  You may run into problems if more than 
one person tries to do this at a time, so be careful.
3) Or. create an array using data from the first set then loop through the 
second set adding the data from the second set.  Then sort.

Good luck and keep us posted.

Paul


Georgie Casey wrote:

> i assume this is a simple question...
> 
> how can I SELECT * FROM 2 different tables in the same query, ORDER BYing
> the 'hits' column, which both tables have.
> 
> eg, 2 tables i have are similiar and i want to merge them and then select
> everything ordering by hits


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




RE: [PHP] Resetting ID

2002-07-29 Thread David Freeman


 > What i want to do is delete the entire IDs and
 > generate them again so that they are in one single
 > order like 1,2,3,4,5... .like this. 

I suspect that if your table, as you use it, needs this ordering then
you've got something wrong.  It really shouldn't matter much what the
internal IDs are.

When you extract the data you'll be ordering it by some means that may
or may not include the ID ie. You might sort by date or some other field
in the table, in which case, the ID's are irrelevant - particularly if
you're doing a select that excludes some of the data anyway.

If you seriously need all your id's to be sequential and have no gaps
then I suspect that about the only way you'll achieve it is probably to
drop the contents and enter the information all over again.  Of course,
then you'll need to do the same again if you delete any information from
the table and so on and so on...

There may well be other ways, I've not really looked as I tend to think
a reliance of this sort is counter-productive so I've never needed to
look.

CYA, Dave




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




[PHP] Re: MYSQL natsort() ?

2002-07-29 Thread lallous

Well, you can do something like:


SELECT * FROM tablename
ORDER BY fieldname [ASC|DESC]

=> [ASC|DESC] optional, put either of theses without the brackets.

//Elias.

"Joel Colombo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is a mysql question, cause i can do it with a natsort in php.
> question is can u do it directly in the MYSQL SELECT ?
> I am wondering if the SELECT statement can have a natural order by.
>
> Table has 5 rows.
> field name "number"
> values :
> 10
> 2
> 15
> 30
> 150
>
> a regular order by "number": generates results 10,15,150,2,30
>
> i need a natural sort
> 2,10,15,30,150
>
> is there a way to sort FLOAT valuse like this using an order by with a
combo
> of other functions or something ?
>
> Thanks
> Joel
>
>
>
>
>
>
>
>



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




[PHP] Re: Resetting ID

2002-07-29 Thread lallous

Save all the entries somewhere programmatically,
then do DELETE * FROM tablename;
re insert all the entries (of course do not enter the ID field, cause it
will be auto assigned).

gl,

"Thomas Edison Jr." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Glory!
>
> I have a table, with 4 columns. One of the column is
> ID, a Primary Key, which has Auto_Increment set on it.
>
>
> Now i have a lot of rows deleted and a lot of
> duplicate rows that will be deleted, and all sorts of
> stuff happening in the table.. the result is, that the
> IDs have become inconsistent.
>
> What you get is something like
> 5,6,9,10,25,32,33 .. and so on. With many IDs missing
> etc.
>
> What i want to do is delete the entire IDs and
> generate them again so that they are in one single
> order like 1,2,3,4,5... .like this.
>
> And so that any new entry in the table gets the ID
> accordingly. How can i do this?
>
> Thanks,
> T. Edison Jr.
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com



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




[PHP] MySQL password()

2002-07-29 Thread Liam MacKenzie

Hi all,
I do this:


 dbconnect();
  $query="SELECT * FROM users where username='$PHP_AUTH_USER'";
  $result=mysql_query($query);
  $list=mysql_fetch_array($result);
  if ($PHP_AUTH_PW !== $list[passwd] || "" == $PHP_AUTH_PW || "all" !=
$list[domain]){
   Header("WWW-authenticate: basic realm=\"EMM\"");
  Header( "HTTP/1.0 401 Unauthorized");
  unauthorized();
  exit;
  }
 }




Noe this bit:
if ($PHP_AUTH_PW !== $list[passwd]

My problem is that the password stored in MySQL was done with password(), so
it comes out similar to this as plain text:

072g307j9236a82h3u


How do I Un password() it?

I have RTFM but to no avail.

If you tell me to RTFM again, at least tell me what to search for  ;-)

Cheers,
Liam




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




Re: [PHP] [Fwd: Can you help me about the installation of apache/php/MySQl/ssl ?]

2002-07-29 Thread Jason Wong

On Tuesday 30 July 2002 14:17, [EMAIL PROTECTED] wrote:

> Can you help me about this problem ?

Try google.

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

/*
Before borrowing money from a friend, decide which you need more.
-- Addison H. Hallock
*/


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




RE: [PHP] [Fwd: Can you help me about the installation of apache/php/MySQl/ssl ?]

2002-07-29 Thread Peter



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 30 July 2002 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] [Fwd: Can you help me about the installation of
> apache/php/MySQl/ssl ?]
>
>
> Hello,
>
> Can you help me about this problem ?
>
> Thanks,
>
> Edward.
>

think u'll find that php.ini should be in /usr/local/lib dir not apache conf
dir

make sure you have the following in httpd.conf

AddModule mod_php4.c
LoadModule  libexec/libphp4.so

and see if that helps ya


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




[PHP] RE: One more question

2002-07-29 Thread Martin Towell

You'll have to check that the results you get back from the database
actually contains something before you echo anything out.
 
Another way would be something like this
 
$numcols = 2;
$counter = 0;
while (($results = mysql_results(...)) !== false)   // haven't used mysql,
so you'll have to fix this line up :)
{
  if ($counter % $numcols == 0)  echo "";
  // echo image stuff here
  if ($counter % $numcols == $numcols-1)  echo "";
}
if ($counter % $numcols != $numcols-1)  echo "";
 
(if I remember your original post correctly)
 
Martin

-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 3:27 PM
To: [EMAIL PROTECTED]; PHP General List
Subject: One more question



Martin.

 

Hoping you are still there, I would like to ask you one more question about
the last mail you answered me about Table Formatting (maybe you missed my
last question ;). After I used what you told me for nesting FOR loops, I end
up getting one blank image (NOT DISPLAYED) whenever I have an odd quantity
of objects in my DB... Do I have to store objects in the DB by 2 from now
on?

 

I'm working it for http://www.saavedraart.com 
under the gallery section (only module I have so far). It would be nice if
you check it out and tell me your opinion. Same goes for everybody else ;)

 

Thanks a lot,

 

 

  Cesar Aracena

CE / MCSE+I

Neuquen, Argentina

+54.299.6356688

+54.299.4466621

 




[PHP] [Fwd: Can you help me about the installation of apache/php/MySQl/ssl ?]

2002-07-29 Thread EdwardSPL

Hello,

Can you help me about this problem ?

Thanks,

Edward.

--- Begin Message ---

Hello,

My system is Red Hat 6.2 system...
Now, I'm going to setup WebMail with IMP 3.x ( http://www.horde.org/imp
), so I must install apache, php, MySQL and SSL by sources code packages
!

These is my installation steps ( install MySQL by rpm packages ) :

1, cd gettext-0.10.40
./configure
make
make check
make install

2, cd ../openssl-0.9.6d
./config
make
make test
make install

3, cd ../mod_ssl-2.8.5-1.3.22
./configure --with-apache=../apache_1.3.22

4, cd ../apache_1.3.22
SSL_BASE=../openssl-0.9.6d \
./configure --enable-module=most --enable-shared=max \
--enable-module=ssl --enable-shared=ssl \
--disable-module=auth_dbm
make
make certificate TYPE=custom
make install

5, cd ../php-4.2.2
./configure \
 --with-apxs=/usr/local/apache/bin/apxs \
 --with-config-file-path=/usr/local/apache/conf \
 --enable-versioning --with-imap --with-imap-ssl \
 --with-ldap --with-mysql --enable-ftp \
 --with-gettext --disable-debug --enable-memory-limit=yes \
 --enable-track-vars
make
make install

cp /usr/local/src/php-4.2.1/php.ini-dist /usr/local/apache/conf/php.ini

Edit /usr/lcoal/apache/conf/httpd.conf :

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

After run /usr/local/apache/bin/apcahectl startssl, the php and https (
SSL ) can't for work :

result of php :

When I access a file via a browser,  I get the "Your are downloading the
file test.php" dialog box up in my browser.

result of ssl ( https ) :

can not find the page !

So, can you help me ?

Thanks,

Edward.



--- End Message ---

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


Re: [PHP] Submitting form in new window!

2002-07-29 Thread Thomas Edison Jr.

Glory,

2 Problems with this :

1. I have a PHP/MySQL statement within my PHP Code,
which is in the Body part of the page. This generates
the Form Fields & Thier Values.. there are a lot of
hidden fields who's values are defined by Database
Variables.. 

If i place the FormSubmit()Function in the head, how
will those variables pass?

2. I'm already using Target=_Blank ... problem with
that is that you cannot control size of window. And
that is exactly what i need to do.. define parameters
for the window... 

Thanks,
T. Edison Jr.



--- vins <[EMAIL PROTECTED]> wrote:
> This is JavaScript you need.
> 
> one example.
> 
> 
> 
>  onSubmit="FormSubmit()'">
> 
> 
>  TYPE="JavaScript/Text">
> function FormSubmit()
> {
> var textfield = Information.TextField.value;
> var url = "./processForm.php?textfield=" +
> textfield;
> 
> window.open(url);
> }
> 
> 
> OR
> 
> just add this to your form tag.
> TARGET="_blank"
> 
> 
> "Thomas Edison Jr." <[EMAIL PROTECTED]> wrote
> in message
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Glory,
> >
> > > Attach a javascript event to the submit button
> >
> > Something like :
> >
> > 
> >
> > Wherein wow() defines a the window.open function?
> >
> > > and also attach the form values to the url.
> > How do i do this? Because the 3 or 4 form fields i
> > have, which are Hidden Fields, contain values
> coming
> > in from $myrow[stuff], that is, coming in from a
> > Database Table. How do i define these values up in
> the
> > Javascript function in the  of the file?
> >
> > Thanks,
> > T. Edison Jr.
> >
> >
> >
> > __
> > Do You Yahoo!?
> > Sign up for SBC Yahoo! Dial - First Month Free
> > http://sbc.yahoo.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] Resetting ID

2002-07-29 Thread Thomas Edison Jr.

Glory!

I have a table, with 4 columns. One of the column is
ID, a Primary Key, which has Auto_Increment set on it.


Now i have a lot of rows deleted and a lot of
duplicate rows that will be deleted, and all sorts of
stuff happening in the table.. the result is, that the
IDs have become inconsistent. 

What you get is something like 
5,6,9,10,25,32,33 .. and so on. With many IDs missing
etc. 

What i want to do is delete the entire IDs and
generate them again so that they are in one single
order like 1,2,3,4,5... .like this. 

And so that any new entry in the table gets the ID
accordingly. How can i do this?

Thanks,
T. Edison Jr.



__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] One more question

2002-07-29 Thread César Aracena

Martin.
 
Hoping you are still there, I would like to ask you one more question
about the last mail you answered me about Table Formatting (maybe you
missed my last question ;). After I used what you told me for nesting
FOR loops, I end up getting one blank image (NOT DISPLAYED) whenever I
have an odd quantity of objects in my DB… Do I have to store objects in
the DB by 2 from now on?
 
I’m working it for http://www.saavedraart.com
  under the gallery section (only module I
have so far). It would be nice if you check it out and tell me your
opinion. Same goes for everybody else ;)
 
Thanks a lot,
 
 
  Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 



RE: [PHP] What is REGEX ?

2002-07-29 Thread Martin Towell

REGEX is short for "Regular Expressions"
It gives you a "smarter" way to manupulate strings.

The PHP manual has some good docs on reg.ex. - see section LXXXIV and LXXXVI

HTH
Martin

-Original Message-
From: Lord Loh. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 5:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What is REGEX ?


Hello! I am new to REGEX.
I tried to read several posts on REGEX. However none were descriptive.

What is Regex ?
Is it a part of the php? or an additional module?
What can it be used for ?

Please let me know
Thank you.

Lord Loh.



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

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




RE: [PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread David Freeman


 > Yes, I am afraid that regarding GPL I have to agree with 
 > Microsoft when they say it is a cancer. The problem is that if you
want to 
 > distribute something that incorporates GPL licensed components, your 
 > software also needs to be distributed as GPL and so it gets
contaminated. 
 > This means that you can't sell your closed source software if you 
 > incorporate GPL components.

I'm quite happy to be corrected on this but I have always understood GPL
licensing to mean that any GPL code you include should be available in
source version.  The methods by which you use that GPL code doesn't
necessarily have to be included.  The only relevant example I can think
of is if you include a class in php that is GPL then you have to
distribute the source even if you compile it with zend for your own
application.

It is my understanding, in this situation, that you aren't necessarily
required to release the code you have written as GPL though.  Basically,
I thought that once something is GPL it is pretty much public forever
but that doesn't stop you from including it in your own proprietory work
as long as you include the source for the GPL stuff.

CYA, Dave




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




[PHP] Mail issues

2002-07-29 Thread Yves Vrancken

Greetings,

I have read up on using mail with PHP because I would like to implement it
on my website. I was wondering though, if I should implement safety measures
and if so, what kind of measures, under the following conditions:

1. If I want to give visitors the opportunity to sign up for a newsletter.
All they have to do is fill in their email adress and hit the submit button.
I could then configure the form in such a way that they would be subscribed
to the Majordomo mailinglist;

2. If I want to give visitors the opportunity to send an email using a form
on the website, so that they can submit questions or request information.

Should I really look into securing the mail, or is this is not necessary?

Thanks in advance,

Yves Vrancken







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




[PHP] What is REGEX ?

2002-07-29 Thread Lord Loh.

Hello! I am new to REGEX.
I tried to read several posts on REGEX. However none were descriptive.

What is Regex ?
Is it a part of the php? or an additional module?
What can it be used for ?

Please let me know
Thank you.

Lord Loh.



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




RE: [PHP] Not a Valid File-Handle Resource

2002-07-29 Thread Martin Towell

1. Take out the @ before fopen(), this may shed some light on your problem
2. What does "/home/blurredv/data/".$username."Contact.txt" expand out to
actually be?
3. Does the script have write access to the directory/file?

-Original Message-
From: Chris Carlson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 1:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Not a Valid File-Handle Resource


I am trying to create a php program and am getting an error in this area
of my script:

  $dataFile =
@fopen("/home/blurredv/data/".$username."Contact.txt","w");
  fputs($dataFile, $line);
  fclose ($dataFile);

These are the errors:

Warning: Supplied argument is not a valid File-Handle resource in
/home/blurredv/public_html/redcarbon/update.php on line 34
Warning: Supplied argument is not a valid File-Handle resource in
/home/blurredv/public_html/redcarbon/update.php on line 35

Note:  My script work perfectly with different path names under Windows
NT.  Do I have to do something special for Unix.

Thanks in advance,

Chris Carlson
totaldeveloper.com


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

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




[PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread Manuel Lemos

Hello,

On 07/29/2002 07:16 PM, Richard Lynch wrote:
>>If someone is going to be using scripts that they grabbed
> 
>>from a public forum (PHP Builder, PHPClasses, etc) in a
> 
>>commercial product (that is going to be compiled with the
>>Zend encoder and released), what is the protocol, if any?  
>>Do you have to get permission from the author or anything?
>>I've read a bit of the GNU Public liscence but I didn't come
>>away knowing any more than went I started reading it.  So
>>I figure I'd ask here where I'm sure many of you have this
>>type of experience.
> 
> 
> If the source code in question has *NO* licensing/copyright notice, the
> author of the source holds the copyright, and you can't use it legally.

Copyright and licenses are different things. Authors always hold 
copyrights until their work becomes of the public domain. Before that, 
the copyright is of the author regardless of the license.


> If the source code in question was published under GNU, you're bound by the
> GNU license, which I *THINK* let's you use it in a commercial release... 
> You'd have to read up on the "examples" of what GNU does/doesn't allow.  I
> think the FSF site might have some clear examples.

No, you can't incorporate GPL code without your software being infected, 
meaning you have to distribute the source of the programs that you 
develop that incorporate GPL code. This basically rules out closed 
source programs like the original poster wants to sell.



> If in doubt, contact the author.  Worst that can happen is they want some
> money, or you have to come up with a different solution.  Odds are really
> really good that there is an alternative solution "out there" to almost
> *ANY* of the publicly available code in those forums, or that you could dig
> into them for the core of what they do and write your own from scratch.

Yes, that is the recommended way of dealing with the licensing doubts.


-- 

Regards,
Manuel Lemos


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




[PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread Manuel Lemos

Hello,

On 07/29/2002 05:29 PM, Chris Boget wrote:
> If someone is going to be using scripts that they grabbed
> from a public forum (PHP Builder, PHPClasses, etc) in a
> commercial product (that is going to be compiled with the
> Zend encoder and released), what is the protocol, if any?  
> Do you have to get permission from the author or anything?

If a explicit license is not specified, yes. If the license does not 
permit what you want to do, like for instance GPL, you may try asking 
the author as well.

Anyway, by popular demand, some time ago I added the possibility for 
authors specify the license they want they code to be made available in 
the PHP Classes site. You may want to notice in a specific License field 
in the classes' pages.

Not all authors bothered to specify their code license. Therefore, some 
time later I am going to mark the classes without a specific license as 
NOT BEING MAINTAINED precisely because many people like yourself really 
need to know.


> I've read a bit of the GNU Public liscence but I didn't come
> away knowing any more than went I started reading it.  So
> I figure I'd ask here where I'm sure many of you have this
> type of experience.

Yes, I am afraid that regarding GPL I have to agree with Microsoft when 
they say it is a cancer. The problem is that if you want to distribute 
something that incorporates GPL licensed components, your software also 
needs to be distributed as GPL and so it gets contaminated. This means 
that you can't sell your closed source software if you incorporate GPL 
components.

Most people are really not aware of this but because some important 
software like Linux and even MySQL use GPL and so many developers use it 
  without even being aware of the actual license implications (if they 
have read the license at all).

I guess Stallman knew that most people would not read or understand the 
licenses or else many of them would not be adopting GPL as in fact GPL 
based Free as in Stallman free is more restrictive than most people 
intended their Open Source software to be.

Usually I do not recommend GPL at all unless you are aware of what it 
means and that is what you really want it. Usually I recommend BSD 
license or similar like Apache or even PHP license.

-- 

Regards,
Manuel Lemos


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




[PHP] Not a Valid File-Handle Resource

2002-07-29 Thread Chris Carlson

I am trying to create a php program and am getting an error in this area
of my script:

  $dataFile =
@fopen("/home/blurredv/data/".$username."Contact.txt","w");
  fputs($dataFile, $line);
  fclose ($dataFile);

These are the errors:

Warning: Supplied argument is not a valid File-Handle resource in
/home/blurredv/public_html/redcarbon/update.php on line 34
Warning: Supplied argument is not a valid File-Handle resource in
/home/blurredv/public_html/redcarbon/update.php on line 35

Note:  My script work perfectly with different path names under Windows
NT.  Do I have to do something special for Unix.

Thanks in advance,

Chris Carlson
totaldeveloper.com


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




Re: [PHP] Re: need help with uploading images

2002-07-29 Thread Deadsam

This looks good but I just have one question about it if you don't mind,
what if someone was uploading a gif or a PNG file? can it be made to only
detect jpgs?
Thanks in advance
Deadsam

> Try it this way, it will check if it is a jpeg and it has a horizontal
> and vertical size so you can be pretty sure it is an image file.
> (you do not need the gd package for getimagesize())
>
>
> /** Check for the type of the image : only allow jpeg's */
> $im = getimagesize($_FILES['uploadFile');
> if(!($im[2] == 2 && $im[0] > 0 && $im[1] > 0)){
> echo "You can only upload jpg images.";
> exit();
> }
>
>
>
>
> --
> regards,
> Tom
>



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




[PHP] Re: Sendmail "return-path" from my virtual webhost

2002-07-29 Thread Manuel Lemos

Hello,

On 07/29/2002 01:54 PM, Al wrote:
> Emails sent from my php scripts, using sendmail, all have a goofy 
> "return-path" variable in the header.
> 
> Is there a way I can correct this, or does it require a change to the 
> sendmail config file that I can't get to?

Yes, you can use mail() 5th argument or call sendmail directly with the 
popen using -f switch.

Take a look at these classes to learn how to do it in case you have doubts:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos


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




[PHP] Re: REGEX for credit card number

2002-07-29 Thread Manuel Lemos

Hello,

On 07/28/2002 05:02 PM, Mike Mannakee wrote:
> Does anyone have a regular expression that works to validate credit card
> numbers?

No, there is not regular expression for that. You may want to use this 
class instead for validation credit card numbers in forms:

http://www.phpclasses.org/formsgeneration

-- 

Regards,
Manuel Lemos


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




Re: [PHP] Re: OT - javascript question..

2002-07-29 Thread Jason Wong

On Tuesday 30 July 2002 05:54, Jome wrote:
> >Is there any way, when the upload window is closed, to force a reload of
>
> the other page, so the dynamic pop-up reflects
>
> >the recent upload?
>
> This link may help some:
> http://www.hwg.org/resources/faqs/jsFAQ.html#popup-talk
>
> Please don't poste OT-questions though, there is better mailing lists if
> you want to find javascript-gurus.

Here's a javascript list:

  http://www.webdevelopersjournal.com/JavaScriptWeenie.html

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

/*
core error - bus dumped
*/


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




Re: [PHP] Update of the problem w/ code - conditional image generation problem?!

2002-07-29 Thread Jason Wong

On Tuesday 30 July 2002 04:47, Joseph Rosenblum wrote:
> Do you know you have a typo in that conditional there? Was that your
> real code? You misspelled 'else' as 'esle'.

(To OP): If you're going to post code that you want someone to debug, please 
copy & paste. Introducing spurious typos wastes everybody's time.

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

/*
CHUBBY CHECKER just had a CHICKEN SANDWICH in downtown DULUTH!
*/


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




RE: [PHP] PHP-MySQL connection problem

2002-07-29 Thread Manisha

Hi,
I tried to display phpinfo and I am getting following values

display_errors On   On
display_startup_errors On   On

error_append_string  no value   no value
error_logno value   no value
error_prepend_string no valueno value
error_reporting  1 1

(Still there is no display of error)

sendmail_from[EMAIL PROTECTED]   [EMAIL PROTECTED]
sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i
short_open_tagOn  On
SMTP   localhost localhost

I changed the script as follows, now it is giving error that - can not even 
queue - btw where the queue is stored ? and where can I see the sendmail log ?



I tried giving mail directly from sendmail going to /usr/sbin - I am not 
sure how to give commands in unix but I tried following block,

---

shell>cd /usr/sbin
shell>sendmail manisha
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Test from new aurica
kl;efkvg;lkf

rkfkrjek

sdjkfjsd

^D - to terminate it

message given  - Failed to send message to any users





Now how shall I proceed ?

Thanks and regards
Manisha






[PHP] Credit Card Validation Solution updated

2002-07-29 Thread Analysis & Solutions

Hi Folks:

I'm happy to announce the latest versions of my
Credit Card Validation Solution.  This includes a new JSP Edition and
reworking the PHP and Perl Editions into an Object Oriented paradigm. 

If you're using a version prior to the following, please upgrade:
  Ed.   Ver  URI
    ---  ---
  JSP   4.2  http://www.analysisandsolutions.com/code/ccvs-jsp.htm 
  Perl  4.7  http://www.analysisandsolutions.com/code/ccvs-pl.htm
  PHP   4.4  http://www.analysisandsolutions.com/code/ccvs-ph.htm

An older version of it is also available for Visual Basic at
http://www.analysisandsolutions.com/code/ccvs-vb.htm

If you're not familliar with these scripts, here's a quick description:

It ensures credit card numbers are keyed in correctly. Includes checks
that the length is correct, the first four digits are within accepted
ranges, the number passes the Mod 10 Checksum and that you accept the
given type of card. Just to be clear, this process does not check with
banks or credit card companies to see if the card number given is actually
associated with a good account. It just checks to see if the number
matches the expected format.

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Re: ENCRYPT() in MySQL

2002-07-29 Thread Justin French

on 30/07/02 7:45 AM, Richard Lynch ([EMAIL PROTECTED]) wrote:

> You're barking down the wrong well. :-)

LMAO

> AES_ENCRYPT/AES_DECRYPT is using 128-bit encryption, which would be fine,
> but *ANYBODY* who manages to read your "password" (aka "key_string" in the
> arg_list) could snatch the CC#s.  Since PHP can read the source to execute
> to get the password, that makes this suitable *ONLY* if:
> 1. You are using SSL (HTTPS)
> 2. You *NEVER* store the password anywhere -- It must be typed by a human
> into the web-page to store/retrieve the CC#s.
> That doesn't sound like what you want.

Wouldn't I have this same problem with ANY string encrypted with a key?
Either way the key has to be stored on the server in the most secure way
possible.

They also mentioned with AES_* that you could set the key at connection,
then NOT send it with each query.

I think AES_* is only available on MySQL 4+, so it's ruled out anyway.


> DES_ENCRYPT/DES_DECRYPT is using DES which doesn't totally suck, but, again,
> the issue is the des_key_files.  If *THOSE* are secure from prying eyes, but
> MySQL can still read them somehow, it might be "okay"...  But making it
> possible for MySQL to read them, but not "too open" for other users is
> somewhat of an oxymoron, maybe.  I dunno enough about how MySQL accesses
> these files and if it starts as 'root' like Apache and then does 'su' or
> what, but I'd be very, very careful figuring out *exactly* how MySQL can
> read these files safely, but a rogue user should have *NO* *CHANCE* at
> getting to them.

DES_* requires MySQL to config'd with SSL, which it hasn't been, so this
option is also shot down.


> Bottom line -- You've *GOT* to make sure you have no chinks in the armour.

Thanks *HEAPS* for your info.  I emailed my ISP to bitch to them about all
this s**t, and they're putting together a new Linux package at the moment
which has mcrypt() support... so hopefully in a minth or so, things will be
cool... otherwise, it'll be time to move hosts :)


Justin French


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




Re: [PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Michael Sims

On Mon, 29 Jul 2002 17:30:48 -0400, you wrote:

>Is it really necessary to store passwords encrypted in a mySQL DB for a
>membership site if you're not storing sensitive info such as credit card
>numbers? How much security does that offer, really, and for whom?
[...]
>The reason I ask is because I'm trying to implement a "forgot password"
>feature on a membership site.
[...]

My two cents...

I'm generally in favor of encrypting passwords, for the same reason
that another poster mentioned:  People use the same password for
multiple accounts/sites/etc.  I know that I do.  And if I knew that I
just signed up for some account/service and the people hosting it were
storing my password in plain text, I would be a bit perturbed.  I
would think them at least amateurish, probably careless, and possibly
untrustworthy.

With that said, sometimes plain text passwords are called for.  But
when you use them make *certain* you inform the user when they sign
up.  For example, many mailing lists store passwords in plain text and
email you a reminder, with your password, at a certain interval.
These mailing lists usually warn you in advance to not use one of your
secure passwords, since it will occasionally be emailed in plain text.
This is an example of where storing in plain text is fine, because
mailing lists aren't critical things, and the convience of being able
to remind people what their password is outweighs any security
concerns.

If you decide that you want to encrypt the passwords, but you still
want a secure way to remind people what their password is, you can
either use the unique authorization code method that one other poster
mentioned (I have some Perl code that handles that for a project I'm
working on, if you're interested), OR you can use the secret question
secret answer method.  This is where you ask the user to enter a
secret question such as mother's maiden name, favorite color, etc. and
also to enter the answer.  Then later you can ask them the question
and compare their answer to determine if they are who they say they
are...

HTH

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




Re: [PHP] Re: need help with uploading images

2002-07-29 Thread Tom Rogers

Hi,

Tuesday, July 30, 2002, 3:52:23 AM, you wrote:
D> maybe it would be easier to show you the part of code I'm using,

D> }
D> /** Check for the type of the image : only allow jpeg's */
D> if($_FILES['uploadFile']['name']['type']!="image/jpeg"){
D> echo "You can only upload jpg images.";
D> exit();
D> }
D> The one above is the one I'm having problems with, it should work by looking
D> at it, it all makes sense, but it won't for some strange reason. I heard
D> there is a difference in browsers to get it to work at time, so I tried
D> using pjpeg instead and got the same result. If I can't get this to work
D> somehow then I will be trying your method Oscar, which just means I'll have
D> to change the code for it all, no big deal it's not much of a change anyhow,
D> if it was pages upon pages then it would be lol.
D> Thanks for all your help guys, and the security issue I never even realized,
D> so I guess I'll have to go hunting for away to resolve that too if I'm going
D> to use it for all users instead of administration uploading.
D> Your help is much appreciated
D> Sam
Try it this way, it will check if it is a jpeg and it has a horizontal
and vertical size so you can be pretty sure it is an image file.
(you do not need the gd package for getimagesize())


/** Check for the type of the image : only allow jpeg's */
$im = getimagesize($_FILES['uploadFile');
if(!($im[2] == 2 && $im[0] > 0 && $im[1] > 0)){
echo "You can only upload jpg images.";
exit();
}




-- 
regards,
Tom


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




[PHP] Re[2]: File Browser like Win Explorer in php

2002-07-29 Thread Evgeny Chuykov

Look at the HTML_TreeMenu http://pear.php.net/package-info.php?pacid=77.

>>I am wondering if anyone has created or know where I can get a code for
>>browsing files and directory in using php in linux. The one I am looking
>>for is file browsing capability that is similar to Window Explorer,
>>meaning you can expand and collapse directory.
>>I just don't want to re-invent the wheel. If anyone knows about this,
>>please let me know. I appreciate the help. 

RL> Are you browsing the files across an HTTP connection?

RL> Cuz all the little triangles and stuff are gonna get dog-slow for most
RL> users...

RL> Every single click will probably require another HTTP request...

RL> At any rate, search the code archives listed at:
RL> http://php.net/links.php

RL> If you are using PHP to do this locally, it seems kinda silly to do, but
RL> maybe a PHP-GTK solution is out there for it.

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


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




Re: [PHP] OT - javascript question..

2002-07-29 Thread Justin French

on 30/07/02 6:11 AM, Martin Clifford ([EMAIL PROTECTED]) wrote:

>  
> echo "\n\n";
> 
> ?>
> 
> Something similar will work fine.


Wouldn't the $PHP_SELF be that of the popped-up window, not of the opener?

Justin French


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




Re: [PHP] OT - javascript question..

2002-07-29 Thread Justin French

Yes, this is way OT

you can refer back to the original window with

opener

(or it may me window.opener)

I used it once to change the location of the parent window with something
like:





show me something else

I'm thinking opener.location.reload() or opener.location.reload(1) or
opener.location.replace('my_url') might do the same job, but if you know
what URL the script should refresh to (ie, load the same URL again), then
the function above should work as is.


Justin French



on 30/07/02 6:00 AM, Kelly Meeks ([EMAIL PROTECTED]) wrote:

> Sorry for the off topic post, but this is by far the most experienced list
> I've found.
> 
> I've got a php page that show all the .gif and .jpeg files in an directory via
> a form based drop down menu.
> 
> On the same page, I've also got a link that opens a new window, and allows the
> user to upload an image to that same directory.
> 
> Is there any way, when the upload window is closed, to force a reload of the
> other page, so the dynamic pop-up reflects the recent upload?
> 
> Thanks in advance,
> 
> Kelly
> 


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




Re: [PHP] ENCRYPT() in MySQL

2002-07-29 Thread Justin French

on 30/07/02 1:05 AM, Analysis & Solutions ([EMAIL PROTECTED])
wrote:

> On Mon, Jul 29, 2002 at 10:06:29PM +1000, Justin French wrote:
>> 
>> I'm on a shared server which does not have mcrypt... not good, since i want
>> to temporarily store credit card numbers in an encrypted manner, either in a
>> MySQL database, or in a text file.
> 
> Uh, what are you going to do with the cc data that you need to store it?

I don't want to send it around in an email.  So, when I get an order, I
notify the staff via email, they jump online, go to a password protected
part of the site, and retrieve the order, complete with decrypted CC#.  THEN
I can trash the CC# off the server.

If there's a smarter way, I'm ALL EARS :)


Justin French


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




RE: [PHP] Re: libphp4.so

2002-07-29 Thread Peter

> >howdy,
> >
> >i've got it all configured correctly .. well it doesn't spit any
> errors out
> >on make
> >but when i got to view a web page it opens a down load box ..so
> i added this
> >
> >LoadModule php4_modulelibexec/libphp4.so
> >
> >to httpd.conf as per the manual and restarted apache but it didn't start
> >saying it couldn't find libphp.so which leads me to my question
> .. that file
> >is created automatically correct?
> >
> >i havent been able to find that file on my machine any where.. so i can't
> >point it to another location ... any one got any ideas what i
> should do as i
> >have not seen any info any where that will direct me in this situation...
>
> Do the "make install" again and pay attention to what scrolls by and see
> where it puts the libphp4.so file.
>
> Then, make sure that's where Apache expects it.
>
> the LoadModule directive acts in conjunction with the one above all the
> LoadModules that tells Apache where to start looking for Modules in the
> first place.
>
> Some folks set that in httpd.conf to include the "libexec" part, so then
> your libexec in the LoadModule line is ending up "doubling" the libexec in
> the path and that ain't gonna work.
>
> If there are any *working* LoadModule lines, you can try digging around to
> find them on your hard drive, and make sure libphp4.so is sitting next to
> them, and then do the LoadModule the same way as the working ones.
>
> http://apache.org will explain all the stuff I just said in
> formal language.
> :-)

Ok i followed what you have suggested and Apache didn't spit out anything on
libphp4.so so I am lead to beleave it wasn't created..

my apache config like was


#./configure --enable-module=most --enable-shared=max --activate-module=src/
modules/php4/libphp4.a

cheers
Peter


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




[PHP] Re: Passing PHP variables into javascript

2002-07-29 Thread Richard Lynch

>echo "$chon_pet[7]";

JavaScript won't let you use [] in a name, so you'll have to refer to the
elements by number.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




Re: [PHP] Re: sessions and https

2002-07-29 Thread Chris Shiflett

Richard Lynch wrote:

>But Cookies sent to the HTTPS are not on the HTTP and vice versa.
>
>That ain't PHP, that's just how cookies work.
>

Are you sure about this? That's definitely not how the specification 
reads (assuming I'm interpreting what you're trying to say correctly), 
and that is not what my experience has shown either.

A secure cookie will only be transmitted when the request is being sent 
over a secure connection, but an ordinary cookie does not carry this 
restriction and would thus not care whether the connection was secure. 
As someone else suggested, if the domain name is changing, then that is 
the access restriction that is keeping the cookie from being sent, not 
whether the connection is secure.

Happy hacking.

Chris



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




Re: [PHP] Public Scripts in a commercial product

2002-07-29 Thread Tech Support

Uhhh but you really should ask the author too. ;-)

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Tech Support" <[EMAIL PROTECTED]>
To: "Chris Boget" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 5:38 PM
Subject: Re: [PHP] Public Scripts in a commercial product


> There are many types of licensing and it really depends on what the author
> licensed it under. Most are GPL. Normally the first few lines of the
LICENSE
> file typically included with the dist will explain the details of the
> license. If there is not one always assume that if you use any part of it
in
> a commercial work you must also provide the original source code and the
> original license. This does *not* mean that you have to include *your*
> source code, but only the original source code. Some licenses are even
more
> free than that but that is the standard.
>
> Jim Grill
> Support
> Web-1 Hosting
> http://www.web-1hosting.net
> - Original Message -
> From: "Chris Boget" <[EMAIL PROTECTED]>
> To: "PHP General" <[EMAIL PROTECTED]>
> Sent: Monday, July 29, 2002 3:29 PM
> Subject: [PHP] Public Scripts in a commercial product
>
>
> > If someone is going to be using scripts that they grabbed
> > from a public forum (PHP Builder, PHPClasses, etc) in a
> > commercial product (that is going to be compiled with the
> > Zend encoder and released), what is the protocol, if any?
> > Do you have to get permission from the author or anything?
> > I've read a bit of the GNU Public liscence but I didn't come
> > away knowing any more than went I started reading it.  So
> > I figure I'd ask here where I'm sure many of you have this
> > type of experience.
> >
> > Chris
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




Re: [PHP] Public Scripts in a commercial product

2002-07-29 Thread Tech Support

There are many types of licensing and it really depends on what the author
licensed it under. Most are GPL. Normally the first few lines of the LICENSE
file typically included with the dist will explain the details of the
license. If there is not one always assume that if you use any part of it in
a commercial work you must also provide the original source code and the
original license. This does *not* mean that you have to include *your*
source code, but only the original source code. Some licenses are even more
free than that but that is the standard.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 3:29 PM
Subject: [PHP] Public Scripts in a commercial product


> If someone is going to be using scripts that they grabbed
> from a public forum (PHP Builder, PHPClasses, etc) in a
> commercial product (that is going to be compiled with the
> Zend encoder and released), what is the protocol, if any?
> Do you have to get permission from the author or anything?
> I've read a bit of the GNU Public liscence but I didn't come
> away knowing any more than went I started reading it.  So
> I figure I'd ask here where I'm sure many of you have this
> type of experience.
>
> Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




Re: [PHP] PHP5?

2002-07-29 Thread Tech Support

You could join the developer's list and just read. I joined just to keep up
with what's coming in future releases and it's also pretty interesting. They
are constantly talking about what features/bugs need work and when they want
to do a release and who will be on vacation and can't help and blah blah
blah. I wouldn't recommend asking many questions though unless you want to
get flamed. :-)

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 3:23 PM
Subject: [PHP] PHP5?


> In the following article:
>
> http://www.computerwoche.de/index.cfm?pageid=254&artid=38819&category=84
>
> Zeev says that PHP5 is expected as early as 1stQ next year.  Is there
anything
> anywhere that discusses the new version and any new possible features?
>
> Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




[PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread Richard Lynch

>If someone is going to be using scripts that they grabbed
>from a public forum (PHP Builder, PHPClasses, etc) in a
>commercial product (that is going to be compiled with the
>Zend encoder and released), what is the protocol, if any?  
>Do you have to get permission from the author or anything?
>I've read a bit of the GNU Public liscence but I didn't come
>away knowing any more than went I started reading it.  So
>I figure I'd ask here where I'm sure many of you have this
>type of experience.

If the source code in question has *NO* licensing/copyright notice, the
author of the source holds the copyright, and you can't use it legally.

If the source code in question was published under GNU, you're bound by the
GNU license, which I *THINK* let's you use it in a commercial release... 
You'd have to read up on the "examples" of what GNU does/doesn't allow.  I
think the FSF site might have some clear examples.

PHPBuilder itself may or may not require authors to agree that their source
is under some particular license.  You'd have to check each site to see for
sure.

If in doubt, contact the author.  Worst that can happen is they want some
money, or you have to come up with a different solution.  Odds are really
really good that there is an alternative solution "out there" to almost
*ANY* of the publicly available code in those forums, or that you could dig
into them for the core of what they do and write your own from scratch.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: OT - javascript question..

2002-07-29 Thread Richard Lynch

>Sorry for the off topic post, but this is by far the most experienced list 
>I've found.
>
>I've got a php page that show all the .gif and .jpeg files in an directory 
>via a form based drop down menu.
>
>On the same page, I've also got a link that opens a new window, and allows 
>the user to upload an image to that same directory.
>
>Is there any way, when the upload window is closed, to force a reload of 
>the other page, so the dynamic pop-up reflects the recent upload?

You could:
Use a META tag in the directory window to for a reload

  



Maybe convince the CLOSE button that it's:
ACTION=http://example.com/directory.php?nocache=
TARGET="directory_window"
Dunno how that jives with JavaScript's window closing code.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: Preg replace & Query Problem

2002-07-29 Thread Richard Lynch

> $style_1  = preg_replace('/\[url\]/', "index.php?catID=$category_id",
>$style_1);
> $style_1  = preg_replace('/\[title\]/', "$category_name", $style_1);

Why use preg at all?

http://php.net/str_replace will do it faster/easier...

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: How would I do this?

2002-07-29 Thread Richard Lynch

>Blink 182
>-
>
>Whats my age again?GuitarBassDrumLyricsBuy
>at Amazon.
>DammitGuitarBassDrumLyrics
>Buy at Amazon.
>MnMs GuitarBassDrumLyrics
>Buy at Amazon.
>
>Now I know this would be simpler if I had them in different tables, but I
>have my reasons why I dont.
>Here is the setup of the table for storing tabs/lyrics..
>
>CREATE TABLE `resources` (
>`id` INT NOT NULL AUTO_INCREMENT,
>`type` TEXT NOT NULL,
>`title` VARCHAR(100) NOT NULL,
>`content` TEXT NOT NULL,
>`user_id` INT NOT NULL,
>`rating` INT DEFAULT '5' NOT NULL,
>`views` INT DEFAULT '0' NOT NULL,
>`date` TIMESTAMP NOT NULL,
>`artist_id` TEXT,
>`amazon` TEXT,
>INDEX (`id`),
>UNIQUE (`id`)
>);

Is 'type' filled in with one of 'Guitar', 'Bass', 'Drum', 'Lyrics' ???

If so, you could do this:

create table types(type_id, type text not null);
insert into types(type) values('Guitar');
insert into types(type) values('Bass');
insert into types(type) values('Drum');

You could then do:

select blah from resources left outer join types on resources.type =
types.type
where artist_id = 'Blink 182'
order by title, type_id

Then your rows will just naturally "fill" the table.

Or, if you could live with the order being: 'Bass', 'Drum', 'Guitar',
'Lyrics' instead, you could use the table you have and do:

select blah from resources order by type where artist_id = 'Blink 182'
order by title

Then, in your PHP script, you'll have to do:

$columns = array('Bass', 'Drum', 'Guitar', 'Lyrics');
$column = 0;
$row = mysql_fetch_row(...);
while($row){
  if ($row['type'] == $columns[$column % count($columns)]){
echo "http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: major problem using mv command to a directory

2002-07-29 Thread Richard Lynch

>hi guys i have a big problem i need to fix , i was moving a tar ball to
>another dir , using
>mv ImageMagick-i686-pc-linux-gnu.tar.gz /home/usr, i now cannot move into
>the usr directory, it has somehow appended the tar ball into the driectory
>strucuture and cant undo this ? please help

Like, you probably never *HAD* a /home/usr directory in the first place, so
you basically moved it into "/home" and re-named it "usr" instead of
"ImageMagick..."

To be 100% certain, download the exact same tarball again and do:

diff /home/usr /new/downloaded/copy/of/ImageMagick...

If nothing comes back, you never had a /home/usr/

If it says the binary files are different, something is very, very, very
wrong on your computer...  Way beyond my ken to fix.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: Brain Fart- table formatting help

2002-07-29 Thread Richard Lynch

>The one constant is that if ($row->show_title) is true the table row will
>have a background color then I need to make the rows after that alternate
>until if ($row->show_title) is true again.
>
>Roughly I have the whole thing laid out like this right now:
>
>echo "\n";

$colors[0] = 'FF';
$colors[1] = '00FF00';
$color = 0;
>while($row = mysql_fetch_object($result)) {

if ($row->show_title){
  $color++;
}

# Now you can use $color % 2 like usual.

>if($row->show_company && $row->show_title && $row->show_month) {
>  display month;
>} else if ($row->show_title) {
>  display title;
>  display first row with background color;
>} else {
>  display rows with no background color; //right here needs to alternate
> background color
>}
>}
>echo "";
>
>I think I've been looking at his too long and I just have jello brain right
>now but I just can't seem to straighten this out in my head...
>
>Thanks for the help...
>
>-B
>


-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: ENCRYPT() in MySQL

2002-07-29 Thread Richard Lynch

>Sorry to be slightly OT, but I've prolly answered 1000 OT posts in the last
>year, and this IS related for all those without mycrypt, so...
>
>I'm on a shared server which does not have mcrypt... not good, since i want
>to temporarily store credit card numbers in an encrypted manner, either in a
>MySQL database, or in a text file.
>
>So I started google'ing for a class or something that someone may have
>written for two-way encryption WITH A KEY TO UNLOCK.
>
>Couldn't find much, then did a search on MySQL.com, and found the ENCRYPT(),
>DECRYPT(), ENCODE() and DECODE() functions.
>
>Am I barking up the wrong tree, or can these be used for storing sensitive
>information (credit card, etc etc) in a mysql table?
>
>The MySQL manual isn't particularly in-depth about it all:
>http://www.mysql.com/doc/M/i/Miscellaneous_functions.html

You're barking down the wrong well. :-)

If PHP can *DECRYPT* the data in your database, then it's not very secure AT
ALL.  It's just too easy for a hacker to get a script uploaded/installed and
then run it and snatch all the cc #'s

To answer your question:

ENCRYPT will not help, as it's one-way.  You could ask somebody to re-enter
their CC# and see if it's the same as before or not, but not "un-do" the
ENCRYPT.

Plain old ENCODE and DECODE don't even tell you which algorithm is used, so
that's useless.

AES_ENCRYPT/AES_DECRYPT is using 128-bit encryption, which would be fine,
but *ANYBODY* who manages to read your "password" (aka "key_string" in the
arg_list) could snatch the CC#s.  Since PHP can read the source to execute
to get the password, that makes this suitable *ONLY* if:
1. You are using SSL (HTTPS)
2. You *NEVER* store the password anywhere -- It must be typed by a human
into the web-page to store/retrieve the CC#s.
That doesn't sound like what you want.

DES_ENCRYPT/DES_DECRYPT is using DES which doesn't totally suck, but, again,
the issue is the des_key_files.  If *THOSE* are secure from prying eyes, but
MySQL can still read them somehow, it might be "okay"...  But making it
possible for MySQL to read them, but not "too open" for other users is
somewhat of an oxymoron, maybe.  I dunno enough about how MySQL accesses
these files and if it starts as 'root' like Apache and then does 'su' or
what, but I'd be very, very careful figuring out *exactly* how MySQL can
read these files safely, but a rogue user should have *NO* *CHANCE* at
getting to them.

Bottom line -- You've *GOT* to make sure you have no chinks in the armour.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




Re: [PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Danny Shepherd

Ok, here's how I do it:

1. User clicks the lost password page:
2. Email is sent to user's registered email address. Email contains a url to
the newpassword page and has a validation code. This validation code is also
stored in the userinfo table (it's the MD5 of current date + time + random
chars).
3. User clicks link and is taken to page.
4. If the supplied validation code checks out, the user gets to pick a new
password there and then.
5. If the user didn't want to change the password (i.e.. the abuse scenario
you talked of) they simply ignore the email - no change occurs.

So :
The passwords can be encrypted in the database.
The system is difficult to abuse.
Passwords are never sent out over email.
User gets to choose own password.

Well it works for me anyway :)

HTH

Danny.


- Original Message -
From: "Monty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 10:30 PM
Subject: [PHP] Encrypting Passwords - Is it really necessary??


> Is it really necessary to store passwords encrypted in a mySQL DB for a
> membership site if you're not storing sensitive info such as credit card
> numbers? How much security does that offer, really, and for whom?
>
> The reason I ask is because I'm trying to implement a "forgot password"
> feature on a membership site. But if I store passwords encrypted, I can't
> just send the password to their e-mail address, I have to generate a new
one
> before sending it, which essentially locks that member out of the site
until
> they get their new password. This has the potential to be abused by a
> vindictive person. All they need to know is the member's username or
e-mail
> address and they can keep re-generating new passwords (locking the member
> out of their own account) for a member to annoy them.
>
> If the password wasn't encrypted, I could just e-mail their existing
> password. The only annoyance then would be someone sending this password
> over and over to another user, but, at least they won't get 20 new
passwords
> and be locked out of their account as a result.
>
> If anyone else has dealt with this issue, I'd appreciate your insight.
>
> Thanks!
>
> Monty
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Chris Wesley

On Mon, 29 Jul 2002, Monty wrote:

> Is it really necessary to store passwords encrypted in a mySQL DB for a
> membership site if you're not storing sensitive info such as credit card
> numbers? How much security does that offer, really, and for whom?

I'm going to go with "YES" on this one.  The problem with being able to
retrieve actual passwords from your database is this:  Most people re-use
passwords across multiple applications.  So, while you may fully intend to
stash passwords access to only your application, you may actually be
storing passwords to people's online banks, work logons, pr0n sites, etc.

You can save yourself a lot of time in the future by taking a little time
now to make sure that plain-text passwords are not retrievable from your
application/database.  If your database server were to be compromised, you
can rest assured that you didn't leak any passwords.  Otherwise, you'll
have to really worry that somebody didn't walk away with a list of names,
usernames and passwords that could be used elsewhere.

> The reason I ask is because I'm trying to implement a "forgot password"
> feature on a membership site. But if I store passwords encrypted, I can't
> just send the password to their e-mail address, I have to generate a new one
> before sending it, which essentially locks that member out of the site until
> they get their new password. This has the potential to be abused by a
> vindictive person. All they need to know is the member's username or e-mail
> address and they can keep re-generating new passwords (locking the member
> out of their own account) for a member to annoy them.

While this is true, what I've found in practice is that this rarely
happens (actually hasn't happend yet, for my sites ... knock on wood).
If you find that this becomes a problem, some logic around how often, and
by what method passwords can be changed may help alleviate the problem.

g.luck,
~Chris


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




[PHP] Re: OT - javascript question..

2002-07-29 Thread Jome

>Is there any way, when the upload window is closed, to force a reload of
the other page, so the dynamic pop-up reflects
>the recent upload?

This link may help some:
http://www.hwg.org/resources/faqs/jsFAQ.html#popup-talk

Please don't poste OT-questions though, there is better mailing lists if you
want to find javascript-gurus.

  -Jome





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




[PHP] Re: Auto Increment Problems....

2002-07-29 Thread Jome

> my primary key column ("id") is set to auto_increment as usual which is
very
> handy. But when I delete a row, the auto_increment just keeps incrementing
> and there's this 'hole' left where I deleted the row!

This is the way it should be, and it's like that for a reason - if you have
other tables with relations to the ID in the original table, you may cause
some headaches when the holes are filled up by new rows and they become
related to those other tables.

> Apart from this looking ugly, it poses another problem. In my PHP script
> where I can add new rows, I query the table, checking how many rows in the
> table altogether and set the new id as the next number, but this doesnt
work
> if theres 'holes' in the id field, as the new record tries to overwrite
> another id.

You may find the function mysql_insert_id() useful. If you'd like to count
the number of rows in a table you can SELECT COUNT(*) FROM table;

> 1) Can the next auto_increment value be 'set' by a SQL query

That's done automagically, and it's probably best to leave it that way.

> 2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the
ID
> column??

It's possible but not recommended, you can just search through the rows and
see where there's a hole.

   -Jome



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




[PHP] Re: Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Jome

> Is it really necessary to store passwords encrypted in a mySQL DB for a
> membership site if you're not storing sensitive info such as credit card
> numbers? How much security does that offer, really, and for whom?

The most important reason in my humble opinion is that users may use the
same password for serveral sites and therefor he or she can feel safe that
his password isn't abused, even if a hacker grabs the database. For
passwords under 128 chars, md5() is a pretty good solution.

> The reason I ask is because I'm trying to implement a "forgot password"
> feature on a membership site. But if I store passwords encrypted, I can't
> just send the password to their e-mail address, I have to generate a new
one
> before sending it, which essentially locks that member out of the site
until
> they get their new password. This has the potential to be abused by a
> vindictive person. All they need to know is the member's username or
e-mail
> address and they can keep re-generating new passwords (locking the member
> out of their own account) for a member to annoy them.
>
> If the password wasn't encrypted, I could just e-mail their existing
> password. The only annoyance then would be someone sending this password
> over and over to another user, but, at least they won't get 20 new
passwords
> and be locked out of their account as a result.

This can be more or less resolved, there's almost impossible to fully
protect your site from abuse but you could for example implement something
like max one new password per day. Another way could be to add an additional
detail, like postal code or something which is easy for user to determine
but (probably) not for other people.

My $0.02

  -Jome



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




[PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread Jome

> If someone is going to be using scripts that they grabbed
> from a public forum (PHP Builder, PHPClasses, etc) in a
> commercial product (that is going to be compiled with the
> Zend encoder and released), what is the protocol, if any?
> Do you have to get permission from the author or anything?

That depends on the type of license (of course). Some licenes are pretty
hard to understand and you may have to ask a lawyer. However, there is an
easy way: just ask the author of the script you're thinking about including
in your product. He can probably tell you real quick (and free of charge) if
you can use it in your commercial product.

  -Jome



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




[PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Monty

Is it really necessary to store passwords encrypted in a mySQL DB for a
membership site if you're not storing sensitive info such as credit card
numbers? How much security does that offer, really, and for whom?

The reason I ask is because I'm trying to implement a "forgot password"
feature on a membership site. But if I store passwords encrypted, I can't
just send the password to their e-mail address, I have to generate a new one
before sending it, which essentially locks that member out of the site until
they get their new password. This has the potential to be abused by a
vindictive person. All they need to know is the member's username or e-mail
address and they can keep re-generating new passwords (locking the member
out of their own account) for a member to annoy them.

If the password wasn't encrypted, I could just e-mail their existing
password. The only annoyance then would be someone sending this password
over and over to another user, but, at least they won't get 20 new passwords
and be locked out of their account as a result.

If anyone else has dealt with this issue, I'd appreciate your insight.

Thanks!

Monty


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




[PHP] Most compatible way to set cookies?

2002-07-29 Thread Leif K-Brooks

I am trying to use cookies for logins (I would use sessions, but the 
free host this site is on doesn't support them).  With all of the bugs 
in various browsers influencing cookies, what does everyone think is the 
most compatible way to set cookies?


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




[PHP] Passing PHP variables into javascript

2002-07-29 Thread Bill Hudspeth

I am having a problem passing a variable from PHP to Javascript and getting
my JS function to recognize a form element object. I am trying to use the
selection of a particular option in a dropdown menu to control the
visibility of another form control element (another select box). In other
words, when the user selects the third option in the menu named "petsubtype"
, the menu named "chonpetsub" should become visible. Similarly, if the third
option is deselected, the latter menu should once again disappear. When I
click on any of the options in the first menu (i.e., "petsubtype"), I get a
Javascript warning that says "elementname.length is null or not an object".
Any help would be greatly appreciated.



Thanks in advance, Bill



//**
***



function PetSubToggle(id, elementname, form) {



alert("Function call here successful");



for(var i=0; i









require 'dhtml_functions.inc';

require 'meteor_data_arrays.inc';



//**




$petsubname="petsubtype"; //used below to assign an name the the petsub
div id

$elementname="chonpet";  //add column for petrologic
types

$elementsarray="$chon_pet";//an associative array



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

RE: [PHP] Update of the problem w/ code - conditional image generation problem?!

2002-07-29 Thread Joseph Rosenblum

Do you know you have a typo in that conditional there? Was that your
real code? You misspelled 'else' as 'esle'.

-Joseph Rosenblum
President, 25th Street Networks
Get Easy, Reliable PHP Web Hosting at:
http://www.25thstreet.net

-Original Message-
From: Alex Maslov [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 29, 2002 1:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Update of the problem w/ code - conditional image
generation problem?!

Thank everyone for suggestions.

I followed through on them but unsuccessfully. I looked for any mistake
but
couldn't find it. I tried commenting out lines in chunks and one by one,
without any effect.

the problem stays the same, if the conditional statement is present then
image
is not generated, otherwise the code works and is generating an image.
Also, the image is generating only in Netscape browzer?! Internet
Explorer
does not display the image at all, never, with or without conditional.

Is their some trick i need to know to display images both in netscape
and
iexplorer?

if smone would give it a shot i would be very thankfull! thnks in
advance for
your help.

---file counter.php ---
");
echo("current page = $this_page ");
echo("address = $address ");
echo("screen width = $scr_width ");
echo("screen height = $scr_height ");
echo("color pallette = $color_palt ");
echo("platform = $platform ");
echo("language = $lang ");
echo("browzer info = $bwzr_info ");
echo("java enabled = $java ");
echo("taint enabled = $taint ");
*/
//---   LOG DATA INTO DATABASE  ---//
// todo //

//this is the begining of troublesome conditional statment
if ( false ) {
//echo("we here");
//$image = ImageCreate(1,1);
//$navyblue = ImageColorAllocate($image, 0, 0, 0);
//ImageFilledRectangle($image, 0, 0, 1, 1, $navyblue);
} esle {

$web_uniqe_kount = sprintf("%07d",
$_SESSION['web_uniqe_count']);
$web_total_kount = sprintf("%07d",
$_SESSION['web_total_count']);
$web_print_kount = sprintf("%07d",
$_SESSION['web_print_count']);

$office_uniqe_kount = sprintf("%07d",
$_SESSION['office_uniqe_count']);
$office_total_kount = sprintf("%07d",
$_SESSION['office_total_count']);
$office_print_kount = sprintf("%07d",
$_SESSION['office_print_count']);

$uniqe_str = "Uniqe";
$total_str = "Total";
$print_str = "Print";

$web_head = "Web";
$office_head = "Office";

$header_length = 6;
$column_length = 9;

$spacer = 1;

$font_size = 1;
$charHeight = ImageFontHeight($font_size);
$charWidth = ImageFontWidth($font_size);

$head_cell_Width = ($charWidth * $header_length) + (2 *
$spacer);
$numb_cell_Width = ($charWidth * $column_length) + (2 *
$spacer);
$cell_Height = $charHeight + (4 * $spacer);

$row_Width = $head_cell_Width + (2 * $numb_cell_Width);
$row_Height = $cell_Height;

$column_Width = $numb_cell_Width;
$column_Height = $cell_Height * 4;

$horizontalMargin = 1;
$verticalMargin = 1;

$image_Width = $row_Width + (2 * horizontalMargin);
$image_Height = $column_Height + (2 * verticalMargin);

//create blank image template with specified dimmentions
$image = ImageCreate($image_Width, $image_Height);

//initiate color pallete to be used
$black = ImageColorAllocate($image, 0, 0, 0);
$white = ImageColorAllocate($image, 255, 255, 255);
$red   = ImageColorAllocate($image, 255, 0, 0);

//fill image background with black color
ImageFilledRectangle($image, 0, 0, $imageWidth,
$imageHeight,
$black);

//set line style for the image
$line_style = array($black, $black, $black, $black,
$black,
$red, $red, $red);
ImageSetStyle($image, $line_style);


//---   DRAW THE IMAGE  ---//

//draw the table
$drawCoordinateX = $horizontalMargin;
$drawCoordinateY = $verticalMargin + $cell_Height;
ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$image_Width-$horizontalMargin, $drawCoordinateY, IMG_COLOR_STYLED);
$drawCoordinateY += $cell_Height;
//ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$image_Width-$horizontalMargin, $drawCoordinateY, IMG_COLOR_STYLED);
$drawCoordinateY += $cell_Height;
Imag

[PHP] Update of the problem w/ code - conditional image generation problem?!

2002-07-29 Thread Alex Maslov

Thank everyone for suggestions.

I followed through on them but unsuccessfully. I looked for any mistake but
couldn't find it. I tried commenting out lines in chunks and one by one,
without any effect.

the problem stays the same, if the conditional statement is present then image
is not generated, otherwise the code works and is generating an image.
Also, the image is generating only in Netscape browzer?! Internet Explorer
does not display the image at all, never, with or without conditional.

Is their some trick i need to know to display images both in netscape and
iexplorer?

if smone would give it a shot i would be very thankfull! thnks in advance for
your help.

---file counter.php ---
");
echo("current page = $this_page ");
echo("address = $address ");
echo("screen width = $scr_width ");
echo("screen height = $scr_height ");
echo("color pallette = $color_palt ");
echo("platform = $platform ");
echo("language = $lang ");
echo("browzer info = $bwzr_info ");
echo("java enabled = $java ");
echo("taint enabled = $taint ");
*/
//---   LOG DATA INTO DATABASE  ---//
// todo //

//this is the begining of troublesome conditional statment
if ( false ) {
//echo("we here");
//$image = ImageCreate(1,1);
//$navyblue = ImageColorAllocate($image, 0, 0, 0);
//ImageFilledRectangle($image, 0, 0, 1, 1, $navyblue);
} esle {

$web_uniqe_kount = sprintf("%07d",
$_SESSION['web_uniqe_count']);
$web_total_kount = sprintf("%07d",
$_SESSION['web_total_count']);
$web_print_kount = sprintf("%07d",
$_SESSION['web_print_count']);

$office_uniqe_kount = sprintf("%07d",
$_SESSION['office_uniqe_count']);
$office_total_kount = sprintf("%07d",
$_SESSION['office_total_count']);
$office_print_kount = sprintf("%07d",
$_SESSION['office_print_count']);

$uniqe_str = "Uniqe";
$total_str = "Total";
$print_str = "Print";

$web_head = "Web";
$office_head = "Office";

$header_length = 6;
$column_length = 9;

$spacer = 1;

$font_size = 1;
$charHeight = ImageFontHeight($font_size);
$charWidth = ImageFontWidth($font_size);

$head_cell_Width = ($charWidth * $header_length) + (2 *
$spacer);
$numb_cell_Width = ($charWidth * $column_length) + (2 *
$spacer);
$cell_Height = $charHeight + (4 * $spacer);

$row_Width = $head_cell_Width + (2 * $numb_cell_Width);
$row_Height = $cell_Height;

$column_Width = $numb_cell_Width;
$column_Height = $cell_Height * 4;

$horizontalMargin = 1;
$verticalMargin = 1;

$image_Width = $row_Width + (2 * horizontalMargin);
$image_Height = $column_Height + (2 * verticalMargin);

//create blank image template with specified dimmentions
$image = ImageCreate($image_Width, $image_Height);

//initiate color pallete to be used
$black = ImageColorAllocate($image, 0, 0, 0);
$white = ImageColorAllocate($image, 255, 255, 255);
$red   = ImageColorAllocate($image, 255, 0, 0);

//fill image background with black color
ImageFilledRectangle($image, 0, 0, $imageWidth, $imageHeight,
$black);

//set line style for the image
$line_style = array($black, $black, $black, $black, $black,
$red, $red, $red);
ImageSetStyle($image, $line_style);


//---   DRAW THE IMAGE  ---//

//draw the table
$drawCoordinateX = $horizontalMargin;
$drawCoordinateY = $verticalMargin + $cell_Height;
ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$image_Width-$horizontalMargin, $drawCoordinateY, IMG_COLOR_STYLED);
$drawCoordinateY += $cell_Height;
//ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$image_Width-$horizontalMargin, $drawCoordinateY, IMG_COLOR_STYLED);
$drawCoordinateY += $cell_Height;
ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$image_Width-$horizontalMargin, $drawCoordinateY, IMG_COLOR_STYLED);

$drawCoordinateY = $verticalMargin;
$drawCoordinateX = $horizontalMargin + $head_cell_Width;
ImageLine($image, $drawCoordinateX, $drawCoordinateY,
$drawCoordinateX, $image_Height-$verticalMargin, IMG_COLOR_STYLED);
$drawCoordinateX += $numb_cell_Width;
   

Re: [PHP] Help Please

2002-07-29 Thread 1LT John W. Holmes

Show us the first 6 lines of processing.php.

---John Holmes...

- Original Message - 
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: "Dennis Moore" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:27 PM
Subject: Re: [PHP] Help Please


> Hi,
> I did not find any print or echo stetement in the
> sample example before hearder or setcookie function.
> Is there any way to find out what really is causing
> error or trace the program. Actually i am very new to
> this cookies and all stuff. Is there any way of
> tracing the program? I am using it on red hat 7.3.
> 
> --- Dennis Moore <[EMAIL PROTECTED]> wrote:
> > you cannot print or echo anything back to the
> > browser before running the
> > header() function...
> > 
> > 
> > 
> > 
> > - Original Message -
> > From: "Varsha Agarwal" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, July 29, 2002 4:00 PM
> > Subject: [PHP] Help Please
> > 
> > 
> > > Hi,
> > > I am trying to run a sample program. It connects
> > to a
> > > postgres database verifies user name and password
> > and
> > > if correct, displays the login screen.
> > > But in that program wherever there there are
> > > setcookies() or header() functions, I get
> > following
> > > error
> > >
> > > Warning: Cannot add header information - headers
> > > already sent by (output started at
> > > var/www/html/processing.php:5) in
> > > /var/www/html/common.php on line 63
> > >
> > > I checked the settings of my browser, it can
> > accept
> > > all cookies.
> > > Someone help please!!!
> > >
> > > __
> > > Do You Yahoo!?
> > > Yahoo! Health - Feel better, live better
> > > http://health.yahoo.com
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> > http://www.php.net/unsub.php
> > >
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford

Copy and paste the code (minus and indisclosurables) and we can take a look at it :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> Varsha Agarwal <[EMAIL PROTECTED]> 07/29/02 04:27PM >>>
Hi,
I did not find any print or echo stetement in the
sample example before hearder or setcookie function.
Is there any way to find out what really is causing
error or trace the program. Actually i am very new to
this cookies and all stuff. Is there any way of
tracing the program? I am using it on red hat 7.3.

--- Dennis Moore <[EMAIL PROTECTED]> wrote:
> you cannot print or echo anything back to the
> browser before running the
> header() function...
> 
> 
> 
> 
> - Original Message -
> From: "Varsha Agarwal" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 29, 2002 4:00 PM
> Subject: [PHP] Help Please
> 
> 
> > Hi,
> > I am trying to run a sample program. It connects
> to a
> > postgres database verifies user name and password
> and
> > if correct, displays the login screen.
> > But in that program wherever there there are
> > setcookies() or header() functions, I get
> following
> > error
> >
> > Warning: Cannot add header information - headers
> > already sent by (output started at
> > var/www/html/processing.php:5) in
> > /var/www/html/common.php on line 63
> >
> > I checked the settings of my browser, it can
> accept
> > all cookies.
> > Someone help please!!!
> >
> > __
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > http://health.yahoo.com 
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php 
> >
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com 

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



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




RE: [PHP] Help Please

2002-07-29 Thread Matt Schroebel

> -Original Message-
> From: Varsha Agarwal [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, July 29, 2002 4:27 PM
> To: Dennis Moore; [EMAIL PROTECTED]
> Subject: Re: [PHP] Help Please
> 
> 
> Hi,
> I did not find any print or echo stetement in the
> sample example before hearder or setcookie function.
> Is there any way to find out what really is causing
> error or trace the program. Actually i am very new to
> this cookies and all stuff. Is there any way of
> tracing the program? I am using it on red hat 7.3.

Read the message php sent.  The answer is there (line 63):

|||
vvv

Warning: Cannot add header information - headers
already sent by (output started at
var/www/html/processing.php:5) in
/var/www/html/common.php on line 63

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




[PHP] Public Scripts in a commercial product

2002-07-29 Thread Chris Boget

If someone is going to be using scripts that they grabbed
from a public forum (PHP Builder, PHPClasses, etc) in a
commercial product (that is going to be compiled with the
Zend encoder and released), what is the protocol, if any?  
Do you have to get permission from the author or anything?
I've read a bit of the GNU Public liscence but I didn't come
away knowing any more than went I started reading it.  So
I figure I'd ask here where I'm sure many of you have this
type of experience.

Chris



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




Re: [PHP] Help Please

2002-07-29 Thread Varsha Agarwal

Hi,
I did not find any print or echo stetement in the
sample example before hearder or setcookie function.
Is there any way to find out what really is causing
error or trace the program. Actually i am very new to
this cookies and all stuff. Is there any way of
tracing the program? I am using it on red hat 7.3.

--- Dennis Moore <[EMAIL PROTECTED]> wrote:
> you cannot print or echo anything back to the
> browser before running the
> header() function...
> 
> 
> 
> 
> - Original Message -
> From: "Varsha Agarwal" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 29, 2002 4:00 PM
> Subject: [PHP] Help Please
> 
> 
> > Hi,
> > I am trying to run a sample program. It connects
> to a
> > postgres database verifies user name and password
> and
> > if correct, displays the login screen.
> > But in that program wherever there there are
> > setcookies() or header() functions, I get
> following
> > error
> >
> > Warning: Cannot add header information - headers
> > already sent by (output started at
> > var/www/html/processing.php:5) in
> > /var/www/html/common.php on line 63
> >
> > I checked the settings of my browser, it can
> accept
> > all cookies.
> > Someone help please!!!
> >
> > __
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > http://health.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] PHP5?

2002-07-29 Thread Chris Boget

In the following article:

http://www.computerwoche.de/index.cfm?pageid=254&artid=38819&category=84

Zeev says that PHP5 is expected as early as 1stQ next year.  Is there anything
anywhere that discusses the new version and any new possible features?

Chris



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




Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford

That's not entirely correct, though.  If you are using output bufferng, then you can.  
Also, for example, say this is your file, with the makeshift line representing the top 
of the text editor:

—Start


—-End

That will produce the same error as before, since a hard return was entered before the 
parser began it's work, therefore finishing the headers and sending the data to the 
client for rendering.  Hope this clears something up :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Dennis Moore" <[EMAIL PROTECTED]> 07/29/02 04:18PM >>>
you cannot print or echo anything back to the browser before running the
header() function...




- Original Message -
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:00 PM
Subject: [PHP] Help Please


> Hi,
> I am trying to run a sample program. It connects to a
> postgres database verifies user name and password and
> if correct, displays the login screen.
> But in that program wherever there there are
> setcookies() or header() functions, I get following
> error
>
> Warning: Cannot add header information - headers
> already sent by (output started at
> var/www/html/processing.php:5) in
> /var/www/html/common.php on line 63
>
> I checked the settings of my browser, it can accept
> all cookies.
> Someone help please!!!
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com 
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>


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



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




Re: [PHP] OT - javascript question..

2002-07-29 Thread Martin Clifford

\n\n";

?>

Something similar will work fine.

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> Kelly Meeks <[EMAIL PROTECTED]> 07/29/02 04:00PM >>>
Sorry for the off topic post, but this is by far the most experienced list I've found.

I've got a php page that show all the .gif and .jpeg files in an directory via a form 
based drop down menu.

On the same page, I've also got a link that opens a new window, and allows the user to 
upload an image to that same directory.

Is there any way, when the upload window is closed, to force a reload of the other 
page, so the dynamic pop-up reflects the recent upload?

Thanks in advance,

Kelly


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




Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford

You can't send headers after the page has left the server.  If you try to write to the 
HTML file in ANY way, even a hard return in your code, then you are telling the server 
that the headers have been completed and should be sent to the client (browser).

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> Varsha Agarwal <[EMAIL PROTECTED]> 07/29/02 04:00PM >>>
Hi,
I am trying to run a sample program. It connects to a
postgres database verifies user name and password and
if correct, displays the login screen.
But in that program wherever there there are
setcookies() or header() functions, I get following
error

Warning: Cannot add header information - headers
already sent by (output started at
var/www/html/processing.php:5) in
/var/www/html/common.php on line 63

I checked the settings of my browser, it can accept
all cookies.
Someone help please!!!

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com 

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



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




Re: [PHP] Help Please

2002-07-29 Thread 1LT John W. Holmes

> Hi,
> I am trying to run a sample program. It connects to a
> postgres database verifies user name and password and
> if correct, displays the login screen.
> But in that program wherever there there are
> setcookies() or header() functions, I get following
> error
>
> Warning: Cannot add header information - headers
> already sent by (output started at
> var/www/html/processing.php:5) in

> /var/www/html/common.php on line 63

Read the error message. Output started at var/www/html/processing.php:5.
that means line 5 of that file output something to the browser, after which,
you cannot send any cookies or headers.

---John Holmes...


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




[PHP] Re: ORDER BY from 2 tables

2002-07-29 Thread Philip Hallstrom

See if your database supports the UNION clause...

On Mon, 29 Jul 2002, Georgie Casey wrote:

> i assume this is a simple question...
>
> how can I SELECT * FROM 2 different tables in the same query, ORDER BYing
> the 'hits' column, which both tables have.
>
> eg, 2 tables i have are similiar and i want to merge them and then select
> everything ordering by hits
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] PHP Consulting Quote Format (fro mprevious discussion)

2002-07-29 Thread Matt Babineau

I seem to remember a previous thread about quotes and how much other
people are charging etc for PHP development. Someone posted a link to a
quote they had recently done, I am looking for a standard format that I
can use to send out my quotes with. Does anyone have anything like this
or remember the thread, I can't seem to find it.
 
Matt Babineau
MCWD / CCFD
-
e:   [EMAIL PROTECTED]
p: 603.943.4237
w:   http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
 



Re: [PHP] Help Please

2002-07-29 Thread Dennis Moore

you cannot print or echo anything back to the browser before running the
header() function...




- Original Message -
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:00 PM
Subject: [PHP] Help Please


> Hi,
> I am trying to run a sample program. It connects to a
> postgres database verifies user name and password and
> if correct, displays the login screen.
> But in that program wherever there there are
> setcookies() or header() functions, I get following
> error
>
> Warning: Cannot add header information - headers
> already sent by (output started at
> var/www/html/processing.php:5) in
> /var/www/html/common.php on line 63
>
> I checked the settings of my browser, it can accept
> all cookies.
> Someone help please!!!
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] Auto Increment Problems....

2002-07-29 Thread cteubner

-Original Message-
>From: Georgie Casey [mailto:[EMAIL PROTECTED]]
>Apart from this looking ugly, it poses another problem. In my PHP script
>where I can add new rows, I query the table, checking how many rows in the
>table altogether and set the new id as the next number, but this doesnt work
>if theres 'holes' in the id field, as the new record tries to overwrite
>another id.

The entire purpose of auto_increment is that you do NOT have to 'set' id when you add 
new records to the field.  Don't reference your 'id' field in the insert statement at 
all.

>So I've 2 questions
>1) Can the next auto_increment value be 'set' by a SQL query

No.  The next auto_increment value is the same as max(id) + 1.  However, just because 
a column is auto_increment doesn't mean you can't specify an id when you add a new 
record, if you like.

>2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the ID
>column??
Not with SQL by itself.  You'd need to SELECT id FROM table, then use PHP to figure 
out how to fill in the hole.

However, none of this should be a problem; simply allow those holes to exist and find 
some other way of numbering your records.


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




[PHP] Help Please

2002-07-29 Thread Varsha Agarwal

Hi,
I am trying to run a sample program. It connects to a
postgres database verifies user name and password and
if correct, displays the login screen.
But in that program wherever there there are
setcookies() or header() functions, I get following
error

Warning: Cannot add header information - headers
already sent by (output started at
var/www/html/processing.php:5) in
/var/www/html/common.php on line 63

I checked the settings of my browser, it can accept
all cookies.
Someone help please!!!

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] Help Please

2002-07-29 Thread Varsha Agarwal

Hi,
I am trying to run a sample program. It connects to a
postgres database verifies user name and password and
if correct, displays the login screen.
But in that program wherever there there are
setcookies() or header() functions, I get following
error

Warning: Cannot add header information - headers
already sent by (output started at
var/www/html/processing.php:5) in
/var/www/html/common.php on line 63

I checked the settings of my browser, it can accept
all cookies.
Someone help please!!!

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] OT - javascript question..

2002-07-29 Thread Kelly Meeks

Sorry for the off topic post, but this is by far the most experienced list I've found.

I've got a php page that show all the .gif and .jpeg files in an directory via a form 
based drop down menu.

On the same page, I've also got a link that opens a new window, and allows the user to 
upload an image to that same directory.

Is there any way, when the upload window is closed, to force a reload of the other 
page, so the dynamic pop-up reflects the recent upload?

Thanks in advance,

Kelly



[PHP] ORDER BY from 2 tables

2002-07-29 Thread Georgie Casey

i assume this is a simple question...

how can I SELECT * FROM 2 different tables in the same query, ORDER BYing
the 'hits' column, which both tables have.

eg, 2 tables i have are similiar and i want to merge them and then select
everything ordering by hits



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




Fw: [PHP] MYSQL natsort() ?

2002-07-29 Thread Kevin Stone

I know that MySQL will do a natural sort on INT fields becuase I often use
an integer for my index.  But I don't know about a FLOAT field.   Seems like
it should doesn't it?  Sorry I don't have a direct answer for you.  You
might want to check www.mysql.com if you haven't already.
-Kevin

- Original Message -
From: "Joel Colombo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 1:27 PM
Subject: [PHP] MYSQL natsort() ?


> This is a mysql question, cause i can do it with a natsort in php.
> question is can u do it directly in the MYSQL SELECT ?
> I am wondering if the SELECT statement can have a natural order by.
>
> Table has 5 rows.
> field name "number"
> values :
> 10
> 2
> 15
> 30
> 150
>
> a regular order by "number": generates results 10,15,150,2,30
>
> i need a natural sort
> 2,10,15,30,150
>
> is there a way to sort FLOAT valuse like this using an order by with a
combo
> of other functions or something ?
>
> Thanks
> Joel
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Auto Increment Problems....

2002-07-29 Thread Georgie Casey

rite,

my primary key column ("id") is set to auto_increment as usual which is very
handy. But when I delete a row, the auto_increment just keeps incrementing
and there's this 'hole' left where I deleted the row!

Apart from this looking ugly, it poses another problem. In my PHP script
where I can add new rows, I query the table, checking how many rows in the
table altogether and set the new id as the next number, but this doesnt work
if theres 'holes' in the id field, as the new record tries to overwrite
another id.

So I've 2 questions
1) Can the next auto_increment value be 'set' by a SQL query
2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the ID
column??

TIA



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




[PHP] MYSQL natsort() ?

2002-07-29 Thread Joel Colombo

This is a mysql question, cause i can do it with a natsort in php.
question is can u do it directly in the MYSQL SELECT ?
I am wondering if the SELECT statement can have a natural order by.

Table has 5 rows.
field name "number"
values :
10
2
15
30
150

a regular order by "number": generates results 10,15,150,2,30

i need a natural sort
2,10,15,30,150

is there a way to sort FLOAT valuse like this using an order by with a combo
of other functions or something ?

Thanks
Joel









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




Re: [PHP] comparing a variable to value in DB

2002-07-29 Thread Kevin Stone

No trust me you're on the right track.  You don't need the double ==
operator in the SQL query.  Try something like this...

$query = "SELECT * FROM membersWHERE username = '$username'";
$result = mysql_query($query, $db);
if (mysql_num_rows($result) == 0)
{
echo "The username $username does not exist.";
exit;
}

To check for blank fields simply ask "... WHERE username = ''".

-Kevin

- Original Message -
From: "Tyler Durdin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 12:46 PM
Subject: [PHP] comparing a variable to value in DB


> I have a column in my DB named username and i am trying to compare a
session
> ID called $username to the field in my DB called username. The way i had
> done it before was SELECT * from tablename WHERE Tablename.username ==
> $username, but this does not seem to be working is there a better way to
do
> this? Also, I would like to know how to tell if a field is blank. For
> example, if  my SELECT statement comes back and there is no data in the
> username column how can i check for this?
>
>
>
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] comparing a variable to value in DB

2002-07-29 Thread Tyler Durdin

I have a column in my DB named username and i am trying to compare a session 
ID called $username to the field in my DB called username. The way i had 
done it before was SELECT * from tablename WHERE Tablename.username == 
$username, but this does not seem to be working is there a better way to do 
this? Also, I would like to know how to tell if a field is blank. For 
example, if  my SELECT statement comes back and there is no data in the 
username column how can i check for this?



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP] Re: Sendmail "return-path" from my virtual webhost

2002-07-29 Thread Joel Boonstra

> Emails sent from my php scripts, using sendmail, all have a goofy
> "return-path" variable in the header.
>
> Is there a way I can correct this, or does it require a change to the
> sendmail config file that I can't get to?

You should be able to use the fifth parameter ("additional parameters")
that was added in PHP 4.0.5 to properly set the envelope-sender, which
will cause the 'Return-Path' header to be set properly.  Quick example:

';
$from = '[EMAIL PROTECTED]';
$subject = 'hey!';
$message = 'This is the message.';
mail($to, $subject, $message, "From: $from", "-f$from");
?>

Note that this doesn't do error checking on the status of the mail()
command -- it's just a quick example.  There also may be sendmail config
things that prevent you from setting the Return-Path in this manner;
that's out of my area of expertise, so if the above doesn't work, I'm
not much more help...

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


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




[PHP] Preg replace & Query Problem

2002-07-29 Thread Alex Beauclair

Hi,

I'm having trouble with preg_replace and a mysql query. Here's my code :

$query = $db->query("SELECT style FROM ".$table_styles." WHERE id = '1'");
$r = $db->fetch_array($query);
$style_1 = $r[style];

$query = $db->query("SELECT id, name, description FROM
".$table_categories."");
while($r = $db->fetch_row($query)) {

 $category_id = $r[0];
 $category_name = $r[1];
 $category_description = $r[2];

 $style_1  = preg_replace('/\[url\]/', "index.php?catID=$category_id",
$style_1);
 $style_1  = preg_replace('/\[title\]/', "$category_name", $style_1);

 echo "$style_1\n";
 echo "\n";

}

This is the schema for $table_styles

++-+-+--
---+
| id | name| description
| style |
++-+-+--
---+
|  1| Title Links | The style for the title links on the main page.
| [title] |
++-+-+--
---+

This is the schema for $table_categories

++--+--+---+
--+
| id | name | description
| picture  | comments |
++--+--+---+
--+
|  1 | PHP  | PHP is a powerful open source language. | icon3.gif   |
0 |
|  2 | ASP  | ASP is microsoft's dynamic web language.| icon2.gif  |
0 |
++--+--+---+
--+

The script should loop and replace [url] and [title] with the relative id
and name from $table_categories, however when it is run, it gives out :

PHP

PHP


I'm really not sure what's going on, can anyone help me ?

Alex





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




Re: [PHP] php.exe from command line

2002-07-29 Thread Evan

I didn't thought about this, but it's logic (as always).

However I solved my problem:
I've developed a really simple program with C++Builder6 (only ~15 lines of
code :-P) that every X seconds calls the php file (agent.php).
And finally it works!

Thanks for your help,
Evan

<[EMAIL PROTECTED]> ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Simple.  Parameters of the type you described, with the ?, = and &, etc. are
specific to URLs and are handled by CGI, common gateway interface, i.e. the
web server.  See the PHP documentation on $argc[] and $argv[] if you want to
pass parameters on the command line.

http://us2.php.net/manual/en/features.commandline.php

Your question mark directly after the file name is confusing DOS.
Parameters on the DOS command line need to be separated from the file name
by a space.

Essentially, $argc is your argument count and $argv is an array of the
values of the arguments.

You won't be able to use $_GET when working with variables from the command
line.  It wouldn't be wise to design one script that works from either the
command line or the web browser, plus it would be a major pain in the ass.

Luck,
Colin Teubner

-Original Message-
From: Evan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 1:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php.exe from command line


I've made a simple php file that creates a file named 'agent_1.txt' where
the number is taken from $_GET["num"].

I've tried to run it in this way:
http://localhost/agent.php?num=1
And it works perfectly

I thought that from from command line it would work so i tried this (WinXP +
PHP 4.1.2):

c:\php\php.exe c:\Inetpub\webpub\PHP\agent.php?num=1

BUT IT DOESN'T WORK! ?

Can someone help, please?
Thenks in advance,
Evan



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




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




[PHP] Re: need help with uploading images

2002-07-29 Thread Deadsam

maybe it would be easier to show you the part of code I'm using,

echo $HTTP_POST_FILES['uploadFile']['size'] . "::".
$HTTP_POST_FILES['uploadFile']['name']['type'] . "::";
echo $HTTP_POST_FILES['uploadFile']['name'] . "::".
$HTTP_POST_FILES['uploadFile']['tmp_name'];

*/
?>
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How would I do this?

2002-07-29 Thread Tony Harrison

Hi. I have a problem with my tab/lyric site, I need to create an artist
page, where users can view all lyrics/tabs by a certain artist.
Now because im likely to get guitar/drum/bass tabs / lyrics for the same
song, I want to have a table with links as follows (e.g):

Blink 182
-

Whats my age again?GuitarBassDrumLyricsBuy
at Amazon.
DammitGuitarBassDrumLyrics
Buy at Amazon.
MnMs GuitarBassDrumLyrics
Buy at Amazon.

Now I know this would be simpler if I had them in different tables, but I
have my reasons why I dont.
Here is the setup of the table for storing tabs/lyrics..

CREATE TABLE `resources` (
`id` INT NOT NULL AUTO_INCREMENT,
`type` TEXT NOT NULL,
`title` VARCHAR(100) NOT NULL,
`content` TEXT NOT NULL,
`user_id` INT NOT NULL,
`rating` INT DEFAULT '5' NOT NULL,
`views` INT DEFAULT '0' NOT NULL,
`date` TIMESTAMP NOT NULL,
`artist_id` TEXT,
`amazon` TEXT,
INDEX (`id`),
UNIQUE (`id`)
);

I was thinking I could extract data and shove it into a temporary table, but
that just creates other problems, I think. Anyone got any suggestions?
Please?



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




Re: [PHP] php.exe from command line

2002-07-29 Thread cteubner

Simple.  Parameters of the type you described, with the ?, = and &, etc. are specific 
to URLs and are handled by CGI, common gateway interface, i.e. the web server.  See 
the PHP documentation on $argc[] and $argv[] if you want to pass parameters on the 
command line.  

http://us2.php.net/manual/en/features.commandline.php

Your question mark directly after the file name is confusing DOS.  Parameters on the 
DOS command line need to be separated from the file name by a space.

Essentially, $argc is your argument count and $argv is an array of the values of the 
arguments.

You won't be able to use $_GET when working with variables from the command line.  It 
wouldn't be wise to design one script that works from either the command line or the 
web browser, plus it would be a major pain in the ass.

Luck,
Colin Teubner

-Original Message-
From: Evan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 1:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php.exe from command line


I've made a simple php file that creates a file named 'agent_1.txt' where
the number is taken from $_GET["num"].

I've tried to run it in this way:
http://localhost/agent.php?num=1
And it works perfectly

I thought that from from command line it would work so i tried this (WinXP +
PHP 4.1.2):

c:\php\php.exe c:\Inetpub\webpub\PHP\agent.php?num=1

BUT IT DOESN'T WORK! ?

Can someone help, please?
Thenks in advance,
Evan



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


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




Re: [PHP] php.exe from command line

2002-07-29 Thread Andrey Hristov

Inspect $argc & $argv arrays (var_dump() them).


Andrey

- Original Message -
From: "Evan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 8:06 PM
Subject: [PHP] php.exe from command line


> I've made a simple php file that creates a file named 'agent_1.txt' where
> the number is taken from $_GET["num"].
>
> I've tried to run it in this way:
> http://localhost/agent.php?num=1
> And it works perfectly
>
> I thought that from from command line it would work so i tried this (WinXP
+
> PHP 4.1.2):
>
> c:\php\php.exe c:\Inetpub\webpub\PHP\agent.php?num=1
>
> BUT IT DOESN'T WORK! ?
>
> Can someone help, please?
> Thenks in advance,
> Evan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




[PHP] php.exe from command line

2002-07-29 Thread Evan

I've made a simple php file that creates a file named 'agent_1.txt' where
the number is taken from $_GET["num"].

I've tried to run it in this way:
http://localhost/agent.php?num=1
And it works perfectly

I thought that from from command line it would work so i tried this (WinXP +
PHP 4.1.2):

c:\php\php.exe c:\Inetpub\webpub\PHP\agent.php?num=1

BUT IT DOESN'T WORK! ?

Can someone help, please?
Thenks in advance,
Evan



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




[PHP] Sendmail "return-path" from my virtual webhost

2002-07-29 Thread Al

Emails sent from my php scripts, using sendmail, all have a goofy 
"return-path" variable in the header.

Is there a way I can correct this, or does it require a change to the 
sendmail config file that I can't get to?

Thanks...


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




RE: [PHP] Disturbing parsing problems

2002-07-29 Thread cteubner

Sorry to double-post but this brought up something I didn't realize wasn't clear in my 
original post.  When I say:
if () ;
I am using the one-line if/elseif/else syntax, which works like this:

if($foo) echo $bar;
elseif($x) echo $y;
else echo $z;

This is a self-contained if statement, as in C, which needs no colon or braces.  This 
is the first mentioned syntax for if() in the PHP documentation.  However, just to be 
100% sure, I used braces anyway and still suffered the same problem.

I'm coding in Dreamweaver MX and all of the {}s appear the appropriate color, and seem 
to be in the appropriate places when I use the balance braces command. (ctrl+' for the 
uninitiated)
Thanks,
Colin Teubner


-Original Message-
From: Steve Edberg [mailto:[EMAIL PROTECTED]]
I assume you mean

if () :
else if ():
else :

here (colon instead of semicolon)? AFAIK PHP doesn't allow the 
alternative syntax -

http://php.he.net/manual/en/control-structures.alternative-syntax.php

- with semicolons. Or do you really mean

if () {}
else if () {}
else {}

If you are using the alternative syntax, I recall several messages 
about people having problems nesting both forms of syntax. Try using 
all one style or the other.

Lastly, quadruple check that you haven't accidentally quoted or 
double-quoted a { or ( or something that you THOUGHT was part of PHP 
code; syntax highlighting editors can definitely help here.

-steve


> if () {}
> if () {
> if {
> }
> // }
> if () {
> if {
> }
> // }
> } while ();
> if() {} //(4x)
>}
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| The end to politics as usual:  |
| The Monster Raving Loony Party (http://www.omrlp.com/) |
++

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




Re: [PHP] Disturbing parsing problems

2002-07-29 Thread Steve Edberg

At 12:19 PM -0400 7/29/02, <[EMAIL PROTECTED]> wrote:
>   I added a few number_format() statements to previously working code (not
>having changed any {}s ) and it started getting parse errors, 'unexpected
>t_if, expected t_while'.  In other words, it thinks the do statement shown
>below has been closed, and wants to hear about the while part.
>
> I checked over the sets of braces about 10 times, but the only way to
>fix it ended up being to have an uneven number of braces - two close braces
>needed eliminating.  I'm not going to post all the code unless it's
>necessary but here is the basic control structure.  I've shown here what
>braces I commented out.  All of the below is escaped in and out of HTML many
>times.
>
> PHP 4.2.2 on Windows 2000 Professional.  Is this a bug, or have people
>experienced weird problems with braces before?
>
>Regards,
>Colin Teubner
>
>if (){
> do {
> if (){
> while () {}
> if () ;
> else if ();
> else ;
> }


I assume you mean

if () :
else if ():
else :

here (colon instead of semicolon)? AFAIK PHP doesn't allow the 
alternative syntax -

http://php.he.net/manual/en/control-structures.alternative-syntax.php

- with semicolons. Or do you really mean

if () {}
else if () {}
else {}

If you are using the alternative syntax, I recall several messages 
about people having problems nesting both forms of syntax. Try using 
all one style or the other.

Lastly, quadruple check that you haven't accidentally quoted or 
double-quoted a { or ( or something that you THOUGHT was part of PHP 
code; syntax highlighting editors can definitely help here.

-steve


> if () {}
> if () {
> if {
> }
> // }
> if () {
> if {
> }
> // }
> } while ();
> if() {} //(4x)
>}
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| The end to politics as usual:  |
| The Monster Raving Loony Party (http://www.omrlp.com/) |
++

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




  1   2   3   >