[PHP] newbie question: how to recompile PHP?

2002-04-01 Thread Bogdan Popescu

Hello all,

  I hope my newbie question don't bother you
  too much.

  I've downloaded the latest PHP for windows
  but when I try to use it I get a message
  that I have to re-compile it.

("You may disable this restriction by recompiling the PHP binary
with the --disable-force-cgi-redirect switch.")

  Can anybody tell me how to recompile PHP?
  I suppose I need the sources and a compiler,
  where from I can get them?

-- 
Many thanks in advance,
Bogdan  mailto:[EMAIL PROTECTED]


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




Re: [PHP] Experiences with vPopmail functions?

2002-04-01 Thread Jason Wong

On Monday 01 April 2002 15:35, Johannes Tyra [BrainData] wrote:
> Hi,
>
> has anybody experiences with the vpopmail functions in php?
>
> If I use these functions (I´m sure there are compiled correctly into php) I
> get errors over errors.
> (Unable to change into /vpopmail/domains/domain dir etc)

It's probably a permissions problem. Your php script is running as the user 
which runs your webserver. To get into the vpopmail directories it needs to 
be run as your vpopmail user.


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

/*
Often statistics are used as a drunken man uses lampposts -- for support
rather than illumination.
*/

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




[PHP] Re: Help with nested if statements, is this possible?

2002-04-01 Thread martinahingis

if ($payment_status = "Completed")
if you do this your if statement is invalid
You should do

if ($payment_status == "Completed")
I mean you should use double '=' inorder to say 'equals'.

"Jim Hankins" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Here is a portion of a work in progress, I tested by sending the script
with
> a payment status of incomplete yet it still executed other portions of the
> code. Should it not have jumped out.  Or is my nested if invalid for some
> reason?
>
> if ($payment_status = "Completed")
> {
> echo "1st if is passed";
> // check that txn_id has not been previously processed
>
> $db_conn = mysql_connect("localhost:/var/lib/mysql/mysql.sock", "apache",
> "xxx");
>   mysql_select_db("telnetlabs", $db_conn);
>   $query = "select pp_txn_id from orders "
>."where pp_txn_id ='.$txn_id.' ";
>   $result = mysql_query($query, $db_conn);
>   echo "This is the result of 1st query";
>   echo $result;
>   echo "";
>   $num_results = mysql_num_rows($result);
>   echo $num_results;
>
> if ($num_results)
> {
> }
> else {
>
>   echo "2nd if is passed";
>   $query = "select cust_email from customers "
>."where cust_email = '$payer_mail' ";
>   $result = mysql_query($query, $db_conn);
>   $num_results = mysql_num_rows($result);
>
> if ($num_results)
> {
> }
> else
> {
> echo "3rd if is passed";
> $item_name=addslashes($item_name);
> $receiver_email=addslashes($receiver_email);
> $item_number=addslashes($item_number);
> $invoice=addslashes($invoice);
> $payment_status=addslashes($payment_status);
> $payment_gross=addslashes($payment_gross);
> $txn_id=addslashes($txn_id);
> $payer_email=addslashes($payer_email);
> $payer_status=addslashes($payer_status);
> $first_name=addslashes($first_name);
> $last_name=addslashes($last_name);
> $address_status=addslashes($address_status);
> $address_street=addslashes($address_street);
> $address_city=addslashes($address_city);
> $address_state=addslashes($address_state);
> $address_country=addslashes($address_country);
> echo $first_name;
> echo $last_name;
> echo $address_street;
> echo $address_city;
> echo $address_state;
> echo $address_status;
> echo $address_zip;
> echo $payer_status;
> echo $item_name;
> echo $receiver_email;
> echo $item_number;
> echo $invoice;
> echo $payment_status;
> echo $address_country;
>
> //$query = "insert into customers values ('"null"', '".$first_name."',
> '".$last_name."', '".$address_street."', '".$address_city."' ,
> '".$address_state."', '".$address_status."', '".$payer_email."' ,
> '".$payer_status."', '".$payer_email."' , '".$txn_id."', '"1"')";
> // check that receiver_email is an email address in your PayPal account
> // check that payer_email doesn't already exist in customer database
> // if exist, increment customer.balanace by 1
> // if not exist, create user and increment balance by 1
> // then send schedule email with userid and password
> // process payment
> // first stab does none of the processes above, just emails the customer
and
> us for testing
> mail ("[EMAIL PROTECTED]", "order info", trim($mailcontent), "From:
> [EMAIL PROTECTED]", "[EMAIL PROTECTED]");
> mail ($payer_email, "Your Order", $custconfirmation, "From:
> [EMAIL PROTECTED]", "[EMAIL PROTECTED]");
> }
> }
> }
> ?>
>
>



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




[PHP] Programming Methodology Question

2002-04-01 Thread jon

Hey --

I have a question for ya'll.

I'm writing a fairly substantial program which allows listing of items like
real estate, car ads, etc... on the web. Overall, it looks like it'll be
around 5-7000 lines long.

I was thinking about putting the main guts of it into one big include file
to make it easier to upgrade when we release new versions. Is that
problematic, to have a php file that large? (I mean, I know it's not THAT
big.) Should I break it into separate files, maybe just make a folder
replaceable?

Thanks,
-- jon



-
jon roig
jon at jonroig.com
project manager, OpenListings
http://jonroig.com



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




[PHP] Problems reading a URL

2002-04-01 Thread Stephen Phillips

Hi,
I'm working on a script to read in the results from a search engine and find out a 
website's position in the results.  I've run into some problems trying to read the 
results in from google, it seems no matter how I try to open the page in php it still 
won't read the results.  I've tried using different functions to read the page, but 
all with no luck, it seems that php thinks the page doesn't exist.  If anyone has any 
experience of a similar problem reading a file, or has any idea's on how to get it to 
read (maybe I missed something obvious), please let me know,

Here's some examples of what I've tried so far,

example 1

$fp = @fopen("http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N","r";);
if ($fp)
{ print"The file exists!";

$contents = fread ($fp,"10");

echo $contents;

 }
else
{ print"The file does not exist"; }

example 2

$contents = @join ('', file 
('http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N'));
if(isset($contents)){
echo $contents;
}
else{
echo "The file does not exist";
}

I've avoided using functions like readfile, and fpassthru since they dump the file to 
output imediately, and I want to get the page as a string I can search.  Hope somone 
has some idea's on this,

Thanks,

Steve.




[PHP] Re: FREE HOSTING

2002-04-01 Thread martinahingis

try http://free-php.cjb.net there is a list of free php, mysql hosts and
analysises of them

"Dani" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm just wondering if anybody know if there is a free web hosting with
> MYSQL and PHP. I don't need a hugh space. mya be I need only 50Meg (for
> practise my PHP)
>
> thanks!
>
> regards,
> Dani
>



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




[PHP] Forum with PHP, without using mySQL..

2002-04-01 Thread MiXmAsTeR

Hi, I run a Sports site.

And need a forum, in php, that dosen't use mySQL.

Anyone know any good, without any advertice, exept some from the one who
made it ?

From

Kjetil Tveit



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




Re: [PHP] Forum with PHP, without using mySQL..

2002-04-01 Thread James Arthur

On Monday 01 Apr 2002 12:44, MiXmAsTeR wrote:
> Hi, I run a Sports site.
>
> And need a forum, in php, that dosen't use mySQL.
>
> Anyone know any good, without any advertice, exept some from the one who
> made it ?

PHPBB v2.x and OpenBB can run on top of PostgreSQL 7.x

--jaa

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




Re: [PHP] Forum with PHP, without using mySQL..

2002-04-01 Thread eric.coleman

phpBB v2.x can run on alot of db's

MS Access
MS SQL Server...
MySQL
DB2
Postgre

And a few others i think...

- Original Message -
From: "James Arthur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 8:58 AM
Subject: Re: [PHP] Forum with PHP, without using mySQL..


> On Monday 01 Apr 2002 12:44, MiXmAsTeR wrote:
> > Hi, I run a Sports site.
> >
> > And need a forum, in php, that dosen't use mySQL.
> >
> > Anyone know any good, without any advertice, exept some from the one who
> > made it ?
>
> PHPBB v2.x and OpenBB can run on top of PostgreSQL 7.x
>
> --jaa
>
> --
> 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] Problems reading a URL

2002-04-01 Thread Jason Wong

