php-general Digest 26 Dec 2001 22:03:18 -0000 Issue 1075

Topics (messages 78763 through 78795):

PDF
        78763 by: Chamarty Prasanna Kumar
        78792 by: Brian Clark

Re: SSI
        78764 by: Alexander Skwar

Re: PHP software tool
        78765 by: Alexander Skwar

page3 will not work
        78766 by: Jan Grafström

page expired
        78767 by: php_guy.visors.com.hk
        78782 by: Fred

mysql_select_db doesn't change db on expected link, bug?
        78768 by: Jean-Pierre Arneodo

Re: 4.10 New Vars Question
        78769 by: LaserJetter
        78780 by: Edward Marczak

Re: Question about CREATE_FUNCTION
        78770 by: Alexander Skwar
        78771 by: Alexander Skwar

Re: Sendemail appends domain to mail function
        78772 by: Alexander Skwar

3 column by n rows table
        78773 by: Rodrigo Peres

One good thing about $_SESSION
        78774 by: Julio Nobrega Trabalhando
        78775 by: Michael Sims
        78777 by: Julio Nobrega Trabalhando

Display output in 2 colomns
        78776 by: Daniel Harik
        78781 by: Daniel Harik

Upload file problems on Win 2K
        78778 by: Mike Baranski
        78784 by: Alok K. Dhir

Re: Most secure way to send a password
        78779 by: Brinkman, Theodore

Show only few words that var contains
        78783 by: Daniel Harik
        78786 by: Gerard Onorato

PHP 4.1.0 uses much RAM compiled --with-mm
        78785 by: Markus Mayer

Store Image in Access Database
        78787 by: Mike Baranski
        78788 by: Manuel Lemos

question regarding cookies
        78789 by: Erik Price
        78790 by: Miles Thompson
        78793 by: Erik Price
        78794 by: Miles Thompson

Re: gd_installation......................... :(
        78791 by: Brian Clark

mysql_escape_string
        78795 by: phantom

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---


 
--- Begin Message ---


Hi All,

   Want to create PDF files using PHP 

from file formats,

.eps

.ps

.doc

.ppt

.xls

.html


  Can you please suggest a way to do it.

Thanks in Advance.

Regards,

Kumar.


 


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

--- End Message ---
--- End Message ---
--- Begin Message ---
* Chamarty Prasanna Kumar ([EMAIL PROTECTED]) [Dec 26. 2001 05:09]:

> 
> Hi All,
> 
>    Want to create PDF files using PHP 

Check out libpdf

<http://www.php.net/manual/en/ref.pdf.php>

Read the Introduction.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Scaldophobia: Fear the toilet will flush while showering.

--- End Message ---
--- Begin Message ---
So sprach »[EMAIL PROTECTED]« am 2001-12-21 um 15:12:54 -0800 :
> if you have a PHP page and you want to use SSI in it... is there a special
> method?

Yes - scrap it.  It's neither senseful nor possible.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 6 days 17 hours 59 minutes
--- End Message ---
--- Begin Message ---
So sprach »LaserJetter« am 2001-12-22 um 18:46:46 -0000 :
> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?

vim

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 6 days 18 hours 0 minutes
--- End Message ---
--- Begin Message ---
Hi!
I am trying to get my script working on IE6 with cookies disabled by the
user.
You can turn cookies off under Properties >>Securitysettings.
Page2 is no problem but when going from a form and send sid as a hidden var
doesen´t work.
Is there any way to work around this?
page1.php:
<?php
session_start();
$myvar1 = "test";
session_register("myvar1");
?>
To continue, <A HREF="page2.php?<?=SID?>">click here</A>
------
page2.php:
<?php
session_start();
if (session_is_registered("myvar1") == FALSE) {
Header("Location: nopermission.htm");
}
?>
<html><head></head><body>
<form action="page3.php?" method="get">
<input type="hidden" value="<?=SID?>" name="SID"><br>//this code doesn´t
work
<input type="text" value="" name="namn"><br>
<input type="submit" value="send">
</form></body></html>
------
page3.php//I can´t get the session recogniced so I always get
"nopermission.htm"
<?php
session_start();
if (session_is_registered("myvar1") == FALSE) {
Header("Location: nopermission.htm");
}
?>
<html><head></head><body>
<p><?echo $namn;?>
</body></html>

Thanks for any help.
Regards,
Jan
--
Jan Grafström
Lillemans Hus AB
Sweden
46 (0)611-60920
46 (0)70-6409073

--- End Message ---
--- Begin Message ---
Hi,

I have problem in that my webpage in which I use sessions and MySql gives
a "warning paged expired" error when the user presses "back" button on the
browser.  Basically, the function of the webpages will be to store user
enquiries in the Mysql database until the user presses a "send email
enquiry" button in which afterwards the accumulated enquiries (recognized
by the sessionid) of the session will be sent to the relevant person.  The
pages are modularized.  All of the pages start off by "including" a
"sessions.php" which has the following:

