[PHP] PDF generation

2002-03-08 Thread Jean-Arthur Silve

Hello, I use PDF function to generate a PDF file.

It works fine except I cannot generate a document with more than 10 pages !

For each page I use pdf_begin_page($pdf, 595, 842);
I close each page with pdf_end_page


Any ideas ??

jean-arthur




EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr



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




[PHP] (htaccess) not letting php to parse

2002-03-08 Thread Lauri Vain

Hi there, 

I would prefer to take away the possibility for PHP to parse my
documents in the /uploaded/ directory. 

What has to be written into the .htaccess file for PHP *not* to parse
*anything* therein (not .php, not .phtml, not .html, not .php3, not
.blah... in a word -- NOTHING). 

It would be very bad when somebody could upload malicious code to my
server, wouldn't it! 

Thanks!
Lauri


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




Re: [PHP] using a variable to a function call

2002-03-08 Thread Matt Williams

On Thursday 07 March 2002 19:21, Lars Torben Wilson wrote: 

 // The direct way:
 $foo-{$test . '_foo'}();

Thanks Lars

This was what I was looking for, just couldn't remember the syntax


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




[PHP] Re: mail() getenv() problems (after 4.1.2 update)...

2002-03-08 Thread Keith Waters

I'm having the same problem -

I've been using the mail() command for quite some time now and it's been
working 100% and executing immediately.

Suddenly, this morning, it is taking about 60 seconds to send mail, delaying
the display of the php web page by that same amount of time.

I have checked the mail server and sending mail from the command prompt
(linux) and there is no delay there.

Does anybody have any clue? I even momentarily downgraded to 4.1.0 to make
sure it wasnt a bug in 4.1.2