On Monday 01 April 2002 21:22, Stephen Phillips wrote:
> Hi,
> I'm working on a script to read in the results from a search engine and
> find out a website's position in the results.  I've run into some problems
> trying to read the results in from google, it seems no matter how I try to
> open the page in php it still won't read the results.  I've tried using
> different functions to read the page, but all with no luck, it seems that
> php thinks the page doesn't exist.  If anyone has any experience of a
> similar problem reading a file, or has any idea's on how to get it to read
> (maybe I missed something obvious), please let me know,
>
> Here's some examples of what I've tried so far,
>
> example 1
>
> $fp =
> @fopen("http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N";
>,"r"); if ($fp)
> { print"The file exists!";

Google is probably trying to give you a cookie. You can verify this by trying 
various sites that are known to send cookies and then again with sites that 
don't.

You may need to use something more sophisticated like curl, or write your own 
function(s) based on fsockopen().


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

/*
Men take only their needs into consideration -- never their abilities.
-- Napoleon Bonaparte
*/

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




RE: [PHP] Problems reading a URL

2002-04-01 Thread Rick Emery

You want Snoopy:  http://snoopy.sourceforge.com


-Original Message-
From: Stephen Phillips [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Problems reading a URL


Hi,
I'm working on a script to read in the results from a search engine and
find out a website's position in the results.  I've run into some problems
trying to read the results in from google, it seems no matter how I try to
open the page in php it still won't read the results.  I've tried using
different functions to read the page, but all with no luck, it seems that
php thinks the page doesn't exist.  If anyone has any experience of a
similar problem reading a file, or has any idea's on how to get it to read
(maybe I missed something obvious), please let me know,

Here's some examples of what I've tried so far,

example 1

$fp =
@fopen("http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N";,
"r");
if ($fp)
{ print"The file exists!";

$contents = fread ($fp,"10");

echo $contents;

 }
else
{ print"The file does not exist"; }

example 2

$contents = @join ('', file
('http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N'));
if(isset($contents)){
echo $contents;
}
else{
echo "The file does not exist";
}

I've avoided using functions like readfile, and fpassthru since they dump
the file to output imediately, and I want to get the page as a string I can
search.  Hope somone has some idea's on this,

Thanks,

Steve.


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




RE: [PHP] Problems reading a URL

2002-04-01 Thread Rick Emery

It's been moved:  http://sourceforge.net/projects/snoopy/

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 8:08 AM
To: 'Stephen Phillips'; [EMAIL PROTECTED]
Subject: RE: [PHP] Problems reading a URL


You want Snoopy:  http://snoopy.sourceforge.com


-Original Message-
From: Stephen Phillips [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Problems reading a URL


Hi,
I'm working on a script to read in the results from a search engine and
find out a website's position in the results.  I've run into some problems
trying to read the results in from google, it seems no matter how I try to
open the page in php it still won't read the results.  I've tried using
different functions to read the page, but all with no luck, it seems that
php thinks the page doesn't exist.  If anyone has any experience of a
similar problem reading a file, or has any idea's on how to get it to read
(maybe I missed something obvious), please let me know,

Here's some examples of what I've tried so far,

example 1

$fp =
@fopen("http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N";,
"r");
if ($fp)
{ print"The file exists!";

$contents = fread ($fp,"10");

echo $contents;

 }
else
{ print"The file does not exist"; }

example 2

$contents = @join ('', file
('http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N'));
if(isset($contents)){
echo $contents;
}
else{
echo "The file does not exist";
}

I've avoided using functions like readfile, and fpassthru since they dump
the file to output imediately, and I want to get the page as a string I can
search.  Hope somone has some idea's on this,

Thanks,

Steve.


-- 
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] Problems reading a URL

2002-04-01 Thread J. Scott Johnson

Just as an aside, sourceforge seems to have changed the url.  Its now:

http://sourceforge.net/projects/snoopy/

(I was interested too).

Scott

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 9:12 AM
To: 'Stephen Phillips'; [EMAIL PROTECTED]
Subject: RE: [PHP] Problems reading a URL


It's been moved:  http://sourceforge.net/projects/snoopy/

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 8:08 AM
To: 'Stephen Phillips'; [EMAIL PROTECTED]
Subject: RE: [PHP] Problems reading a URL


You want Snoopy:  http://snoopy.sourceforge.com


-Original Message-
From: Stephen Phillips [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Problems reading a URL


Hi,
I'm working on a script to read in the results from a search engine and
find out a website's position in the results.  I've run into some problems
trying to read the results in from google, it seems no matter how I try to
open the page in php it still won't read the results.  I've tried using
different functions to read the page, but all with no luck, it seems that
php thinks the page doesn't exist.  If anyone has any experience of a
similar problem reading a file, or has any idea's on how to get it to read
(maybe I missed something obvious), please let me know,

Here's some examples of what I've tried so far,

example 1

$fp =
@fopen("http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N";,
"r");
if ($fp)
{ print"The file exists!";

$contents = fread ($fp,"10");

echo $contents;

 }
else
{ print"The file does not exist"; }

example 2

$contents = @join ('', file
('http://www.google.com/search?q=$keywords&num=10&hl=en&start=1&sa=N'));
if(isset($contents)){
echo $contents;
}
else{
echo "The file does not exist";
}

I've avoided using functions like readfile, and fpassthru since they dump
the file to output imediately, and I want to get the page as a string I can
search.  Hope somone has some idea's on this,

Thanks,

Steve.


--
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] Processing Code created on the fly

2002-04-01 Thread Erik Price


On Friday, March 29, 2002, at 11:39  PM, Jonathan Duncan wrote:

> I have read the page for eval on php.net
> several times as well as the very helpful examples, but whenever I use 
> eval,
> it just prints out the same stuff.  By same stuff I mean wether I use 
> eval
> or just the variable by itself it just prints out the contents of the
> variable.  In the web page source it looks as if the contents were 
> merely
> echoed because it still has the $'s and variable names.  Any other 
> ideas or
> examples on how to implement eval on this?

eval() can let your variable contain PHP code in addition to simple text 
or HTML.  That's what makes it different from just "echoing back the 
text".  So you could do

$print_statement = "print('test');";

eval($print_statement);
// the output is "test", not "print('test');"

I just learned this function myself.


HTH,

Erik






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


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




Re: [PHP] Forum with PHP, without using mySQL..

2002-04-01 Thread Andrew Brampton

If you can use CGI there are 100s of perl ones, like UBB which don't use a
database engine

Andrew
- Original Message -
From: "MiXmAsTeR" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 12:44 PM
Subject: [PHP] Forum with PHP, without using mySQL..


> Hi, I run a Sports site.
>
> And need a forum, in php, that dosen't use mySQL.
>
> Anyone know any good, without any advertice, exept some from the one who
> made it ?
>
> From
>
> Kjetil Tveit
>
>
>
> --
> 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] Problem with CGI mode

2002-04-01 Thread James Arthur

Hi

I need to run some pages on my site in CGI mode for security reasons.

I've put #!/usr/local/bin/php at the top of the script in question, and given 
it the .cgi extension so that apache treats it as a CGI. The script works, 
but the first thing it does is print out #!/usr/local/bin/php, because that's 
the first line of the script. If I remove that line, I get an internal server 
error, because apache doesn't know where php is located.

Does anyone have any ideas?

--jaa

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




[PHP] Using PHP to access an AS 400 database

2002-04-01 Thread Rance Hall

I'd like to find a way to get my PHP driven web site to connect to an AS 400 database

The machine that is running php does have client access to the AS 400.

I'm trying to port some old MS Excel spreadsheets over to our intranet..

any thoughts much appreciated.

Rance

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




[PHP] Has anyone looked at phpinfo today?

2002-04-01 Thread James Arthur



Notice anything different?

--jaa

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




Re: [PHP] Sql results

2002-04-01 Thread Erik Price


On Saturday, March 30, 2002, at 06:29  PM, Alberto Wagner wrote:

> $Sql_Query_Login = Mysql_Query("SELECT Nome FROM users WHERE User = 
> 'Anyone'")
>
> There isn't a user if name Anyone...
>
> Why
>
> If (!$Sql_Query_Login) {
>Echo "Ninguem";
> }
>
> Is returning False?

The query is succeeding, it's just returning an empty set.  Try

if (!$Sql_Query_Login) {
   echo "query failed";
} else {
   if ($sql_Query_Login == "") {
 echo "empty result set";
   } else {
 // do what you want with the results
   }
}


Erik






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


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




Re: [PHP] Has anyone looked at phpinfo today?

2002-04-01 Thread Tyler Longren

hm.  I've seen that before by appending something to the end of the url
(not sure what though).

Tyler

- Original Message -
From: "James Arthur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 8:46 AM
Subject: [PHP] Has anyone looked at phpinfo today?


> 
>
> Notice anything different?
>
> --jaa
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Using PHP to access an AS 400 database

2002-04-01 Thread Geoff Hankerson

Any way to use ODBC?? Just a thought
- Original Message -
From: "Rance Hall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 8:37 AM
Subject: [PHP] Using PHP to access an AS 400 database


> I'd like to find a way to get my PHP driven web site to connect to an AS
400 database
>
> The machine that is running php does have client access to the AS 400.
>
> I'm trying to port some old MS Excel spreadsheets over to our intranet..
>
> any thoughts much appreciated.
>
> Rance
>
> Rance Hall
> 308.238.2455
> Internal Office Extensions: 2455 or 6655
> PC Programmer, The Buckle, Inc.
> [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] Re: Help with nested if statements, is this possible?

2002-04-01 Thread Hugh Bothwell

... an old C trick: when comparing a variable to a
constant, put the constant first, ie

if ("Completed" == $payment_status) {
}

that way, if you accidentally use 'assignment-equals'
instead of 'equivalence-equals', you get a syntax error.


"Martinahingis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if ($payment_status = "Completed")
> if you do this your if statement is invalid
> You should do




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




Re: [PHP] register_globals

2002-04-01 Thread Erik Price


On Sunday, March 31, 2002, at 04:05  AM, Liam wrote:

> at the moment I have register_globals set to "on"
> Is there any reason I should turn it off?
>
> What are the security risks of having them on?

I once asked this exact question, and here is the response I got -- I 
found it very helpful:

> Give this a read first, then come back if you still have questions ;)
>
> http://www.securereality.com.au/studyinscarlet.txt
>
> Kirk


Erik




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


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




[PHP] Problems reading a URL

2002-04-01 Thread Stephen Phillips

Thanks everyone,
Snoopy looks just like what I need to use, if only I'd known about this sooner, I 
could have saved myself alot of time :)

Steve.



Re: [PHP] ask for suggestion about printing

2002-04-01 Thread Erik Price


On Sunday, March 31, 2002, at 02:02  PM, [EMAIL PROTECTED] wrote:

> We are choosing some tools for building applications. Php is a very 
> good tools to
> build web applications, but we don't know if it can generate printable
> reports. "Printable reports" mean the report you can print what you see 
> on screen
> (like winword).
>
> We are asking if at here, there are good solutions to generate reports. 
> Simply
> generate html files and print them are not good solutions to us, 
> becuase you have
> to remove header / footer of html files, and html files seems not to be 
> used for
> printing.
>
> We know we can use pdflib to generate pdf files, but it is very 
> expensive (at
> least US $1,000) .
>
> If there are no other ways, we will be forced to use the old 
> client-server approach
> again because printing report is very important to us.

If you use XML instead of HTML, you could perform one XSLT process to 
create HTML for the online version and another XSLT process to create a 
file in any other format to create the print version.


Erik






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


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




Re: [PHP] register_globals

2002-04-01 Thread Rasmus Lerdorf

You would be better off reading the security chapter in the PHP
documentation.  It is much better informed than that study-in-scarlet
thing.

On Mon, 1 Apr 2002, Erik Price wrote:

>
> On Sunday, March 31, 2002, at 04:05  AM, Liam wrote:
>
> > at the moment I have register_globals set to "on"
> > Is there any reason I should turn it off?
> >
> > What are the security risks of having them on?
>
> I once asked this exact question, and here is the response I got -- I
> found it very helpful:
>
> > Give this a read first, then come back if you still have questions ;)
> >
> > http://www.securereality.com.au/studyinscarlet.txt
> >
> > Kirk
>
>
> Erik
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] ask for suggestion about printing

2002-04-01 Thread Michael Kimsal

Eric Coleman wrote:
> This can be done easily...
> 
> And since when does PDFLIB cost money? I thought it was free...


PDFLIB isn't free.

A commercial PDFlib license is required for all uses of the software 
which are not explicitely covered by the Aladdin Free Public License 
(see bottom), for example:

? shipping a commercial product which contains PDFlib
? distributing (free or commercial) software based on PDFlib when the 
source code is not made available
? implementing commercial Web services with PDFlib




? you may develop free software with PDFlib, provided you make all of 
your own source code publicly available
? you may develop software for your own use with PDFlib as long as you 
don't sell it
? you may redistribute PDFlib non-commercially
? you may redistribute PDFlib on digital media for a fee if the complete 
contents of the media are freely redistributable.


It's fine for some situations, but it's not *free* for all uses.
There are actually quite a number of scenarios I come across
where PDFLIB isn't a 'free' package, but requires someone to pay.
"implementing commercial Web services with PDFlib" is pretty wide
open, imo.


Michael Kimsal
http://www.phphelpdesk.com
PHP support when you need it
734-480-9961


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




Re: [PHP] Issues with long SQL inserts

2002-04-01 Thread Chris Snyder

Jason Wong wrote:
> On Monday 01 April 2002 07:22, Chris Snyder wrote:
> 
> 
> 
>>I altered the add.php script to print the query to screen instead of
>>sending it to MySQL to try this.  It still acted the same, regardless of
>>whether it was sending it to the MySQL server or printing it.  In fact,
>>it even had the same reaction when I commented out the print command as
>>well.  This appears to be something in the form-handling of PHP.  Any
>>ideas now?  Thanks for all your help.
> 
> 
> Are you using POST or GET for your form? Both have a limit on how much data 
> you can send with GET having a lower limit than POST. So if you were using 
> GET then try using POST. Both limits are, I think, browser dependent.
> 
> 