session_start();
$connection = mysql_connect("localhost", "root", "password") or die
("Couldn't connection to database");
$db = mysql_select_db("micromotor", $connection) or die
("Couldn't select database.");
?>


The pages also "include" a form.php file which has the following to enter
data into the Mysql database.  A few lines from this file are as follows:

else
{
$insert_sql = "INSERT INTO test VALUES('$sessionid', '$modelno', '$qty',
'$purpose', '$comments', $date')";
mysql_query($insert_sql) or die ("could not insert records");


After I enter information into the form , I find that if I want to use the
"back" button on the browser, the browser displays a "warning page
expired".  Then I have to press "back" one more time before I can get to
the page that I want.

I was wondering am I registering my sessions id the wrong way?

Thanks.

Peter


--- End Message ---
--- Begin Message ---
This has nothing to do with mysql or sessions.  Your form is sent using the
POST method.  For security reasons, browsers (by default) will not resend
POST information to a page when you hit the back button.

Fred

Php Guy <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have problem in that my webpage in which I use sessions and MySql gives
> a "warning paged expired" error when the user presses "back" button on the
> browser.  Basically, the function of the webpages will be to store user
> enquiries in the Mysql database until the user presses a "send email
> enquiry" button in which afterwards the accumulated enquiries (recognized
> by the sessionid) of the session will be sent to the relevant person.  The
> pages are modularized.  All of the pages start off by "including" a
> "sessions.php" which has the following:
>
> session_start();
> $connection = mysql_connect("localhost", "root", "password") or die
> ("Couldn't connection to database");
> $db = mysql_select_db("micromotor", $connection) or die
> ("Couldn't select database.");
> ?>
>
>
> The pages also "include" a form.php file which has the following to enter
> data into the Mysql database.  A few lines from this file are as follows:
>
> else
> {
> $insert_sql = "INSERT INTO test VALUES('$sessionid', '$modelno', '$qty',
> '$purpose', '$comments', $date')";
> mysql_query($insert_sql) or die ("could not insert records");
>
>
> After I enter information into the form , I find that if I want to use the
> "back" button on the browser, the browser displays a "warning page
> expired".  Then I have to press "back" one more time before I can get to
> the page that I want.
>
> I was wondering am I registering my sessions id the wrong way?
>
> Thanks.
>
> Peter
>
>


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

The function mysql_select_db set the db for one
or for all link identifiers?

The table my_table is in db1 but the active database
seems to be test on link #8.

Here the result with PHP 4.1.0 and MySQL 3.23.41-log:
mysql_pconnect() id1=Resource id #8
mysql_select_db(db1,Resource id #8)
mysql_pconnect() id2=Resource id #9
mysql_select_db(test,Resource id #9)
mysql_query(select * from my_table,Resource id #8)
failed: Table 'test.my_table' doesn't exist

Here the source:
        $id1=mysql_pconnect($host,$user,$pass);
        if($id1==false){
                die("<br>mysql_pconnect() failed: ".mysql_error());
        }
        echo "<br>mysql_pconnect() id1=$id1";

        $b=mysql_select_db($db1,$id1);
        if($b==false){
                die("<br>mysql_select_db($db1,$id1) failed:
".mysql_error());
        }
        echo "<br>mysql_select_db($db1,$id1)";

        $id2=mysql_pconnect($host,$user,$pass);
        if($id2==false){
                echo "<br>mysql_pconnect() failed: ".mysql_error();
        }
        echo "<br>mysql_pconnect() id2=$id2";

        $b=mysql_select_db($db2,$id2);
        if($b==false){
                die("<br>mysql_select_db($db2,$id2) failed:
".mysql_error());
        }
        echo "<br>mysql_select_db($db2,$id2)";

        $sql='select * from my_table';
        $result=mysql_query($sql,$id1);
        if($result==false){
                die("<br>mysql_query($sql,$id1) failed:
".mysql_error());
        }


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr
--- End Message ---
--- Begin Message ---
There's some info in the release notes for 4.1.0


"Edward Marczak" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello!
>
> Two items in the new 4.10 change-log caught my attention:
>
> *    Introduced a new $_REQUEST array, which includes any GET, POST or
> COOKIE variables. Like the other new variables, this variable is also
> available regardless of the context. (Andi & Zeev)
> *    Introduced $_GET, $_POST, $_COOKIE, $_SERVER and $_ENV variables,
which
> deprecate the old $HTTP_*_VARS arrays. In addition to be much shorter to
> type - these variables are also available regardless of the scope, and
> there's no need to import them using the 'global' statement. (Andi & Zeev)
>
> However, I can't seem to find any documentation regarding these variables
on
> the php.net site.  Any pointers?  Am I missing something obvious?  Thanks!
>
> --
> Ed Marczak
> [EMAIL PROTECTED]
>


--- End Message ---
--- Begin Message ---
On 12/26/01 1:39 AM, "Philip Olson" <[EMAIL PROTECTED]> wrote:

>> hmm, now that i\'m trying to program with register_globals=off, what
>> is the new $HTTP_SESSION_VARS?
> 
> $HTTP_SESSION_VARS works, as will $_SESSION (after 4.1.0).  These
> "special" PHP variables are described in the manual:

[snip]

I'll check that out.  Thanks!
-- 
Ed Marczak
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
So sprach »Andrey Hristov« am 2001-12-21 um 15:52:35 +0200 :
> Nope
> $test();

Please explain!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 4 days 23 hours 37 minutes
--- End Message ---
--- Begin Message ---
So sprach »Andrey Hristov« am 2001-12-21 um 17:40:07 +0200 :
> <?php
> $test='htmlspecialchars';
> echo $test('<html>');
> ?>
> 
> Produces :
> 
> &lt;html&gt;

Ah, I thought you did disagree.  Whatever.  I misunderstood you, sorry
about that.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 4 days 23 hours 45 minutes
--- End Message ---
--- Begin Message ---
So sprach »Peter« am 2001-12-21 um 18:48:13 +0800 :
> How can I avoid this?

By using a valid $from adress.  It might also help to put the "adress"
in <>, so:

$from = "<xyz company>";

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |     Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 4 days 23 hours 49 minutes
--- End Message ---
--- Begin Message ---
Hi list,

I have a script that grab data from mysql and generate a table order by name
and with images at the beggining of each new letter, something like a index.
My problem is that I need to buil a table with 3 column by n row. The
problem of creating the <tr> etc is ok! But I can't figure out how to stop
the table and initiate another <tr> if the letters change, someone can
help?? Here is my code that generate the letters and Index for them:

$ultletra = '';
$row = '';
while($resultado = $query->dados()) {
    $curletra = $resultado['letra'];
    if($curletra != $ultletra) {
            $row .= "<tr>\n<td>\n<img src=\"img/letras/$curletra.gif\"
width=\"24\" height=\"24\">\n</td>\n</tr>\n";
    }
    $row .= "<td><a
href=\"interna.php?cat=$resultado[Nome_Categoria]&celebID=$resultado[CelebID
]\">".$resultado['Nome_Artistico']."</a></td>\n";
    $ultletra = $curletra;

}

and the sql command is:

SELECT 
categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico,
lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN
celebridades ON categorias.CategoriaID=celebridades.Categoria  WHERE
CategoriaID='1' ORDER BY Nome_Artistico

Thank's in advance

Rodrigo Peres

-- 


--- End Message ---
--- Begin Message ---
  Is that while porting a script to PHP 4.1.0, where I used to check:

if (session_is_registered('del_power') && $del_power == 1) {
    // del stuff
}

  Because $del_power could be registered as 1 or 0, now I can do:

if ($_SESSION['del_power'] == 1) {
    // del stuff
}

  Nice. Less typing and easier to read.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884




--- End Message ---
--- Begin Message ---
At 11:59 AM 12/26/2001 -0200, Julio Nobrega Trabalhando wrote:
>   Is that while porting a script to PHP 4.1.0, where I used to check:
>
>if (session_is_registered('del_power') && $del_power == 1) {
>     // del stuff
>}
>
>   Because $del_power could be registered as 1 or 0, now I can do:
>
>if ($_SESSION['del_power'] == 1) {
>     // del stuff
>}
>
>   Nice. Less typing and easier to read.

Couldn't you have done this with your original script? :

if ($HTTP_SESSION_VARS['del_power'] == 1) {
         //
}

??

--- End Message ---
--- Begin Message ---
  Yes, but I just thought of doing this way when porting :-))

PS: (Not 100% true, there's the question of $_SESSION being global now.
Makes life easier too :-))

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca



--- End Message ---
--- Begin Message ---
Hello guys

I have following code, it splits 1 array into 2(to make 2 colomns
out of 1) and then displays it, but for some reason it only displayes
1 array not second

--------
$i=0;
$this->query( "select * from topics");
while($this->fetchRow()){
    $array[$i] = $this->record["name"];
    $i++;
}
     
$count = count($array);
$count = $count/2;
$count = round($count,0);

$x = 0;

echo "<table>\n";
foreach($array as $key => $value) {
    if ($x <=$count) {
        $array1[] = $value;
    } elseif($x > $count) {
        $array2[] = $array[$x];
    }
    echo "<tr><td>$array1[$x]</td><td>$array2[$x]</tr>\n";
    $x++;
}
echo "</table>\n";  
---


Thank You very much
-- 
Best regards,
 Daniel                          mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello akul,

Wednesday, December 26, 2001, 5:50:29 PM, you wrote:

aoc> Hello Daniel,

aoc> Tuesday, December 25, 2001, 5:09:05 PM, you wrote:

DH>> Hello guys

DH>> I have following code, it splits 1 array into 2(to make 2 colomns
DH>> out of 1) and then displays it, but for some reason it only displayes
DH>> 1 array not second
aoc>   Because you didn't close TD

DH>> --------
DH>> $i=0;
$this->>>query( "select * from topics");
while($this->>>fetchRow()){
DH>>     $array[$i] = $this->record["name"];
DH>>     $i++;
DH>> }
     
DH>> $count = count($array);
DH>> $count = $count/2;
DH>> $count = round($count,0);

DH>> $x = 0;

DH>> echo "<table>\n";
DH>> foreach($array as $key => $value) {
DH>>     if ($x <=$count) {
DH>>         $array1[] = $value;
DH>>     } elseif($x > $count) {
DH>>         $array2[] = $array[$x];
DH>>     }
DH>>     echo "<tr><td>$array1[$x]</td><td>$array2[$x]</tr>\n";
aoc>                                                      ^ </TD>

aoc> Try this:
                                                     
aoc>         echo t('TR',t('TD',$array1[$x]).t('TD',$array2[$x]));


aoc> function tagname($tag)
aoc> {
aoc>      $tagname=explode(' ',$tag);
aoc>      return $tagname[0];
aoc> }

aoc> function t($tag,$text)
aoc> {
aoc>         return '<'.$tag.'>'.$text.'</'.tagname($tag).'>';
aoc> }




Thank You, but still no resut :-(

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

--- End Message ---
--- Begin Message ---
Hi, I'm trying to fix upload file problems on Win 2K server.  I've got the 
allow directive set to on in the PHP.ini file, and the permissions set to 
give everyone full access on the directory specified in the ini file.  The 
file never shows up.  I'm using code identical to working code for a linux 
app, but we need it to run under MS as well.  The ini file seems right, are 
there any major differences, and is there any reason the identical code 
doesen't work.  The file does not ever show up on the server...

Thanks
Mike B.
--- End Message ---
--- Begin Message ---
It'd be simpler to help if you posted the releveant portions of the INI
files and code...

> -----Original Message-----
> From: 
> [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED].
> net] On Behalf Of Mike Baranski
> Sent: Wednesday, December 26, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Upload file problems on Win 2K
> 
> 
> Hi, I'm trying to fix upload file problems on Win 2K server.  
> I've got the 
> allow directive set to on in the PHP.ini file, and the 
> permissions set to 
> give everyone full access on the directory specified in the 
> ini file.  The 
> file never shows up.  I'm using code identical to working 
> code for a linux 
> app, but we need it to run under MS as well.  The ini file 
> seems right, are 
> there any major differences, and is there any reason the 
> identical code 
> doesen't work.  The file does not ever show up on the server...
> 
> Thanks
> Mike B.
> 
> -- 
> 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]
> 
> 

--- End Message ---
--- Begin Message ---
The in-between hacker who catches the encoded password would gain the same
access if the JavaScript hashing function wasn't there.  However the server
expects the password, he'd have gotten that form of it by sniffing that set
of packets.  On the other hand, he wouldn't have your plain-text password
which, to be honest, most people would be using in many, many, many
different places.  Hashing the password in JavaScript before sending it to
the server simply means that the password the hacker sniffs out can't easily
be used to get into your other accounts on other servers which use a
different (or no) hash on the client.

Anything sent from the browser CAN be sniffed.  Using SSL certainly
minimizes this though.

As for decrypting the password, that is why you HASH a password instead of
encrypting it.  A good hash is a one-way thing, which prevents the password
from being recovered by anything short of a brute-force dictionary attack,
which nothing can prevent.

        - Theo


-----Original Message-----
From: Papp Gyozo [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 24, 2001 5:59 AM
To: James Arthur; [EMAIL PROTECTED]
Subject: Re: [PHP] Most secure way to send a password


| 
| JavaScript doesn't implement any kind of one-way hashing. But that's for a

| good reason: suppose JavaScript encoded your password and sent it encoded
to 
| the server. The in-between hacker would retrieve the encoded password as
it 
| is sent to the server and simply pass that as the password - he doesn't
ever 
| need to know your undencoded password to break in, since the server
expects 
| it to be encoded anyway!

and what about those guys who visit your site, download your page with the 
javascript encoder in the source HTML, and finds out how a crypted password
can be decrypted?

I 'm not aware of how the javascript source can be hidden.

| So you're only left with SSL for proper security...

Yes. SSL must be developed for reasons of this kind.

| 
| HTTP_AUTH is just another way of sending the unsername and password as
plain 
| text -- it's just more comfortable to use than checking if you have proper

| credeintials in every page. My personal recommendation is to forget about 
| HTTP_AUTH and use SSL plus phplib for proper security.

Yes, agreed.
--- End Message ---
--- Begin Message ---
Hello guys,

sorry for spamming with questions today, i have varuable called
$intro, it's stores pretty big story, but i want to display say 10
first words.

Thank You very much
  

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

--- End Message ---
--- Begin Message ---
Daniel,

Here is a rather inelegant way to do this. I am sure there is a better way and I would 
love for someone to point it out to us. 

This function simply pulls out the first N words using the space as a delimiter.

function firstN($string, $N) {
        // remove all double and more spaces
        $string = ereg_replace("[[:space:]][[:space:]]+", " ",$string);
        // explode the string on spaces, slice off the amount of words you want and 
then implode it back to a single string
        $return = implode(" ", array_slice (explode(" ",$string, $N + 1), 0, $N));
        // return it
        return $return;
} //end firstN


--- End Message ---
--- Begin Message ---
Hi,

I'm experiencing strange PHP memory usage on a Sun SPARC machine running
Solaris 8:

I when I compile PHP 4.1.0 --with-mm to store session variables in memory
the resulting Apache (1.3.22) process(es) immediately uses 138 MB of RAM.
One can also observe an immediate significant reduction of available
swap-space. Compiled --without-mm, memory-usage of the Apache process(es) is
normal.

with-mm:
--------
% ls -l libphp4.so
-rwxr-xr-x   1 root     root     2408468 Dec 11 23:27 libphp4.so
% /usr/ucb/ps auxwww | grep http
root      8670  0.9  1.0 138832 4848 ?  S 18:44:34  0:00 /usr/apache/bin/httpd
nobody    8671  0.1  0.3 138848 1440 ?  S 18:44:35  0:00 /usr/apache/bin/httpd

without-mm:
-----------
% ls -l libphp4.so 
-rwxr-xr-x   1 root     root     2330076 Dec 26 17:01 libphp4.so
% /usr/ucb/ps auxwww | grep http
root      8817  0.8  1.0 7656 4800 ?    S 18:45:47  0:00 /usr/apache/bin/httpd
nobody    8818  0.1  0.3 7672 1440 ?    S 18:45:48  0:00 /usr/apache/bin/httpd

In both versions (with-mm/without-mm) I've also enabled GD-, TTF-, DB3-,
MySQL-Support and several more.

Any hints how to reduce memory-consumption when using libmm?

Thanks.

Regards,
Markus

PS: The configure command-line

./configure \
    --prefix=/usr/apache/php \
    --with-apxs=/usr/apache/bin/apxs \
    --with-config-file-path=/usr/apache/php \
    --with-gd \
    --with-jpeg-dir=/opt/sfw/lib \
    --with-png-dir=/opt/sfw/lib \
    --with-xpm-dir=/opt/sfw/lib \
    --with-ttf \
    --enable-gd-native-ttf \
    --with-mysql \
    --with-ttf \
    --with-mm \
    --enable-sockets \
    --with-zlib=/usr \
    --with-xml \
    --with-db3=/opt/sfw \
    --enable-sysvshm=yes \
    --enable-sysvsem=yes \
    --with-config-file-path=/etc/apache \
    --enable-debug=no \
    --enable-safe-mode=yes \
    --with-exec-dir=/usr/apache/php/bin \
    --enable-shared \
    --enable-force-cgi-redirect=yes \
    --enable-discard-path=yes \
    --enable-inline-optimization
--- End Message ---
--- Begin Message ---


Hi, I'm trying to store a binary file in an access database, I'm using an ole
type, and I think that it's getting inserted OK.  My problem is that I don't
know how to pull it out...  How do you select the stuff that's in an ole
object out of the database and display it, a jpg, for example.  I can't even
get the raw data.  I've tried converting it to base 16 and inserting it, but
I still can't pull it out.  I know how to do this in mysql, so posting that
won't help.  I need to know how to do this with access.

Thanks
Mike.

-------------------------------------------------------

-- 
*********************************
* Mike Baranski                 *
* Security Managment Consulting *
* 919-788-9200 Phone            *
* 919-510-0037 Fax              *
* [EMAIL PROTECTED]              *
*********************************
--- End Message ---
--- Begin Message ---
Hello,

Mike Baranski wrote:
> 
> Hi, I'm trying to store a binary file in an access database, I'm using an ole
> type, and I think that it's getting inserted OK.  My problem is that I don't
> know how to pull it out...  How do you select the stuff that's in an ole
> object out of the database and display it, a jpg, for example.  I can't even
> get the raw data.  I've tried converting it to base 16 and inserting it, but
> I still can't pull it out.  I know how to do this in mysql, so posting that
> won't help.  I need to know how to do this with access.

If you are using ODBC, you may want to try Metabase because it supports
BLOB fields with any ODBC driver. Metabase is Open Source and is freely
available here.

http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---
Hello,

I am having a problem testing out the use of cookies.  I'm using a 
tutorial from Wrox's "Beginning PHP4".  It seems that I'm doing 
everything correctly, but when I try to access the page in my browser, I 
am not prompted as to whether or not I'd like to accept a cookie (which 
is something that I have configured my browser for), nor do the values 
that I assigned to the cookies show up in the test variables that I 
included on the page for just this purpose.  In other words, I'm not 
sure that the setcookie() functions are working -- the variables that I 
set using "setcookie()" don't seem to be turning up on the page, but the 
standard form-based variables that I used (as values in the setcookie() 
function) turn up just fine.

Do I need to have my web server specially configured for using cookies?  
I don't see anything in httpd.conf about this.

My setup is as follows:

Darwin 1.4.1 on PowerBook G3 (Bronze edition, no firewire)
Apache 1.3.22
        configured with --enable-module=most --enable-shared=max
        DSOs: mod_dav, mod_hfs_apple, mod_php
                (PHP 4.0.6)

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

What code are you using to set your cookie? 
Are you certain the expiry date is in the future?
What browser are you using? There are notes in the online manual 
(www.php.net/setcookie()) regarding IE.

Miles

On Wednesday 26 December 2001 04:01 pm, Erik Price wrote:
> Hello,
>
> I am having a problem testing out the use of cookies.  I'm using a
> tutorial from Wrox's "Beginning PHP4".  It seems that I'm doing
> everything correctly, but when I try to access the page in my browser, I
> am not prompted as to whether or not I'd like to accept a cookie (which
> is something that I have configured my browser for), nor do the values
> that I assigned to the cookies show up in the test variables that I
> included on the page for just this purpose.  In other words, I'm not
> sure that the setcookie() functions are working -- the variables that I
> set using "setcookie()" don't seem to be turning up on the page, but the
> standard form-based variables that I used (as values in the setcookie()
> function) turn up just fine.
>
> Do I need to have my web server specially configured for using cookies?
> I don't see anything in httpd.conf about this.
>
> My setup is as follows:
>
> Darwin 1.4.1 on PowerBook G3 (Bronze edition, no firewire)
> Apache 1.3.22
>       configured with --enable-module=most --enable-shared=max
>       DSOs: mod_dav, mod_hfs_apple, mod_php
>               (PHP 4.0.6)
--- End Message ---
--- Begin Message ---
I used

<code>
<?php
// cookie_test.php

if ($type_sel) setcookie("font[type]", $type_sel, time()+3600) ;
if ($size_sel) setcookie("font[size]", $size_sel, time()+3600) ;

</code>
(without the <code /> tags)
This is a page which calls itself ($PHP_SELF) (is there a name for 
those?).  And these variables are set by choosing from a select-list at 
a different part of this page.  It's very basic, no if or case 
statements -- just basically a page that delivers a pair of values 
(font[type] and font[size]) to setcookie() and then checks to see if 
there is a cookie in the browser that matches this description.  If 
there is, it outputs some simple data, and at the very bottom it echoes 
the contents of all variables so I can check and make sure everything's 
working.  That's how I know that the setcookie() function doesn't seem 
to work -- there's no value in the cookie variables but if I echo the 
variables that I used ($type_sel and $size_sel) then it outputs the data.

I'll read about IE, it's 5.1 for Mac OS X.


Erik

On Wednesday, December 26, 2001, at 03:12  PM, Miles Thompson wrote:

> Erik
>
> What code are you using to set your cookie?
> Are you certain the expiry date is in the future?
> What browser are you using? There are notes in the online manual
> (www.php.net/setcookie()) regarding IE.
>
> Miles
>
> On Wednesday 26 December 2001 04:01 pm, Erik Price wrote:
>> Hello,
>>
>> I am having a problem testing out the use of cookies.  I'm using a
>> tutorial from Wrox's "Beginning PHP4".  It seems that I'm doing
>> everything correctly, but when I try to access the page in my 
>> browser, I
>> am not prompted as to whether or not I'd like to accept a cookie (which
>> is something that I have configured my browser for), nor do the values
>> that I assigned to the cookies show up in the test variables that I
>> included on the page for just this purpose.  In other words, I'm not
>> sure that the setcookie() functions are working -- the variables that I
>> set using "setcookie()" don't seem to be turning up on the page, but 
>> the
>> standard form-based variables that I used (as values in the setcookie()
>> function) turn up just fine.
>>
>> Do I need to have my web server specially configured for using cookies?
>> I don't see anything in httpd.conf about this.
>>
>> My setup is as follows:
>>
>> Darwin 1.4.1 on PowerBook G3 (Bronze edition, no firewire)
>> Apache 1.3.22
>>      configured with --enable-module=most --enable-shared=max
>>      DSOs: mod_dav, mod_hfs_apple, mod_php
>>              (PHP 4.0.6)
>

--- End Message ---
--- Begin Message ---
Erik,

1. Did you just try setting a cookie, plain, with no conditions.
2. Have you tested your conditions, or added a test, equivalent to what you 
do when you set the cookie? In other words, change setcookie to this ....

if ($type_sel) 
{ 
   setcookie("font[type]", $type_sel, time()+3600) ;
   echo "type_sel: $type_sel;
}

3. Are you getting any errors when you try to set the cookie?

Miles

On Wednesday 26 December 2001 05:07 pm, Erik Price wrote:
> I used
>
> <code>
> <?php
> // cookie_test.php
>
> if ($type_sel) setcookie("font[type]", $type_sel, time()+3600) ;
> if ($size_sel) setcookie("font[size]", $size_sel, time()+3600) ;
>
> </code>
> (without the <code /> tags)
> This is a page which calls itself ($PHP_SELF) (is there a name for
> those?).  And these variables are set by choosing from a select-list at
> a different part of this page.  It's very basic, no if or case
> statements -- just basically a page that delivers a pair of values
> (font[type] and font[size]) to setcookie() and then checks to see if
> there is a cookie in the browser that matches this description.  If
> there is, it outputs some simple data, and at the very bottom it echoes
> the contents of all variables so I can check and make sure everything's
> working.  That's how I know that the setcookie() function doesn't seem
> to work -- there's no value in the cookie variables but if I echo the
> variables that I used ($type_sel and $size_sel) then it outputs the data.
>
> I'll read about IE, it's 5.1 for Mac OS X.
>
>
> Erik
>
> On Wednesday, December 26, 2001, at 03:12  PM, Miles Thompson wrote:
> > Erik
> >
> > What code are you using to set your cookie?
> > Are you certain the expiry date is in the future?
> > What browser are you using? There are notes in the online manual
> > (www.php.net/setcookie()) regarding IE.
> >
> > Miles
> >
> > On Wednesday 26 December 2001 04:01 pm, Erik Price wrote:
> >> Hello,
> >>
> >> I am having a problem testing out the use of cookies.  I'm using a
> >> tutorial from Wrox's "Beginning PHP4".  It seems that I'm doing
> >> everything correctly, but when I try to access the page in my
> >> browser, I
> >> am not prompted as to whether or not I'd like to accept a cookie (which
> >> is something that I have configured my browser for), nor do the values
> >> that I assigned to the cookies show up in the test variables that I
> >> included on the page for just this purpose.  In other words, I'm not
> >> sure that the setcookie() functions are working -- the variables that I
> >> set using "setcookie()" don't seem to be turning up on the page, but
> >> the
> >> standard form-based variables that I used (as values in the setcookie()
> >> function) turn up just fine.
> >>
> >> Do I need to have my web server specially configured for using cookies?
> >> I don't see anything in httpd.conf about this.
> >>
> >> My setup is as follows:
> >>
> >> Darwin 1.4.1 on PowerBook G3 (Bronze edition, no firewire)
> >> Apache 1.3.22
> >>    configured with --enable-module=most --enable-shared=max
> >>    DSOs: mod_dav, mod_hfs_apple, mod_php
> >>            (PHP 4.0.6)
--- End Message ---
--- Begin Message ---
* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 26. 2001 01:58]:

> Hi Brian ,
> I don't have any file like ph_gd.dll .

In your original message, you wrote:

"I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll
extension . I can use other extensions succesfully (like php_mssql.dll 
,php_pdf.dll etc.)"

So that's what I was going by. You're going to have to give a little
more information. For instance, does the file php_gd.dll exist? <g> 

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
$ mount -t neuro /dev/brain /mnt/head

--- End Message ---
--- Begin Message ---
How do I remove the slashes from mysql_escape_string when I pull the 
string back out of the DB and want to display it?

--- End Message ---

Reply via email to