[PHP] $PHP_SELF

2001-03-31 Thread Steve Haemelinck

Anybody got an idea why $PHP_SELF isn't working with me?

I think because I have set my register_globals to off, but how can I get the
value of  $PHP_SELF an another way ?


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




Re: [PHP] $PHP_SELF

2001-03-31 Thread elias

please try this:

pre
?

/*
Tells whether or not to register the EGPCS (Environment, GET, POST, Cookie,
Server) variables as global variables. You may want to turn this off if you
don't want to clutter your scripts' global scope with user data. This makes
the most sense when coupled with track_vars - in which case you can access
all of the EGPCS variables through the $HTTP_ENV_VARS, $HTTP_GET_VARS,
$HTTP_POST_VARS, $HTTP_COOKIE_VARS, and $HTTP_SERVER_VARS arrays in the
global scope.
*/

  var_dump($HTTP_ENV_VARS);
?
/pre
br
?
  echo $HTTP_ENV_VARS["SCRIPT_NAME"];
?
br

""Steve Haemelinck"" [EMAIL PROTECTED] wrote in message
000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli">news:000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli...
 Anybody got an idea why $PHP_SELF isn't working with me?

 I think because I have set my register_globals to off, but how can I get
the
 value of  $PHP_SELF an another way ?


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




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




[PHP] FYI: PostgreSQL users

2001-03-31 Thread Yasuo Ohgaki
Some users in PHP General list may be interested in.

Tom Lane has posted patch for pg_dump to PostgreSQL Admin List.
He said it works with 7.0 (and he said it may work for 6.5 - not tested) This
means
you can backup/restore large object w/o upgrading to 7.1.