I'm using POST.  I'm using Mozilla 0.9.9 - maybe it has a low limit or 
something?  I'll search their bug database and see if anything turns up.


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




Re: [PHP] IMPORTANT question for anyone using XSLT

2002-04-01 Thread Erik Price


On Friday, March 29, 2002, at 01:56  PM, Erik Price wrote:

> My, there have been a lot of questions about XSLT in the past 24 hrs... 
> admittedly most of them coming from me.  In addition to my first 
> question (repeated below for clarity), I have a second one -- how do I 
> perform an XSLT transformation on multiple XML documents?  Do I need to 
> perform a separate XSLT transformation on each one?  The reason I ask 
> is b/c I am pulling my XML from a DB, so there may be more than one 
> based on the results from the query.  If anyone can answer this, that'd 
> be great.

I did discover over the weekend that it is possible to use a single XSLT 
stylesheet to perform a transformation on multiple XML documents, but 
this requires that each XML document have its own URI to do so -- 
obviously this won't work in my case, since I'm pulling the XML 
documents as multiple results from a database query.  So that option is 
out.

I have thought about this problem and the answer is simple -- no, there 
is no way to perform a single XSLT transformation on multiple 
concatenated XML documents if those documents contain XML declarations 
at the top of them.  Why?  Because multiple concatenated XML documents 
with XML declarations != a well-formed XML document, which is a 
prerequisite for the XSLT processor.  (Essentially, the processor didn't 
like encountering a second XML declaration in the concatenated string, 
since a rule of well-formedness is that if there are any XML 
declarations, there can be only one and there cannot be any characters 
before that declaration in the document.)

So that leaves me with this question -- (A) should I run the XSLT 
process on each individual result that comes from the query?  (B) Or 
should I concatenate the XML documents as I have, use substr_replace() 
to change all XML declarations to "", and then prepend a single XML 
declaration to the beginning of the string and perform the 
transformation on this new string?


Much thanks to Sean Scanlon for showing me how to create HTML attributes 
from XML with XSLT.



Erik





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

> From: Erik Price <[EMAIL PROTECTED]>
> Date: Fri Mar 29, 2002  01:56:55  PM US/Eastern
> To: [EMAIL PROTECTED]
> Subject: [PHP] IMPORTANT question for anyone using XSLT
>
> My, there have been a lot of questions about XSLT in the past 24 hrs... 
> admittedly most of them coming from me.  In addition to my first 
> question (repeated below for clarity), I have a second one -- how do I 
> perform an XSLT transformation on multiple XML documents?  Do I need to 
> perform a separate XSLT transformation on each one?  The reason I ask 
> is b/c I am pulling my XML from a DB, so there may be more than one 
> based on the results from the query.  If anyone can answer this, that'd 
> be great.
>
> If not, perhaps you can help with this situation, which I believe will 
> probably plague just about any PHP programmer who will ever use XSLT 
> with PHP (or possibly any other language):
>
> I am still unsure of the best way to mix PHP & [X]HTML together in an 
> XSLT stylesheet, because regardless of whether you specify the output 
> method as "text" or "xml", if you are using HTML tags they must be 
> well-formed, because Sablotron or expat (not sure which) will want the 
> XSLT stylesheet to be a well-formed document.  Only, we often interrupt 
> our HTML code when using PHP, like this:
>
> $output_to_browser = "Go";
> $output_to_browser .= "home";
>
> (of course, the output to the browser will by a hyperlink to index.php 
> that says "Go home".)
>
> The above looks fine as PHP code, but if you try to manipulate the data 
> from an XSLT process in this fashion, you won't be able to use HTML 
> tags -- the greater-than and less-than symbols can't be used, since an 
> XSLT sheet is technically an XML document and these are not well-formed 
> tags.  In the XSLT sheet, the above might look like:
>
> 
>  ">Go Home
> 
>
> I thought that perhaps if I specified text as the output method, then 
> the greater-than and less-than signs wouldn't be parsed, so I could use 
> them as such:
>
> 
>
> 
>  
>
>  
>">Go Home
>  
> 
>
> See what's happening in the above?  I thought I had "escaped" my  
> tags by placing them within the  tags, but this is not so -- 
> they are parsed, and the document is then interpreted as not being 
> well-formed.
>
>
> So unless you want to do a straight XML-to-XML or XML-to-XHTML 
> transformation, OR you don't want to use ANY XML or XHTML tags in your 
> output document, you're kind of up a river.  Unless someone on this 
> list can help me find a way to "escape" the HTML tags when creating PHP 
> code.
>
> And the only way I can think of doing it (which I still haven't tested, 
> but might have to use) is to use variables to represent the HTML tags 
> so that instead of
>
> Go Home
>
> I could use
>
> $astartag = "Go Home";
>
> and then make the style sheet like th

[PHP] Recommendation for PHP Shopping Cart

2002-04-01 Thread jeremy spielmann

I'm looking for an off the shelf shopping cart that has been developed in PHP.  Please 
send me the link and the cost of the software.

I would develop my own, but time is an issue.

Thanks!

Jeremy

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




[PHP] Please help with code

2002-04-01 Thread Denis L. Menezes

Hello friends,

can someone tell me what is wrong with this code :



  

  
   

  
   

  
  

  
   

  
  




It gives the link ID. But then gives "error adding row"

Thanks in advance

Denis


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




Re: [PHP] Recommendation for PHP Shopping Cart

2002-04-01 Thread Jason Sheets

look at www.hotscripts.com

they are a pretty good resource of scripts.

Jason
- Original Message -
From: "jeremy spielmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 9:13 AM
Subject: [PHP] Recommendation for PHP Shopping Cart


> I'm looking for an off the shelf shopping cart that has been developed in
PHP.  Please send me the link and the cost of the software.
>
> I would develop my own, but time is an issue.
>
> Thanks!
>
> Jeremy
>
> --
> 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] Recommendation for PHP Shopping Cart

2002-04-01 Thread Dennis Moore

Take a look at  OSCommerce at http://www.oscommerce.org.

/dkm

- Original Message -
From: "jeremy spielmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 11:13 AM
Subject: [PHP] Recommendation for PHP Shopping Cart


> I'm looking for an off the shelf shopping cart that has been developed in
PHP.  Please send me the link and the cost of the software.
>
> I would develop my own, but time is an issue.
>
> Thanks!
>
> Jeremy
>
> --
> 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] Please help with code

2002-04-01 Thread Andrew Brampton

You are not actually posting the form to a page with your PHP on... so its
trying to insert that form into your DB before u actually fill it out.
either check if the form has been posted before running your PHP, or split
this into 2 pages

Andrew
- Original Message -
From: "Denis L. Menezes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 5:08 PM
Subject: [PHP] Please help with code


> Hello friends,
>
> can someone tell me what is wrong with this code :
>
>
> 
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
>  $link=mysql_connect("localhost","myid","mypassword");
> if ($link){
> print "link id is $link";
> } else {
> print "error connecting to database";
> }
> $posted=time();
> $query="INSERT INTO news (newsid,title, author, body, posted)
>  VALUES($newsid,$title, $author, $body, UNIX_TIMESTAMP())";
> IF (mysql_query($query)){
>   print "Row added to table";
>   } else {
>   print "error adding row";
>   }
> ?>
>
>
> It gives the link ID. But then gives "error adding row"
>
> Thanks in advance
>
> Denis
>
>
> --
> 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] Please help with code

2002-04-01 Thread Denis L. Menezes

Should I change the position of the php code?

Thanks
denis
- Original Message -
From: "Andrew Brampton" <[EMAIL PROTECTED]>
To: "Denis L. Menezes" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 12:31 AM
Subject: Re: [PHP] Please help with code


> You are not actually posting the form to a page with your PHP on... so its
> trying to insert that form into your DB before u actually fill it out.
> either check if the form has been posted before running your PHP, or split
> this into 2 pages
>
> Andrew
> - Original Message -
> From: "Denis L. Menezes" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 01, 2002 5:08 PM
> Subject: [PHP] Please help with code
>
>
> > Hello friends,
> >
> > can someone tell me what is wrong with this code :
> >
> >
> > 
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> >  > $link=mysql_connect("localhost","myid","mypassword");
> > if ($link){
> > print "link id is $link";
> > } else {
> > print "error connecting to database";
> > }
> > $posted=time();
> > $query="INSERT INTO news (newsid,title, author, body, posted)
> >  VALUES($newsid,$title, $author, $body, UNIX_TIMESTAMP())";
> > IF (mysql_query($query)){
> >   print "Row added to table";
> >   } else {
> >   print "error adding row";
> >   }
> > ?>
> >
> >
> > It gives the link ID. But then gives "error adding row"
> >
> > Thanks in advance
> >
> > Denis
> >
> >
> > --
> > 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] Please help with code

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 11:08  AM, Denis L. Menezes wrote:

> $query="INSERT INTO news (newsid,title, author, body, posted)
>  VALUES($newsid,$title, $author, $body, UNIX_TIMESTAMP())";
> IF (mysql_query($query)){
>   print "Row added to table";
>   } else {
>   print "error adding row";
>   }
> ?>
>
>
> It gives the link ID. But then gives "error adding row"

If you are inserting a value into a string-type column, then it must be 
quoted.  I recommend you change your query to look like this:

$query = "INSERT INTO news (newsid,
 title,
 author,
 body,
 posted)
  VALUES($newsid,
 '$title',
 '$author',
 '$body',
 UNIX_TIMESTAMP()
)";

I've made the (possibly incorrect) assumption that your newsid column is 
not a string-type column, so I didn't quote the variable -- but you 
could, and it should still insert as normal.

And yes, you can structure your query this way for legibility since 
whitespace is ignored (if you want).


Erik






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


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




Re: [PHP] Issues with long SQL inserts

2002-04-01 Thread Chris Snyder

Jason Wong wrote:
> On Monday 01 April 2002 07:22, Chris Snyder wrote:
> 
> 
> 
>>I altered the add.php script to print the query to screen instead of
>>sending it to MySQL to try this.  It still acted the same, regardless of
>>whether it was sending it to the MySQL server or printing it.  In fact,
>>it even had the same reaction when I commented out the print command as
>>well.  This appears to be something in the form-handling of PHP.  Any
>>ideas now?  Thanks for all your help.
> 
> 
> Are you using POST or GET for your form? Both have a limit on how much data 
> you can send with GET having a lower limit than POST. So if you were using 
> GET then try using POST. Both limits are, I think, browser dependent.
> 
> 

I tried VNCing over to my WinNT server and using IE on there - it worked 
fine.  This must be a Mozilla issue.  Now I get to have fun over with 
their support channels.  Thanks for all your help.


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




RE: [PHP] Please help with code

2002-04-01 Thread Rick Emery

You CANNOT execute the PHP script until the form is submitted.  You are
attempting to do both at the same time.
Second, ALL your text fields muse be surrounded by quotes in your INSERT
statement.
Third, use NULL, not UNIX_TIMESTAMP() to insert a timestamp field.

In the following, assume the name of your script is "thisscript.php".



  

  
   

  
   

  
  

  
   

  
  

-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Please help with code


Hello friends,

can someone tell me what is wrong with this code :



  

  
   

  
   

  
  

  
   

  
  




It gives the link ID. But then gives "error adding row"

Thanks in advance

Denis


-- 
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] tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Septic Flesh