Paul [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Can nobody help?  This is so frustrating.  I cannot see what's wrong, open
 to ANY suggestions!

 Thanks.

 Paul
 Paul [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hello,
 
  I wonder if anyone can help me with a problem I have.  I have some sites
  hosted on a Cobalt Raq4 server (not sure if this is relevant).  I
recently
  upgraded PHP from a package at www.pkgmaster.com, and since making this
  upgrade I have problems with PHP that I cannot find the solution to.
 
  I have conacted their 'team' who have thus far offered no explanation,
  saying it must be something else causing these issues with PHP, but I
  haven't made any more changes, just installed the new PHP version.
 
  The problems are with the mail() function taking an AGE to excecute, and
  environmental HTTP header information not being sent/recieved by
getenv().
 
  Some examples follow..
 
  For example, as an extremely basic example of the mail function going
 slow,
  this simple script:
  ?
  mail([EMAIL PROTECTED], Test subject, Test message);
  print finished!;
  ?
 
  Which can be found at http://www.clicktolearn.co.uk/test/mail.php in
 action,
  ran (as it should do) extremely fast the week before I made the upgrade
 from
  the packages.  Now, as you will see, it runs dog slow.
 
  Secondly, the following script shows the lack of headers:
  http://www.clicktolearn.co.uk/test/  (click the link, so there's a
referer
  to the script page)...
 
  ?
  function get_http_headers($url, $proto=HTTP/1.0, $timeout=10) {
  $return = false;
  if (substr($url,0,7)==http://;) {
  $url = substr($url,7);
  }
 
  $parts = parse_url(http://.$url);
 
  $ips = gethostbynamel($parts[host]);
 
  if ($ips[0]) {
  $ip = $ips[0];
  $host = $parts[host];
  $path = ($parts[path]) ? $parts[path] : /;
  $port = ($parts[port]) ? $parts[port] : 80;
 
  $start = time();
  $timeout = $timeout + $start;
 
  if($sock = fsockopen($host, $port)) {
  set_socket_blocking($sock, 0);
  switch($proto) {
  case HTTP/1.1:
  set_socket_blocking($sock, 1);
  fputs($sock, sprintf(HEAD %s
 %s\n,
  $path, $proto));
  fputs($sock, sprintf(Host:
 %s\n\n,
  $host));
  break;
  default:
  fputs($sock, sprintf(HEAD %s
  %s\n\n, $path, $proto));
  }
 
  while(!feof($sock)  $t$timeout) {
  $line .= fgets($sock,1);
  $t = time();
  }
  fclose($sock);
  $end = time();
 
  if ($t=$timeout) {
  $http = parse_output($line);
  $http[result] = 502;
  $http[message] = Timed Out;
  $http[time_used] = $end - $start;
  $return = $http;
  } elseif($line) {
  $http = parse_output($line);
  $http[time_used] = $end - $start;
  $return = $http;
  }
  }
  }
  return $return;
  }
 
  function parse_output($line) {
  $lines = explode(\n, $line);
  if(substr($lines[0],0,4)==HTTP) {
  list($http[protocol], $http[result], $http[message]) =
  split([[:space:]]+,$lines[0],3);
  } else if(substr($lines[0],0,7)==Server:) {
  $http[server] = substr($lines[0],8);
  }
  for ($i=1; $icount($lines); $i++) {
  list($key, $val) = split(:[[:space:]]*, $lines[$i],2);
  $key = strtolower(trim($key));
  if ($key) {
  $http[$key] = trim($val);
  } else {
  break;
  }
  }
  return($http);
  

[PHP] Number of Vars in session

2002-03-08 Thread Beta

Can somebody tell me how many variables can i store in one session,
or how many KB can one session resist



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




[PHP] General

2002-03-08 Thread Gunther E. Biernat

Guys,

I want to randomly pick one of a number of values, with given probability for each 
item, e.g.

abc 50%
def 25%
ghi 25%

The obvious way is to take a list where the 50% item is given twice and then randomly 
pick one, but what if I want to use a probability of 51.3% (and don't tell me of a 
list with 1000 entries and 513 times the 'abc' item *g*).

This seems to be trivial, but I just can't think of a simple and proper way to do it.

Any ideas?

Regards,

Gunther E. Biernat



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




php-general Digest 8 Mar 2002 10:34:10 -0000 Issue 1214

2002-03-08 Thread php-general-digest-help


php-general Digest 8 Mar 2002 10:34:10 - Issue 1214

Topics (messages 87696 through 87749):

Referer Is Empty
87696 by: Steven Walker
87726 by: Bogdan Stancescu

Re: Rasmus, O'Reilly, Programming PHP
87697 by: Paul Roberts
87707 by: Erik Price
87717 by: DL Neil
87722 by: Rasmus Lerdorf

bug???
87698 by: Rodrigo Peres

Re: User accounts
87699 by: David Johansen
87712 by: Kevin Stone

Add associative element to an an array
87700 by: Bradley Goldsmith
87702 by: Matt Drake
87703 by: Bradley Goldsmith
87704 by: Mark
87705 by: Erik Price

dealing with # in urls
87701 by: Mark
87743 by: CC Zona

Re: php, text file, and mysql
87706 by: Erik Price
87708 by: Jason Murray
87709 by: Darren Gamble
87710 by: Julio Nobrega

Re: A good PHP Shop
87711 by: Matt

Re: Session_start()
87713 by: Matthew Walker
87716 by: Erik Price

Re: What is - mean in php?
87714 by: Kearns, Terry
87724 by: Stephano Mariani
87727 by: Douglas Maclaine-cross
87738 by: S.Murali Krishna

php questions about cookies
87715 by: zhaoxd

Re: writing to a file
87718 by: David Robley

Re: impossible to delete file after 'parse_ini_file'
87719 by: David Robley

Re: REQUEST QUESTION
87720 by: David Robley
87730 by: karthikeyan

Re: Use an ini file
87721 by: David Robley
87725 by: jtjohnston
87729 by: David Robley

Re: Alphabet
87723 by: Angel Fenoy

Urgent - MySQL is not inserting the single quotes
87728 by: Manisha
87732 by: Analysis  Solutions
87735 by: Manisha
87740 by: Analysis  Solutions
87742 by: Jason Wong

data to multi-dimensional array
87731 by: Craig Westerman

Dbconnect
87733 by: Josiah Wallingford
87734 by: Michael Kimsal

A silly question. :P
87736 by: GENESiS DESiGNS
87737 by: Jason Murray

Re: Crontab
87739 by: Uma Shankari T.
87741 by: S.Murali Krishna

PDF generation
87744 by: Jean-Arthur Silve

(htaccess) not letting php to parse
87745 by: Lauri Vain

Re: using a variable to a function call
87746 by: Matt Williams

Re: mail()  getenv() problems (after 4.1.2 update)...
87747 by: Keith Waters

Number of Vars in session
87748 by: Beta

General
87749 by: Gunther E. Biernat

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]


--

---BeginMessage---

Hello,

I'm having trouble getting the referring url. I have tried:
$HTTP_REFERER
getenv(HTTP_REFERER);
$_SERVER[HTTP_REFERER];
... but they are all blank.

The referring page has a meta http-equiv=Refresh header. If the user 
waits for the page to automatically redirect, the referring url is 
empty. If on the other hand the user clicks the link to the new page, 
the referring url is fine. Is there a limitation here?

I'm familiar with using header(location..), but it doesn't allow a delay 
time to be specified. Any ideas?

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


---End Message---
---BeginMessage---

Javascript, if that's acceptable for the environment you're working in...

Bogdan

Steven Walker wrote:

 Hello,

 I'm having trouble getting the referring url. I have tried:
 $HTTP_REFERER
 getenv(HTTP_REFERER);
 $_SERVER[HTTP_REFERER];
 ... but they are all blank.

 The referring page has a meta http-equiv=Refresh header. If the user 
 waits for the page to automatically redirect, the referring url is 
 empty. If on the other hand the user clicks the link to the new page, 
 the referring url is fine. Is there a limitation here?

 I'm familiar with using header(location..), but it doesn't allow a 
 delay time to be specified. Any ideas?

 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]






---End Message---
---BeginMessage---


Amazon have it listed as folows.

http://www.amazon.com/exec/obidos/ASIN/1565926102/qid=1015539436/sr=2-3/ref=sr_2_3/104-7882944-0058305

List Price: $39.95
Our Price: $27.96
You Save: $11.99 (30%)

This item will be published in March 2002. You may order it now and we will ship it to 
you when it arrives. 

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: Erik Price [EMAIL PROTECTED]
To: DL Neil [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 07, 2002 8:53 PM
Subject: Re: [PHP] Rasmus, O'Reilly, Programming PHP


 
 On Thursday, March 7, 2002, at 06:05  AM, DL Neil wrote:
 
  Rasmus/others,
 
  O'Reilly are advertising the imminent release (Mar 2002) of Programming
  PHP 

[PHP] Date

2002-03-08 Thread Yogesh

Hi! can someone please tell me how to get the current date? Well, the thing is, i 
want to manage a subscription, so, in my database, i have a field called 
date_registered which will be assigned to the date that any user registers... so, i 
have to capture that date value which can vary depending on when a user registers.

So, let's say $date1 will be assigned to that value.


Now, how can i perform addition with the date so that i mail that user 3 months after 
the date he registered that his registration has expired?

Therefore, i'll be having 2 dates

$date1 = the date the user registers;
$date2 = $date1 + 3months


can someone please help me with that?

Thanks and regards,
Yogesh Mahadnac



[PHP] Database abstraction layer oci

2002-03-08 Thread DrouetL


Hi everybody.

I would like your opinion on the Database Abstraction Layer you prefer (I
will use it with Oracle 8i)
I know that there is Metabase end Pear DB

What's  your opinion on both or others ?

Laurent Drouet



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




Re: [PHP] Date

2002-03-08 Thread RIVES Sergio

Hi

try the function getdate()
check this page for examples :
http://www.php.net/manual/en/function.getdate.php
i hope it could help you.


Yogesh a écrit :

 Hi! can someone please tell me how to get the current date? Well, the thing is, 
i want to manage a subscription, so, in my database, i have a field called 
date_registered which will be assigned to the date that any user registers... so, i 
have to capture that date value which can vary depending on when a user registers.

 So, let's say $date1 will be assigned to that value.

 Now, how can i perform addition with the date so that i mail that user 3 months 
after the date he registered that his registration has expired?

 Therefore, i'll be having 2 dates

 $date1 = the date the user registers;
 $date2 = $date1 + 3months

 can someone please help me with that?

 Thanks and regards,
 Yogesh Mahadnac


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




[PHP] MySQL

2002-03-08 Thread Roman Duriancik

I have mysql table with 3 columns I need update all data in one rows that
all data in this rows will be same but without space.How I do this ?

Example

before
table:
ID  memodata
1   21  ab vbd
2   ds  1 c 23
3   
..

after 
table:
ID  memo  data
1   21  abvbd
2   ds  1c23
...

Thank you

roman






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




RE: [PHP] Re: User accounts

2002-03-08 Thread Tim Ward

Surely an empty string is == false.

In fact I'd be interested if anyone can come up with a situation where  !$x
doesn't return the same as empty($x)

i.e. can anyone get a value of $x such that !$x !== empty($x) 

Tim Ward
Internet Chess www.chessish.com http://www.chessish.com 

--
From:  Kevin Stone [SMTP:[EMAIL PROTECTED]]
Sent:  07 March 2002 23:56
To:  'David Johansen'; [EMAIL PROTECTED]
Subject:  RE: [PHP] Re: User accounts

I understand your confusion.  The thing is that empty() and ! are
two
completely different arguments.

if(empty($var)) is looking for: $var = '';

if(!$var) is looking for: $var = false; or $var = 0;

If $var is set to anything other than 0 or false then the ASCII
value of
the string is (by definition) equivilant to an integer value of 1 or
more.  And thus is interpreted as true.

Hope that helps.

-Kevin

-Original Message-
From: David Johansen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 3:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: User accounts

Here's a little piece of code that gives me a weird problem:

?php
if (!$logout)
{
   if ($_SESSION['loggedin'])
   {
  unset($_SESSION['loggedin']);
   }
}
?


I have the session started and everything, but it gives me the
following
error.
Warning: Undefined variable: logout in
c:\inetpub\wwwroot\uslogin.php on
line 13
I've seen this used on several examples. I know that if I just use
empty($logout) then it'll work ok, but I just wanted to know why
it's
used
in so many examples but doesn't work in my code. Is there some
setting
that
I have set wrong or something? Thanks,
Dave

David Johansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm new to this php thing and I would like to set up a web page
were
the
 users can login and edit their preferences and all that stuff. I
have
the
 basic login stuff worked out and I was passing the username and
password
as
 a hidden input in the form, but then the password can be seen with
view
 source. I know that there's a better way to do this, so could
someone
point
 me to a good tutorial or example on how I could make it so that
the
user
 could login and logout and then I wouldn't need to be passing the
password
 all around like this. Thanks,
 Dave





-- 
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: mail() getenv() problems (after 4.1.2 update)...

2002-03-08 Thread Paul

Keith, can you tell me if you're also having the same issue with getenv() as
I am?  I am glad it's not just me experiencing this issue, as no-none
replied I was beginning to wonder!

Paul

Keith Waters [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm having the same problem -

 I've been using the mail() command for quite some time now and it's been
 working 100% and executing immediately.

 Suddenly, this morning, it is taking about 60 seconds to send mail,
delaying
 the display of the php web page by that same amount of time.

 I have checked the mail server and sending mail from the command prompt
 (linux) and there is no delay there.

 Does anybody have any clue? I even momentarily downgraded to 4.1.0 to make
 sure it wasnt a bug in 4.1.2


 Paul [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Can nobody help?  This is so frustrating.  I cannot see what's wrong,
open
  to ANY suggestions!
 
  Thanks.
 
  Paul
  Paul [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hello,
  
   I wonder if anyone can help me with a problem I have.  I have some
sites
   hosted on a Cobalt Raq4 server (not sure if this is relevant).  I
 recently
   upgraded PHP from a package at www.pkgmaster.com, and since making
this
   upgrade I have problems with PHP that I cannot find the solution to.
  
   I have conacted their 'team' who have thus far offered no explanation,
   saying it must be something else causing these issues with PHP, but I
   haven't made any more changes, just installed the new PHP version.
  
   The problems are with the mail() function taking an AGE to excecute,
and
   environmental HTTP header information not being sent/recieved by
 getenv().
  
   Some examples follow..
  
   For example, as an extremely basic example of the mail function going
  slow,
   this simple script:
   ?
   mail([EMAIL PROTECTED], Test subject, Test
message);
   print finished!;
   ?
  
   Which can be found at http://www.clicktolearn.co.uk/test/mail.php in
  action,
   ran (as it should do) extremely fast the week before I made the
upgrade
  from
   the packages.  Now, as you will see, it runs dog slow.
  
   Secondly, the following script shows the lack of headers:
   http://www.clicktolearn.co.uk/test/  (click the link, so there's a
 referer
   to the script page)...
  
   ?
   function get_http_headers($url, $proto=HTTP/1.0, $timeout=10) {
   $return = false;
   if (substr($url,0,7)==http://;) {
   $url = substr($url,7);
   }
  
   $parts = parse_url(http://.$url);
  
   $ips = gethostbynamel($parts[host]);
  
   if ($ips[0]) {
   $ip = $ips[0];
   $host = $parts[host];
   $path = ($parts[path]) ? $parts[path] : /;
   $port = ($parts[port]) ? $parts[port] : 80;
  
   $start = time();
   $timeout = $timeout + $start;
  
   if($sock = fsockopen($host, $port)) {
   set_socket_blocking($sock, 0);
   switch($proto) {
   case HTTP/1.1:
   set_socket_blocking($sock, 1);
   fputs($sock, sprintf(HEAD %s
  %s\n,
   $path, $proto));
   fputs($sock, sprintf(Host:
  %s\n\n,
   $host));
   break;
   default:
   fputs($sock, sprintf(HEAD %s

   %s\n\n, $path, $proto));
   }
  
   while(!feof($sock)  $t$timeout) {
   $line .= fgets($sock,1);
   $t = time();
   }
   fclose($sock);
   $end = time();
  
   if ($t=$timeout) {
   $http = parse_output($line);
   $http[result] = 502;
   $http[message] = Timed Out;
   $http[time_used] = $end - $start;
   $return = $http;
   } elseif($line) {
   $http = parse_output($line);
   $http[time_used] = $end - $start;
   $return = $http;
   }
   }
   }
   return $return;
   }
  
   function parse_output($line) {
   $lines = explode(\n, $line);
   if(substr($lines[0],0,4)==HTTP) {
   list($http[protocol], $http[result], $http[message]) =
   split([[:space:]]+,$lines[0],3);
   } else if(substr($lines[0],0,7)==Server:) {
   

Re: [PHP] (htaccess) not letting php to parse

2002-03-08 Thread Matt


- Original Message - 
From: Lauri Vain [EMAIL PROTECTED]


 Hi there, 
 
 I would prefer to take away the possibility for PHP to parse my
 documents in the /uploaded/ directory. 

Why don't you append someother suffix to the file when it's uploaded?



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




Re: [PHP] Date

2002-03-08 Thread Matt

- Original Message -
 From: Yogesh [EMAIL PROTECTED]
   Hi! can someone please tell me how to get the current date?
See: http://www.php.net/manual/en/function.mktime.php

Now, how can i perform addition with the date so that i mail that user 3
months after the date
 he registered that his registration has expired?
Since unix timestamps are in seconds, 3 months is 60*60*24*90
(secs*minutes*hours*days), although that's not quite the same as 3 months.
Using a combination of php date/time functions you can come up with exactly
what you want. Also look at whatever db software you're using, it certainly
will have date functions. Date and time coding is always tedious.  You might
search in the function library on http://www.zend.com/ and see if there's
something there that might be useful to you.


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




[PHP] PHP Server platform

2002-03-08 Thread Dani

Hi,


I'm new to server issue, I would like to know what is the difference
between Linux and Unix?

If I want to setup a server which one is the most commond one and good
one? Lunix or Unix or Apache?

sorry if this sounds like a silly question, but I don't know about it
and I would like to learn. I hope someone could help me.

thanks

Regards,
Dani


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




[PHP] Query bug, what is wrong?

2002-03-08 Thread Daniel F. Castro

?php
   $qname  = $HTTP_POST_VARS['ct_nome'];
   $qkey   = $HTTP_POST_VARS['ct_kw'];
   $qdia   = $HTTP_POST_VARS['ct_dia'];
   $qmes   = $HTTP_POST_VARS['ct_mes'];
   $qano   = $HTTP_POST_VARS['ct_ano'];
   $qautor = $HTTP_POST_VARS['ct_autor'];
   $qeng   = $HTTP_POST_VARS['cS_eng'];
   $qdes   = $HTTP_POST_VARS['cS_des'];
   $qFILE  = FILES;
   $host   = localhost;
   //Database Conection
   $link = mysql_connect($host,root,root)
 or die(Not possible to connect);
   print(Connection OK);
   //Database Selection
   mysql_select_db(test)
 or die(mysql_error());
   print(Selection OK);
   $query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
 ($qname,$qdes,$qFILE,'ok');
   print $qname;
   print $qkey;
   print $qautor;
   print $qdia/$qmes/$qano;
   //My Query
   mysql_query ($query)
 or Die (mysql_error());
   echo Projecto registered;

   // Closing connection
   mysql_close($link);
 ?

 Thanks you

 Daniel Castro




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




Re: [PHP] Query bug, what is wrong?

2002-03-08 Thread Jason Wong

On Friday 08 March 2002 21:29, Daniel F. Castro wrote:
 ?php
$qname  = $HTTP_POST_VARS['ct_nome'];
$qkey   = $HTTP_POST_VARS['ct_kw'];
$qdia   = $HTTP_POST_VARS['ct_dia'];
$qmes   = $HTTP_POST_VARS['ct_mes'];



[snip]

What's wrong with it? What was the error msg if any?


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


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




Re: [PHP] Query bug, what is wrong?

2002-03-08 Thread Daniel F. Castro

The error msg is

You have an error in your SQL syntax near 'ARQUIVO,NULL)' at line 1

Daniel Ferreira Castro
Jason Wong [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]...
 On Friday 08 March 2002 21:29, Daniel F. Castro wrote:
  ?php
 $qname  = $HTTP_POST_VARS['ct_nome'];
 $qkey   = $HTTP_POST_VARS['ct_kw'];
 $qdia   = $HTTP_POST_VARS['ct_dia'];
 $qmes   = $HTTP_POST_VARS['ct_mes'];



 [snip]

 What's wrong with it? What was the error msg if any?


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




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




Re: [PHP] Query bug, what is wrong?

2002-03-08 Thread Jason Wong

On Friday 08 March 2002 21:56, you wrote:
 The error msg is

 You have an error in your SQL syntax near 'ARQUIVO,NULL)' at line 1


Try entering that query into mysql at the command line. Does it work?


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

/*
Mark's Dental-Chair Discovery:
Dentists are incapable of asking questions that require a
simple yes or no answer.
*/

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




[PHP] Re: PHP Server platform

2002-03-08 Thread J Smith


Linux is a form of Unix, one that is available free, as in it costs 
nothing, you are free to copy it and use it on as many computers as you 
like, and you can, if you are so inclined, make changes to the operating 
system as the full source code for the kernel is available to you.

There are many forms of Unix, such as Sun's Solaris, HP's HP-UX, Digital 
UNIX, any of the *BSD systems, and Linux. Linux is just another form of 
Unix-like system. There are other freely available Unix systems, like the 
BSD systems (OpenBSD, NetBSD, FreeBSD), while other ones you usually have 
to pay for, and likely won't get complete access to the source. (Some are 
in-between, like Solaris, which you can download for free under certain 
circumstances, and you can get the source code, but you can't really 
distribute changes to the OS.)

As for the most common Unix, these days it feels like Linux, 'cause it's 
all the rage, but the most common on the big-ass servers are the 
proprietary Unices, like Solaris. 

Apache isn't a Unix system at all, it's just a web server, like Microsoft's 
IIS. Apache can be used on pretty much any Unix system, and can even be 
used on Windows platforms. (Although it's generally more stable and faster 
on Unix systems.)

If you're really new to Unix systems (and it sounds like you are) pick up a 
Linux distribution like Mandrake, RedHat, or SuSE, as they're generally the 
easiest to install. Once you get used to Unix-like systems, you can 
generally move between them fairly easily, although there is a learning 
curve. (For instance, while Solaris and Linux are both Unices, there are 
quite a few differences, but if you can get used to one, it makes learning 
the other relatively easy, versus only knowing Windows or whatever.)

IMHO, of course.

J



Dani wrote:

 Hi,
 
 
 I'm new to server issue, I would like to know what is the difference
 between Linux and Unix?
 
 If I want to setup a server which one is the most commond one and good
 one? Lunix or Unix or Apache?
 
 sorry if this sounds like a silly question, but I don't know about it
 and I would like to learn. I hope someone could help me.
 
 thanks
 
 Regards,
 Dani


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




RE: [PHP] Database abstraction layer oci

2002-03-08 Thread Andrew Hill

I suggest simply using ODBC.

Best regards,
Andrew Hill
Director of Technology Evangelism
http://www.openlinksw.com/virtuoso/whatis.htm
OpenLink Virtuoso Internet Data Integration Server 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 08, 2002 5:39 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Database abstraction layer oci
 
 
 
 Hi everybody.
 
 I would like your opinion on the Database Abstraction Layer you prefer (I
 will use it with Oracle 8i)
 I know that there is Metabase end Pear DB
 
 What's  your opinion on both or others ?
 
 Laurent Drouet
 
 
 
 -- 
 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] Configuring /etc/syslog.conf to redirect PHP errors to a separate file

2002-03-08 Thread Michael Sims

I hope this isn't too obvious of a question, but I've been looking around 
for the past hour and can't seem to find an answer to this.

Currently I have set the error_log = syslog directive in my php.ini file 
(this is on a Redhat 7.2 machine running PHP 4.1.2, and the syslog deamon 
that comes with RH 7.2 (sysklogd-1.4.1-4)) and it's working fine, sending 
all PHP errors to /var/log/messages.

I'd love to be able to send any errors from PHP to a completely separate 
file, say something like /var/log/php_errors.  Does anyone know of a way to 
do this?  I gather it has to do with using /etc/syslog.conf to redirect 
messages from a particular facility to that file, but I have no idea which 
facility PHP uses.  I tried grepping the source but it's a bit over my head 
so I didn't really know what to look for...

I'd be extremely grateful for any assistance...


-
Michael Sims
mhsims at midsouth dot rr dot com

The Web site you seek
Can not be located but
Countless more exist.
-


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




[PHP] opendir problem on solaris

2002-03-08 Thread Nick selby

Hi,
I've got a script that is installed on a Solaris machine that is having 
difficulties, and I'm wondering if anyone can help.

The script is trying to access and read files within a directory, pull some 
at random and put them in a webpage.


The path is correct, the directory is set to 755 and I can view the files 
when I browse in. The script is up and running perfectly on two other 
servers - one on Red Hat Linux and one on Win2k.


The script is this:
?php
// This pulls 3 random banners from the appropriate
// subdirectory of the images section of the site
$i=-1;
$banners=opendir($SECTION_SIDEBAR_BANNERS);
if ($banners != FALSE) {
while (($file = readdir($banners)) != FALSE)
if ($file != .  $file != ..) $banner_list[$i++]=$file;
closedir($banners);
$l=sizeof($banner_list);
if ($l!=0) {
for ($i=0;$i3;$i++) {
   $ad=$banner_list[rand(0,$l)];
   if (empty($ad)) { $i-=1; continue; }
   $imginfo=getimagesize($SECTION_SIDEBAR_BANNERS/$ad);
   $link=str_replace('.gif','',$ad);
   $link=str_replace('.jpg','',$ad);
   $link=str_replace('_','/',$ad);
   echo 
div class='sidebar-banner-slot'
 a href='$SECTION_URL.ad-clickthrough.htm?AD_URL=$link'img src='.
 $SECTION_SIDEBAR_BANNERS_URL.
 /$ad' height='$imginfo[1]' width='$imginfo[0]' border='0' alt='Visit
$link' //a
/div;
}
} // $l != 0
} // $banner != FALSE
?

The problem on the solaris machine is that opendir is getting in to the
directory but from that point the server won't let the script read the
files. It kicks back the error:

Warning: 1 is not a valid Directory resource in
/data0/foo.org/members/foo/foo/html/destinations/templates/foo.footer.php
on line 20
(Identifying directories are foo'd out)

Since it kicks back the 1 and not a false, it seems it's getting access
but then not being permitted. Here's something else  - the problem is
intermittent: sometimes the script can grab the images and others not.

Can anyone help?

Many thanks in advance.

NIck




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




RE: [PHP] Database Error

2002-03-08 Thread Robert V. Zwink

Check syntax for mysql_query() function.  You don't need to pass the
database name.  See here:
http://www.php.net/manual/en/function.mysql-query.php

You're query method then becomes:

function query($query) {
  $connection = mysql_connect($this-hostname, $this-user,
$this-pass) or die (Cannot connect to database);

mysql_select_db ($this-db, $connection);  // You forgot this step

// Also change the following line, you don't need
// to pass the database name
  $ret = mysql _query($query, $connection) or die (Error
in query: $query);
  return $ret;
}


Robert Zwink
http://www.zwink.net

-Original Message-
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:59 PM
To: 'Robert V. Zwink'
Subject: RE: [PHP] Database Error


I just tried that Robert. It still gives me the same error that it did
before. There is no error after the mysql_connect. It definitely is
connecting. If it didn't connect then it wouldn't pass the query to the
database in the first place and spit out an error on the SQL syntax. I
checked the syntax on the MySQL command line and it worked just fine. So
it's not the syntax either. I don't know what it could be  :(

-Original Message-
From: Robert V. Zwink [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 3:42 PM
To: Navid Yar
Subject: RE: [PHP] Database Error

Could you try changing your query() method to

function query($query) {
  $connection = mysql_connect($this-hostname, $this-user,
$this-pass) or die (Cannot connect to database);

echo mysql_error();  // put this here

  $ret = mysql _query($this-db, $query, $connection) or die (Error
in query: $query);
  return $ret;
}

I think echoing out the mysql_error() will help pinpoint the problem.
Seems
like it is unable to connect?

Robert Zwink
http://www.zwink.net/daid.php




-Original Message-
From: Navid Yar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:42 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Database Error


Yes, Jason. I posted it earlier, but here it is again.


// Error I'm getting
Error in query: SELECT label FROM menu WHERE id = 3
Warning: Supplied argument is not a valid MySQL result resource in
e:\localhost\menu\menu.class.php on line 47



// Object being called from get.php
?php
require(menu.class.php);
$obj = new Menu();
echo $obj-get_label(1);
?



// Class in the file menu.class.php
class Menu {
   var $hostname;
   var $user;
   var $pass;
   var $db;
   var $table;

   function Menu() {
  $this-set_database_parameters(localhost, username,
password, apps, menu);
   }

   function set_database_parameters($hostname, $user, $password, $db,
$table) {
  $this-hostname = $hostname;
  $this-user = $user;
  $this-password = $password;
  $this-db = $db;
  $this-table = $table;
   }

   function query($query) {
  $connection = mysql_connect($this-hostname, $this-user,
$this-pass) or die (Cannot connect to database);
  $ret = mysql _query($this-db, $query, $connection) or die (Error
in query: $query);
  return $ret;
   }

   function get_label($id) {
  $query = SELECT label FROM $this-table WHERE id = $id;
  $result = $this-query($query);
  $row = mysql_fetch_row($result);
  return $row[0];
   }
}


--
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] Query bug, what is wrong?

2002-03-08 Thread Robert V. Zwink

You probably need to wrap the strings you are trying to input with quotation
marks.

Try modifying this line  (add \) :
   $query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
 (\$qname\,\$qdes\,\$qFILE\,'ok');

Robert Zwink
http://www.zwink.net/daid.php


-Original Message-
From: Daniel F. Castro [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 8:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Query bug, what is wrong?


?php
   $qname  = $HTTP_POST_VARS['ct_nome'];
   $qkey   = $HTTP_POST_VARS['ct_kw'];
   $qdia   = $HTTP_POST_VARS['ct_dia'];
   $qmes   = $HTTP_POST_VARS['ct_mes'];
   $qano   = $HTTP_POST_VARS['ct_ano'];
   $qautor = $HTTP_POST_VARS['ct_autor'];
   $qeng   = $HTTP_POST_VARS['cS_eng'];
   $qdes   = $HTTP_POST_VARS['cS_des'];
   $qFILE  = FILES;
   $host   = localhost;
   //Database Conection
   $link = mysql_connect($host,root,root)
 or die(Not possible to connect);
   print(Connection OK);
   //Database Selection
   mysql_select_db(test)
 or die(mysql_error());
   print(Selection OK);
   $query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
 ($qname,$qdes,$qFILE,'ok');
   print $qname;
   print $qkey;
   print $qautor;
   print $qdia/$qmes/$qano;
   //My Query
   mysql_query ($query)
 or Die (mysql_error());
   echo Projecto registered;

   // Closing connection
   mysql_close($link);
 ?

 Thanks you

 Daniel Castro




--
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] Changing an XML-file

2002-03-08 Thread Léon Hoeneveld

I want to use XML-files not just for reading but also for writing. In fact I
want to update values in an XML-file as if they were database tables. Does
anyone have an example or link for that?

Regards, Léon Hoeneveld


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




Re: [PHP] Date

2002-03-08 Thread Pablo

On 3/8/02 4:55 AM, Yogesh ([EMAIL PROTECTED]) wrote:

 Now, how can i perform addition with the date so that i mail that user 3
 months after the date he registered that his registration has expired?

Are you using MySQL?  If so, you may find the DATE_ADD() function useful:

DATE_ADD(date_registered, INTERVAL 3 MONTH)

Pablo


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




Re: [PHP] A silly question. :P

2002-03-08 Thread Billy S Halsey

Greetings Sean,

The ! in front of strcasecmp means, if strcasecmp returns zero. If you 
look at the reference manual for strcasecmp and strcmp, you'll see that 
it returns zero if the two strings are equivalent -- somewhat of a 
strange return value, but (1) that's how C/C++ do it; and (2) it has 
value in that a positive or negative return value tells you which string 
comes first, so a zero means they are equivalent.

Regards,
/bsh/

GENESiS DESiGNS wrote:

Hello everyone,

I would like to know why you put this character (!) in front of this:
?php
$var1 = Hello;
$var2 = hello;
if (!strcasecmp($var1, $var2)) {
echo '$var1 is equal to $var2 in a case-insensitive string comparison';
}
?
Do you see the (!) in front of the strcasecmp() function? That! Why do you put 
that there? 

I'm trying to learn PHP, but it's been kinda hard. THANKS A LOT GUYS! 

-GENESiS DESiGNS
-Sean Kennedy
-http://www.gdesigns.vcn.com


-- 


/-=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer. |
\--=[ [EMAIL PROTECTED] ]=/




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




[PHP] how to calculate frequency of words in array?

2002-03-08 Thread Simon De Deyne

Does anybody has a clever way to summarize the
number of different words (with multiple occurences)
from an array into an  array with all the different words
and the times they occured?

Thanks a lot!
Simon


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




Re: [PHP] how to calculate frequency of words in array?

2002-03-08 Thread Andrey Hristov

array_count_values()

Best regards,
Andrey Hristov

On Friday 08 March 2002 04:45 pm, you wrote:
 Does anybody has a clever way to summarize the
 number of different words (with multiple occurences)
 from an array into an  array with all the different words
 and the times they occured?

 Thanks a lot!
 Simon

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




RE: [PHP] MySQL

2002-03-08 Thread Robert V. Zwink

How about:

UPDATE table SET data = REPLACE(data,  , )

For more information about the UPDATE query:
http://www.mysql.com/doc/U/P/UPDATE.html

For more information about MySQL string functions:
http://www.mysql.com/doc/S/t/String_functions.html

Robert Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Roman Duriancik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 5:52 AM
To: PHP-General
Subject: [PHP] MySQL


I have mysql table with 3 columns I need update all data in one rows that
all data in this rows will be same but without space.How I do this ?

Example

before
table:
ID  memodata
1   21  ab vbd
2   ds  1 c 23
3   
..

after 
table:
ID  memo  data
1   21  abvbd
2   ds  1c23
...

Thank you

roman






-- 
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] TEXT BOX + USER

2002-03-08 Thread Dani

Hi,

I have got a webiste where a user can update data using a text box.

the user usualy use ENTER to create new lines or paragraphs.

I want to save the data enter by user into MySQL database INCLUDING the
new paragraph so that when I display the data on a webpage, the
paragraph is still there.

I have tried some testing but I always get the result entered by users
are flat. The paragraphs are gone. How do I do this?


regards,

Dani


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




[PHP] BIG PROBLEm with headers

2002-03-08 Thread Krzysztof Kocjan

Hi

I have problem with downloading any file from my site using IE 5.5 and 
HTTPS protocol. My php script works fine with Netscape 6.2 and 
HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol.
I can't find problem.
I use Apache 1.3.20, PHP 4.0.6, mod_ssl 2.8.4 and OpenSSL 0.9.6 on 
RedHat 7.1 platform.
My download php script is so simple, but I present it below:

?

header( 'Content-Encoding: gzip');
header( 'Content-Type: application/x-gzip' );
header( 'Content-Disposition: attachment; filename=file.txt.gz' );

readfile( '/tmp/file.txt.gz' );
exit();

?

As I said it works fine with Netscape 6.2 for both HTTP and HTTPS and 
only with IE 5.5 for HTTP. Is there any expert how can tell me what is 
it wrong or what I have to do to use IE 5.5 and HTTPS protocol for 
downloading gziped files (or any other files) from my site. All pages in 
my site work fine except this simple one.

Thank You very much for any help.

Krzysiek


--
Wejdz do gry! Pilkarska Ruletka!  http://ruletka.interia.pl/



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




RE: [PHP] Alphabet

2002-03-08 Thread Robert V. Zwink

What could be simpler than:

$range = implode( , range('A', 'Z'));
echo $range;

result:
A B C D . . .

Am I missing something here?  All this loop, chr()  ord() stuff going on. .
.

Robert Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Robert V. Zwink [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 8:59 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Alphabet


Or how about:

foreach(range('A', 'Z') AS $val){
echo $val;
}

range('A', 'Z') will produce an array of character A thru Z.
http://www.php.net/manual/en/function.range.php

Robert Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Nico Vrouwe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 8:42 AM
To: David Apthorpe; [EMAIL PROTECTED]
Subject: Re: [PHP] Alphabet


Very true. oops :)
/Nico


- Original Message -
From: David Apthorpe [EMAIL PROTECTED]
To: 'Nico Vrouwe' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, March 07, 2002 2:34 PM
Subject: RE: [PHP] Alphabet


: Shouldn't it be $i=ord('Z') ?
:
: David Apthorpe
:
: -Original Message-
: From: Nico Vrouwe [mailto:[EMAIL PROTECTED]]
: Sent: 07 March 2002 13:30
: To: [EMAIL PROTECTED]
: Subject: Re: [PHP] Alphabet
:
: $iord('Z') seems easier to me than $iord('A')+26 :)
:
: /Nico
:
:
: Edward Van Bilderbeek - Bean It [EMAIL PROTECTED] wrote in message
: 002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01">news:002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01...
:  something like:
: 
:  for ($i=ord('A'); $iord('A')+26; $i++) {
:  $str .= chr($i);
:  }
: 
:  print $str;
: 
:  Greets,
: 
:  Edward
: 
: 
:  - Original Message -
:  From: Jeroen Timmers [EMAIL PROTECTED]
:  To: [General] [EMAIL PROTECTED]
:  Sent: Thursday, March 07, 2002 11:37 AM
:  Subject: [PHP] Alphabet
: 
: 
:  Is there a simple function to generate
:  the alphabet with php
: 
:  Thx
: 
:  Jeroen
: 
: 
: 
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
: ---
: Incoming mail is certified Virus Free.
: Checked by AVG anti-virus system (http://www.grisoft.com).
: Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/2002
:
:
: ---
: Outgoing mail is certified Virus Free.
: Checked by AVG anti-virus system (http://www.grisoft.com).
: Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/2002
:


--
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] A silly question. :P

2002-03-08 Thread Erik Price


On Thursday, March 7, 2002, at 11:50  PM, GENESiS DESiGNS wrote:

 I would like to know why you put this character (!) in front of this:

Nearly unanimously to all programming languages, the bang (!) symbol 
indicates not or negative or inverse or not true.  So you use it 
when you want to indicate that something is not the case or if you are 
performing a test for the lack of a condition rather than the condition 
itself.  Like this:

if ($var) {
   echo Yes, var exists;
} elseif (!$var) {
   echo No, there is no variable called var;
} else {
   echo You cannot reach this part of the if statement.
 Either var exists or it doesn't;
}





(!(Hope that doesn't help)),

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] Netscape vs. IE/Mozilla

2002-03-08 Thread Vlad Kulchitski

 
Hi guys,
 
I know it's a wrong place to ask about this, but I am sure someone here
faced the same problem. I am trying to get the site to look consistent
in
Netscape Navigator and it's giving me hard times.

Either tables or/and cell background doesn't show up or spacing between
two tables is not what it is supposed to be.

If anyone can give me suggestion about where to look for some hints
online
that would be appreciated.

Thanks,
Vlad



Re: [PHP] Netscape vs. IE/Mozilla

2002-03-08 Thread Richard S. Crawford

A URL would be helpful


On Fri, 2002-03-08 at 07:44, Vlad Kulchitski wrote:
  
 Hi guys,
  
 I know it's a wrong place to ask about this, but I am sure someone here
 faced the same problem. I am trying to get the site to look consistent
 in
 Netscape Navigator and it's giving me hard times.
 
 Either tables or/and cell background doesn't show up or spacing between
 two tables is not what it is supposed to be.
 
 If anyone can give me suggestion about where to look for some hints
 online
 that would be appreciated.
 
 Thanks,
 Vlad
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




[PHP] Replacing words

2002-03-08 Thread Martin Thoma

Hello!

I use

$txt = preg_replace(#((?php .*?/A)|$search)#se, '\2==\1?
\1:$replace', $txt);

to replace some text in $txt. The problem: Parts of words are replaced,
too. How can I make preg_replace replace only words, which  means, that
the word is followed by space . , -, but not by other letters/numbers?

Martin




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




RE: [PHP] Netscape vs. IE/Mozilla

2002-03-08 Thread Darren Gamble

Good day,

A 10-second search on Google comes up with:

http://www.omninet.net.au/~kg/docs/demyst9.html

Personally, I can tell you that the biggest difference between the two
browsers is the way that Netscape 4.X uses styles.  In particular, it
generally doesn't inherit styles from other elements.  So, if you use a
stylesheet and say that you want text to be green, you need to specify that
p is green, td is green, etc.

A bigger explanation of the differences would be outside the scope of this
list.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 8:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Netscape vs. IE/Mozilla


 
Hi guys,
 
I know it's a wrong place to ask about this, but I am sure someone here
faced the same problem. I am trying to get the site to look consistent
in
Netscape Navigator and it's giving me hard times.

Either tables or/and cell background doesn't show up or spacing between
two tables is not what it is supposed to be.

If anyone can give me suggestion about where to look for some hints
online
that would be appreciated.

Thanks,
Vlad

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




Re: [PHP] Replacing words

2002-03-08 Thread Andrey Hristov

Read the docs. Look at the assertion part. ?= and the opposite of it.

Best regards,
Andrey Hristov

On Friday 08 March 2002 05:51 pm, you wrote:
 Hello!

 I use

 $txt = preg_replace(#((?php .*?/A)|$search)#se, '\2==\1?
 \1:$replace', $txt);

 to replace some text in $txt. The problem: Parts of words are replaced,
 too. How can I make preg_replace replace only words, which  means, that
 the word is followed by space . , -, but not by other letters/numbers?

 Martin

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




[PHP] finding include path

2002-03-08 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi
Is there an easy way to determine the include path as set in php.ini
*without* actually looking at the php.ini file?

Many thanks
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8iOFqHpvrrTa6L5oRAo/bAJ94ZrRHCVOos17kimfQpleQUz+K4wCgtJej
lrppUPI6EWDZVEG4Pm7Dtk0=
=kSca
-END PGP SIGNATURE-

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




Re: [PHP] finding include path

2002-03-08 Thread Jason Wong

On Saturday 09 March 2002 00:06, Nick Wilson wrote:
 Hi
 Is there an easy way to determine the include path as set in php.ini
 *without* actually looking at the php.ini file?

phpinfo();


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

/*
The control of the production of wealth is the control of human life itself.
-- Hilaire Belloc
*/

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




Re: [PHP] Configuring /etc/syslog.conf to redirect PHP errors to a separate file

2002-03-08 Thread Jason Wong

On Friday 08 March 2002 22:13, Michael Sims wrote:
 I hope this isn't too obvious of a question, but I've been looking around
 for the past hour and can't seem to find an answer to this.

 Currently I have set the error_log = syslog directive in my php.ini file
 (this is on a Redhat 7.2 machine running PHP 4.1.2, and the syslog deamon
 that comes with RH 7.2 (sysklogd-1.4.1-4)) and it's working fine, sending
 all PHP errors to /var/log/messages.

 I'd love to be able to send any errors from PHP to a completely separate
 file, say something like /var/log/php_errors.  Does anyone know of a way to
 do this?  I gather it has to do with using /etc/syslog.conf to redirect
 messages from a particular facility to that file, but I have no idea which
 facility PHP uses.  I tried grepping the source but it's a bit over my head
 so I didn't really know what to look for...

error_log = /some/path/or/another/php-error.log


Make sure the user running the webserver (with RH7.2 it should be apache) has 
write access to the above directory/file


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

/*
A handful of patience is worth more than a bushel of brains.
*/

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




RE: [PHP] finding include path

2002-03-08 Thread Daniel Kushner

ini_get('include_path')

 -Original Message-
 From: Nick Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 08, 2002 11:06 AM
 To: php-general
 Subject: [PHP] finding include path
 
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi
 Is there an easy way to determine the include path as set in php.ini
 *without* actually looking at the php.ini file?
 
 Many thanks
 - -- 
 - ---
  www.explodingnet.com   |Projects, Forums and
 +Articles for website owners 
 - -- Nick Wilson -- |and designers.
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)
 
 iD8DBQE8iOFqHpvrrTa6L5oRAo/bAJ94ZrRHCVOos17kimfQpleQUz+K4wCgtJej
 lrppUPI6EWDZVEG4Pm7Dtk0=
 =kSca
 -END PGP SIGNATURE-
 
 -- 
 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 Mail() Question

2002-03-08 Thread LaserJetter

Its probably a problem with your mail server software not being able to send
email out. I think you need t tell it to connect to another email server
outside of your network


Mindless Bot [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I hope maybe you can help me with this problem... I've been working with
 PHP/mySQL for about 6 months now, this is causing quite a headache!

 When I try to send confirmation email (from a form the user fills out) -
it
 works fine when sending within the company network but fails when sending
to
 other emails (like hotmail accounts).

 Any suggestions?

 I have full rights to the php.ini file on our server, I've tried editing
the
 send_mail path, nothing seems to work! The server is running on a Solaris
 5.8 machine - I'm assuming Apache server.

 $email, $first, $last are pulled from a submitted form (using POST).

 $welcome is a standard message used in several places - easier to change
one
 file when changes are required.

 $toaddressSent = $email;
 $subjectSent = $first $last, Your Request Has Been Received;
 $contentSent = $welcome;


 mail($toaddressSent, $subjectSent, $contentSent, $additionalSent);


 Thanks!
 Brian






 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com




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




[PHP] Symbolic Links, Includes, and Relative Paths

2002-03-08 Thread Jonathan Hilgeman

I'm on a red hat system, and I've soft-linked two directories:
/www/dir1/subdir
/www/dir2/subdir -- /www/dir1/subdir

Now, inside subdir is a file that tries to include(../info.php); which
prints out some information about the file paths and my database stuff. So
there's:
/www/dir1/info.php
/www/dir1/subdir/includer.php
/www/dir2/info.php
/www/dir2/subdir -- /www/dir1/subdir

Now, when I run /www/dir2/subdir/includer.php, it SHOULD include the file
../info.php which translates into /www/dir2/info.php. However, the
symbolic linking seems to have messed it up, and instead of running dir2's
info.php, it seems to think it is in dir1, and instead includes dir1's
info.php file. 

Has anyone run into this and/or know a fix for it?

Thanks!

- Jonathan

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




[PHP] Does $HTTP_REFERER show where you was last time or where the user clicked on a link to mine?

2002-03-08 Thread SED

Hi,

Does $HTTP_REFERER show where you was last time or where the user
clicked on a link to mine?

Regards,
SED


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




[PHP] bug with session or normal procedure???

2002-03-08 Thread Rodrigo Peres

Hi list,

I'm developing an CMS, and I started a session with PHP 4.1.1
With I use this in javascript alert(document.forms[0].elements[0].name)
it returns PHPSESSID and if i use
alert(document.forms[0].elements[0].value), it returns a number.

It's a bug???

I'm using IE5 in macos 9.2.2

Thank's in advance

Rodrigo
-- 




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




[PHP] number_format

2002-03-08 Thread Scott St. John

Hi everyone,

I am trying to format a number for a report, the one consistant thing is 
the three decimal places.  But I need to strip them, then fill in zero's 
from the left.  

So, if the number coming in is 8.000 I need to convert to 00800, 11.070 
would convert to 01107.

I have tried a combination of number_format and usually end up with 8000
or 00110.  

Help!  Thank you!  Mind in slow motion this morning.

-Scott


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




RE: [PHP] number_format

2002-03-08 Thread Alastair Battrick

why not multiply the number by 1000 and then use
str_pad($in,6,0,STR_PAD_LEFT)

Alastair Battrick
Senior Developer
Lightwood Consultancy Ltd
http://www.lightwood.net

 -Original Message-
 From: Scott St. John [mailto:[EMAIL PROTECTED]]
 Sent: 08 March 2002 17:02
 To: [EMAIL PROTECTED]
 Subject: [PHP] number_format


 Hi everyone,

 I am trying to format a number for a report, the one consistant thing is
 the three decimal places.  But I need to strip them, then fill in zero's
 from the left.

 So, if the number coming in is 8.000 I need to convert to 00800, 11.070
 would convert to 01107.

 I have tried a combination of number_format and usually end up with 8000
 or 00110.

 Help!  Thank you!  Mind in slow motion this morning.

 -Scott


 --
 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] Configuring /etc/syslog.conf to redirect PHP errors to a separate file

2002-03-08 Thread Michael Sims

At 12:07 AM 3/9/2002 +0800, Jason Wong wrote:
  I'd love to be able to send any errors from PHP to a completely separate
  file, say something like /var/log/php_errors.  Does anyone know of a way to
  do this?  I gather it has to do with using /etc/syslog.conf to redirect
  messages from a particular facility to that file, but I have no idea which
  facility PHP uses.  I tried grepping the source but it's a bit over my head
  so I didn't really know what to look for...

error_log = /some/path/or/another/php-error.log

Thanks for the response.  I actually had it setup this way before but 
switched it to syslog because of some stupid assumptions that I made due to 
lack of research. :)  I'll spare everyone the details since they're not at 
all interesting. :)

Thanks again!


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




[PHP] HTML Buffer

2002-03-08 Thread Mario Montoya Martínez

Hi.

I'm used to a function in ASP which is HTMLBuffer.
This allows the script to send HTML code to the browser while
the script is running.
I've seen that PHP scripts don't send any HTML until the
script finishes. I'd really like to see what's happening in my script
while it is being executed.

Any ideas?

Mario


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




[PHP] Bank of America eStores

2002-03-08 Thread Shu Chow

Has anyone had any experience with Bank of America's 
eStore credit card processing service?  A client of mine 
would like to use BofA because that's their bank, and it's 
very affordable. 

Specifically, I need clarification on how the Settlement 
Post works, if it can be automated right after the 
autentication post, and how the responses can be handled 
by PHP.

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




[PHP] HTML Buffer

2002-03-08 Thread Mario Montoya Martínez

Hi.

I'm used to a function in ASP which is HTMLBuffer.
This allows the script to send HTML code to the browser while
the script is running.
I've seen that PHP scripts don't send any HTML until the
script finishes. I'd really like to see what's happening in my script
while it is being executed.

Any ideas?

Mario


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




Re: [PHP] TEXT BOX + USER

2002-03-08 Thread Richard Baskett

Take a look at the 'nl2br' function.  This will help you do what you want to
do ;)

Rick

Do all the good you can, By all the means you can, In all the ways you can,
In all the places you can, At all the times you can, To all the people you
can, As long as ever you can. - John Wesley


 Hi,
 
 I have got a webiste where a user can update data using a text box.
 
 the user usualy use ENTER to create new lines or paragraphs.
 
 I want to save the data enter by user into MySQL database INCLUDING the
 new paragraph so that when I display the data on a webpage, the
 paragraph is still there.
 
 I have tried some testing but I always get the result entered by users
 are flat. The paragraphs are gone. How do I do this?
 
 
 regards,
 
 Dani
 
 
 -- 
 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] Right way to do the MySQL thing

2002-03-08 Thread David Johansen

I was just wondering what the right way to do the MySQL connection thing
is. Am I supposed to do it everytime through in the php code, should I make
it a session variable, or is a global variable the way to go? Right now this
is the code that I have

if (empty($_SESSION['db']))
{
   $_SESSION['db'] = mysql_connect(localhost, root);

   mysql_select_db(clients,$_SESSION['db']);
}

Is that a good way to do it or is there a better way or anything like
that. Thanks,
Dave



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




Re: [PHP] BIG PROBLEm with headers

2002-03-08 Thread Analysis Solutions

Hi Krzysiek:

 I have problem with downloading any file from my site using IE 5.5 and 
 HTTPS protocol. My php script works fine with Netscape 6.2 and 
 HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol.

I suspect your script has nothing to do with it.  

A while back, I had problems serving my SSL'd pages to IE 5 users.  If I
recall correctly, it turned out to be a bug in IE not being able to
process certificiates with key lengths that were not the ones expected.  
Thawte or my ISP inadvertently used a 1028 bit key on the certificate 
rather than 1024.

Got a new certificate and everything's worked fine since then.

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

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




[PHP] Again Session

2002-03-08 Thread Sven Jacobs

Hey 

I have 2 values stored in my session, how do I pull them back out ?





Re: [PHP] Re: dealing with # in urls

2002-03-08 Thread Mark

On Thu, 07 Mar 2002 23:33:00 -0800, CC Zona wrote:
In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Mark) wrote:

 in php.ini there is a variable called arg separator.input that
looks
 like it can help but when I add the line:

 arg separator.input = #

 I still get $id = 0#top

Did you restart the server after modifying php.ini?

Yes, and I checked the value of arg_separator.input with phpinfo().
When I try to get it to work with a different character it works
fine, but the # is a problem for some reason, I think php might think
it's a comment or something.

As for http://mysite.com/test.php?id=0#top; sometimes resulting in
id='0'
and sometimes id='0#', perhaps this is a situation where letting PHP
register the globals automatically is not the way to go.  You could
instead
extract the query string from the URL by using parse_url()
http://php.net/parse-url, then turn that query string into
variables by using parse_str() http://php.net/parse-str.

I guess I could do that but I really think this is a bug in php, and
since the situation is not really that urgent I guess I'll wait for
the php guys to fix it.


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




Re: [PHP] BIG PROBLEm with headers

2002-03-08 Thread Erik Price


On Friday, March 8, 2002, at 01:06  PM, Analysis  Solutions wrote:

 I have problem with downloading any file from my site using IE 5.5 and
 HTTPS protocol. My php script works fine with Netscape 6.2 and
 HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol.

 I suspect your script has nothing to do with it.

 A while back, I had problems serving my SSL'd pages to IE 5 users.  If I
 recall correctly, it turned out to be a bug in IE not being able to
 process certificiates with key lengths that were not the ones expected.
 Thawte or my ISP inadvertently used a 1028 bit key on the certificate
 rather than 1024.

IE5 has known problems with SSL.  Some sites (sourceforge.net) use SSL 
only to authenticate the user, letting them back out of secure-mode 
after authentication succeeds, if the useragent is IE5.  It reduces the 
potential for problems.

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

2002-03-08 Thread mailing list

I am new to PHP so please excuse my ignorance.  I want to manage and
create session id's for my shopping cart with a MySQL database.  I have a
database with a session_id column that is auto-increminting.  Is there any
example of anyone using a mysql database to manage session_id's?

Regards,

Adrian Mcmanus
IT Director
The BF System, Inc.


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




Re: [PHP] Again Session

2002-03-08 Thread Erik Price


On Friday, March 8, 2002, at 01:15  PM, Sven Jacobs wrote:

 Hey

 I have 2 values stored in my session, how do I pull them back out ?


$_SESSION['name_of_first_value']
$_SESSION['name_of_second_value']

in PHP 4.1 or greater.

And hay is for horses.



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

2002-03-08 Thread Erik Price


On Friday, March 8, 2002, at 01:12  PM, mailing list wrote:

 I am new to PHP so please excuse my ignorance.  I want to manage and
 create session id's for my shopping cart with a MySQL database.  I 
 have a
 database with a session_id column that is auto-increminting.  Is there 
 any
 example of anyone using a mysql database to manage session_id's?

No.
http://google.com/search?hl=enq=session+management+php+mysql



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

2002-03-08 Thread Andrew Brampton

flush()
outputs everything in the buffer, and I think U can turn buffering off
completly, but I'm too lazy to open my PHP chm help file ;-)

andrew
- Original Message -
From: Mario Montoya Martínez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 5:48 PM
Subject: [PHP] HTML Buffer


 Hi.

 I'm used to a function in ASP which is HTMLBuffer.
 This allows the script to send HTML code to the browser while
 the script is running.
 I've seen that PHP scripts don't send any HTML until the
 script finishes. I'd really like to see what's happening in my script
 while it is being executed.

 Any ideas?

 Mario


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

2002-03-08 Thread Scott St. John

Ok, I think I got it using this:

$anum = number_format($fie31,2);
$anum = str_replace($replace_char, $replace_strings, $anum);



On Fri, 8 Mar 2002, Alastair Battrick wrote:

 why not multiply the number by 1000 and then use
 str_pad($in,6,0,STR_PAD_LEFT)
 
 Alastair Battrick
 Senior Developer
 Lightwood Consultancy Ltd
 http://www.lightwood.net
 
  -Original Message-
  From: Scott St. John [mailto:[EMAIL PROTECTED]]
  Sent: 08 March 2002 17:02
  To: [EMAIL PROTECTED]
  Subject: [PHP] number_format
 
 
  Hi everyone,
 
  I am trying to format a number for a report, the one consistant thing is
  the three decimal places.  But I need to strip them, then fill in zero's
  from the left.
 
  So, if the number coming in is 8.000 I need to convert to 00800, 11.070
  would convert to 01107.
 
  I have tried a combination of number_format and usually end up with 8000
  or 00110.
 
  Help!  Thank you!  Mind in slow motion this morning.
 
  -Scott
 
 
  --
  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] just a link in php email

2002-03-08 Thread Andrea Caldwell

Hi All,

I've been researching the mail() function and from what I've read, some
people embed HTML into their mail() without using classes.  All I need to do
is add a link in an email... can anyone advise how I would do this?  Which
headers would I need?  I was using:

$headers = MIME-Version: 1.0\r\n;
$headers .= Content-type: text/html; charset=iso-8859-1\r\n;

but getting a wrong parameter count for mail.  How do I add more than one?
Then how do I code the link in the $mailcontent?  I was using single quotes
for the anchor tags, is that correct?  Not sure if that works since my
headers weren't working.

Thanks for your help w/ a novice,
~AC






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




Re: [PHP] mktime() into TIMESTAMP ?

2002-03-08 Thread DL Neil

Hi Erik,

 On Wednesday, March 6, 2002, at 05:11  AM, DL Neil wrote:

  My 'rules' are simple:
  If the date/time is for processing, keep it as a timestamp (consider
  which type).
If the timestamp is being used to keep track of RDBMS activity,
then
  use a TIMESTAMP column.

 By RDBMS activity, do you mean last time user performed x query ?
 In fact, one of my columns is in fact designed to record things like
 last time user logged in or whatever, but I am not using the
 auto-bumping ability of the TIMESTAMP column, but rather creating a
new
 INSERT statement and mysql_query() function to do this job.

Either UPDATEing or INSERTing will cause an unspecified (first)
TIMESTAMP column to be set to NOW(). If it is recording last login, then
surely it makes more sense to UPDATE?

Yes, the TIMESTAMP 'bump' is useful to record 'last activity'
applications.

If RDBMS auto-update would foul things up, use an integer data
type.

Whereas when I am recording timestamp data, but don't want the 'bump'
facility, then I store UNIX TIMESTAMPs in (suitably wide) INTEGER fields
(which won't 'bump' under any conditions).

  If the date/time is for people/presentation, use a textural format.

 I'm thinking of not storing any plaintext dates, simply because it's
 easier to format the mktime() result or TIMESTAMP column to suit my
 needs.  In fact, combining mktime() and date() really seem to be the
way
 to go, which is why I'm using mktime()-generated Unix-style
 timestamps -- I'll probably never do any database output directly from
 mysql[client], but rather everything from PHP or perhaps Python if I
 ever get the time to work on that side project.*

Now if you mean UNIX TIMESTAMP as an integer (*not* MySQL TIMESTAMP)
that's exactly what I decided (excepting that I'm using PHP's GM*
functions and converting everything to UTC). The 'downside' is that
looking at the table contents is an eye-straining experience, so the
first thing you have to do is write a debug retrieval query that will
present the data in 'English'/a more readable form.

If there will be minor processing on the column, eg GROUP BY,
ORDER
  BY, or even , =, etc, then use ISO format
 ISO = MySQL-style TIMESTAMP?
 If so, then can't you do ORDER BYs and , = queries with the
Unix-style
 mktime()-generated integers as well?  I'm not very experienced with
the
 more advanced MySQL features, though I know they're there and have a
 decent reference should my script require them.

Careful! ISO dates are in CCYY-MM-DD format, as per MySQL DATEs.
MySQL TIMESTAMPs are in 'integer' format, still CCYYMMDD but don't try
using them for arithmetic!

Yes you are correct you can perform each of the above comparisons on
both data formats.

I didn't mean that you should interpret some 'exclusivity' in those
(somewhat informal) 'rules'. What I was saying was that the CCYY-MM-DD
format (cf TIMESTAMP) suits 'presentation' but can also be used for
simply manipulations, eg comparisons. However, backing up a paragraph or
two, I pointed out that the other temporal format is to be used when
calculations are required (and presentation is less of an issue). The
attempt was to illustrate when you might use one format and when the
other.

If there will be no processing between what comes out of PHP and
what
  PHP wants back, use a string format column.

 That's what I was thinking.  Apart from some simple queries for
results
 whose dates are between x and y (which should work with
 mktime()-generated timestamps, right?), it seems that this is the best
 policy.  I should change those columns from TIMESTAMP to INT now
before
 I go any further, just so that I don't accidentally ever bump up the
 value of the column via an insert or update...

  Yes you should remember that MySQL will happily cast between string
and
  integer alternative presentations!

 I'm not sure I understand what this means.  I'm guessing that you're
 suggesting that an INT or a VARCHAR column can both have mathematical
 operations performed on their values, but perhaps I'm completely
 off-base.  My SQL skills are miserable... I need to brush up.  (Too
much
 time spent learning PHP lately!)

Cast means to set/reset a value in one datatype/format to another
datatype, eg converting a character=1 to an integer=1, or as you say,
a TIMESTAMP value (of either kind) to an integer - or a string
DATE=CCYY-MM-DD to its integer equivalent=CCYYMMDD.

  Your take/critique welcomed!

 More like questions than critique!

All encourages clarity of thinking and expression!

Regards,
=dn


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




[PHP] php CLI

2002-03-08 Thread matthew clay shultz

hi,

when i run script from the CLI, it doens't recognize the oracle library
functions.  why is tthis and what can i do aobut it?

thanks everyone!

matt


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




[PHP] Re: Right way to do the MySQL thing

2002-03-08 Thread George Whiffen

The simplest way to do the connection thing is, as is often the case in php,
to do nothing i.e. forget it.

If you don't specify a connect id MySQL happily uses the last one opened, so
the only thing you need do with the return from mysql_connect is check it for
errors i.e.

if (!mysql_connect(localhost,root))
{
// panic

There's certainly no point in putting it in a session variable, the connection
is closed for you
as your script terminates.

The only time you might want to actually do something is if you were doing a LOT
of
switching between different database servers during one page request.  Switching

between databases doesn't matter, but different servers = different connects.

George





connection if you don't specify one, so the
only thing I've ever done wih

David Johansen wrote:

 I was just wondering what the right way to do the MySQL connection thing
 is. Am I supposed to do it everytime through in the php code, should I make
 it a session variable, or is a global variable the way to go? Right now this
 is the code that I have

 if (empty($_SESSION['db']))
 {
$_SESSION['db'] = mysql_connect(localhost, root);

mysql_select_db(clients,$_SESSION['db']);
 }

 Is that a good way to do it or is there a better way or anything like
 that. Thanks,
 Dave




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




RE: [PHP] php CLI

2002-03-08 Thread Hunter, Ray

What type of system are you running this on?


Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: matthew clay shultz [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 08, 2002 12:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php CLI


hi,

when i run script from the CLI, it doens't recognize the oracle library
functions.  why is tthis and what can i do aobut it?

thanks everyone!

matt


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



RE: [PHP] php CLI

2002-03-08 Thread matthew clay shultz


its a solaris box, with apache and oracle.  its got php4.0.4 on it right
now, about to upgrade i believe..

On Fri, 8 Mar 2002, Hunter, Ray wrote:

 What type of system are you running this on?


 Ray Hunter
 Firmware Engineer

 ENTERASYS NETWORKS


 -Original Message-
 From: matthew clay shultz [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 08, 2002 12:38 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php CLI


 hi,

 when i run script from the CLI, it doens't recognize the oracle library
 functions.  why is tthis and what can i do aobut it?

 thanks everyone!

 matt


 --
 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] A good PHP Shop

2002-03-08 Thread George Whiffen

Here's a mini-checklist on tricky bits, some of which are as much about
payment as
much as cart:

1. Delivery  Packing especially pricing on composite loads, destination,
different speeds.

2. Sales taxes.

3. Quantity discounts, discount vouchers, reusable vouchers, loyalty cards.

4. Affiliate and referral tracking and their accounts.

5. Order processing, separate auth and debit, refunds, partial refunds

6. Stock control.

and, of course, currencies, languages etc., if you want to do the proper job.

Depending on your target base, I'd be particularly careful about the shopping
process. It's really
easy to put off customers, especially the general public.  For example,
insisting on user
registration before you get to the cart or order will lose you business,
unless you're the likes
of zend store and are guaranteed confident customers.

If you want to look at a mall for ideas, try http://www.ishop.co.uk which
only has php at the
backend but does show you can get rich functionality, without having to have
Amazon's
budget.

George

Jaxon wrote:

 www.fishcart.org :)

 i've been trying to decide which one to use to tackle a big mall project,
 but don't know enough about 'carts to make an intelligent assessment yet.

 cheers,
 jaxon

  -Original Message-
  From: Bradley Goldsmith [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 07, 2002 5:06 PM
  To: '[EMAIL PROTECTED]'; Bradley Goldsmith; 'Peter Haywood';
  [EMAIL PROTECTED]
  Subject: RE: [PHP] A good PHP Shop
 
 
  Dunno, Havn't looked at it. What's the Url?
 
  -bcg
 
 
 
  -Original Message-
  From: Jaxon [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 8 March 2002 8:49 AM
  To: Bradley Goldsmith; 'Peter Haywood'; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: RE: [PHP] A good PHP Shop
 
 
  hi
 
  how does it compare to fishcart?
 
  cheers,
  jaxon
 
   -Original Message-
   From: Bradley Goldsmith [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 07, 2002 4:40 PM
   To: 'Peter Haywood'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: RE: [PHP] A good PHP Shop
  
  
   Check out phpshop.org.
  
   It's base implimentation is a little dry (but extremely functional).
  
   You can view a heavily modified version in the wild at my shop:
   www.artsupplies.com.au
  
  
   All the best,
   Brad
  
  
   -Original Message-
   From: Peter Haywood [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, 7 March 2002 2:31 PM
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: [PHP] A good PHP Shop
  
  
   Hello,,
  
   I am looking at setting up PHP driven shop.
  
   Can anyone recommend one?  Or which ones to stay away from?  And why?
  
   I am reviewing phpShop at the moment, and it looks pretty
  nicely featured.
  
   Thanks,
  
   Pete
  
  
  
  
   --
   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] cal_days_in_month()

2002-03-08 Thread CB

Hi!

I get an errormessage when trying to use cal_days_in_month(). Fatal error:
Call to undefined function: cal_days_in_month()

The server is runnig PHP 4.1.2, Apache 1.3.23 on some kind of Linux dist.

When I run the same file on my laptop it works. The laptop is running PHP
4.1.1, Apache 1.3.20 on Windows 2000 Professional.

Anyone got any idea?

/Örjan

--






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




[PHP] Re: uploading images

2002-03-08 Thread George Whiffen



Filippo Veneri wrote:

 When uploading image files to my powerpc linux box (derived
 from redhat 7.1) running apache + php4.0.4pl1 something
 wierd happen.
 Images get corrupted by (IMHO) php itself. It adds the
 following 2 lines at the top of the file:

 Content-Type: image/jpeg^M
 ^M
 ...(rergular image file data)

 (as displayed by my text editor, vim).

 It seems a bug, as uploading images to another machine
 (a i386 debian 2.2 box) works as expected.

 Is this a known issue/bug?

 thanks,
 fbv

Wierd, sounds like it could be a bug.  What's the actual code you use
for the upload?

I presume you are running vim from the command line of the box to which
the image is
uploaded.  Content-Type: image/jpeg is, of course, what Apache would add
if you requested a .jpg file over
the web.

Good Luck,

George




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




[PHP] Re: User accounts

2002-03-08 Thread George Whiffen



David Johansen wrote:

 I'm new to this php thing and I would like to set up a web page were the
 users can login and edit their preferences and all that stuff. I have the
 basic login stuff worked out and I was passing the username and password as
 a hidden input in the form, but then the password can be seen with view
 source. I know that there's a better way to do this, so could someone point
 me to a good tutorial or example on how I could make it so that the user
 could login and logout and then I wouldn't need to be passing the password
 all around like this. Thanks,
 Dave

For me, the all round best approach to usernames and passwords is to use
http authentication.  Then the browser, or whatever's at the other end of
the web, takes care of storing usernames and passwords for you, with the
full knowledge that it is storing a username and password.

The big downside is that you have so little control over how the login
looks, all you get to set is the domain name.

The plus sides are that your users will certainly be familiar with the prompts,

it looks professional and you get all the benefits of automatic standards
compatibility.  For example, I was amazed to find when I was doing a wml
version of a script that my existing http authentication worked fine on a
mobile
phone, with no changes to the code at all.

I'd go into more detail, but if you've already done your login page, I guess
you've
already made your mind up. ;(

Good luck anyway,

George


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




[PHP] Re: Help needed with speading up a function.

2002-03-08 Thread George Whiffen

William,

You need a mathematician not a computer programmer.

This is classic number theory which must have been very well
explored.  I have a very vague recollection that there may be
partial proofs that there are no primes between x and y or no
more than n primes between w and z for low ranges of numbers.

My instinct would be that you cannot, in general, know you are near
a prime.  But that's based on a wishy-washy assumption that primes are
the only significant rational numbers and that all other rationals
are just short hand for prime relationships. Or rather, only the
primes and irrationals are necessary.  Or, if you want a database
metaphor, only primes are 5th normal form.

Hope you are/are not trying to crack ciphers!

George

William Bailey wrote:

 Hello again.

 I have the following function that generates a prime number of x
 bits. It seems to work but i am just trying to see if i can make it any
 faster as generateing 1024 bit prime can take a while. so i thoought i
 would ask here to see if anybody has any ideas or suggestions.

 The function is as follows:

 mt_srand((double)microtime()*1);

 function generate_prime ($bits) {
 $number=gmp_init('0');
 for($i=$bits; $i=0; $i--){
 $rand=mt_rand()%2;
 gmp_setbit($number, $i, $rand);
 }
 while(gmp_prob_prime($number)1){
 $number=gmp_add($number, 1);
 }
 if(strlen(gmp_strval($number, 2))!=$bits){
 $number=generate_prime($bits);
 }else{
 return (string)gmp_strval($number);
 }
 }

 At the moment im generating a random number of the required length and
 then +1ing it untill it is a prime. I suppose i really want to know if
 their is some way of knowing how close you are to a possiable prime so
 that if the random number is too far away then it could call itself again
 and try a different random start location.

 I look forward to any ideas that you might have.

 Regards,
 William.

 --
 William Bailey.
 http://wb.pro-net.co.uk




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




Re: [PHP] HTML Buffer

2002-03-08 Thread Anas Mughal

Are you interested in remote debugging?


--- Mario Montoya Martínez
[EMAIL PROTECTED] wrote:
 Hi.
 
 I'm used to a function in ASP which is HTMLBuffer.
 This allows the script to send HTML code to the
 browser while
 the script is running.
 I've seen that PHP scripts don't send any HTML until
 the
 script finishes. I'd really like to see what's
 happening in my script
 while it is being executed.
 
 Any ideas?
 
 Mario
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




[PHP] Graphing Question

2002-03-08 Thread Chris Seymour

Hi All,
Does anyone know of a graphing package that will allow a line graph with 
labels on the data points?

Thanks in advance.

Chris

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




Re: [PHP] number_format

2002-03-08 Thread Anas Mughal

Look into printf and sprintf.



--- Scott St. John [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 I am trying to format a number for a report, the one
 consistant thing is 
 the three decimal places.  But I need to strip them,
 then fill in zero's 
 from the left.  
 
 So, if the number coming in is 8.000 I need to
 convert to 00800, 11.070 
 would convert to 01107.
 
 I have tried a combination of number_format and
 usually end up with 8000
 or 00110.  
 
 Help!  Thank you!  Mind in slow motion this morning.
 
 -Scott
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




[PHP] patch installation

2002-03-08 Thread abw

I have downloaded the patch for the security bug found with the file 
uploading. One server has php 4.0.6 and the other has 4.1.1, but my problem 
is that the patch does not have any instructions.

I was going to use the patch command, but I don't know what parameters to use.

This question was asked on the mailing list a few days ago, but there were 
no replies.

Can anybody tell me how I might install the patch on the servers? Do I have 
to install it over the source and recompile? What command line might I use? 
It is a hot fix?

Thank you in advance.
Aaron


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




Re: [PHP] Re: Help needed with speading up a function.

2002-03-08 Thread Erik Price


On Friday, March 8, 2002, at 04:27  PM, George Whiffen wrote:

 Hope you are/are not trying to crack ciphers!

George, you know way more about math than I do, but I do know that 
trying to crack them is a good  way to make sure they work, or make them 
stronger!


Erik
(who thinks his pay rate should be a more rational number)





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

2002-03-08 Thread Mario Montoya Martínez

Well, yes. But I think I may still need to output things to the browser
while the script is runing in the final version.

Thanks Andrew Brampton, thanks Billi Halsey, thanks Anas Mughal.


Anas Mughal ha escrito:

 Are you interested in remote debugging?

 --- Mario Montoya Martínez
 [EMAIL PROTECTED] wrote:
  Hi.
 
  I'm used to a function in ASP which is HTMLBuffer.
  This allows the script to send HTML code to the
  browser while
  the script is running.
  I've seen that PHP scripts don't send any HTML until
  the
  script finishes. I'd really like to see what's
  happening in my script
  while it is being executed.
 
  Any ideas?
 
  Mario
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 =
 Anas Mughal
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Tel: 973-249-6665

 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/


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




Re: [PHP] HTML Buffer

2002-03-08 Thread Mario Montoya Martínez

Well, yes. But I think I may still need to output things to the browser
while the script is runing in the final version.

Thanks Andrew Brampton, thanks Billi Halsey, thanks Anas Mughal.


Anas Mughal ha escrito:

 Are you interested in remote debugging?

 --- Mario Montoya Martínez
 [EMAIL PROTECTED] wrote:
  Hi.
 
  I'm used to a function in ASP which is HTMLBuffer.
  This allows the script to send HTML code to the
  browser while
  the script is running.
  I've seen that PHP scripts don't send any HTML until
  the
  script finishes. I'd really like to see what's
  happening in my script
  while it is being executed.
 
  Any ideas?
 
  Mario
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 =
 Anas Mughal
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Tel: 973-249-6665

 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/


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




Re: [PHP] HTML Buffer

2002-03-08 Thread Mario Montoya Martínez

Well, yes. But I think I may still need to output things to the browser
while the script is runing in the final version.

Thanks Andrew Brampton, thanks Billi Halsey, thanks Anas Mughal.


Anas Mughal ha escrito:

 Are you interested in remote debugging?

 --- Mario Montoya Martínez
 [EMAIL PROTECTED] wrote:
  Hi.
 
  I'm used to a function in ASP which is HTMLBuffer.
  This allows the script to send HTML code to the
  browser while
  the script is running.
  I've seen that PHP scripts don't send any HTML until
  the
  script finishes. I'd really like to see what's
  happening in my script
  while it is being executed.
 
  Any ideas?
 
  Mario
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 =
 Anas Mughal
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Tel: 973-249-6665

 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/


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




Re: [PHP] HTML Buffer

2002-03-08 Thread Mario Montoya Martínez

Well, yes. But I think I may still need to output things to the browser
while the script is runing in the final version.

Thanks Andrew Brampton, thanks Billi Halsey, thanks Anas Mughal.


Anas Mughal ha escrito:

 Are you interested in remote debugging?

 --- Mario Montoya Martínez
 [EMAIL PROTECTED] wrote:
  Hi.
 
  I'm used to a function in ASP which is HTMLBuffer.
  This allows the script to send HTML code to the
  browser while
  the script is running.
  I've seen that PHP scripts don't send any HTML until
  the
  script finishes. I'd really like to see what's
  happening in my script
  while it is being executed.
 
  Any ideas?
 
  Mario
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 =
 Anas Mughal
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Tel: 973-249-6665

 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/


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




[PHP] Re: HTML Buffer

2002-03-08 Thread Philip Hallstrom

Take a look at flush().  It might help... it might not if the web server
doesn't want to send the data until it's buffers are full... at least
that's my undertanding.

On Fri, 8 Mar 2002, Mario Montoya [iso-8859-1] Martínez wrote:

 Well, yes. But I think I may still need to output things to the browser
 while the script is runing in the final version.

 Thanks Andrew Brampton, thanks Billi Halsey, thanks Anas Mughal.


 Anas Mughal ha escrito:

  Are you interested in remote debugging?
 
  --- Mario Montoya Martínez
  [EMAIL PROTECTED] wrote:
   Hi.
  
   I'm used to a function in ASP which is HTMLBuffer.
   This allows the script to send HTML code to the
   browser while
   the script is running.
   I've seen that PHP scripts don't send any HTML until
   the
   script finishes. I'd really like to see what's
   happening in my script
   while it is being executed.
  
   Any ideas?
  
   Mario
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
  =
  Anas Mughal
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  Tel: 973-249-6665
 
  __
  Do You Yahoo!?
  Try FREE Yahoo! Mail - the world's greatest free email!
  http://mail.yahoo.com/


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



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




[PHP] sessions and netscape 6.2

2002-03-08 Thread Jan Grafström

Hi!

I am building a shop and on first page I set a sessions var
$_SESSION['myvar']=myword;

On the same page I have links like,
a href=product1.php??php echo SID?items=1id=? echo $prodnr[0]?Put
in the basket/a
and those works normal in navigator 4.7 and IE 6 but in Netscape 6.2
the links open in a new window. I worked around this setting target=_top in
all links.

Now I wonder if there is any other way solving this problem?
Thanks in advance.
--
Regards
Jan Grafström



87010 Älandsbro
Sweden


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




[PHP] Problem with MSSQL

2002-03-08 Thread pong-TC

Hello All

I just reinstalled PHP 4.1.1 on IIS5 (win2000) over the old version by
using the installer.  I installed as a cgi.  Then, I got problems with
mssql_connect function.  It doesn't work as it did before.  Here is the
error message:

Fatal error: Call to undefined function: mssql_connect() in
d:\inetpub\wwwroot\cgi-bin\Submitted.php on line 25

It is my mistake that I reinstalled without realization.  So, I got a
trouble.  Anyone, please help.

Thank you.
Pong


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




Re: [PHP] Problem with MSSQL

2002-03-08 Thread Joshua Hoover

Check your php.ini file in your C:\WINNT directory.  Make sure that you
have php_mssql.dll extension uncommented in your php.ini file.  Then check
to see where the php.ini is looking for the extensions.  If you installed
PHP in C:\PHP, then the line for extension_dir in your php.ini file would
be: extension_dir = C:/PHP/extensions

Once you have all that checked, then I would go to a command prompt and get
into the PHP directory.  From the PHP directory, run the command: php -i and
see if any error dialog boxes appear.  If you get errors, then it's most
likely telling you that it can't find the appropriate dll files used to
connect to SQL Server.  To remedy this you can add the following to your
Windows PATH variable: C:\PHP\dlls;   This, again, is assuming you have PHP
installed on C:\

Hope that gets you pointed in the right direction.

Joshua Hoover

- Original Message -
From: pong-TC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 5:17 PM
Subject: [PHP] Problem with MSSQL


 Hello All

 I just reinstalled PHP 4.1.1 on IIS5 (win2000) over the old version by
 using the installer.  I installed as a cgi.  Then, I got problems with
 mssql_connect function.  It doesn't work as it did before.  Here is the
 error message:

 Fatal error: Call to undefined function: mssql_connect() in
 d:\inetpub\wwwroot\cgi-bin\Submitted.php on line 25

 It is my mistake that I reinstalled without realization.  So, I got a
 trouble.  Anyone, please help.

 Thank you.
 Pong


 --
 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] Replacing Sablotron backend with libxslt (gnome) backend for XSLT extension

2002-03-08 Thread Robert

After reading /ext/xslt/README.XSLT-BACKENDS in the source, specifically

snip

 Config.m4
 ---

The XSLT extension's magic really occurs in the config.m4 file.  Here you
 must add a couple of things in order for your backend to be enabled.  Its a
bit
 too complex to describe (but easy to implement and understand).  Take a
look at
 config.m4 (which is well commented) to see what is necessary.

 Makefile.in
 ---

Simply add the source files for your backend to the LTLIBRARY_SOURCES
variable
 and you're all set with this file.

/snip

...and having various compilation/linking/performance problems with the
default Sablotron backend, I am seriously interested in replacing it with
the libxslt (gnome) libraries.  I hacked around with the Config.m4 and
Makefile.in files as noted in Sterling's comments to see if I could get PHP
configure/make to accept libxslt sources/libraries (after successfully
compiling/installing them) in place of Sablotronbut no success.

Before spending hours/days trying to do this methodically and painfully
(since I have always just configured/made PHP by the book and am a recent
ASP/IIS convert), I was hoping that somebody, somewhere has already done
this and just not posted or documented it (or at least thought about it).

Regards,
Robert Tuttle
United Devices, Inc.
[EMAIL PROTECTED]




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




[PHP] Where to get freetype2.x precompiled for windows 2000

2002-03-08 Thread Andy

Hi guys,

does anybody know where to get freetype 2 for win2k as a binary? I did try
it on freetype.org and through google but all links seem to lead to nothing.

Maybe someone has the .dll already installed on his machine. If so, please
send me a copy I would appreciate it.

Thanx for any help

Andy



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




[PHP] Re: Graphing Question

2002-03-08 Thread Michael Kimsal

Chris Seymour wrote:
 Hi All,
 Does anyone know of a graphing package that will allow a line graph with 
 labels on the data points?
 
 Thanks in advance.
 
 Chris
 

Try JPGRAPH at:

http://www.aditus.nu/jpgraph/




Michael Kimsal
http://www.phphelpdesk.com
Taking the ? out of ?php
734-480-9961


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




Re: [PHP] Query bug, what is wrong?

2002-03-08 Thread hugh danaher

I think it should be single quote marks around the variables like you've
used around the ok:

$query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
  ('$qname','$qdes','$qFILE','ok');

Hope this helps,
Hugh

- Original Message -
From: Robert V. Zwink [EMAIL PROTECTED]
To: Daniel F. Castro [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 6:22 AM
Subject: RE: [PHP] Query bug, what is wrong?


 You probably need to wrap the strings you are trying to input with
quotation
 marks.

 Try modifying this line  (add \) :
$query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
  (\$qname\,\$qdes\,\$qFILE\,'ok');

 Robert Zwink
 http://www.zwink.net/daid.php


 -Original Message-
 From: Daniel F. Castro [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 08, 2002 8:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Query bug, what is wrong?


 ?php
$qname  = $HTTP_POST_VARS['ct_nome'];
$qkey   = $HTTP_POST_VARS['ct_kw'];
$qdia   = $HTTP_POST_VARS['ct_dia'];
$qmes   = $HTTP_POST_VARS['ct_mes'];
$qano   = $HTTP_POST_VARS['ct_ano'];
$qautor = $HTTP_POST_VARS['ct_autor'];
$qeng   = $HTTP_POST_VARS['cS_eng'];
$qdes   = $HTTP_POST_VARS['cS_des'];
$qFILE  = FILES;
$host   = localhost;
//Database Conection
$link = mysql_connect($host,root,root)
  or die(Not possible to connect);
print(Connection OK);
//Database Selection
mysql_select_db(test)
  or die(mysql_error());
print(Selection OK);
$query = INSERT INTO projeto (nome,setor,arquivo,status) VALUES
  ($qname,$qdes,$qFILE,'ok');
print $qname;
print $qkey;
print $qautor;
print $qdia/$qmes/$qano;
//My Query
mysql_query ($query)
  or Die (mysql_error());
echo Projecto registered;

// Closing connection
mysql_close($link);
  ?

  Thanks you

  Daniel Castro




 --
 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] Re: session_id database

2002-03-08 Thread Andy

Hi Adrian,

there is an excellent article on that by:

 * 
 * PHP4 DBM Session Handler
 * Version 1.00
 * by Ying Zhang ([EMAIL PROTECTED])

Describing all you need. Check out www.phpbuilder.com or weberdev.com and
search for the name above.You could also check his website.

Good luck

Andy


Mailing List [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am new to PHP so please excuse my ignorance.  I want to manage and
 create session id's for my shopping cart with a MySQL database.  I have a
 database with a session_id column that is auto-increminting.  Is there any
 example of anyone using a mysql database to manage session_id's?

 Regards,

 Adrian Mcmanus
 IT Director
 The BF System, Inc.




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




[PHP] Finding variable names in strings, and replacing with values?

2002-03-08 Thread Nick Richardson

Been working on this one for quite awhile, and it's probably a fairly easy
solution, but i can't find it... so thought i would ask.

I'm opening a file, and going through it line by line.  I need for find
places where the line contains %value% and replace it with $value.

So if the line says body bgcolor=%bgcolor% text=%textcolor%
link=%linkcolor%, i need to replace the text where the %% stuff is and set
it to $bgcolor,$textcolor,or $linkcolor respectively. -

I'm sure this can be done, but i'm just no good w/ the pattern matching
stuff... so if anyone has any ideas on this, please let me know!!!

Thanks

//Nick Richardson
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
--   We must come to see that the end we seek, is a society --
-- at peace with itself.  A society that can live with its  --
-- concience.  That will be a day not of the white man, not --
-- of the black man... That will be the day of man, as man! --
--  -Dr. Martin Luther King Jr. --
-- -March 25th, 1965--
--


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




[PHP] mysql_connect() help

2002-03-08 Thread Ellis M. Mendez-Hidaka

Greetings,
I'm a newbie with apache and PHP.
I was able to setup apache, php and mysql in RH Linux and have my
website running.
I was trying to test the BD connectivity capabilities of PHP but I keep
receiving this error message:
{
Warning: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in /var/www/html/testdb.php on line 20

Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2) in /var/www/html/testdb.php on line
20
Could not connect to DB
}

I tried looking at the documentation in php.net, but I don't see what
could be the problem.
Here is the code (line 20 is the mysql_connect() command):

?php



 //build SELECT query
 $query = SELECT * FROM divers;

 //Connect to MySQL
 // *This line is the problem! :^(   **
 if( !($database1 = mysql_connect( localhost,test1,psswd ) ) )
  die( Could not connect to DB );

 //Open database
 if( !mysql_select_db( divers, $database1 ) )
  die( Could not open divers DB );

 //Query DB
 if( !($result = mysql_query( $query, $databse1 ) ) )
 {
  print(Could not execute query! br / );
  die( mysql_error() );
 }

?

My DB is running fine, and I even tested it with that ID and it shows
fine as well.

I'm using PHP 4.0.6 and mysql is enabled.
Am I missing any settings I might not know?
Any help will be really appreciated.
Thank you

Ellis


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




Re: [PHP] mysql_connect() help

2002-03-08 Thread ruler

What I did is made a symlink from /var/run/mysql.sock to /tmp/mysql.sock
example: ln -s /var/run/mysql.sock /tmp/mysql.sock

Or if /var/run/mysql.sock doesn't exist, find / -name mysql.sock
Then symlink that to /tmp

Hope that helps.
- Original Message - 
From: Ellis M. Mendez-Hidaka [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 8:43 PM
Subject: [PHP] mysql_connect() help


 Greetings,
 I'm a newbie with apache and PHP.
 I was able to setup apache, php and mysql in RH Linux and have my
 website running.
 I was trying to test the BD connectivity capabilities of PHP but I keep
 receiving this error message:
 {
 Warning: Can't connect to local MySQL server through socket
 '/tmp/mysql.sock' (2) in /var/www/html/testdb.php on line 20
 
 Warning: MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/tmp/mysql.sock' (2) in /var/www/html/testdb.php on line
 20
 Could not connect to DB
 }
 
 I tried looking at the documentation in php.net, but I don't see what
 could be the problem.
 Here is the code (line 20 is the mysql_connect() command):
 
 ?php
 
 
 
  //build SELECT query
  $query = SELECT * FROM divers;
 
  //Connect to MySQL
  // *This line is the problem! :^(   **
  if( !($database1 = mysql_connect( localhost,test1,psswd ) ) )
   die( Could not connect to DB );
 
  //Open database
  if( !mysql_select_db( divers, $database1 ) )
   die( Could not open divers DB );
 
  //Query DB
  if( !($result = mysql_query( $query, $databse1 ) ) )
  {
   print(Could not execute query! br / );
   die( mysql_error() );
  }
 
 ?
 
 My DB is running fine, and I even tested it with that ID and it shows
 fine as well.
 
 I'm using PHP 4.0.6 and mysql is enabled.
 Am I missing any settings I might not know?
 Any help will be really appreciated.
 Thank you
 
 Ellis
 
 
 -- 
 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] patch installation

2002-03-08 Thread abw

I guess that would have been nice! Solaris 8 x86 with Apache 1.3.22.

Both servers use the same operating system and web server.

what type of system are you running.  A little bit more information would be
helpfull.

Jim Lucas
www.bend.com

- Original Message -
From: abw [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 1:21 PM
Subject: [PHP] patch installation


  I have downloaded the patch for the security bug found with the file
  uploading. One server has php 4.0.6 and the other has 4.1.1, but my
problem
  is that the patch does not have any instructions.
 
  I was going to use the patch command, but I don't know what parameters to
use.
 
  This question was asked on the mailing list a few days ago, but there were
  no replies.
 
  Can anybody tell me how I might install the patch on the servers? Do I
have
  to install it over the source and recompile? What command line might I
use?
  It is a hot fix?
 
  Thank you in advance.
  Aaron
 
 
  --
  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] Checking to see what value error_reporting is set at?

2002-03-08 Thread eric.coleman

Is it possible to return what error_reporting is set at currently?  If not, think they 
would be able to throw it into the newest build of php?

Thanks,
Eric



  1   2   >