Check out the PostgreSQL Admin List if you need it.
(There is news server for the list, too. news://news.postgresql.org )

Regards,

--
Yasuo Ohgaki


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


[PHP] Problems with files!!!!!

2001-03-31 Thread Ales Kunst

Hi,

I have a strange kind of a problem. I'm cannot write to files on a server
(i'm having virtual host) where i got my domain name.
The server is running Apache 1.3.x and is having php3.0.8 installed.
The code looks like this:

html
body
?php
$fcontents = "something";
$fp = fopen("tmp/some.dat", "w");  // trying to open file in my
directory tmp/ (i think)
fwrite($fp, $fcontents);
fclose($fp);
?
/body
/html

I cannot write to directory tmp.I get an error from Netscape that "document
contains no data" (i changed the directory mode to 777 (tmp/)). The
strangest part is that this script works fine when i am running it at home.
At home i tried to run the script under Windows 98 and Linux Mandrake both
with Apache 1.3.x with php 4.0.x installed (i don't think this code should
have any compatibility problems). On Linux i have put the script to a user
directory, just the kind on the server is, and it worked just fine. I think
maybe it's the Apache configuration (on the server) which is causing my
problem. I would very appreciate any help on this matter (clues what could
be wrong).

Ales!



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




[PHP] GD/PHP Image Creation - combining GIFs

2001-03-31 Thread John Portwin

Hi All,

I need to automatically create a large GIF image made up of numerous smaller
GIF/JPG files.

The list of images (either GIF or JPG) is taken off a MySQL database and at
the moment, I create a HTML table (5 columns, up to 20 rows), view it in my
browser, manually dump it to the screen and then edit it in a image program
to the right size. Then I save it as a transparent GIF and use a server-side
image map to extract the right filename when a user clicks on it. (I'm not
willing to move to a system where each individual image is loaded
individually!)

This is getting a little too time-consuming, so I want PHP to do it for me
;-) I only need it to generate the new images when they are added, so speed
is not an issue. Has anyone created something like this, or does anyone have
any tips on how to do it?

I'm looking into ImageMagick right now (looking through the archives). The
only thing is, I need to do this on my Win98 system..

Thanks in advance,
John

--




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




Re: [PHP] sanity check please

2001-03-31 Thread Felix Kronlage

On Fri, Mar 30, 2001 at 06:45:21PM -0500, ..s.c.o.t.t.. [gts] wrote:

 i dont see how a surfer could get your PHP source code
 via the webserver.

what happens if the webserver once gets started without the php-interpreter
being there? You get to see the raw-files (if they are in the document-root).

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


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




[PHP-CVS] cvs: php4 /pear/Experimental/XML fo2pdf.php

2001-03-31 Thread Christian Stocker

chregu  Sat Mar 31 05:38:58 2001 EDT

  Modified files:  
/php4/pear/Experimental/XML fo2pdf.php 
  Log:
  - converted tabs to spaces
  - more links in the docs about xsl:fo
  
  
  

Index: php4/pear/Experimental/XML/fo2pdf.php
diff -u php4/pear/Experimental/XML/fo2pdf.php:1.5 
php4/pear/Experimental/XML/fo2pdf.php:1.6
--- php4/pear/Experimental/XML/fo2pdf.php:1.5   Fri Mar 30 04:55:07 2001
+++ php4/pear/Experimental/XML/fo2pdf.php   Sat Mar 31 05:38:58 2001
@@ -15,7 +15,7 @@
 // | Authors: Christian Stocker [EMAIL PROTECTED] |
 // +--+
 //
-// $Id: fo2pdf.php,v 1.5 2001/03/30 12:55:07 chregu Exp $
+// $Id: fo2pdf.php,v 1.6 2001/03/31 13:38:58 chregu Exp $
 
 
 /**
@@ -23,9 +23,16 @@
 *
 * with fo (formating objects) it's quite easy to convert xml-documents into
 *  pdf-docs.
-* 
+*
 * An introduction into formating objects can be found at
 *  http://www.w3.org/TR/xsl/slice6.html#fo-section
+*  http://www.ibiblio.org/xml/books/bible/updates/15.html
+* A tutorial is here:
+*  http://www.xml.com/pub/a/2001/01/17/xsl-fo/
+*  http://www.xml.com/pub/a/2001/01/24/xsl-fo/
+* A html_to_fo.xsl can also be found there
+*  http://www.xml.com/2001/01/24/xsl-fo/fop_article.tgz
+*  but it didn't work for my simple xhtml files..
 *
 * The way to use this class is, produce a fo-file from a xml-file with a
 * xsl-stylesheet, then feed this class with this fo-file and you get a pdf
@@ -44,9 +51,9 @@
 *  Furthermore you have to compile your php with --with-java and to adjust
 *   your php.ini file. It can be a rather painful task to get java and php
 *   to work together.
-*   See http://www.phpbuilder.com/columns/marknold20001221.php3 or 
-*  http://www.linuxwebdevnews.com/articles/php-java-xslt.php?pid=347
-*  for more details about java and php or ask me, if you're stuck 
+*   See http://www.phpbuilder.com/columns/marknold20001221.php3 or
+*   http://www.linuxwebdevnews.com/articles/php-java-xslt.php?pid=347
+*   for more details about java and php or ask me, if you're stuck
 *   (especially with linux. windows is not my area..)
 *
 * Todo:
@@ -84,191 +91,191 @@
 *print $cache-end("+30");
 *
 * @author   Christian Stocker [EMAIL PROTECTED]
-* @version  $Id: fo2pdf.php,v 1.5 2001/03/30 12:55:07 chregu Exp $
+* @version  $Id: fo2pdf.php,v 1.6 2001/03/31 13:38:58 chregu Exp $
 * @package  XML
 */
 
 class XML_fo2pdf {
 
-   /**
-   * fo-file used in this class
-   *
-   * @var  string
-   */
-   var $fo = "";
-
-   /**
-   * pdf-file used in this class
-   *
-   * @var  string
-   */
-   var $pdf = "";
-
-   /**
-   * Where the temporary fo and pdf files should be stored
-   *
-   * @var  string
-   */
-   var $tmpdir = "/tmp";
-
-   /**
-   * A prefix for the temporary files
-   *
-   * @var  string
-   */
-   var $tmppdfprefix = "pdffo";
-
-
-   /**
-   * constructor
-   * One can pass an input fo-file already here (the other possibility
-   * is with the run or runFromString method).
-   *  and if the pdf should be stored permanently, a filename/path for
-   *  that can also be passed here.
-   *
-   * @paramstring  file input fo-file
-   * @paramstring  file output pdf-file
-   * @see run(), runFromString(), runFromFile()
-   */
-   function xml_fo2pdf($fo = "", $pdf = "")
-   {
-   if ($fo) {
-   $this-run($fo, $pdf);
-   }
-   }
-
-   /**
-   * Calls the Main Fop-Java-Programm
-   *
-   * One has to pass an input fo-file
-   *  and if the pdf should be stored permanently, a filename/path for
-   *  the pdf.
-   *  if the pdf is not passed or empty/false, a temporary pdf-file
-   *   will be created
-   *
-   * @paramstring  file input fo-file
-   * @paramstring  file output pdf-file
-   * @paramboolean if the fo should be deleted after execution
-   * @see runFromString()
-   */
-   function run($fo, $pdf = "", $DelFo = False)
-   {
-   if (!$pdf)
-   $pdf = tempnam($this-tmpdir, $this-tmppdfprefix);
-
-   $this-pdf = $pdf;
-   $this-fo = $fo;
-   $options = array($this-fo, $this-pdf);
-   $java = new Java("org.apache.fop.apps.CommandLine", $options);
-   $java-run();
-   if ($DelFo) {
-   $this-deleteFo($fo);
-   }
-   }
-
-   /**
-   * If the fo is a string, not a file, use this.
-   *
-   * If you generate the fo dynamically (for example with a
-   *  xsl-stylesheet), you can use this method
-   *
-   * The Fop-Java program needs a file as an input, so a
-   *  temporary fo-file is created here (and will be deleted
-   * 

[PHP] Date difference

2001-03-31 Thread ravi

Dear Friends,

I am accessing a MySQL database through PHP.

I have to calculate the difference between todays date and the date obtained 
from MySQL database.

The Database string is in the form of \"-mm-dd\".

I have to convert the above string into unix timestamp so that i can calcualte 
the difference between the two time stamps.

Please help me in this regard.

Thanking you,

B. Raveendra Reddy
National Law School of India University

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




Re: [PHP] MS SQL error handling...

2001-03-31 Thread Christian Dechery

At 11:58 30/3/2001 -0500, you wrote:
Hope it helps.
Let me know if it works for you.

well... it was in fact a great idea... but it didn't work... for some 
reason... ob_*() functions do not grab warnings and error messages 
generated by PHP... so warnings AND the error messages were lost...

maybe I didn't implement it the best way... I don't know... but I really 
tried every way I can possibly imagine, and it didn't work.


thanks anyway...

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




Re: [PHP] Catagory list

2001-03-31 Thread Joe Stump

This is what I'd do:

  $sql = "SELECT disinct category FROM article ORDER BY category";
  $r = mysql_query($sql);
  while($cat = mysql_fetch_array($r))
  {
$id = $cat['id'];
$sql = "SELECT * FROM article WHERE category='$id'";
$x = mysql_query($sql);
while($row = mysql_fetch_array($x))
{
  // echo articles here
}
  }

The permanent solution is to make a separate table called "categories" and then
do a join on the categoryID from the two tables.

--Joe

On Fri, Mar 30, 2001 at 10:33:11PM +1000, Mark Bayfield wrote:
 I am trying to make a catagory list that displays a distinct catagory, and
 then listing titles under that catagory.
 Unfortunatly all the data is in one table, and the catagory field is not set
 catagories, so there is duplicates in that field.
 The code so far is (but I am probably going about it the wrong way, if you
 can see whats wrong with my code plase help, or point me in some direction),
 
  $query = mysql_query("SELECT DISTINCT catagory from article order by
 catagory");
  $query2 = mysql_query ("SELECT * from article ORDER BY catagory");
 
  for ($index = 0; $index  mysql_num_rows($query); $index++) {
   $Catagory = mysql_fetch_row ($query) or die (mysql_error());
   $name1 =  mysql_fetch_row ($query2) or die (mysql_error());
   $x = $name1;
   $result1 = array_unique($Catagory);
   $result = array_merge($Catagory, $name1);
 
print ("$result1[0]BR");
for ($x=0; $x == $result1[0]; $x++) {
print ("nbsp;nbsp;nbsp;nbsp;a
 href='update.php?passed=$name1[0]'$name1[2]/abr\n");
}
  }
 
 I am trying everything to get it do just print the following:
 
 Catagory
 title1
 title2
 Catagory1
 title3
 title4
 
 Please help me out
 
 thanks
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

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




Re: [PHP] Date difference

2001-03-31 Thread bill

Lots of ways to do it, here's one.

Convert them both to unix timestamps and subtract.

$nowstamp=mktime() ;

$result=mysql_query(SELECT UNIX_TIMESTAMP(mydatefield)  AS dbdate FROM
mydatabase);

$row=mysql_fetch_array($result);

$dbdate=$row["dbdate"];

$thedifference=$nowstamp - $dbdate;

//above gives you the difference in seconds.

$daydifference = intval($thedifference / 86400);

// 86400 is number of seconds in a day
// intval because I don't want partial days, just number of days
// $daydifference above gives you the difference in days

kind regards,

bill


[EMAIL PROTECTED] wrote:

 Dear Friends,

 I am accessing a MySQL database through PHP.

 I have to calculate the difference between todays date and the date obtained
 from MySQL database.

 The Database string is in the form of \"-mm-dd\".

 I have to convert the above string into unix timestamp so that i can calcualte
 the difference between the two time stamps.

 Please help me in this regard.

 Thanking you,

 B. Raveendra Reddy
 National Law School of India University

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


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




[PHP-CVS] cvs: php4 /ext/ircg ircg.c php_ircg.h

2001-03-31 Thread Sascha Schumann

sas Sat Mar 31 07:53:14 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c php_ircg.h 
  Log:
  Add ircg_html_encode() which is an interface to the standard
  HTML encoder for URLs and color attributes.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.53 php4/ext/ircg/ircg.c:1.54
--- php4/ext/ircg/ircg.c:1.53   Sat Mar 10 15:51:56 2001
+++ php4/ext/ircg/ircg.cSat Mar 31 07:53:14 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.53 2001/03/10 23:51:56 sas Exp $ */
+/* $Id: ircg.c,v 1.54 2001/03/31 15:53:14 sas Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -76,6 +76,7 @@
PHP_FE(ircg_nick, NULL)
PHP_FE(ircg_topic, NULL)
PHP_FE(ircg_channel_mode, NULL) 
+   PHP_FE(ircg_html_encode, NULL)
PHP_FE(ircg_whois, NULL)
PHP_FE(ircg_kick, NULL)
PHP_FE(ircg_disconnect, NULL)
@@ -750,6 +751,21 @@
irc_handle_command(conn-conn, "TOPIC", 2, Z_STRVAL_PP(p2), Z_STRVAL_PP(p3));
RETVAL_TRUE;
 #endif
+}
+
+PHP_FUNCTION(ircg_html_encode)
+{
+   zval **p1;
+   smart_str res = {0};
+   
+   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, p1) == FAILURE)
+   WRONG_PARAM_COUNT;
+
+   convert_to_string_ex(p1);
+   
+   ircg_mirc_color(Z_STRVAL_PP(p1), res, Z_STRLEN_PP(p1));
+
+   RETVAL_STRINGL(res.c, res.len, 0);
 }
 
 PHP_FUNCTION(ircg_kick)
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.8 php4/ext/ircg/php_ircg.h:1.9
--- php4/ext/ircg/php_ircg.h:1.8Wed Mar  7 14:18:50 2001
+++ php4/ext/ircg/php_ircg.hSat Mar 31 07:53:14 2001
@@ -37,6 +37,7 @@
 PHP_FUNCTION(ircg_whois);
 PHP_FUNCTION(ircg_msg);
 PHP_FUNCTION(ircg_nick);
+PHP_FUNCTION(ircg_html_encode);
 PHP_FUNCTION(ircg_kick);
 PHP_FUNCTION(ircg_topic);
 PHP_FUNCTION(ircg_channel_mode);



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




Re: [PHP] PHP SITE REDESIGN - What happened to older source files?

2001-03-31 Thread Rouvas Stathis

I keep a copy of php.4.0.3.pl1 at
URL:http://glaykos.mm.di.uoa.gr/~rouvas/tmp/inet/linux/php/
Both the original version I downloaded as well as a version with the
bc-lib and conf files for SuSE exist.
-Stathis.

James Moore wrote:
 
I need an older version of PHP because my pam_auth won't build with
  php-4.0.4pl1?  With the redesign of the php site, I think they
  removed older
  source files.  Can anyone confirm this, or does anyone know where
  I can get
  php-4.0.0 - 4.0.4 source files?
 
 The files are no longer avaible form the site but are still avalible via cvs
 (cvs.php.net) just checkout the files you want from the distributions
 directory. I wouldnt advise using anything less recent than 4.0.4pl1 though
 due to security issues in previous versions.
 
 James
 --
 James Moore
 [EMAIL PROTECTED]
 PHP Web Scripting: http://www.php.net/
 PHP QA Team: http://qa.php.net/
 PHP-GTK: http://gtk.php.net/
 VL-SRM: http://www.vl-srm.net/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] Quick RegEx Question

2001-03-31 Thread Jeff Oien

I want to check if a variable contains a price, like
$19.99
It definitely would be a dollar sign, two integers a dot and
two integers. Here is what I tried which doesn't work.

if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
or
if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))

Thanks.
Jeff Oien

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




[PHP] Executing a PHP file to write an html file

2001-03-31 Thread PHP User

Here is my problem.
I have a file, static.php
static.php writes to index.html by way of...
$filename = "/web/h16/docs/index.html";
$fp = fopen("$filename","w");
fwrite($fp, "table width=\"230\"\n");
etc..

If I hit static.php from the command line, index.html gets written just fine. 
static.php does it's job.

If I try to exec(), or  system() static.php from a browser the browser just hangs. eg. 

I add:
system ('/usr/local/bin/php web/h16/docs/index.html);
or
exec ('/usr/local/bin/php web/h16/docs/index.html);
To a file and get nothing. I tried with and without the absolute paths in the 
commands.

What I want to be able to do is every time I update a Db, at the same time I want the 
index page to be rewritten to reflect the changes in the Db. And I don't want to have 
to go to the command line everytime I want to rewrite the index page. So I would just 
hit "SAve" in the update.php page, it would save to the Db, which it does now, and at 
the same time it hits static.php and therefore rewrites index.html

I also tried header() but that was no good due to echo in the pages, gives that header 
already sent error.

Is there a funtion I am missing somehwere that does the job?

It's a Unix box running php 4.03, and the Db is MySQL

Thanks Much!!

-

*
Sign up for these FREE offers and have the chance to win money and prizes!
Click Here http://winwith.chek.com/promotions.php3?partnerid=7"
*

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




Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jon Jacob

Jeff Oien wrote:

 I want to check if a variable contains a price, like
 $19.99
 It definitely would be a dollar sign, two integers a dot and
 two integers. Here is what I tried which doesn't work.

 if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
 or
 if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))

 Thanks.
 Jeff Oien

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

I am not an expert on PHP but I have been programming in Perl for four
years so I can tell you what I would use in Perl and you can see if that
works in PHP.  (I am almost sure they would be the same...)

/\$\d\d\.\d\d\.d/

It looks to me like you are forgetting to escape your period making the
interpreter think it is "any character" rather than a literal period.  I am
not sure what the {2} is because I have never used that.  Does that part of
it really work that way?

Good luck, hope that helps.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] Date difference

2001-03-31 Thread Mark Maggelet

On Sat, 31 Mar 2001 20:07:10 +0600,  ([EMAIL PROTECTED]) wrote:
Dear Friends,

I am accessing a MySQL database through PHP.

I have to calculate the difference between todays date and the date
obtained
from MySQL database.

select to_days(curdate())-to_days(datefield) from table;

- Mark


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




[PHP] Compiling under RH7

2001-03-31 Thread Jon Jacob

I am still  only getting the source of the php file.  Has anybody
successfully compiled Apache 1.3.x (1.3.19 in my case) and PHP
(4.0.4pl1) under RH7?  My httpd.conf has the proper AddType line and the
php4 module is installed according to httpd -l.

If you have done this successfully, please let me know.  I have been
racking my brain for three straight days trying to get this to work.

Thanks.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jon Jacob

Jon Jacob wrote:

 Jeff Oien wrote:

  I want to check if a variable contains a price, like
  $19.99
  It definitely would be a dollar sign, two integers a dot and
  two integers. Here is what I tried which doesn't work.
 
  if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
  or
  if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))
 
  Thanks.
  Jeff Oien
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

 I am not an expert on PHP but I have been programming in Perl for four
 years so I can tell you what I would use in Perl and you can see if that
 works in PHP.  (I am almost sure they would be the same...)

 /\$\d\d\.\d\d\.d/

 It looks to me like you are forgetting to escape your period making the
 interpreter think it is "any character" rather than a literal period.  I am
 not sure what the {2} is because I have never used that.  Does that part of
 it really work that way?

 Good luck, hope that helps.

 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com

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

Opps.  I mistyped that.  It should be:

/\$\d\d\.\d\d/

Drop the last d.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: [PHP] duplicate tables

2001-03-31 Thread McShen

that didn't work. I tried that.
"CC Zona" [EMAIL PROTECTED] wrote in message
9a3hk3$bn7$[EMAIL PROTECTED]">news:9a3hk3$bn7$[EMAIL PROTECTED]...
 In article 9a3fme$4hg$[EMAIL PROTECTED],
  [EMAIL PROTECTED] ("McShen") wrote:

  i have a table named "refer"
  I wanna duplicate a table name "refer2" so that i can mess around with
it.

 Have you checked the manual for your DBMS?  Something like "create table
 refer2 select * from refer" should work with MySQL (assuming that were
your
 DBMS).

 --
 CC

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




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




[PHP] C and PHP

2001-03-31 Thread Ft Karras

Somebody knows if it is possible to link C and PHP?

I have a C library and need to 'include' with PHP code, as it does PERL, 
is it possible?

Thanks

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




Re: [PHP] C and PHP

2001-03-31 Thread Mukul Sabharwal

you can use shared memory functions to ineract between
C and PHP.


--- Ft Karras [EMAIL PROTECTED] wrote:
 Somebody knows if it is possible to link C and PHP?
 
 I have a C library and need to 'include' with PHP
 code, as it does PERL, 
 is it possible?
 
 Thanks
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


=
To find out more about me : http://www.geocities.com/mimodit
My bookmarks are available @ http://mukul.free.fr

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

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




[PHP] something of interest on the GTK front

2001-03-31 Thread Joe Stump

I've just finished a proof of concept tutorial about how to create a GTK app
to be your backend on a dynamic PHP site. It steps you through makeing the API,
the GTK app, and the frontend. You can check it out at:

http://gtk.php-coder.net/docs/joe2001_03_31.4.html

For you GTK users it also has a pretty comprehensive example of GtkText(), which
seemed to be lacking.

--Joe

/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

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




Re: [PHP] Quick RegEx Question

2001-03-31 Thread Jack Dempsey

?

$price = "$19.99";

if(ereg("\\$[0-9]{2}\.[0-9]{2}",$price)){
echo "this is a price";
}
else{
echo "not a price";
}

In eregs, if you want to use the $, you have to escape it twice...the
first escape tells php to look for a variable whose name is after the
$...the second \ tells it, look for this character...

-jack


Jeff Oien wrote:
 
 I want to check if a variable contains a price, like
 $19.99
 It definitely would be a dollar sign, two integers a dot and
 two integers. Here is what I tried which doesn't work.
 
 if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
 or
 if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))
 
 Thanks.
 Jeff Oien
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] A message to php-general@lists.php.net

2001-03-31 Thread lucy

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   Are you bored and want some excitement?
   Las Vegas Has Just Showed Up In Your Neigbourhood!
  In fact, you wont even have to leave your computer!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Queensclub Online Casino Advantages:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

* Play in your pyjamas
* Play for fun option (without gambling money)
* Free money to play with!
* Confidential and safe
* No travel headaches
* No hotel bill suprises
* Take your time playing!
* Play with your creditcard
* Get advice as you play!
* Almost 98% payout!

++
|  This could be your lucky day! Give us a try!  |
++
 http://www.bluelineca.com/casino/

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
What do our satisfied visitors think about us?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

PAULM, A ,460 Jackpot winner from Georgia:
"That's when I decided to throw caution to the wind.
I just put the whole wad into the machine and on my tenth
try -- BINGO! almost 150,000 dollars!" 

BOSSMAN48, A Jackpot winner from Michigan:
"After throwing out  bets for 20 minutes or so at the
JacksOrBetter game, my one big bet made me a richer man.
I pulled down a royal flush!!!" 

5666777, A Jackpot winner from New Jersey:
"After four or five unsuccessful bets I gave it a rest and
went to pick up a sandwich from the fridge. Then, after
couple of bites and couple of pulls on the slot machine,
it happened!!! I HIT THE JACKPOT!" 

RIVER, ,878 jackpot winner from Canada:
"I couldn't believe it as the money suddenly showed in my
account! We both jumped so quickly, we almost knocked
the PC off the table." 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


++
| This could be your lucky day! Give us a try!  |
+---+
 http://www.bluelineca.com/casino/

This message was sent to [EMAIL PROTECTED] If you do not wish to receive more 
emails from me, just
click on the link below.
http://www.kiatou.com/cgi-bin/remove.cgi

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




[PHP] problem loading extension

2001-03-31 Thread Christian Dechery

I posted a message a while ago about having trouble loading php_mssql.dll 
extension.
It gave me that error: 'can't find ...'. So I was stuppid enough to realize 
I didn't have MS SQL 7 installed here.

Somone here told me to download a proggie called Dependency Walker, that 
lists all the dependencies of a DLL.
So I did it, and it really was missing a DLL (MS SQL).

So I installed MS SQL 7 here, and now Dependency Walker doesn't give me any 
error, but PHP still gives me the message and still does not load 
php_mssql.dll. Why? MSSQL is started, working perfectly, PHP is working fine...

what may be wrong?

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




[PHP] [Fwd: php...]

2001-03-31 Thread George Schlossnagle


-- 
$_ = 'George Schlossnagle';
s#.#(ord$')-(ord$)+((index($_,$')-$)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print
join('',(map chr$_,reverse
map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/);


I'm sure you appreciate the importance of transitive equality in programming
languages (especially they all aspire to be pseudo-mathematical), which is
why I think you'll appreciate this.

?php

$a = "0";
$b = 0;
$c = "";
$d = "   ";

$a == $b  // T
$b == $c  // T
$a == $c  // F!!

$b == $c  // T
$b == $d  // T
$c == $d  // F!!

?

Perl, of course, outputs the expected values: $a, $b, $c and $d are equal
under '==', and only $a and $b are equal under 'eq'. PHP's '===' operator
(its equivalent to 'eq') says that $a, $b, $c and $d are all different.

Doesn't that seem like a fundamental flaw? How can equality NOT be
transitive?? How can anyone be expected to write programs in such an
environment?

D






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


Re: [PHP] problem loading extension

2001-03-31 Thread Jack Dempsey

restart apache/php?

-jack

Christian Dechery wrote:
 
 I posted a message a while ago about having trouble loading php_mssql.dll
 extension.
 It gave me that error: 'can't find ...'. So I was stuppid enough to realize
 I didn't have MS SQL 7 installed here.
 
 Somone here told me to download a proggie called Dependency Walker, that
 lists all the dependencies of a DLL.
 So I did it, and it really was missing a DLL (MS SQL).
 
 So I installed MS SQL 7 here, and now Dependency Walker doesn't give me any
 error, but PHP still gives me the message and still does not load
 php_mssql.dll. Why? MSSQL is started, working perfectly, PHP is working fine...
 
 what may be wrong?
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] problem loading extension

2001-03-31 Thread Christian Dechery

of course...
it's while loading apache that the error message appears...

restart apache/php?

-jack

Christian Dechery wrote:
 
  I posted a message a while ago about having trouble loading php_mssql.dll
  extension.
  It gave me that error: 'can't find ...'. So I was stuppid enough to realize
  I didn't have MS SQL 7 installed here.
 
  Somone here told me to download a proggie called Dependency Walker, that
  lists all the dependencies of a DLL.
  So I did it, and it really was missing a DLL (MS SQL).
 
  So I installed MS SQL 7 here, and now Dependency Walker doesn't give me any
  error, but PHP still gives me the message and still does not load
  php_mssql.dll. Why? MSSQL is started, working perfectly, PHP is working 
 fine...
 
  what may be wrong?
  
  . Christian Dechery (lemming)
  . http://www.tanamesa.com.br
  . Gaita-L Owner / Web Developer
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




Re: [PHP] problem loading extension

2001-03-31 Thread Jack Dempsey

ahh, ok, misread your post...don't know what it could be..don't have
experience with php and dlls...
best of luck!
-jack

Christian Dechery wrote:
 
 of course...
 it's while loading apache that the error message appears...
 
 restart apache/php?
 
 -jack
 
 Christian Dechery wrote:
  
   I posted a message a while ago about having trouble loading php_mssql.dll
   extension.
   It gave me that error: 'can't find ...'. So I was stuppid enough to realize
   I didn't have MS SQL 7 installed here.
  
   Somone here told me to download a proggie called Dependency Walker, that
   lists all the dependencies of a DLL.
   So I did it, and it really was missing a DLL (MS SQL).
  
   So I installed MS SQL 7 here, and now Dependency Walker doesn't give me any
   error, but PHP still gives me the message and still does not load
   php_mssql.dll. Why? MSSQL is started, working perfectly, PHP is working
  fine...
  
   what may be wrong?
   
   . Christian Dechery (lemming)
   . http://www.tanamesa.com.br
   . Gaita-L Owner / Web Developer
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer

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




[PHP] Check your regex here

2001-03-31 Thread Jörg Krause

Hi there,

sometimes I test a new regular expression.
So I've created a test site, which works with
ereg, eregi, preg_match on PHP 4.0.4. Some options
allowed and a benchmarks shows how effective an
expression is.
You're invited to take a look here:

http://www.php.comzept.de/rexpr/

Please send me a private email what do you think about this.

Joerg Krause
*
E-Mail:  [EMAIL PROTECTED]
*

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




php-general Digest 31 Mar 2001 20:02:27 -0000 Issue 600

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


php-general Digest 31 Mar 2001 20:02:27 - Issue 600

Topics (messages 46438 through 46466):

$PHP_SELF
46438 by: Steve Haemelinck
46439 by: elias

Re: PostgreSQL users
46440 by: Yasuo Ohgaki

Problems with files!
46441 by: Ales Kunst

GD/PHP Image Creation - combining GIFs
46442 by: John Portwin

Re: sanity check please
46443 by: Felix Kronlage

Date difference
46444 by: ravi.nls.ac.in
46447 by: bill
46452 by: Mark Maggelet

Re: MS SQL error handling...
46445 by: Christian Dechery

Re: Catagory list
46446 by: Joe Stump

Re: PHP SITE REDESIGN - What happened to older source files?
46448 by: Rouvas Stathis

Quick RegEx Question
46449 by: Jeff Oien
46451 by: Jon Jacob
46454 by: Jon Jacob
46459 by: Jack Dempsey

Executing a PHP file to write an html file
46450 by: PHP User

Compiling under RH7
46453 by: Jon Jacob

Re: duplicate tables
46455 by: McShen

C and PHP
46456 by: Ft Karras
46457 by: Mukul Sabharwal

something of interest on the GTK front
46458 by: Joe Stump

A message to [EMAIL PROTECTED]
46460 by: lucy.aol.com

problem loading extension
46461 by: Christian Dechery
46463 by: Jack Dempsey
46464 by: Christian Dechery
46465 by: Jack Dempsey

Re: php...]
46462 by: George Schlossnagle

Check your regex here
46466 by: Jörg Krause

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]


--



Anybody got an idea why $PHP_SELF isn't working with me?

I think because I have set my register_globals to off, but how can I get the
value of  $PHP_SELF an another way ?





please try this:

pre
?

/*
Tells whether or not to register the EGPCS (Environment, GET, POST, Cookie,
Server) variables as global variables. You may want to turn this off if you
don't want to clutter your scripts' global scope with user data. This makes
the most sense when coupled with track_vars - in which case you can access
all of the EGPCS variables through the $HTTP_ENV_VARS, $HTTP_GET_VARS,
$HTTP_POST_VARS, $HTTP_COOKIE_VARS, and $HTTP_SERVER_VARS arrays in the
global scope.
*/

  var_dump($HTTP_ENV_VARS);
?
/pre
br
?
  echo $HTTP_ENV_VARS["SCRIPT_NAME"];
?
br

""Steve Haemelinck"" [EMAIL PROTECTED] wrote in message
000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli">news:000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli...
 Anybody got an idea why $PHP_SELF isn't working with me?

 I think because I have set my register_globals to off, but how can I get
the
 value of  $PHP_SELF an another way ?


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






Some users in PHP General list may be interested in.

Tom Lane has posted patch for pg_dump to PostgreSQL Admin List.
He said it works with 7.0 (and he said it may work for 6.5 - not tested) This
means
you can backup/restore large object w/o upgrading to 7.1.

Check out the PostgreSQL Admin List if you need it.
(There is news server for the list, too. news://news.postgresql.org )

Regards,

--
Yasuo Ohgaki



Hi,

I have a strange kind of a problem. I'm cannot write to files on a server
(i'm having virtual host) where i got my domain name.
The server is running Apache 1.3.x and is having php3.0.8 installed.
The code looks like this:

html
body
?php
$fcontents = "something";
$fp = fopen("tmp/some.dat", "w");  // trying to open file in my
directory tmp/ (i think)
fwrite($fp, $fcontents);
fclose($fp);
?
/body
/html

I cannot write to directory tmp.I get an error from Netscape that "document
contains no data" (i changed the directory mode to 777 (tmp/)). The
strangest part is that this script works fine when i am running it at home.
At home i tried to run the script under Windows 98 and Linux Mandrake both
with Apache 1.3.x with php 4.0.x installed (i don't think this code should
have any compatibility problems). On Linux i have put the script to a user
directory, just the kind on the server is, and it worked just fine. I think
maybe it's the Apache configuration (on the server) which is causing my
problem. I would very appreciate any help on this matter (clues what could
be wrong).

Ales!






Hi All,

I need to automatically create a large GIF image made up of numerous smaller
GIF/JPG files.

The list of images (either GIF or JPG) is taken off a MySQL database and at
the moment, I create a HTML table (5 columns, up to 20 rows), view it in my
browser, manually dump it to the screen and then edit it in a image program
to the right size. Then I save it as a transparent GIF and use a 

[PHP] RE: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah lookingfor? .h? .so? .a? what?!

2001-03-31 Thread Daevid Vincent

I get the "No such file or directory" right after the "license box" shows up
in the PHP4 compile. Like this (no matter what directory I've tried in that
big old list so far):

./WTConfigure: --with-openlink=/usr/local/openlink/lib: No such file or
directory

"./WTConfigure" is just a shell script with make clean, all my --options,
make, make install, since I have to compile in mysql, and some other stuff.

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 30, 2001 4:00 PM
 To: Daevid Vincent; [EMAIL PROTECTED]; PHP General
 Subject: Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
 lookingfor? .h? .so? .a? what?!


 Daevid,

 just --with-iodbc or --with-openlink is fine.

 you should be using either:

 --with-iodbc=/usr/local/openlink/odbcsdk \
 or
 --with-openlink=/usr/local/openlink/lib \

 depending on which you use and where you installed the sdk.
 what error are you getting?

 Best regards,
 Andrew


 On 3/30/01 6:54 PM, "Daevid Vincent" [EMAIL PROTECTED] wrote:

  thanks for replying Andrew, but that's not working for me either.
 
  Also, do I need both "--with-iodbc" and "--with-openlink" or do
 I just need
  one of them?
 
  These are the instructions I've been following:
  http://www.iodbc.org/odbc-phpHOWTO.html
 
  so now I've tried:
 
 #--with-iodbc=/usr/local/openlink/odbcsdk/lib \
 #--with-iodbc=/usr/local/openlink/odbcsdk \
 #--with-iodbc=/usr/local/openlink/lib \
 #--with-iodbc=/usr/local/bin \
 #--with-iodbc=/usr/local \
 #--with-iodbc=/usr/local/include \
 #--with-iodbc=../libiodbc \
 #--with-openlink=/usr/local/openlink/odbcsdk/lib \
 #--with-openlink=/usr/local/openlink/odbcsdk \
 #--with-openlink=/usr/local/openlink \
 #--with-openlink=/usr/local/openlink/lib \
 
  here is my dir structure:
  the files are there, why won't PHP see them? In fact I have the
  "libiodbc.so" library in TWO places I see: "openlink/lib/" and
  "openlink/odbcsdk/lib/"
 
  [root=pts/1]3:45pm@content:{/usr/local/openlink} ll -r
  /usr/local/openlink/*
  -rw-rw-rw-1 nobody   html0 Mar 29 20:20
  /usr/local/openlink/oplrqb.ini
  -rwxr-xr-x1 nobody   html  707 Mar 30 15:16
  /usr/local/openlink/openlink.sh*
  -rwxr-xr-x1 nobody   html  619 Mar 30 15:16
  /usr/local/openlink/openlink.csh*
  -rw-rw-rw-1 nobody   html  180 Mar 29 20:21
  /usr/local/openlink/odbcinst.ini
  -rw-rw-rw-1 nobody   html  541 Mar 30 13:51
  /usr/local/openlink/odbc.ini
  -rw-rw-rw-1 nobody   html   196347 Mar 29 17:54
  /usr/local/openlink/l2oc.taz
  -rw-rw-rw-1 nobody   html   364085 Mar 30 15:16
  /usr/local/openlink/l2ku.taz
  -rw-rw-rw-1 nobody   html   512218 Mar 30 15:16
  /usr/local/openlink/l2ko.taz
  -rwxrwxrwx1 nobody   html16137 Mar 30 15:16
  /usr/local/openlink/install.sh*
 
  /usr/local/openlink/udbcsdk:
  total 16
  drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 lib/
  drwxr-xr-x3 nobody   html 4096 Mar  7 14:44 include/
  drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 examples/
  drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 doc/
 
  /usr/local/openlink/lib:
  total 400
  -rw-r--r--1 nobody   html   272057 Mar  7 14:43 oplodbc.so.1.0.0
  lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so.1 -
  oplodbc.so.1.0.0
  lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so -
  oplodbc.so.1.0.0
  -rw-r--r--1 nobody   html  678 Mar  7 14:43 oplodbc.la
  lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libodbc.so -
  libiodbc.so.2.1.2*
  -rwxr-xr-x1 nobody   html   117877 Mar  7 14:43
 libiodbc.so.2.1.2*
  lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so.2 -
  libiodbc.so.2.1.2*
  lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so -
  libiodbc.so.2.1.2*
  -rwxr-xr-x1 nobody   html  669 Mar  7 14:43 libiodbc.la*
 
  /usr/local/openlink/bin:
  total 140
  -rw---1 nobody   html   29 Mar 30 15:16 oplrqb.ini
  -rwxr-xr-x1 nobody   html92225 Mar  7 14:43 odbctest*
  -rw-r--r--1 nobody   html  170 Mar  7 14:43
 odbcinst.ini.sample
  -rw-r--r--1 nobody   html  170 Mar  7 14:43 odbcinst.ini
  -rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini.sample
  -rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini
  -rwxr--r--1 nobody   html23260 Mar  7 14:43 inifile*
 
  /usr/local/openlink/odbcsdk:
  total 20
  drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 lib/
  drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 include/
  drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 examples/
  drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 driver/
  

[PHP] Saving file

2001-03-31 Thread Adi Wibowo


Hi I write a script that create a report. 
Using header ("location : filename") to tell browser to download file
instead of displaying it to screen.

On some computer it work, but on another (using the same browser) is
always displayed. I try to change file extension to treat browser to
download it, but still doesn't work.

Do you have any suggestion to push browser to always download the file?

Thank you so much.


Adi Wibowo ---
* Work matter: [EMAIL PROTECTED]
* Private matter : [EMAIL PROTECTED]
--


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




[PHP] sessions and cookies

2001-03-31 Thread David Hynes

I am using sessions to password protect a section of a website.

I am storing the session ID in a cookie but just in case cookies are not
enabled, I am also passing the session ID in the query string to each page
in the protected directory.

Please can someone tell me if this could cause any problems, especially if
the user if tries to access a URL from their history bar in the browser with
an old session ID.

i think what I'm trying to ask is , if the script receives a session ID from
a query string and cookie, which does it use ?

Thanks,
David.

---
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


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




Re: [PHP] sessions and cookies

2001-03-31 Thread \[Inf\] F!RE-WALL

I don't recommend putting the Session ID in the URL. Subscibed members could
pass URL's to eachother and that way they could have eachother's settings.

""David Hynes"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am using sessions to password protect a section of a website.

 I am storing the session ID in a cookie but just in case cookies are not
 enabled, I am also passing the session ID in the query string to each page
 in the protected directory.

 Please can someone tell me if this could cause any problems, especially if
 the user if tries to access a URL from their history bar in the browser
with
 an old session ID.

 i think what I'm trying to ask is , if the script receives a session ID
from
 a query string and cookie, which does it use ?

 Thanks,
 David.

 ---
 Fed202 Solutions
 www.fed202solutions.com
 Mobile : 07779 293368
 ---


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




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




[PHP-CVS] cvs: php4 /ext/standard output.c

2001-03-31 Thread Zeev Suraski

zeevSat Mar 31 14:53:19 2001 EDT

  Modified files:  
/php4/ext/standard  output.c 
  Log:
  Fix headers handling with output buffering
  
  
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.51 php4/ext/standard/output.c:1.52
--- php4/ext/standard/output.c:1.51 Wed Mar 28 12:08:49 2001
+++ php4/ext/standard/output.c  Sat Mar 31 14:53:19 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.51 2001/03/28 20:08:49 andre Exp $ */
+/* $Id: output.c,v 1.52 2001/03/31 22:53:19 zeev Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -447,6 +447,7 @@
OLS_FETCH();
 
if (SG(request_info).headers_only) {
+   php_header();
zend_bailout();
}
if (php_header()) {



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




[PHP] Remembering variables during Ping-Pong session

2001-03-31 Thread David Minor

Here's what I want to do:
multiple forms on separate pages that collect data from the user.  When all
appropriate data is entered, the user can send all data to the process
script.  I want the user to be able to jump from one page to another in no
particular order and back while entering data.  This is so if they change
their mind mid-stream, they can go edit previous pages without having to
reenter everything after that page.  If the user enters a page where they
have already entered data, the data is displayed.

Maybe I'm headed down the wrong path...
Here's how I thought about doing it (haven't gotten this working yet):

I set the form input attribute to 'name="variable_name_post"' (variable name
+ _post suffix).  At the beginning of each page, I include a function that
reads through $HTTP_POST_VARS and if it finds a posted variable with the
'_post' suffix, it stores the value of that var in $variable_name.  The main
list of vars (not the posted vars) is passed from page to page via sessions.

my problem is not storing the new variable, it's making it available to the
rest of the script (and the session).  What I end up with is a variable
variable ${$tmp_var_name} with a value equal to the posted var.  In this
case, if $tmp_var_name = 'cust_name', I can echo $cust_name and get the
proper value inside the function.  Outside the function the var is set to
''.

I either need to find a way to get that variable variable to be recognized
outside the function, or I need some help reorganizing my logic on another
way to do this.  The code for the function was posted to the list yesterday
under the subject "renaming form posted variable names".

Thanks to those who will help1
dm


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




[PHP] mail() and a Data format error

2001-03-31 Thread Chris Cameron

My setup is PHP 4.0.4p1 with Apache 1.3.19 (PHP as a module), and sendmail
at /usr/sbin/sendmail. I have sendmail_path = /usr/sbin/sendmail -t -i in
my php.ini. THis is all on Linux.

When I use mail() in any which way, it returns as if it were sucsessful,
but in my maillog I see;
Mar 31 16:22:16 catsnip sendmail[30912]: f2VNMGZ30910: f2VNMGY30912: DSN:
Data format error

The messages above it gives me the idea that it's the destination
mailserver returning this error.

Any ideas?
Thanks,
Chris


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




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/standard output.c

2001-03-31 Thread Zeev Suraski

zeevSat Mar 31 14:54:07 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/standard  output.c 
  Log:
  MFH - header handling with output buffering
  
  
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.48.2.1 php4/ext/standard/output.c:1.48.2.2
--- php4/ext/standard/output.c:1.48.2.1 Fri Mar 16 19:05:07 2001
+++ php4/ext/standard/output.c  Sat Mar 31 14:54:07 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.48.2.1 2001/03/17 03:05:07 zeev Exp $ */
+/* $Id: output.c,v 1.48.2.2 2001/03/31 22:54:07 zeev Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -447,6 +447,7 @@
OLS_FETCH();
 
if (SG(request_info).headers_only) {
+   php_header();
zend_bailout();
}
if (php_header()) {



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




[PHP-CVS] cvs: php4 /ext/midgard .cvsignore ChangeLog INSTALL LICENSE Makefile.in README.session article.c attachment.c calendar.c config.m4 config.m4.session element.c event.c eventmember.c file.c group.c host.c image.c mail.c member.c mgd_access.h mgd_article.h mgd_attachment.h mgd_calendar.h mgd_element.h mgd_errno.pl mgd_event.h mgd_eventmember.h mgd_file.h mgd_group.h mgd_host.h mgd_image.h mgd_internal.h mgd_mail.h mgd_member.h mgd_oop.h mgd_page.h mgd_pageelement.h mgd_pagelink.h mgd_person.h mgd_preferences.h mgd_preparser.h mgd_session.h mgd_sitegroup.h mgd_snippet.h mgd_snippetdir.h mgd_style.h mgd_topic.h midgard.c mkall oop.c page.c pageelement.c pagelink.c parameter.c person.c php_midgard.h preferences.c preparser-parser.y preparser-scanner.l preparser.c session.c session.modules.c session.sql sitegroup.c snippet.c snippetdir.c style.c topic.c

2001-03-31 Thread Emiliano Heyns

emile   Sat Mar 31 16:23:56 2001 EDT

  Removed files:   
/php4/ext/midgard   .cvsignore ChangeLog INSTALL LICENSE Makefile.in 
README.session article.c attachment.c calendar.c 
config.m4 config.m4.session element.c event.c 
eventmember.c file.c group.c host.c image.c 
mail.c member.c mgd_access.h mgd_article.h 
mgd_attachment.h mgd_calendar.h mgd_element.h 
mgd_errno.pl mgd_event.h mgd_eventmember.h 
mgd_file.h mgd_group.h mgd_host.h mgd_image.h 
mgd_internal.h mgd_mail.h mgd_member.h mgd_oop.h 
mgd_page.h mgd_pageelement.h mgd_pagelink.h 
mgd_person.h mgd_preferences.h mgd_preparser.h 
mgd_session.h mgd_sitegroup.h mgd_snippet.h 
mgd_snippetdir.h mgd_style.h mgd_topic.h 
midgard.c mkall oop.c page.c pageelement.c 
pagelink.c parameter.c person.c php_midgard.h 
preferences.c preparser-parser.y 
preparser-scanner.l preparser.c session.c 
session.modules.c session.sql sitegroup.c 
snippet.c snippetdir.c style.c topic.c 
  Log:
  
  



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




[PHP] Can a WHILE be done inside an array?

2001-03-31 Thread Kenneth R Zink II

I'm trying to figure out how to do a WHILE inside of an array.

Here is the while statement.

$modyear = "1982";
$curyear = date("Y");
$curyear = $curyear + 1;

while($modyear = $curyear){
echo "option".$modyear.;
$modyear++;
}

The array I want to use the WHILE in, looks like this.  The X is where I
want to insert the WHILE.

'year' = array('Year','12','keyword','1:30','select','X','text'),

Here is what a functioning array statment in my script looks like for
referance.

'make' =
array('Make','12','keyword','1:30','select','optionChevroletoptionGMCop
tionIsuzuoptionOldsmobile','text'),

Can someone please give me some pointers. =)

Thanks.


Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
'87 GMC S-15 Ext. Cab (Hurricane) ...BBC 524 being built !!!
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI !!!
http://www.s-series.org/htm/firestorm/firestorm.htm
'84 Oldsmobile Delta 88 Delta 88 Royal Brougham.
Racing by the grace of God!!!


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




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/midgard .cvsignore ChangeLog INSTALL LICENSE Makefile.in README.session article.c attachment.c calendar.c config.m4 config.m4.session element.c event.c eventmember.c file.c group.c host.c image.c mail.c member.c mgd_access.h mgd_article.h mgd_attachment.h mgd_calendar.h mgd_element.h mgd_errno.pl mgd_event.h mgd_eventmember.h mgd_file.h mgd_group.h mgd_host.h mgd_image.h mgd_internal.h mgd_mail.h mgd_member.h mgd_oop.h mgd_page.h mgd_pageelement.h mgd_pagelink.h mgd_person.h mgd_preferences.h mgd_preparser.h mgd_session.h mgd_sitegroup.h mgd_snippet.h mgd_snippetdir.h mgd_style.h mgd_topic.h midgard.c mkall oop.c page.c pageelement.c pagelink.c parameter.c person.c php_midgard.h preferences.c preparser-parser.y preparser-scanner.l preparser.c session.c session.modules.c session.sql sitegroup.c snippet.c snippetdir.c style.c topic.c

2001-03-31 Thread James Moore

jmoore  Sat Mar 31 16:35:50 2001 EDT

  Removed files:   (Branch: PHP_4_0_5)
/php4/ext/midgard   topic.c style.c snippetdir.c snippet.c 
sitegroup.c session.sql session.modules.c 
session.c README.session preparser.c 
preparser-scanner.l preparser-parser.y 
preferences.c php_midgard.h person.c parameter.c 
pagelink.c pageelement.c page.c oop.c mkall 
midgard.c mgd_topic.h mgd_style.h 
mgd_snippetdir.h mgd_snippet.h mgd_sitegroup.h 
mgd_session.h mgd_preparser.h mgd_preferences.h 
mgd_person.h mgd_pagelink.h mgd_pageelement.h 
mgd_page.h mgd_oop.h mgd_member.h mgd_mail.h 
mgd_internal.h mgd_image.h mgd_host.h mgd_group.h 
mgd_file.h mgd_eventmember.h mgd_event.h 
mgd_errno.pl mgd_element.h mgd_calendar.h 
mgd_attachment.h mgd_article.h mgd_access.h 
member.c Makefile.in mail.c LICENSE INSTALL 
image.c host.c group.c file.c eventmember.c 
event.c element.c config.m4.session config.m4 
ChangeLog calendar.c attachment.c article.c 
.cvsignore 
  Log:
  Removing Midgard from release branch
  



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




[PHP] fetching MS SQL errors...

2001-03-31 Thread Christian Dechery

Has anyone successfully handled MS SQL error messages?

some articles? or code? anyone?

thanks...

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




[PHP] RH7, Oracle 8i: Curiouser and Curiouser

2001-03-31 Thread Jon Jacob

Hum.  Maybe it is because of the weekend or maybe it is because the
combination of RH7, Oracle and PHP is too volitile, but I have yet to
hear of anyone who has gotten this to work.  Well, my experience brings
up serious doubts that it can be done (but I will persist!)

I will quickly recap if you have not followed my previous posts.  I
recompiled Apache and PHP according to instructions causing a working
situation to become broken.  All PHP code showed in the browser instead
of being rendered.  I went over my configuration with a find tooth comb
and it appeared correct.

In response to this, I decided to return to my previous state by
installing the RH7 rpm with the additional oci rpm for Oracle support.
Indeed, it did improve the situation but only halfway.  Let me
explain..

The browser now renders the PHP correctly and the phpinfo() function
shows that the --with-oci8 support is included.  However, when I use the
basic OCI function OCILogin, I get the following error (just as I did
when I first started this mess):

Fatal error: Call to undefined function: ocilogon() in
/home/jon/public_html/test.php on line 25

So, I tried to run the file from the command line, and lo and behold,
the file worked as it should.  I did not get any errors whatsoever.

What the hell could all this mean?


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] registering an array into a session (?)

2001-03-31 Thread Christian Dechery

Can somebody please help me out??
I'm going nuts...
what's wrong with this piece of code?

pre
 if(!isset($script_total_time))
 {
 // register the session variables to keep track of 
step times
 $script_total_time=(float)$total_time;
 session_register("script_total_time");
 $step_times_array[$step]=$total_time;
 $step_times=serialize($step_times_array);
 //echo "step_times=\"$step_times\""; - this 
echoes perfeclty
 session_register("step_times");
 }
 else
 {
 // update session variables
 $script_total_time+=(float)$total_time;
 $step_times_array=unserialize($step_times);
 $step_times_array[$step]=$total_time;
 $step_times=serialize($step_times_array);
 }
/pre

why doesn't $step_times gets registered correctly? it always register an 
empty var...

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer



Re: [PHP] [Fwd: php...]

2001-03-31 Thread Yasuo Ohgaki

PHP has type juggling feature. PHP4 supports "total equality"(?) operator "===".
If you need variable to be match for both type and value. Use "===", then you
can avoid type juggling.

http://www.php.net/manual/en/language.types.type-juggling.php
http://www.php.net/manual/en/language.operators.comparison.php

Regards,
--
Yasuo Ohgaki

 I'm sure you appreciate the importance of transitive equality in programming
 languages (especially they all aspire to be pseudo-mathematical), which is
 why I think you'll appreciate this.

 ?php

 $a = "0";
 $b = 0;
 $c = "";
 $d = "   ";

 $a == $b  // T
 $b == $c  // T
 $a == $c  // F!!

 $b == $c  // T
 $b == $d  // T
 $c == $d  // F!!

 ?

 Perl, of course, outputs the expected values: $a, $b, $c and $d are equal
 under '==', and only $a and $b are equal under 'eq'. PHP's '===' operator
 (its equivalent to 'eq') says that $a, $b, $c and $d are all different.

 Doesn't that seem like a fundamental flaw? How can equality NOT be
 transitive?? How can anyone be expected to write programs in such an
 environment?

 D






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




Re: [PHP] Compiling under RH7

2001-03-31 Thread Yasuo Ohgaki

How did you install Apache and PHP? PRM or source?
I compile from source for these. You might have httpd.conf that is actually used
by apache may be located some where else.

If you are compile from source and need the same file layout as RedHat,
use --with-layout=RedHat (or like) for Apache's configure.

(How about run 'find / -name httpd.conf'? You might find more than one.)

Regards,

--
Yasuo Ohgaki


"Jon Jacob" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am still  only getting the source of the php file.  Has anybody
 successfully compiled Apache 1.3.x (1.3.19 in my case) and PHP
 (4.0.4pl1) under RH7?  My httpd.conf has the proper AddType line and the
 php4 module is installed according to httpd -l.

 If you have done this successfully, please let me know.  I have been
 racking my brain for three straight days trying to get this to work.

 Thanks.


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


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



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




Re: [PHP] hash suggestions wanted

2001-03-31 Thread Yasuo Ohgaki

If you need shorter result, how about use a part of md5 hash result?

--
Yasuo Ohgaki


""David P. Schwartz"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 the PHP crypt function uses DES and it only generates a hash based on the
 first 8 chars of a string, although it produces a 12-char hash.  Md5 can hash
 a string of indefinite length, but it produces a much longer hash (34 chars or
 so).

 I need something that can provide me with a 12-16 char hash of an indefinite
 string (usually under 100 chars in my case) using standard hasing algorithms.

 Any suggestions?

 Thanks
 -David Schwartz


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



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




Re: [PHP] Question using chop :-)

2001-03-31 Thread Yasuo Ohgaki
It's not explain why you get additional char at the end of string, but chop() in
PHP does not get rid of last char, but it also suppose to get rid of spaces
including newline.

What char code are you using? Char code may be the cause.

--
Yasuo Ohgaki


""Marcus Ouimet"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have got chop to work for me to remove characters at the end of the
 string using something like:

 echo $listing_values1 = chop(substr($listing_values['name'],0,4);
 echo $listing_values1 ['name'] . '...' . 'nbsp;' . "\n";

 Works great except for the fact after the name there appears to be a letter
 ie:

 Brita Water Filter

 Would become:

 BritaB...

 The letter is different for each entry. What am I oing wrong. Any help
 appreciated thanks in advance...




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



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


Re: [PHP] Install

2001-03-31 Thread Yasuo Ohgaki

There is a section for that in the PHP Manual

http://jp.php.net/manual/en/migration4.php

I suggest you to read www.zend.com documents also.

Regards,

--
Yasuo Ohgaki


""Chris"" [EMAIL PROTECTED] wrote in message
00ce01c0b942$4cc0d5a0$01c8c8c8@ibcserver">news:00ce01c0b942$4cc0d5a0$01c8c8c8@ibcserver...
Hi,
I am trying to find some info on upgrading from php3 to php4.
I can't seem to find any docs about upgrading, just installing. Is this the same
thing?
Do I have to re-compile apache just to go from php3 to php4?

Thanks,
Chris.






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




Re: [PHP] Disk Quota Through web

2001-03-31 Thread Yasuo Ohgaki

You need to provide what OS you are using.
I think you may get better response if you ask mailing list discussing about
your OS for this matter.

Regards,
--
Yasuo Ohgaki


""pnp"" [EMAIL PROTECTED] wrote in message
013301c0b8e5$37735220$[EMAIL PROTECTED]">news:013301c0b8e5$37735220$[EMAIL PROTECTED]...
Hi All There

I am new to this mailing list

I had virtual domain hosted on my server with No. of users

With control panel of mine,I want to add Quota feature to my panel

By which users can check for there quota Through web for the amount of

space they are using

I am a baby for php so please help me out from scratch

Thanks

Regards



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




Re: [PHP] problem loading extension

2001-03-31 Thread Yasuo Ohgaki

How about take a look at notes (PHP Manual)?
http://www.php.net/manual/en/install-windows.php

You might need to change \ to /, or / to \, or get rid of drive letter in
extension_dir, as I needed to load extension for PHP for Windows.

Regards,
--
Yasuo Ohgaki


"Christian Dechery" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I posted a message a while ago about having trouble loading php_mssql.dll
 extension.
 It gave me that error: 'can't find ...'. So I was stuppid enough to realize
 I didn't have MS SQL 7 installed here.

 Somone here told me to download a proggie called Dependency Walker, that
 lists all the dependencies of a DLL.
 So I did it, and it really was missing a DLL (MS SQL).

 So I installed MS SQL 7 here, and now Dependency Walker doesn't give me any
 error, but PHP still gives me the message and still does not load
 php_mssql.dll. Why? MSSQL is started, working perfectly, PHP is working
fine...

 what may be wrong?
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer


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



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




[PHP] PHP4.04pl1/pdflib3.0.3 compile issue

2001-03-31 Thread Lindsay Adams

Firstly, I spent 3 hours searching the archives and trying all the
suggestion that I could find. No go.

The box that I want to put this on is a Cobalt Qube2

The pdflib compiles and installs correctly as a shared library
It is compiled with tiff and zlib support only (png is explicitly off)

Here is the output when I compile php with the following command:

./configure --with-apxs=/usr/sbin/apxs \
--with-ftp \
--enable-calendar\
 --with-zlib-dir \
--with-mysql \
--with-pdflib=/usr/local \
--with-swf=/usr/local/swf \
--with-zlib


OUTPUT:
checking for Oracle-ORACLE support... no
checking for Ovrimos SQL Server support... no
checking whether to include PCRE support... yes
checking for memmove... (cached) yes
checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... no
no
checking for png_create_info_struct in -lpng... no
no
checking for TIFFOpen in -ltiff... no
no
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.
[php-4.0.4pl1]# 


I do not know the ins and outs of make, ld, yacc, sed...
I am not a developer, just a monkey that can read and explore

In exploring, I grep'd for PDF_show_box in a bunch of .c and .h files, and
found it in a lot of places.
I don't know which file does the actual check for PDF_show_boxed, or which
file it checks, that would be helpful.

I did download the latest and greatest pdf.c for php/ext/pdf directory.

If anyone has any new ideas on things to try to make this work, I would be
hugely grateful.


I downloaded both source tarballs today, from what appeared to be the
newest.

Ack!

Lindsay Adams


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




Re: [PHP] Saving file

2001-03-31 Thread Yasuo Ohgaki

Reading RFCs will help.

RFC 2068 RFC 1945 RFC 2936

Regards,
--
Yasuo Ohgaki


"Adi Wibowo" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi I write a script that create a report.
 Using header ("location : filename") to tell browser to download file
 instead of displaying it to screen.

 On some computer it work, but on another (using the same browser) is
 always displayed. I try to change file extension to treat browser to
 download it, but still doesn't work.

 Do you have any suggestion to push browser to always download the file?

 Thank you so much.


 Adi Wibowo ---
 * Work matter: [EMAIL PROTECTED]
 * Private matter : [EMAIL PROTECTED]
 --


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



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




Re: [PHP] Saving file

2001-03-31 Thread Yasuo Ohgaki

Oops I pasted older RFC number for HTTP/1.1, newer version is

RFC 2616

Reading older version will also help, though.

--
Yasuo Ohgaki


"Adi Wibowo" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi I write a script that create a report.
 Using header ("location : filename") to tell browser to download file
 instead of displaying it to screen.

 On some computer it work, but on another (using the same browser) is
 always displayed. I try to change file extension to treat browser to
 download it, but still doesn't work.

 Do you have any suggestion to push browser to always download the file?

 Thank you so much.


 Adi Wibowo ---
 * Work matter: [EMAIL PROTECTED]
 * Private matter : [EMAIL PROTECTED]
 --


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



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




[PHP] APC version 1.0.9 pushed

2001-03-31 Thread George Schlossnagle

New version pushed with all the current CVS changes.

- fixes for numerous small bugs
- fix for memory alignment errors on 64 bit systems
- many new cache-visibility functions added
- optional fcntl locks under shm versions (look in apc_cache.c)

As always, available at http://apc.communityconnect.com

Also, Mike Bretz and team have developed a beautiful gui to provide easy
management of your APC cluster.  Check out http://apc.neuropeans.com/
(this gui requires the functions new in v1.0.9)

Enjoy!

George



-- 
$_ = 'George Schlossnagle';
s#.#(ord$')-(ord$)+((index($_,$')-$)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print
join('',(map chr$_,reverse
map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/);


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




[PHP] form

2001-03-31 Thread LDL Enterprise

Hi all,

Could someone please give me a clue. I have a input type=text form that
pulls the quantity from a mysql database. I want the user to be able to
update the quatity by just entering the new quantity and when they unfocus
on the text box it will automatically update without pressing a submit
button. Thanks


`,,`,,,`,,`,

 _ ___   _   Larry L.
| |   |   \ | |  [EMAIL PROTECTED]
| |__ | | || |__  www.ldlenterprise.com
|||___/ ||



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




[PHP] ereg

2001-03-31 Thread Michael Hall


I'm using the following expression to check input strings:

if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! }

This works fine except for when a string has spaces, as in text. What do I
need to add to the expression to handle spaces (internal, not at the
beginning or end).

Thanks

Mick


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




Re: [PHP] [Fwd: php...]

2001-03-31 Thread Yasuo Ohgaki

I  missed that you are discussing about transitivity. Your claim sound fair to
me too. I'm relatively new to PHP :) So I'm not sure, but it's probably because
historical reason that PHP dose not have transitivity for equality operator.

We can still workaround with type casting, though.

Do you know annotated manual?

http://www.php.net/manual/en/

Your post would be a great note for many users. How about add them to sections
that I've been mentioned.

"Yasuo Ohgaki" [EMAIL PROTECTED] wrote in message news:...
 PHP has type juggling feature. PHP4 supports "total equality"(?) operator
"===".
 If you need variable to be match for both type and value. Use "===", then you
 can avoid type juggling.

 http://www.php.net/manual/en/language.types.type-juggling.php
 http://www.php.net/manual/en/language.operators.comparison.php

 Regards,
 --
 Yasuo Ohgaki

  I'm sure you appreciate the importance of transitive equality in programming
  languages (especially they all aspire to be pseudo-mathematical), which is
  why I think you'll appreciate this.
 
  ?php
 
  $a = "0";
  $b = 0;
  $c = "";
  $d = "   ";
 
  $a == $b  // T
  $b == $c  // T
  $a == $c  // F!!


As you mentioned it's worth to note. Since $a and $d is string that have
different content, so PHP evaluates it as FALSE.

 
  $b == $c  // T
  $b == $d  // T
  $c == $d  // F!!


This is the same.

 
  ?
 
  Perl, of course, outputs the expected values: $a, $b, $c and $d are equal
  under '==', and only $a and $b are equal under 'eq'. PHP's '===' operator
  (its equivalent to 'eq') says that $a, $b, $c and $d are all different.


It also worh to note.

=== expects the same type although PHP loosely typed language.

 
  Doesn't that seem like a fundamental flaw? How can equality NOT be
  transitive?? How can anyone be expected to write programs in such an
  environment?


We still can cast variables, so I suggest cast when you needed.

Regards,
--
Yasuo Ohgaki


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




[PHP] Reading db fetched values from files.

2001-03-31 Thread Thomas Edison Jr.

awright, basically what i want is to write a script
that can open a file and read some values that i want,
for eg:- yahoo mail. if i have an account and i can
make a page that logs on to my yahoo mail using my
account, i want to display the number of unread
messages (  perhaps read messages ) on my page using
my script. i'm not really opening the yahoo mail page.
i'm just needing to read the no. of read messages once
i've logged on using my script  my a/c info and print
it out on my page. how's this possible. 

making a logon page in which i feed in my user/pass
for yahoo mail is easy - and then actually logging on
to my yahoo mial is also easy - but i don't wanna open
my yahoo inbox - i just wanna read the values of read
 unread messages and print it out on my page which
opens next. can this be done? i figure we use the
filesystem functions - but considering yahoo uses his
own cgi-perl with his own db, how can my PHP code read
those scripts and give the output?

cheers,
T. Edison jr.


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

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

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




Re: [PHP] Passing Special Characters in Query String

2001-03-31 Thread Thomas Edison Jr.

apparently, "echo" solved my problem - much to my
surprise  disgust, considering the head i was putting
into it. printf() apparently didn't print any special
chars coming in it - while echo prints anything 
everything without a problem!!!

Though i am having some problems with slashes, i guess
stripslashes() has solved most of it - i'm just
working on the balance...

cheers,
T. Edison jr.
--- Christian Reiniger [EMAIL PROTECTED] wrote:
 On Wednesday 28 March 2001 18:34, you wrote:
  I've tried everything :
  rawurlencode, urldecode, htmlentities,
  htmlspecialchars - nothing is working. and come 2
  think of it - it seems like such a basic
 problem...
 
 well, then I'd say you do something else wrong.
 Difficult to say without 
 seeing the code.
 
   On Wednesday 28 March 2001 08:36, you wrote:
I'm facing a problem with Special Characters
 ($,
  
   %, ,
  
\, /, ;, :, ", ') etc..
We are sending a varibale in a query string
 like
   this
a href="add_pro_team.php3?title=? echo
urlencode($title) ?"
 
 -- 
 Christian Reiniger
 LGDC Webmaster (http://sunsite.dk/lgdc/)
 
 Pretty cool, the kind of power information
 technology puts in our hands
 these days.
 
 - Securityfocus on probing 3600 hosts for known
 problems in 3 weeks
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


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

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

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




Re: [PHP] form

2001-03-31 Thread Chris Adams

On 31 Mar 2001 20:33:56 -0800, LDL Enterprise [EMAIL PROTECTED]
wrote:
   Could someone please give me a clue. I have a input type=text form
   that pulls the quantity from a mysql database. I want the user to be
   able to update the quatity by just entering the new quantity and when
   they unfocus on the text box it will automatically update without
   pressing a submit button.

You could use JavaScript to have the form submit OnBlur, but that's going to be
pretty slow and annoying - consider what would happen if the user is entering
several fields and clicks on another field, intending to come back and change
it...

What effect are you trying to achieve? Just reducing the number of clicks
needed to submit a form? If so, some browers will submit the form when you hit
the enter key while in a text field, which might have the effect you're looking
for without requiring any coding.

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




Re: [PHP] ereg

2001-03-31 Thread Chris Adams

On 31 Mar 2001 21:07:59 -0800, Michael Hall [EMAIL PROTECTED] wrote:

I'm using the following expression to check input strings:

if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! }

This works fine except for when a string has spaces, as in text. What do I
need to add to the expression to handle spaces (internal, not at the
beginning or end).

if (!ereg("^[[:alnum:]_- ]+$", $string)) { get outta here! }

Check out the regular expression documentation or "Mastering Regular
Expressions" over at ora.com.

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




[PHP-CVS] cvs: php4 /ext/gd gd.c gd_ctx.c php_gd.h

2001-03-31 Thread Jani Taskinen

sniper  Sat Mar 31 21:42:07 2001 EDT

  Modified files:  
/php4/ext/gdgd.c gd_ctx.c php_gd.h 
  Log:
  Fixed bug #8137 and killed some compile warnings.
  
  

Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.118 php4/ext/gd/gd.c:1.119
--- php4/ext/gd/gd.c:1.118  Mon Mar 12 05:57:53 2001
+++ php4/ext/gd/gd.cSat Mar 31 21:42:07 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.118 2001/03/12 13:57:53 sasha Exp $ */
+/* $Id: gd.c,v 1.119 2001/04/01 05:42:07 sniper Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -92,7 +92,7 @@
 #define CTX_PUTC(c,fp) fputc(c, fp)
 #endif
 
-static void _php_image_output_wbmp(gdImagePtr im, gdIOCtx *fp);
+static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold);
 
 #ifdef THREAD_SAFE
 DWORD GDlibTls;
@@ -644,6 +644,7 @@
 }
 /* }}} */
 
+size_t php_fread_all(char **buf, int socket, FILE *fp, int issock);
 static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char 
*tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)()) 
 {
zval **file;
@@ -685,7 +686,7 @@
if(issock  socketd) {
 #ifdef USE_GD_IOCTX
gdIOCtx* io_ctx;
-   int buff_size;
+   size_t buff_size;
char *buff,*buff_em;
 
buff_size = php_fread_all(buff_em, socketd, fp, issock);
@@ -811,11 +812,11 @@
char *fn = NULL;
FILE *fp;
int argc = ZEND_NUM_ARGS();
-   int output = 1, q = -1;
+   int q = -1, i;
GDLS_FETCH();
 
-   /* The quality parameter for Wbmp stands for the threshold
-  So the q variable */
+   /* The quality parameter for Wbmp stands for the threshold when called from 
+image2wbmp() */
+   /* When called from imagewbmp() the quality parameter stands for the 
+foreground color. Default: black. */
 
if (argc  1 || argc  3 || zend_get_parameters_ex(argc, imgind, file, 
quality) == FAILURE) 
{
@@ -846,14 +847,18 @@
}

switch(image_type) {
+   case PHP_GDIMG_CONVERT_WBM:
+   if(q0||q255) {
+   php_error(E_WARNING, "%s: invalid threshold 
+value '%d'. It must be between 0 and 255",get_active_function_name(), q);
+   }
case PHP_GDIMG_TYPE_JPG:
(*func_p)(im, fp, q);
break;
case PHP_GDIMG_TYPE_WBM:
-   if(q0||q255) {
-   php_error(E_WARNING, "%s: invalid threshold 
value '%d'. It must be between 0 and 255",get_active_function_name(), q);
+   for(i=0; i  im-colorsTotal; i++) {
+   if(im-red[i] == 0) break;
}
-   (*func_p)(im, q, fp);
+   (*func_p)(im, i, fp);
break;
default:
(*func_p)(im, fp);
@@ -873,12 +878,16 @@
}
 
switch(image_type) {
+   case PHP_GDIMG_CONVERT_WBM:
+   if(q0||q255) {
+   php_error(E_WARNING, "%s: invalid threshold 
+value '%d'. It must be between 0 and 255",get_active_function_name(), q);
+   }
case PHP_GDIMG_TYPE_JPG:
(*func_p)(im, tmp, q);
break;
case PHP_GDIMG_TYPE_WBM:
-   if(q0||q255) {
-   php_error(E_WARNING, "%s: invalid threshold 
value '%d'. It must be between 0 and 255",get_active_function_name(), q);
+   for(i=0; i  im-colorsTotal; i++) {
+   if(im-red[i] == 0) break;
}
(*func_p)(im, q, tmp);
break;
@@ -958,54 +967,20 @@
 }
 /* }}} */
 
-/* {{{ proto int imagewbmp(int im [, string filename])
+/* {{{ proto int imagewbmp(int im [, string filename, [, int foreground]])
Output WBMP image to browser or file */
 PHP_FUNCTION(imagewbmp)
 {
+#ifdef HAVE_GD_WBMP
 #ifdef USE_GD_IOCTX
-   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, 
"WBMP", _php_image_output_wbmp);
+   _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, 
+"WBMP", gdImageWBMPCtx);
 #else
-   _php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, 
"WBMP", _php_image_output_wbmp);
+   

Re: [PHP] form

2001-03-31 Thread Sean Weissensee


I would like to achieve this as well,
I have a shopping cart system I wrote which display several detail lines
of items purchased, at the moment if the user changes a quantity they have
to manualy
click a link to recalulate the total, I would like this to happen as soon as
the
user tabs of the qty field.

Sean

, e-mail: [EMAIL PROTECTED]


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




[PHP-CVS] cvs: php4 /ext/informix ifx.ec

2001-03-31 Thread Jani Taskinen

sniper  Sat Mar 31 21:55:22 2001 EDT

  Modified files:  
/php4/ext/informix  ifx.ec 
  Log:
  Fixed bug #10095. 
  
  
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.52 php4/ext/informix/ifx.ec:1.53
--- php4/ext/informix/ifx.ec:1.52   Sun Feb 25 22:06:58 2001
+++ php4/ext/informix/ifx.ecSat Mar 31 21:55:20 2001
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: ifx.ec,v 1.52 2001/02/26 06:06:58 andi Exp $ */
+/* $Id: ifx.ec,v 1.53 2001/04/01 05:55:20 sniper Exp $ */
 
 /* ---
  * if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -472,17 +472,18 @@
 maxl[15]=0;
 }

-DISPLAY_INI_ENTRIES();
-   
-php_printf("table border=\"5\" width=\"600\"\n");
-php_info_print_table_header(2, "Key", "Value");
+php_info_print_table_start();
+php_info_print_table_header(2, "Informix support", "enabled");
 sprintf(buf, "%ld", IFXG(num_persistent));
-php_info_print_table_row(2, "Persistent links : ", buf);
+php_info_print_table_row(2, "Persistent links", buf);
 sprintf(buf, "%ld", IFXG(num_links)); 
-php_info_print_table_row(2, "Total links : ", buf);
+php_info_print_table_row(2, "Total links", buf);
 sprintf(buf, "%02.2f", (double)(IFX_VERSION/100.0)); 
-php_info_print_table_row(2, "ESQL/C Version: ", buf);
-php_printf("/table\n");
+php_info_print_table_row(2, "ESQL/C Version", buf);
+php_info_print_table_end();
+
+DISPLAY_INI_ENTRIES();
+   
 }
 
 static void php3_ifx_set_default_link(int id) 



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




[PHP-CVS] cvs: php4 /ext/gd gd.c gd_ctx.c

2001-03-31 Thread Jani Taskinen

sniper  Sat Mar 31 22:20:45 2001 EDT

  Modified files:  
/php4/ext/gdgd.c gd_ctx.c 
  Log:
  According to GD documentation the macros should be used instead..
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.119 php4/ext/gd/gd.c:1.120
--- php4/ext/gd/gd.c:1.119  Sat Mar 31 21:42:07 2001
+++ php4/ext/gd/gd.cSat Mar 31 22:20:45 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.119 2001/04/01 05:42:07 sniper Exp $ */
+/* $Id: gd.c,v 1.120 2001/04/01 06:20:45 sniper Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -855,8 +855,8 @@
(*func_p)(im, fp, q);
break;
case PHP_GDIMG_TYPE_WBM:
-   for(i=0; i  im-colorsTotal; i++) {
-   if(im-red[i] == 0) break;
+   for(i=0; i  gdImageColorsTotal(im); i++) {
+   if(gdImageRed(im, i) == 0) break;
}
(*func_p)(im, i, fp);
break;
@@ -886,8 +886,8 @@
(*func_p)(im, tmp, q);
break;
case PHP_GDIMG_TYPE_WBM:
-   for(i=0; i  im-colorsTotal; i++) {
-   if(im-red[i] == 0) break;
+   for(i=0; i  gdImageColorsTotal(im); i++) {
+   if(gdImageRed(im, i) == 0) break;
}
(*func_p)(im, q, tmp);
break;
Index: php4/ext/gd/gd_ctx.c
diff -u php4/ext/gd/gd_ctx.c:1.3 php4/ext/gd/gd_ctx.c:1.4
--- php4/ext/gd/gd_ctx.c:1.3Sat Mar 31 21:42:07 2001
+++ php4/ext/gd/gd_ctx.cSat Mar 31 22:20:45 2001
@@ -82,8 +82,8 @@
(*func_p)(im, ctx, q);
break;
case PHP_GDIMG_TYPE_WBM:
-   for(i=0; i  im-colorsTotal; i++) {
-   if(im-red[i] == 0) break;
+   for(i=0; i  gdImageColorsTotal(im); i++) {
+   if(gdImageRed(im, i) == 0) break;
} 
(*func_p)(im, i, ctx);
break;



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




Re: [PHP] form

2001-03-31 Thread Chris Adams

On 31 Mar 2001 22:03:54 -0800, Sean Weissensee [EMAIL PROTECTED] wrote:
I have a shopping cart system I wrote which display several detail lines
of items purchased, at the moment if the user changes a quantity they have
to manualy
click a link to recalulate the total, I would like this to happen as soon as
the
user tabs of the qty field.

Use an OnBlur() handler and some JavaScript. However, you'll still need to do
the calculations on the server to prevent cheating because if you want to
support older browsers, you'll need to put the total in an INPUT TYPE="TEXT"
field. Your PHP code could generate a JavaScript function ("recalc()") that
would check each item and a cost * quantity to update the subtotal; when they
hit submit, you'd need to do the same check in PHP to be sure of getting an
accurate result.

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




Re: [PHP] Compiling under RH7

2001-03-31 Thread Jon Jacob

Yasuo Ohgaki wrote:

 How did you install Apache and PHP? PRM or source?
 I compile from source for these. You might have httpd.conf that is actually used
 by apache may be located some where else.

 If you are compile from source and need the same file layout as RedHat,
 use --with-layout=RedHat (or like) for Apache's configure.

 (How about run 'find / -name httpd.conf'? You might find more than one.)

 Regards,

 --
 Yasuo Ohgaki

 "Jon Jacob" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am still  only getting the source of the php file.  Has anybody
  successfully compiled Apache 1.3.x (1.3.19 in my case) and PHP
  (4.0.4pl1) under RH7?  My httpd.conf has the proper AddType line and the
  php4 module is installed according to httpd -l.
 
  If you have done this successfully, please let me know.  I have been
  racking my brain for three straight days trying to get this to work.
 
  Thanks.
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

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

Duh.  I wish I had gotten your reply earilier.  Yes, there was a second httpd.conf
file and it did lack the addtype line, but now I am in a different situation as I
have reinstalled the original rpms with the oracle rpm and yet the oracle functions
do not exactly run (see my previous note).

Appreciate the effort, however.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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