anyone found any webserver for linux to support HTML - PHP - SSL without
much/any compiling . .
just the binary to uncompress and run .???

I am really tired by linux..


--


Sapilas@/dev/pinkeye





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




RE: [PHP] tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Demitrious S. Kelly

I don't know any offhand... but taking the easy road never produced
anything more secure then a bad IIS server...

Try my walkthrough... (ok... not walkthrough, but example)

http://www.apokalyptik.com/lsftgu/Apache-Frontpage-Mod_ASP-Mod_SSL-Mod_P
erl-Php/index.htm

-Original Message-
From: Septic Flesh [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 01, 2002 8:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] tired by linux - recompiling.._PHP SERVER

anyone found any webserver for linux to support HTML - PHP - SSL without
much/any compiling . .
just the binary to uncompress and run .???

I am really tired by linux..


--


Sapilas@/dev/pinkeye





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

2002-04-01 Thread Duncan

Hi,

i am running php with IMAP extension on my apache Red Hat 7.2 machine, but i always 
have trouble with it.
After a while my script simply crashes:

[Mon Apr  1 17:53:25 2002] [notice] child pid 15338 exit signal Segmentation fault (11)

I thought it may be related to too many open imap_open() connections?
...but every imap_open() also has an imap_close(), so no open connections.
Everything works just perfect after a reboot again, but restarting apache doesn't help 
a thing :(

...maybe someone encountered similar problems or has an idea to share,

regards,
Duncan



Re: [PHP] Please help with code

2002-04-01 Thread Harry Yu

You forgot to select the database that you want to
insert.

Ex:

$db = mysql_select_db ( mydatabase );

Hope this helps,
Harry
--- "Denis L. Menezes" <[EMAIL PROTECTED]>
wrote:
> Hello friends,
> 
> can someone tell me what is wrong with this code :
> 
> 
> 
>   
> 
>   
>
> 
>   
>
> 
>   
>   
> 
>   
>
>  value="Submit">
>   
>   
> 
> 
$link=mysql_connect("localhost","myid","mypassword");
> if ($link){
> print "link id is $link";
> } else {
> print "error connecting to database";
> }
> $posted=time();
> $query="INSERT INTO news (newsid,title, author,
> body, posted)
>  VALUES($newsid,$title, $author, $body,
> UNIX_TIMESTAMP())";
> IF (mysql_query($query)){
>   print "Row added to table";
>   } else {
>   print "error adding row";
>   }
> ?>
> 
> 
> It gives the link ID. But then gives "error adding
> row"
> 
> Thanks in advance
> 
> Denis
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

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




[PHP] Parsing error

2002-04-01 Thread news.php.net

Hi,

I'm real new in php and trying to read a txt file

this is my code :



and when i run it i get : Parse error: parse error in essai.php on line 45

here' my txt file (just 1 line for probe)

petitimage;photo;marque;Nom;lepdf;commproduit

Can someone help me to go thru

TIA

Hubert





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




php-general Digest 1 Apr 2002 17:26:15 -0000 Issue 1261

2002-04-01 Thread php-general-digest-help


php-general Digest 1 Apr 2002 17:26:15 - Issue 1261

Topics (messages 90922 through 90978):

Re: return
90922 by: eric.coleman.zaireweb.com
90923 by: Jordan
90924 by: Rasmus Lerdorf
90925 by: Miguel Cruz
90926 by: Miguel Cruz
90931 by: jtjohnston

Getting rid of Web Page has expired
90927 by: David Johansen

Re: problems trying to use PHP to choose CSS
90928 by: Timothy J. Luoma

database security - sql injection
90929 by: Geoff

server side includes
90930 by: jtjohnston

Re: PHP / cgiwrap - weird problem
90932 by: jtjohnston

Experiences with vPopmail functions?
90933 by: Johannes Tyra [BrainData]
90937 by: Jason Wong

Re: HTML Question
90934 by: gaukia 345

declaring properties
90935 by: caspar kennerdale

newbie question: how to recompile PHP?
90936 by: Bogdan Popescu

Re: Help with nested if statements, is this possible?
90938 by: martinahingis
90957 by: Hugh Bothwell

Programming Methodology Question
90939 by: jon

Problems reading a URL
90940 by: Stephen Phillips
90945 by: Jason Wong
90946 by: Rick Emery
90947 by: Rick Emery
90948 by: J. Scott Johnson
90959 by: Stephen Phillips

Re: FREE HOSTING
90941 by: martinahingis

Forum with PHP, without using mySQL..
90942 by: MiXmAsTeR
90943 by: James Arthur
90944 by: eric.coleman.zaireweb.com
90950 by: Andrew Brampton

Re: Processing Code created on the fly
90949 by: Erik Price

Problem with CGI mode
90951 by: James Arthur

Using PHP to access an AS 400 database
90952 by: Rance Hall
90956 by: Geoff Hankerson

Has anyone looked at phpinfo today?
90953 by: James Arthur
90955 by: Tyler Longren

Re: Sql results
90954 by: Erik Price

Re: register_globals
90958 by: Erik Price
90961 by: Rasmus Lerdorf

Re: ask for suggestion about printing
90960 by: Erik Price
90962 by: Michael Kimsal

Re: Issues with long SQL inserts
90963 by: Chris Snyder
90972 by: Chris Snyder

Re: IMPORTANT question for anyone using XSLT
90964 by: Erik Price

Recommendation for PHP Shopping Cart
90965 by: jeremy spielmann
90967 by: Jason Sheets
90968 by: Dennis Moore

Please help with code
90966 by: Denis L. Menezes
90969 by: Andrew Brampton
90970 by: Denis L. Menezes
90971 by: Erik Price
90973 by: Rick Emery
90977 by: Harry Yu

tired by linux - recompiling.._PHP SERVER
90974 by: Septic Flesh
90975 by: Demitrious S. Kelly

imap crashes
90976 by: Duncan

Parsing error
90978 by: news.php.net

Administrivia:

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

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

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


--

--- Begin Message ---

But to answer your question

The purpose of return, is to "return" a value..

function test($var)
{
 return addslashes($var);
}

$foo = "Yes, I'am Very Awsome";
$foo = test($foo);
echo($foo);
// echo's, Yes I\'am Very Awsome

Understand?

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Gary" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, March 31, 2002 11:43 PM
Subject: Re: [PHP] return


> Nope, that code makes no sense.  $_POST is an array containing the POST
> variables.  You make a copy of that array an put it in $foo thereby
> overwriting the passed in $foo.  Then you return $$foo which actually ends
> up returning a variable named $Array.  It does not look like you have a
> $Array variable in scope, and it is surely not what the misguided coder
> behind this code was trying to achieve.  In short, this is completely
> bogus.
>
> -Rasmus
>
> On Sun, 31 Mar 2002, Gary wrote:
>
> > Can someone explain to me the reason for using return.
> >
> > function _getValue($foo)
> > {
> > $foo = $_POST;
> > return ${$foo};
> > }
> >
> > TIA
> > Gary
> >
> >
> > --
> > 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
>
>
>


--- End Message ---
--- Begin Message ---

Eric,

Isnt there really no need for the 'return' though?

$test ($var)
{
addslashes($var)
}

$foo = "He's dreaming";
$foo = test($foo);
print($foo);
//should also print He\'s dreaming

Am I incorrect in thinking this?

-Jordan K. Martin
http://www.newimagedesign.com


Eric Coleman <[EMAIL PROTECTED]> wrote in message
018e01c1d93d$cd404be0$0201a8c0@zaireweb">news:018e01c1d93d$cd404be0$0201a8c0@zaireweb...
> But to answer your question
>
> The purpose of return, is to "return" a value..
>
> functi

RE: [PHP] Parsing error

2002-04-01 Thread Rick Emery

which line is 45

-Original Message-
From: news.php.net [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 10:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing error


Hi,

I'm real new in php and trying to read a txt file

this is my code :



and when i run it i get : Parse error: parse error in essai.php on line 45

here' my txt file (just 1 line for probe)

petitimage;photo;marque;Nom;lepdf;commproduit

Can someone help me to go thru

TIA

Hubert





-- 
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 & Javascript Mixed Repost Fields

2002-04-01 Thread Simos Varelakis



Here is a problem :-)

A php post form fooa.php 
Submit all form fields to a page foob.php
Page foob.php do some mysql db check and in one condition I want to
Return to fooa.php without losing any field value... I made this from
foob.php with
header:("location:fooa.php?field1=$field1&field2=$field2.etc")
But this is more complex esspecially when in fooa.php there are radio
buttons + checkboxes.

I thing that if I could with Javascript in foob.php create an (invisble)
form and take all posted fields from 
Fooa.php And resubmit it with form.submit  method to fooa.php I will
have best results But I don’t know how to do this since I am a
begginer.. Anyone can help please send me an email 

Thanks in advnace for your time & help and excuse me if is off topic

Best Regads

simos




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




RE: [PHP] Parsing error

2002-04-01 Thread Chris Kwasneski

Is it just me or is the for statement missing a begining curly bracket?

-Chris



At 11:29 AM 4/1/2002 -0600, you wrote:
>which line is 45
>
>-Original Message-
>From: news.php.net [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 01, 2002 10:45 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Parsing error
>
>
>Hi,
>
>I'm real new in php and trying to read a txt file
>
>this is my code :
>
>  $row = 1;
>  $fp = fopen ("lecteurs.txt","r");
>   while ($data = fgetcsv ($fp, 1000, ";"))
>   {
> $num = count ($data);
> $row++;
> for ($c=0; $c<$num; $c++)
> switch ($row)
>  {
>  case 1 :
>   {
>   $vignette = $data[$c];
>   }
>  case 2 :
>{
>$photo= $data[$c];
>}
>case 3 :
>{
>$marque= $data[$c];
>}
>   case 4 :
>{
>$nom = $data[$c];
>}
>   case 5 :
>{
>$pdfproduit= $data[$c];
>}
>   case 6 :
>{
>$commprod = $data[$c];
>}
> }
>   fclose ($fp);
>   echo $vignette;
>   echo $photo;
>   echo $marque;
>   echo $nom;
>   echo $pdfproduit;
>   echo $commprod;
>?>
>
>and when i run it i get : Parse error: parse error in essai.php on line 45
>
>here' my txt file (just 1 line for probe)
>
>petitimage;photo;marque;Nom;lepdf;commproduit
>
>Can someone help me to go thru
>
>TIA
>
>Hubert
>
>
>
>
>
>--
>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] PhP & Javascript Mixed Repost Fields

2002-04-01 Thread Jackson Miller

That seems like over complicating the problem to me.

Why not just include the original query string that was passed from
fooa.php by:
header("Location:foa.php?$QUERY_STRING")

-Jackson

On Mon, 2002-04-01 at 12:28, Simos Varelakis wrote:
> 
> 
> Here is a problem :-)
> 
> A php post form fooa.php 
> Submit all form fields to a page foob.php
> Page foob.php do some mysql db check and in one condition I want to
> Return to fooa.php without losing any field value... I made this from
> foob.php with
> header:("location:fooa.php?field1=$field1&field2=$field2.etc")
> But this is more complex esspecially when in fooa.php there are radio
> buttons + checkboxes.
> 
> I thing that if I could with Javascript in foob.php create an (invisble)
> form and take all posted fields from 
> Fooa.php And resubmit it with form.submit  method to fooa.php I will
> have best results But I don’t know how to do this since I am a
> begginer.. Anyone can help please send me an email 
> 
> Thanks in advnace for your time & help and excuse me if is off topic
> 
> Best Regads
> 
> simos
> 
> 
> 
> 
> -- 
> 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: PhP & Javascript Mixed Repost Fields

2002-04-01 Thread George Nicolae

in fooa.php for each  textfield





so, when you come back from foob.php if a $field !empty the respective
textfiel will have a value in html form;
--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Simos Varelakis" <[EMAIL PROTECTED]> wrote in message
000401c1d9a2$afd6bde0$9b00a8c0@simos">news:000401c1d9a2$afd6bde0$9b00a8c0@simos...


Here is a problem :-)

A php post form fooa.php
Submit all form fields to a page foob.php
Page foob.php do some mysql db check and in one condition I want to
Return to fooa.php without losing any field value... I made this from
foob.php with
header:("location:fooa.php?field1=$field1&field2=$field2.etc")
But this is more complex esspecially when in fooa.php there are radio
buttons + checkboxes.

I thing that if I could with Javascript in foob.php create an (invisble)
form and take all posted fields from
Fooa.php And resubmit it with form.submit  method to fooa.php I will
have best results But I don’t know how to do this since I am a
begginer.. Anyone can help please send me an email

Thanks in advnace for your time & help and excuse me if is off topic

Best Regads

simos






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




[PHP] Re: PhP & Javascript Mixed Repost Fields

2002-04-01 Thread George Nicolae

sorry the correct code is:

in fooa.php for each  textfield





so, when you come back from foob.php if a $field !empty the respective
textfiel will have a value in html form;


--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Simos Varelakis" <[EMAIL PROTECTED]> wrote in message
000401c1d9a2$afd6bde0$9b00a8c0@simos">news:000401c1d9a2$afd6bde0$9b00a8c0@simos...


Here is a problem :-)

A php post form fooa.php
Submit all form fields to a page foob.php
Page foob.php do some mysql db check and in one condition I want to
Return to fooa.php without losing any field value... I made this from
foob.php with
header:("location:fooa.php?field1=$field1&field2=$field2.etc")
But this is more complex esspecially when in fooa.php there are radio
buttons + checkboxes.

I thing that if I could with Javascript in foob.php create an (invisble)
form and take all posted fields from
Fooa.php And resubmit it with form.submit  method to fooa.php I will
have best results But I don’t know how to do this since I am a
begginer.. Anyone can help please send me an email

Thanks in advnace for your time & help and excuse me if is off topic

Best Regads

simos






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




[PHP] Can anyone help?

2002-04-01 Thread Denis L. Menezes

Hello friends. I have two files as follows :

1. The test.htm is as follows :



Untitled Document






  

  
  

  
  

  
  

  
  

  
  








2. The testphp1.php is as follows:



Untitled Document












Explanation : I run the test.htm and then the testphp1.php executes well.
The databse is connected, but the error
"error adding row" appears all the time.

Can someone tell me my error in SDyntax?

Thanks
Denis




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




[PHP] header() question

2002-04-01 Thread Patrick Hartnett



Is it possible to user the target="_top" reference when using a 
header("Location = ...")?

If so, anyone have an example.

Thanks

-patrick

_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] Delphi & PHP Programming

2002-04-01 Thread Quique

I need someone who knows about Indy Components and PHP programming.
I use a TidTCPServer which is active at port 4250 listening 4 
connections.
When i connect from another machine in my LAN, using PHP, the TCPServer 
tells me, that's right...
The problem is when i want to read a text from the client (PHP). 
TCPServer tells me that a message came, but it doesn't shw it to me.

Following is the code i use.

procedure TMainForm.TCPServerConnect(AThread: TIdPeerThread);
begin
  MessageDlg('User has connected from web', mtInformation, [mbOK], 0);
end;

...

procedure TMainForm.TCPServerExecute(AThread: TIdPeerThread);
Var
  Msg:String;
begin
  { Get the text sent from the client }
  Msg := AThread.Connection.ReadLn;
  MessageDlg('Message received: '+Msg, mtInformation, [mbOK], 0);
end;

...

This is PHP code (connect.php)


$errstr ($errno)\n";
}
else {
if (empty($field_msg)) {
echo "Message: ";
echo "";
echo "";
}
else {  
echo "Message sent to Server!";
fputs($fp,$field_msg);
fclose($fp);
}
}
?>

...

Does anyone what may be wrong with this?
When user sends message from web i see the Server @ 10.0.0.8 showing me
a message dialog
-
| Message received: |
-

BUT I CAN'T SEE THE MESSAGE...
Sorry 4 long post. Thanks in advance.

--
Henry - Argentina
http://www.quiquesistemas.com.ar
[EMAIL PROTECTED]
ICQ: 18048153

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




Re: [PHP] header() question

2002-04-01 Thread George Nicolae

The _top option send you to the top of a page. When you open a new location
you go on top by default.Maybe you ask about _blank? I don't have the answer
for this last question.

--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Patrick Hartnett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Is it possible to user the target="_top" reference when using a
> header("Location = ...")?
>
> If so, anyone have an example.
>
> Thanks
>
> -patrick
>
> _
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>



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




Re: [PHP] Can anyone help?

2002-04-01 Thread Miguel Cruz

On Tue, 2 Apr 2002, Denis L. Menezes wrote:
> $query="INSERT INTO news (newsid,title, author, body, posted)
>  //VALUES($newsid,'$title','$author', '$body', $posted)";)
> 
> Explanation : I run the test.htm and then the testphp1.php executes well.
> The databse is connected, but the error
> "error adding row" appears all the time.

When in doubt, tell it to print your SQL statement to the browser screen, 
and paste it into the MySQL command-line client. Between your own eyes and 
the MySQL CLI's error messages, you'll get your answer.

Or, at the very least, print out mysql_error() when you get a database
error.

miguel


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




Re: [PHP] Parsing error

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, news.php.net wrote:
>   while ($data = fgetcsv ($fp, 1000, ";"))
>   {
> switch ($row)
>  {
> }
> ?>
> 
> and when i run it i get : Parse error: parse error in essai.php on line 45

You never close the { you open for the while().

miguel


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




Re: [PHP] Parsing error

2002-04-01 Thread Steve Cayford

It looks like you've got a closing curly bracket "}" for your switch 
statement, but not for your while statement.

Also, have you read up on the switch statement? Keep in mind that if 
something matches your case 1, it will also fall through and execute 
case 2, case 3, etc... unless you include break statements. e.g. try 
this:

switch ($row)
{
   case 1:
 {
   $vignette = $data[$c];
   break;
 }
   case 2:
 {
   $photo = $data[$c];
   break;
 }
...
...
...

-Steve


On Monday, April 1, 2002, at 10:44  AM, news.php.net wrote:

> Hi,
>
> I'm real new in php and trying to read a txt file
>
> this is my code :
>
>   $row = 1;
>  $fp = fopen ("lecteurs.txt","r");
>   while ($data = fgetcsv ($fp, 1000, ";"))
>   {
> $num = count ($data);
> $row++;
> for ($c=0; $c<$num; $c++)
> switch ($row)
>  {
>  case 1 :
>   {
>   $vignette = $data[$c];
>   }
>  case 2 :
>{
>$photo= $data[$c];
>}
>case 3 :
>{
>$marque= $data[$c];
>}
>   case 4 :
>{
>$nom = $data[$c];
>}
>   case 5 :
>{
>$pdfproduit= $data[$c];
>}
>   case 6 :
>{
>$commprod = $data[$c];
>}
> }
>   fclose ($fp);
>   echo $vignette;
>   echo $photo;
>   echo $marque;
>   echo $nom;
>   echo $pdfproduit;
>   echo $commprod;
> ?>
>
> and when i run it i get : Parse error: parse error in essai.php on line 
> 45
>
> here' my txt file (just 1 line for probe)
>
> petitimage;photo;marque;Nom;lepdf;commproduit
>
> Can someone help me to go thru
>
> TIA
>
> Hubert
>
>
>
>
>
> --
> 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] Connecting to multiple DB's

2002-04-01 Thread James Taylor

I host a few sites, and on usually each site will have it's own MySQL 
database in the background.  I've decided that I want to link one site 
to another, and need to connect to more than one database at a time.
I've found that when I try to connect to 2 or more, even if I assign the 
other database to another variable
(ie .

$db1 = @mysql_connect($dbhost, $dbuser, $dbpass);
$db2 = @mysql_connect($dbhost2, $dbuser, $dbpass);

)

, the last connect called is the only one that is active.

Any work arounds to this?  I've been having to do it where I connect to 
one when needed, then connect to the other, etc.  I'm thinking there has 
to be a better way to do this.

Also, what is the function to kill a connection to a db?  Thanks!


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




Re: [PHP] header() question

2002-04-01 Thread Patrick Hartnett


So any use of header("Location=...") automatically does what amounts to a 
target="_top"?  If so, then ignore this entire post, cuz that answers the 
question.  If not, does anyone know how to force a target="_top" when using 
header("Location=...")?


>From: "George Nicolae" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] header() question
>Date: Mon, 1 Apr 2002 21:11:00 +0300
>
>The _top option send you to the top of a page. When you open a new location
>you go on top by default.Maybe you ask about _blank? I don't have the 
>answer
>for this last question.
>
>--
>
>
>Best regards,
>George Nicolae
>IT Manager
>___
>PaginiWeb.com  - Professional Web Design
>www.PaginiWeb.com
>
>
>"Patrick Hartnett" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> > Is it possible to user the target="_top" reference when using a
> > header("Location = ...")?
> >
> > If so, anyone have an example.
> >
> > Thanks
> >
> > -patrick
> >
> > _
> > Join the world's largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: [PHP] Connecting to multiple DB's

2002-04-01 Thread Patrick Hartnett

Not sure about the multiple connections side, but to kill a connection:

mysql_close($link);

where $link is your connection variable/string

hope this helps.

-Patrick


>From: James Taylor <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: PHP List <[EMAIL PROTECTED]>
>Subject: [PHP] Connecting to multiple DB's
>Date: Mon, 01 Apr 2002 10:47:45 -0800
>
>I host a few sites, and on usually each site will have it's own MySQL
>database in the background.  I've decided that I want to link one site
>to another, and need to connect to more than one database at a time.
>I've found that when I try to connect to 2 or more, even if I assign the
>other database to another variable
>(ie .
>
>$db1 = @mysql_connect($dbhost, $dbuser, $dbpass);
>$db2 = @mysql_connect($dbhost2, $dbuser, $dbpass);
>
>)
>
>, the last connect called is the only one that is active.
>
>Any work arounds to this?  I've been having to do it where I connect to
>one when needed, then connect to the other, etc.  I'm thinking there has
>to be a better way to do this.
>
>Also, what is the function to kill a connection to a db?  Thanks!
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_
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




RE: [PHP] Connecting to multiple DB's

2002-04-01 Thread Rick Emery

Both connects are "active".

you specify which link when you select the database:
mysql_select_db("database_name", $db1);  mysql_select_db("database_name",
$db2);

-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 12:48 PM
To: PHP List
Subject: [PHP] Connecting to multiple DB's


I host a few sites, and on usually each site will have it's own MySQL 
database in the background.  I've decided that I want to link one site 
to another, and need to connect to more than one database at a time.
I've found that when I try to connect to 2 or more, even if I assign the 
other database to another variable
(ie .

$db1 = @mysql_connect($dbhost, $dbuser, $dbpass);
$db2 = @mysql_connect($dbhost2, $dbuser, $dbpass);

)

, the last connect called is the only one that is active.

Any work arounds to this?  I've been having to do it where I connect to 
one when needed, then connect to the other, etc.  I'm thinking there has 
to be a better way to do this.

Also, what is the function to kill a connection to a db?  Thanks!


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

2002-04-01 Thread Jordan K. Martin

Rasmus,

Makes sense.  I didn't think much when writing that piece...but...what is
the & for?  wouldn't it work the same without it?

function test ($var)
{
$var = addslashes($var)
}

 $foo = "He's dreaming";
 test($foo);
 print($foo);

Jordan K. Martin
http://www.newimagedesign.com



"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well, you could do it without a return, but first, addslashes() returns
> the modified string, it does not do in-place replacement.  And second, you
> would need to pass the string in by reference, like this:
>
> function test (& $var)
> {
> $var = addslashes($var)
> }
>
> $foo = "He's dreaming";
> test($foo);
> print($foo);
>
> -Rasmus
>
> On Mon, 1 Apr 2002, Jordan wrote:
>
> > Eric,
> >
> > Isnt there really no need for the 'return' though?
> >
> > $test ($var)
> > {
> > addslashes($var)
> > }
> >
> > $foo = "He's dreaming";
> > $foo = test($foo);
> > print($foo);
> > //should also print He\'s dreaming
> >
> > Am I incorrect in thinking this?
> >
> > -Jordan K. Martin
> > http://www.newimagedesign.com
> >
> >
> > Eric Coleman <[EMAIL PROTECTED]> wrote in message
> > 018e01c1d93d$cd404be0$0201a8c0@zaireweb">news:018e01c1d93d$cd404be0$0201a8c0@zaireweb...
> > > But to answer your question
> > >
> > > The purpose of return, is to "return" a value..
> > >
> > > function test($var)
> > > {
> > >  return addslashes($var);
> > > }
> > >
> > > $foo = "Yes, I'am Very Awsome";
> > > $foo = test($foo);
> > > echo($foo);
> > > // echo's, Yes I\'am Very Awsome
> > >
> > > Understand?
> > >
> > > - Original Message -
> > > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > > To: "Gary" <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Sunday, March 31, 2002 11:43 PM
> > > Subject: Re: [PHP] return
> > >
> > >
> > > > Nope, that code makes no sense.  $_POST is an array containing the
POST
> > > > variables.  You make a copy of that array an put it in $foo thereby
> > > > overwriting the passed in $foo.  Then you return $$foo which
actually
> > ends
> > > > up returning a variable named $Array.  It does not look like you
have a
> > > > $Array variable in scope, and it is surely not what the misguided
coder
> > > > behind this code was trying to achieve.  In short, this is
completely
> > > > bogus.
> > > >
> > > > -Rasmus
> > > >
> > > > On Sun, 31 Mar 2002, Gary wrote:
> > > >
> > > > > Can someone explain to me the reason for using return.
> > > > >
> > > > > function _getValue($foo)
> > > > > {
> > > > > $foo = $_POST;
> > > > > return ${$foo};
> > > > > }
> > > > >
> > > > > TIA
> > > > > Gary
> > > > >
> > > > >
> > > > > --
> > > > > 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
> >
>



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




RE: [PHP] Can anyone help?

2002-04-01 Thread Rick Emery

>  $query="INSERT INTO news (newsid,title, author, body, posted)
> //VALUES($newsid,'$title','$author', '$body', $posted)";)

What's with the // in front of VALUES?  Change to:

$query="INSERT INTO news (newsid,title, author, body, posted) ".
 "VALUES($newsid,'$title','$author', '$body', $posted)";

When you have an error indicating that a record was not inserted:
1)  Print $query to ensure it contains what you expect
2)  Change query to:  mysql_query($query) or die(mysql_error())

This will save you much frustration and unnecessary posting

Finally, show us your table structure

-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Can anyone help?


Hello friends. I have two files as follows :

1. The test.htm is as follows :



Untitled Document






  

  
  

  
  

  
  

  
  

  
  








2. The testphp1.php is as follows:



Untitled Document












Explanation : I run the test.htm and then the testphp1.php executes well.
The databse is connected, but the error
"error adding row" appears all the time.

Can someone tell me my error in SDyntax?

Thanks
Denis




-- 
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: tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Michael Kimsal

Septic Flesh wrote:
> anyone found any webserver for linux to support HTML - PHP - SSL without
> much/any compiling . .
> just the binary to uncompress and run .???
> 
> I am really tired by linux..
> 
> 


Most Linux distributions come precompiled with PHP and SSL in Apache
by default.  RedHat and Mandrake do - at least there are options during
installation.



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




Re: [PHP] return

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, Jordan K. Martin wrote:
> Makes sense.  I didn't think much when writing that piece...but...what is
> the & for?  wouldn't it work the same without it?
> 
> function test ($var)
> {
> $var = addslashes($var)
> }
> 
>  $foo = "He's dreaming";
>  test($foo);
>  print($foo);

If you don't have the & in the function declaration, then the function
operates on a copy of the variable. This is normally more useful, when you
don't want functions messing with your variables, but instead doing things
with them to produce new information (which you get back via return).

miguel


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




Re: [PHP] header() question

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 01:49  PM, Patrick Hartnett wrote:

> So any use of header("Location=...") automatically does what amounts to 
> a target="_top"?  If so, then ignore this entire post, cuz that answers 
> the question.  If not, does anyone know how to force a target="_top" 
> when using header("Location=...")?

Why not just create an anchor ID at the top of the page, and then make 
the header argument point to that?  This will work on more browsers than 
"_top" anyway.  Like so:

// this is the HTML page you want to point to
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>

   Test
   









// and this is your PHP code
header('Location: http://www.domain.com/testpage.php#topofpage');




HTH,

Erik






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


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




Re: [PHP] return

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 02:13  PM, Jordan K. Martin wrote:

> Makes sense.  I didn't think much when writing that piece...but...what 
> is
> the & for?  wouldn't it work the same without it?
>
> function test ($var)
> {
> $var = addslashes($var)
> }
>
>  $foo = "He's dreaming";
>  test($foo);
>  print($foo);

No, this won't work because you're not returning a value.  You need to 
either have a return statement in this function that says "return $var;" 
or you need to use the & sign, which lets you change the value of a 
variable outside the namespace of the function.  Or scope.  I forget 
which it is.

Try your above code -- it shouldn't work.


Erik






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


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




[PHP] strange file handle problem

2002-04-01 Thread Ken Nagorski

Hi there,

Ok - This is the error I get,

Warning: 2 is not a valid File-Handle resource in
/usr/local/apache/htdocs/mm_edit.php on line 359

But this is the code... I marked line 359 where it attempts to call fputs
for the first time. I can't seem to understand how this is failing. I really
think it is not the code. I am really stumped.



function write()
{
global $db;
global $domain;
//Notice that I exit if it can't open the file... That is not the
//the problem
if(!$domainfile=fopen("/tmp/$domain", "w"))
{
die("Failed to open domain file");
}
echo("DEBUG /tmp/$domain -- $domainfile");
$result = $db->Execute("SELECT * FROM addresses WHERE
domain='$domain'");
if ($result === false)
{
die("SQL Failed");
}
while(!$result->EOF)
{
list($dom,$ext)=split("\.",$domain);
$virt_address=$result->fields[1];
$dest=$result->fields[2];
$default=$result->fields[3];
echo("DEBUG $virt_address $dest $default");
list($virt_user,$virt_domain)=split("\@", $virt_address);
list($remote_user,$remote_domain)=split("\@", $dest);
//If the destination is a remote address and this is a NOT a
default
if($remote_domain && !($default))
{
//this is line 359 - the first call to fputs
fputs($domainfile, "$virt_address");
echo("$virt_address");
fputs($domainfile, ": $virt_user$dom$ext\n");
echo(": $virt_user$dom$ext");

if(!$courierfile=fopen("/tmp/.courier-$virt_user$dom$ext", "w"))
{
echo "Could not open file";
}
fputs($courierfile, "$dest\n");
fclose($courierfile);
//If the destination is a local address and this is
NOT a default
}
elseif(!($remote_domain) && !($default))
{
fputs($domainfile, "$virt_address");
fputs($domainfile, ": $remote_user\n");
}
//If it's a default we don't care where it is going, just
write a .courier-domext-default with the address
//And stick line in the the domain file that looks like this
"@dom.com: domcom-default"
elseif($default)
{
fputs($domainfile, "$virt_address");
fputs($domainfile, ": $dom$ext-default\n");

if(!$courierfile=fopen("/tmp/.courier-$dom$ext-default", "w"))
{
echo "Could not open file";
}
fputs($courierfile, "$dest\n");
fclose($courierfile);
}
$result->MoveNext();
system("mv /tmp/.changes /tmp/$domain");
#system("/usr/local/sbin/changewriter $domain &>
/tmp/cw_error");
fclose($domainfile);
}
}



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




[PHP] exec/system on FreeBSD help?

2002-04-01 Thread Jeff D. Hamann

I've been trying to figure out why a command like exec()/system() works fine
under windows and it doens't seem to run on FreeBSD. I've got a script that
generates a latex file, runs pdflatex, and then moves the pdf file into a
"reports" with a link on the generating page. Works fine on Win2k but when I
try to run it on the BSD machine, it doesn't look like the commands are
getting issued, or that I can't run the commands because of file
permissions. I've chmod'd the dir for the website and that didn't seem to
help. I tried some small script like exec("ls -la") and that worked. I then
tried system( "/usr/local/bin/pdflatex temp/report_file" ); to try and
diagnose the problem, and got "Fatal Error occured, I can't write on file
'report_file.log', suggesting that there might still be some permissions
problems. Maybe this is a apache thing?

Any ideas?

--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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




Re: [PHP] strange file handle problem

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, Ken Nagorski wrote:
> function write()
> {
> if(!$domainfile=fopen("/tmp/$domain", "w"))
> {
> die("Failed to open domain file");
> }
> while(!$result->EOF)
> {
> if($remote_domain && !($default))
> {
> fputs($domainfile, "$virt_address");
> }
> fclose($domainfile);
> }
> }

You close $domainfile the first time through the loop.

miguel


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




Re: [PHP] exec/system on FreeBSD help?

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, Jeff D. Hamann wrote:
> I tried some small script like exec("ls -la") and that worked. I then
> tried system( "/usr/local/bin/pdflatex temp/report_file" ); to try and
> diagnose the problem, and got "Fatal Error occured, I can't write on
> file 'report_file.log', suggesting that there might still be some
> permissions problems.

Are you sure temp/report_file is where you think it is? May be safer to 
use an absolute path.

miguel


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




Re: [PHP] exec/system on FreeBSD help?

2002-04-01 Thread Jeff D. Hamann


so then I tried
system( "/usr/local/bin/pdflatex
/usr/local/www/html/project_x/temp/report_file" );

i think this is a write premission thing.

yes, it's where I think it is
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 1 Apr 2002, Jeff D. Hamann wrote:
> > I tried some small script like exec("ls -la") and that worked. I then
> > tried system( "/usr/local/bin/pdflatex temp/report_file" ); to try and
> > diagnose the problem, and got "Fatal Error occured, I can't write on
> > file 'report_file.log', suggesting that there might still be some
> > permissions problems.
>
> Are you sure temp/report_file is where you think it is? May be safer to
> use an absolute path.
>
> miguel
>



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




[PHP] parse error, mysql select

2002-04-01 Thread ROBERT MCPEAK

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = "SELECT DATE_FORMAT( exp_date, "%W, %M
%d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";


Thanks!  My eyes are shot!


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




RE: [PHP] Has anyone looked at phpinfo today?

2002-04-01 Thread Matt Friedman

I think if you look at today's date, you'll realize why the silly
picture on your phpinfo today.  

Good one guys! That's what I love about php - it's about enjoying
programming and making it fun.

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 9:45 AM
To: James Arthur; [EMAIL PROTECTED]
Subject: Re: [PHP] Has anyone looked at phpinfo today?

hm.  I've seen that before by appending something to the end of the
url
(not sure what though).

Tyler

- Original Message -
From: "James Arthur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 8:46 AM
Subject: [PHP] Has anyone looked at phpinfo today?


> 
>
> Notice anything different?
>
> --jaa
>
> --
> 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] parse error, mysql select

2002-04-01 Thread Rick Emery

$query = "SELECT DATE_FORMAT( exp_date, \"%W, %M %d, %Y\") AS thedate from
tifrequest where user='$user' limit 1,1";

Missing escape \ in front of quotes

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 1:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select


When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = "SELECT DATE_FORMAT( exp_date, "%W, %M
%d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";


Thanks!  My eyes are shot!


-- 
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] parse error, mysql select

2002-04-01 Thread Matt Friedman

It doesn't like the ";" at the end of the statement. I noticed this a
while ago. I'd prefer if it didn't choke on the ";" but it seems to.
It's probably more correct to have the ";" there - I don't know why it
chokes when going through php. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = "SELECT DATE_FORMAT( exp_date, "%W, %M
%d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";


Thanks!  My eyes are shot!


-- 
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] parse error, mysql select

2002-04-01 Thread Rick Emery

He's not including the ; in the SELECT statement.  The ; you're seeing is at
end of the PHP statement

-Original Message-
From: Matt Friedman [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:02 PM
To: 'ROBERT MCPEAK'; [EMAIL PROTECTED]
Subject: RE: [PHP] parse error, mysql select


It doesn't like the ";" at the end of the statement. I noticed this a
while ago. I'd prefer if it didn't choke on the ";" but it seems to.
It's probably more correct to have the ";" there - I don't know why it
chokes when going through php. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = "SELECT DATE_FORMAT( exp_date, "%W, %M
%d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";


Thanks!  My eyes are shot!


-- 
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] parse error, mysql select

2002-04-01 Thread ROBERT MCPEAK

Ack!  Thanks.

>>> Rick Emery <[EMAIL PROTECTED]> 04/01/02 02:59PM >>>
$query = "SELECT DATE_FORMAT( exp_date, \"%W, %M %d, %Y\") AS thedate
from
tifrequest where user='$user' limit 1,1";

Missing escape \ in front of quotes

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 01, 2002 1:55 PM
To: [EMAIL PROTECTED] 
Subject: [PHP] parse error, mysql select


When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = "SELECT DATE_FORMAT( exp_date, "%W, %M
%d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";


Thanks!  My eyes are shot!


-- 
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/MySQL/XML

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 02:33  PM, Jay Fitzgerald wrote:

> Can this be done and am I going about it the right way?

First, it's a bad idea to cross-post between mailing lists, even if they 
seem like related topics.  Second, what is it you're trying to do?  Or 
what does your application do?


Erik






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


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




[PHP] Question on Using fgets for Network I/O while Limiting Amount of Data Retrieved

2002-04-01 Thread J. Scott Johnson

Hi,

I'm trying to limit the amount of content retrieved with fgets when pulling
data from a url.  I'm generating page extracts and only need the first 2K to
4K.  What I'm finding is that when I limit fgets, I get NOTHING but run
within a while loop, I get the whole string.

What works:

//retrieve the page from the Internet
  $file = @fopen ("$url", "r");
  // bcg need to add error handling so if website is offline, page is
still logged and retrieved later
  if (!$file) {
  //log error
  //need to write logging code
  }
  else {
  //load the file into a string var
  while (!feof ($file)) {
$string = $string . fgets($file, 4096);
  }
 }

What fails:

//retrieve the page from the Internet
  $file = @fopen ("$url", "r");
  // bcg need to add error handling so if website is offline, page is
still logged and retrieved later
  if (!$file) {
  //log error
  //need to write logging code
  }
  else {
  //load the file into a string var
  while (!feof ($file)) {
$string = $string . fgets($file, 4096);
break;
  }
 }

I've done it with and without the while loop, tried if tests and such.  Its
strange.

Thanks in advance

J. Scott Johnson
Physical
* * * * * * * * * * * * * * * * * * * * * * * * * *
80 Spring Road
Nahant, MA 01908
Phone:
* * * * * * * * * * * * * * * * * * * * * * * * * *
781 592 0262 - home
617 970 4719 - cell
Virtual:
* * * * * * * * * * * * * * * * * * * * * * * * * *
[EMAIL PROTECTED]
http://www.fuzzygroup.com/
Yahoo IM: fuzzygroup


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




[PHP] date comparison expressions

2002-04-01 Thread ROBERT MCPEAK

I'd like to compare today's date against a stored date, and then fire
some code based on the result.

Like.

if ($today's_date < stored_date+5 days)

then {blah}

Can somebody clue this newbie in on how to do this?

-Bob

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




[PHP] Re: parse error, mysql select

2002-04-01 Thread martinahingis

Error is absolute.
Don't use " (double quotation mark) in yur queries. Use ' (single quot.)
instead

$query = "SELECT DATE_FORMAT( exp_date, '%W, %M > %d, %Y') AS thedate from
tifrequest where user='$user' limit 1,1";

Because the preprocessor think that your string is finished when it sees a
double quot.
And use a colorful editor. that helps u seeing errors like this. :)

martina


"Robert McPeak" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When I execute from browser I get a parse error, but when I enter the
> query directly into a MySQL command prompt I get a successful return.
> Can anybody see the problem with this code:
>
> $query = "SELECT DATE_FORMAT( exp_date, "%W, %M
> %d, %Y") AS thedate from tifrequest where user='$user' limit 1,1";
>
>
> Thanks!  My eyes are shot!
>



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




RE: [PHP] date comparison expressions

2002-04-01 Thread Rick Emery

Are you retrieving the stored date from a mySQL database?  If so, you can
let mysql SELECT only those records that fit the tardy date criteria.

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date comparison expressions


I'd like to compare today's date against a stored date, and then fire
some code based on the result.

Like.

if ($today's_date < stored_date+5 days)

then {blah}

Can somebody clue this newbie in on how to do this?

-Bob

-- 
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] Hi to you anti-spammers HAHA

2002-04-01 Thread vins

Happy Happy Easter.
and to all you peeps out there who don't celebrate this day.
Hope you enjoyed your day.

And just too keep the cool
How do i run that script that give all the information about php ?
Someone told me the you type PHPINFO();
but it sometimes doesn't work

Cheerz
Spammer Vins



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




Re: [PHP] Hi to you anti-spammers HAHA

2002-04-01 Thread Scott St. John




On Mon, 1 Apr 2002, vins wrote:

> Happy Happy Easter.
> and to all you peeps out there who don't celebrate this day.
> Hope you enjoyed your day.
> 
> And just too keep the cool
> How do i run that script that give all the information about php ?
> Someone told me the you type PHPINFO();
> but it sometimes doesn't work
> 
> Cheerz
> Spammer Vins
> 
> 
> 
> 

-- 



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




Re: [PHP] header() question

2002-04-01 Thread martinahingis

I think the question is not the top of the page, the top frame of the
window. Isn't it?

If so you should use Javascript instead of PHP.

top.window.location.href=http://yoursite.com/yourpage.php;


---
martina.

"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Monday, April 1, 2002, at 01:49  PM, Patrick Hartnett wrote:
>
> > So any use of header("Location=...") automatically does what amounts to
> > a target="_top"?  If so, then ignore this entire post, cuz that answers
> > the question.  If not, does anyone know how to force a target="_top"
> > when using header("Location=...")?
>
> Why not just create an anchor ID at the top of the page, and then make
> the header argument point to that?  This will work on more browsers than
> "_top" anyway.  Like so:
>
> // this is the HTML page you want to point to
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml";>
> 
>Test
>
> 
> 
> 
>
>
> 
> 
> 
>
> // and this is your PHP code
> header('Location: http://www.domain.com/testpage.php#topofpage');
>
>
>
>
> HTH,
>
> Erik
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



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




RE: [PHP] Hi to you anti-spammers HAHA

2002-04-01 Thread Vlad Kulchitski

Phpinfo(); works all the time, unless you went ahead and reprogrammed php yourself :)

Hello to AFRIKA from SOVIETS!   CCCP rules!


-Original Message-
From: vins [mailto:[EMAIL PROTECTED]] 
Sent: 1 êâ³òíÿ 2002 ð. 15:43
To: [EMAIL PROTECTED]
Subject: [PHP] Hi to you anti-spammers HAHA

Happy Happy Easter.
and to all you peeps out there who don't celebrate this day.
Hope you enjoyed your day.

And just too keep the cool
How do i run that script that give all the information about php ?
Someone told me the you type PHPINFO();
but it sometimes doesn't work

Cheerz
Spammer Vins



-- 
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 - apache web based configurator

2002-04-01 Thread Rance Hall

Anybody have any recommendations on a good php based apache configurator, kinda like 
phpmyadmin for mysql databases?

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




[PHP] Re: tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Septic Flesh

I have slackware 8 . . .

I can have php working . . .but the default ssl installation does not work


--


Sapilas@/dev/pinkeye


"Septic Flesh" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> anyone found any webserver for linux to support HTML - PHP - SSL without
> much/any compiling . .
> just the binary to uncompress and run .???
>
> I am really tired by linux..
>
>
> --
> 
>
> Sapilas@/dev/pinkeye
>
> 
>
>



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




Re: [PHP] Re: tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, Septic Flesh wrote:
> I have slackware 8 . . .
> 
> I can have php working . . .but the default ssl installation does not work

"Does not work" is not a very helpful description. Maybe it does work, and 
it just isn't being used correctly. But nobody can help you find out if 
you keep the symptoms a secret.

comp.infosystems.www.servers.unix is the best place to get help on Apache
configuration issues.

miguel


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




Re: [PHP] PHP/MySQL/XML

2002-04-01 Thread Thalis A. Kalfigopoulos

On Mon, 1 Apr 2002, Jay Fitzgerald wrote:

> I have created a database called friends with four columns:
> Name / Address / City / State
> 
> I also made an XML file to coincide with those variables:
> 
>  
>  
>  Friend 1
>  999 Foo Avenue
>  Foo Town
>  FO
>  
>  
> 
> 
> The variables in the XML doc above are already in the database
> 
> 
> BUT - what I want to do - using PHP and MySQL - is something like this:
> 
> $connection = mysql_connect("localhost", "foo", "bar") or die ("Could not 
> connect to server.");
> $db = mysql_select_db("friends") or die ("Could not select database.");
> $sql = "select * from friends order by name asc";
> $sql_result = mysql_query($sql, $connection) or die ("Could not execute 
> query.");
> 
> echo "\n";
> echo "\n\n";
> 
> echo "\n";
> echo "\t\n";
> echo "\t\t\n";
> 
> echo "\t\t\t";
> echo "$name";

> Can this be done and am I going about it the right way?

It's not clear what would be right in your case because you don't state what you'd 
like the code to do for you. But anyway, the extraction from the DB is not complete 
(neep more PHP code after you get the result handler). From the way that you have your 
SQL query, it seems that you have a table with columns name/address/city/state. If XML 
is not your only output format, then that's OK. But if this data will see the light of 
day only as XML, then you might as well store it as plain text in a single field. Of 
couse you won't be able to order by the name on the SQL side this way :-) But you can 
parse the entries on the PHP side after you retrieve them and then sort them.

Just my 2c.

cheers,
--thalis


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




Re: [PHP] header() question

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 03:47  PM, martinahingis wrote:

> I think the question is not the top of the page, the top frame of the
> window. Isn't it?

Oh yeah, you're right.  I was thinking along the lines of what that 
other guy suggested -- that all pages revert to _top by default (which 
now I remember is not the case).

Sorry for the completely inappropriate suggestion.


Erik






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


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




Re: [PHP] PHP/MySQL/XML

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 02:33  PM, Jay Fitzgerald wrote:

> Can this be done and am I going about it the right way?

Are you familiar with something called "partial decomposition"?  I'm not 
sure where it came from, but Google suggests that it may have been 
conceived by Daniel Appelquist, the author of a book called "XML and 
SQL".  I read this book a few weeks ago -- it's expensive, and slim on 
content (see my mini-review below), but covers a topic that everyone 
seems very interested in.  I was elated when Google pointed me to this 
article on the theory of partial decomposition (by Appelquist) but 
dismayed to find that he didn't submit it in time for a conference, and 
so it is not actually found at this link: 
http://www.idealliance.org/papers/xml2001/papers/html/06-05-02.html
But I'm sure it's the same idea he puts forth in his book.

Partial Decomposition:
The idea is that you store your information in an XML document, and then 
take the most-searched information and store it in a database with some 
kind of relationship to the document (either store the XML document in 
the database or store a URI to the XML document in the database).  In 
this fashion, you can use the power of SQL to search for your data, but 
have the data itself stored in XML to take advantage of XML's features.  
The important thing to remember is that the data in the columns should 
ONLY be used for searches, and the XML is where the data TRULY lies, 
otherwise you can violate data integrity.  It is not a good scheme for 
data that is regularly changed or updated -- for this you are better off 
storing your data in the usual way.  Also, some of the methods for 
ensuring data integrity are not at this time possible in MySQL (he uses 
Oracle and SQL Server for a lot of his examples), though you can ad-lib 
it with your application (i.e. in PHP) if you are dilligent and are 
careful not to make changes to your database without going through the 
proper channels to ensure that data integrity is maintained.

It is no substitute for a true XML database, since it is just that -- a 
"partial" decomposition of your data (and thus is only "partially" 
searchable), and won't work for every application.  But you may wish to 
check out Appelquist's book.

(* my mini-review of "XML and SQL" by Daniel Appelquist:  Well, there 
aren't a lot of pages, the text is huge, and the book still costs US 
$40.00.  Kind of ridiculous.  This is further exacerbated by the fact 
that only 80% of the book actually revolves around ideas of using XML 
with SQL, and much of the rest of the book focuses on the process of 
developing a web application by taking user surveys and 
scenario-role-playing etc, or introducing some of the fundamentals of 
XML which are available all over the rest of the bookstore.  Excellent 
topics, which IMHO do not fall under the topic of 'XML and SQL'.  The 
book also discusses at length some of the XML features of Oracle and SQL 
Server, so I kind of skipped over these sections -- I'm a MySQL fan.

Is it worth reading?  The middle few chapters, which deal specifically 
with partial decomposition, are interesting.  But is it worth $40?  Not 
unless your employer is paying for it, or if you are looking for a 
general book on developing web applications.  In fact, it should 
probably have been called "Developing Web Applications with XML and 
SQL", and if it had then this review might be more forgiving.)

To answer your question, I'm not so sure that I would go about it the 
way that you have -- it seems that you are echoing an XML file from SQL 
information.  There's nothing wrong with this, but simply echoing it to 
the screen is probably more useless than just echoing the data in some 
meaningful format -- such as a paragraph or a list.  HOWEVER, if you 
were  storing the data in a file, or a string to be sent out as a SOAP 
or XML-RPC request, then that makes more sense.

Still, you want some advice?  First, your SQL code won't work as it 
is -- you've forgotten a mysql_fetch_* function to pull the data from 
the $sql_result.  So, add to your code:

while ($xml_data_row = mysql_fetch_assoc($sql_result)) {
   $xml_document = '

   
 
   ' . $xml_data_row['name'] . '
   ' . $xml_data_row['address'] . '
   ' . $xml_data_row['city'] . '
   ' . $xml_data_row['home'] . '
 
   

";

echo $xml_document;
}

This saves you a ton of typing and even makes your code look better.

HTH,


Erik




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


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




[PHP] Re: tired by linux - recompiling.._PHP SERVER

2002-04-01 Thread Septic Flesh

I install slack8 with apache + mod_ssl + mod_php

from the CD.

nothing is enabled at the begining.

I enable php . .from uncommenting the appropriate httpd.con line
nothing..works..
I download php 4-1-2 latest . . I compile and install ...PHP no works..

mod_ssl does not work... I uncomment the line in  httpd.conf and then

apachectl startssl

apache couldn;t start...

apachectl start

apache starts with php enabled . .but no SSL . .

anyone has a solution to that ?
y mod_ssl default install from the slack CD does not work ?

something I do wrong . or it is the problem from the CD's installation.?



--


Sapilas@/dev/pinkeye


"Septic Flesh" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> anyone found any webserver for linux to support HTML - PHP - SSL without
> much/any compiling . .
> just the binary to uncompress and run .???
>
> I am really tired by linux..
>
>
> --
> 
>
> Sapilas@/dev/pinkeye
>
> 
>
>



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




Re: [PHP] exec/system on FreeBSD help?

2002-04-01 Thread Jeff D. Hamann

got it figured out. permissions.

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 1 Apr 2002, Jeff D. Hamann wrote:
> > I tried some small script like exec("ls -la") and that worked. I then
> > tried system( "/usr/local/bin/pdflatex temp/report_file" ); to try and
> > diagnose the problem, and got "Fatal Error occured, I can't write on
> > file 'report_file.log', suggesting that there might still be some
> > permissions problems.
>
> Are you sure temp/report_file is where you think it is? May be safer to
> use an absolute path.
>
> miguel
>



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




Re: [PHP] PHP/MySQL/XML

2002-04-01 Thread Erik Price

Shoot, kind of an important error I made in the code I gave you 
earlier -- the closing quote for $xml_document should be a single-quote, 
not a double-quote as I wrote.

Sorry,
Erik




On Monday, April 1, 2002, at 04:26  PM, Erik Price wrote:

> Still, you want some advice?  First, your SQL code won't work as it 
> is -- you've forgotten a mysql_fetch_* function to pull the data from 
> the $sql_result.  So, add to your code:
>
> while ($xml_data_row = mysql_fetch_assoc($sql_result)) {
>   $xml_document = '
> 
>   
> 
>   ' . $xml_data_row['name'] . '
>   ' . $xml_data_row['address'] . '
>   ' . $xml_data_row['city'] . '
>   ' . $xml_data_row['home'] . '
> 
>   
> 
> ";
>







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


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




[PHP] RE: PHP/MySQL/XML

2002-04-01 Thread Jay Fitzgerald

OkThanks to all those who are helping me (sorry for cross-posting)...

My scripts are working great except for one thingwhen it queries the db 
there are some fields that have a NULL value, thus when it writes the XML 
file it does this:


What I would like to do is either place an   in the XML tags for all 
of these NULL fields - can I do an if / else statement in the code I am 
using below??

$phone_list = fopen("/usr/local/apache2/htdocs/test/phone_list.xml", "w+");

fwrite($phone_list, "\n");
fwrite($phone_list, "\n\n");

fwrite($phone_list, "\n");
fwrite($phone_list, "\t\n");

 while ($row = mysql_fetch_array($sql_result))
 {
 $name = $row["name"];
 $ext = $row["ext"];
 $title = $row["title"];
 $home = $row["home"];
 $pager = $row["pager"];
 $cell = $row["cell"];
 $email = $row["email"];

 fwrite($phone_list, "\t\t\n");
 fwrite($phone_list, "\t\t\t");
 fwrite($phone_list, "$name");
 fwrite($phone_list, "\n");

 fwrite($phone_list, "\t\t\t");
 // would need an if / else statement here
 fwrite($phone_list, "$ext");
 // end if / else statement here
 fwrite($phone_list, "\n");

 }

fwrite($phone_list, "\t\n");
fwrite($phone_list, "");

fclose($phone_list);

?>



Should you have any questions, comments or concerns, feel free to call me 
at 318-338-2034.

Thank you for your time,

Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A
==
Bayou Internet..(888) 
30-BAYOUhttp://www.bayou.com
Mississippi Internet...(800) 
MISSISSIPPI...http://www.mississippi.net
Vicksburg Online..(800) 
MISSISSIPPIhttp://www.vicksburg.com
==
Tel: (318) 338-2034ICQ: 38823829 Fax: 
(318) 323-5053



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




[PHP] PEAR vs. ADODB

2002-04-01 Thread jon

Hey folks...

Does anyone out there have a feel for how widely distributed the PEAR
libraries are? I want to add DB abstraction to my project, but I don't want
to use PEAR if it's going to horribly inconvenience all the people out there
on managed servers.

Has any played around with the ADODB libraries? What do you think?

-- jon




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




Re: [PHP] PEAR vs. ADODB

2002-04-01 Thread Jochen Kaechelin

Am Dienstag, 2. April 2002 00:35 schrieb jon:
> Hey folks...
>
> Does anyone out there have a feel for how widely distributed the
> PEAR libraries are? I want to add DB abstraction to my project,
> but I don't want to use PEAR if it's going to horribly
> inconvenience all the people out there on managed servers.
>
> Has any played around with the ADODB libraries? What do you
> think?


Take a look at

http://php.weblogs.com/ADOdb

It works great!

-- 
Jochen

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




RE: [PHP] New php functions?

2002-04-01 Thread Jason Murray

> It begs the question, why don't you just download the manual? 
> It's available in a myriad of different formats, one of which 
> must suit you. It may not be bang up-to-date and it may not have 
> the (sometimes) useful user comments but it sure saves you a lot 
> of time and bandwidth.

Heheh ... well, for one, it's not my bandwidth :) And the time it
takes to open a new browser and type www.php.net/date and download
the page is a lot faster than the amount of time it'd take to find
out where the heck I put the downloaded document, then find the
right page / entry / etc... :)

J

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




  1   2   >