php-general Digest 31 Oct 2003 19:29:09 -0000 Issue 2388

Topics (messages 168213 through 168233):

Re: Connection AS400-Windows & PHP
        168213 by: James Lobley

nested tree
        168214 by: Daniel Demacek

Couldn't open stream with imap_open
        168215 by: Mr.Suthee Jia

Re: Web Service in PHP/XML
        168216 by: neko

PHP and Interbase !
        168217 by: Luiz Gustavo Sarubi Macchi

Re: Trying to craft a regexp
        168218 by: Burhan Khalid
        168226 by: Manuel Vázquez Acosta

Re: Oh, for a "sureset()" (orthogonal to isset())
        168219 by: Tom Rogers

using existing mysql connection in a php extension
        168220 by: Adrian
        168222 by: Gareth Williams

Re: PHP & Apache 2
        168221 by: Dean E. Weimer

Handling a BLOB (zip file) called from MySQL
        168223 by: SpyProductions Support Team

Session for creating a unique shopping cart for each user
        168224 by: Tore E. Mackay
        168225 by: Gareth Williams
        168227 by: Tore E. Mackay
        168229 by: Gareth Williams
        168230 by: pete M

Re: Object References Problem
        168228 by: Manuel Vázquez Acosta

Can't Get PHP Configured Properly To Use SQLite
        168231 by: JR

Re: php temp table question (for mysql)
        168232 by: Larry Brown

help!
        168233 by: Mårten Palm

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 ---
1. Install IBM Client Access on your NT machine
2. Add details of your AS400 to Client Access
3. Create a Client Access data source in ODBC
4. Use ODBC calls within PHP, for example:
        $connect = odbc_connect("AS400", "username", "password");
        $query = "SELECT free
                FROM stock
                WHERE part='$item'";
        $result = odbc_exec($connect, $query);
        $available      = odbc_result($result, 'free');
        echo($available);
        odbc_close($connect);

-- 
 @  James Lobley   |   Intranet Developer & Sysadmin
\/  ------------------------------------------------------
()  This message was written on 100% recycled spam



-----Original Message-----
From: mohamad taghlobi [mailto:[EMAIL PROTECTED]
Sent: 30 October 2003 22:56
To: [EMAIL PROTECTED]
Subject: [PHP] Connection AS400-Windows & PHP


I would like to establish a connection between AS400 - Windows NT and PHP,
to make requetes on data base AS400, from forms PHP. I do not know how to
make, could you help me?



---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail


This email is only intended for the person(s) to whom it is addressed and
may contain confidential information.  Unless stated to the contrary, any
opinions or comments are personal to the writer and do not represent the
official view of the company.  If you have received this e-mail in error,
please notify us immediately by reply e-mail and then delete this message
from your system.  Please do not copy it or use if for any purposes, or
disclose its contents to any other person.

We make every effort to keep our network free from viruses. You should 
independently check this e-mail and any attachments for viruses, as we 
can take no responsibility for any computer viruses that might be 
transferred by way of this e-mail. 

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

I have a sorted associative array that represents
nested tree in the form of (note: parent=0 is the top
level):

$ar[0]['id']=1;
$ar[0]['parent_id']=0;
$ar[0]['name'] = 'john';

$ar[1]['id']=4;
$ar[1]['parent_id']=1;
$ar[1]['name'] = 'mary';

$ar[2]['id']=7;
$ar[2]['parent_id']=1;
$ar[2]['name'] = 'jane';

$ar[3]['id']=2;
$ar[3]['parent_id']=1;
$ar[3]['name'] = 'joe';

$ar[4]['id']=23;
$ar[4]['parent_id']=1;
$ar[4]['name'] = 'tim';

$ar[5]['id']=11;
$ar[5]['parent_id']=23;
$ar[5]['name'] = 'martin';

$ar[6]['id']=9;
$ar[6]['parent_id']=11;
$ar[6]['name'] = 'zoe';

$ar[7]['id']=6;
$ar[7]['parent_id']=9;
$ar[7]['name'] = 'pete';

$ar[8]['id']=12;
$ar[8]['parent_id']=1;
$ar[8]['name'] = 'oscar';

Now I have written the following code to represent
this nested tree using <ul> and </ul> in html, which I
think is very ugly and probably not very efficient, I
was wondering if there was a better solution, maybe
more efficient:

$l=0;
$out='';
$level = array();

for($i=0; $i<count($ar); $i++)
{
     # if top level close all unopened <ul>s.
     if($ar[$i]['parent_id'] == 0)
     {
         for($m=0; $m<$l; $m++)
         {
                 $out .= '</ul>';
         }
         $l=0;
     }
     
     $out .= $ar[$i]['name'].' l:'.$l.'<br>';

     if( $ar[$i]['id'] ==  $ar[$i+1]['parent_id'])
     {
          $out .= '<ul>';

          $level[ $ar[$i]['id'] ] = $l;

          $l++;
     }
     else
     {
          if($l && $ar[$i]['parent_id'] !=
$ar[$i+1]['parent_id'])
          {
               $number = $l - $level[
$ar[$i+1]['parent_id'] ];
               for($v=0; $v<$number-1; $v++)
               {
                    $out .= '</ul>';
                    $l--;
               }

          }
     }
     # if we are at the end close all opened <ul>s.
     if(!$ar[$i+1]['id'])
     {
          for($m=0; $m<$l; $m++)
          {
               $out .= '</ul>';
          }

     }
}

echo '<pre>';
echo $out;


Thanks, Dan.






__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

--- End Message ---
--- Begin Message ---
How to correct this warning?

Warning: Couldn't open stream {localhost:143} ??? We are constructing a
webmail, and we use the function imap_open.

Please, to return reply.

Grateful,

Suthee Jia

--- End Message ---
--- Begin Message --- And if you can't be arsed with SOAP, try XML-RPC, which does the job for me. Check PEAR for an implementation, or try Keith Deven's library, which is easy to use (you only deal with PHP types, and leave the XML to the library)

http://keithdevens.com/software/xmlrpc/

-neko
--- End Message ---
--- Begin Message ---
Please,  I´m using Mandrake 9.1.

has anyone a tutorial or a url to find how to build php with interbase
and pdf lib ?

I know that i should put --with-interbase[=DIR], but what else should i
put at ./configure ?

The Interbase runs ok ?

thanks any help



-- 
Luiz Gustavo Sarubi Macchi <[EMAIL PROTECTED]>
Emar Plasticos Ltda

--- End Message ---
--- Begin Message --- Manuel Vázquez Acosta wrote:
Hi all:

I'm trying to find every simple mail address in an HTML that is not inside
an A tag.

I have tried this regexp:
(?<!maito\:)([EMAIL PROTECTED](?:\.\w+)+)(?![^<]*?</a>)

Try this (a little more comprehensive) :


preg_match_all("|<a(.*?)href=[\"'](.*?)[\"'](.*?)>(.*?)</a>|i", $rawHTML, $arrayoflinks);
$links = array_unique($arrayoflinks[0]);
$href = array_unique($arrayoflinks[2]); //href=
$text = array_unique($arrayoflinks[4]); //link text


$text, $href, etc. are arrays. You can print_r() to find out what they contain.

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com

--- End Message ---
--- Begin Message ---
Maybe I didn't myself clear enough. I don't want to catch every tag A on the
HTML but all the mail addresses that are not already inside a tag A.

The expression you sugest will catch every tag A, failing to catch mail
addresses outside the scope of a tag A.

Thanks anyway.
Manu.


"Burhan Khalid" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Manuel Vázquez Acosta wrote:
> > Hi all:
> >
> > I'm trying to find every simple mail address in an HTML that is not
inside
> > an A tag.
> >
> > I have tried this regexp:
> > (?<!maito\:)([EMAIL PROTECTED](?:\.\w+)+)(?![^<]*?</a>)
>
> Try this (a little more comprehensive) :
>
> preg_match_all("|<a(.*?)href=[\"'](.*?)[\"'](.*?)>(.*?)</a>|i",
> $rawHTML, $arrayoflinks);
> $links = array_unique($arrayoflinks[0]);
> $href = array_unique($arrayoflinks[2]); //href=
> $text = array_unique($arrayoflinks[4]); //link text
>
> $text, $href, etc. are arrays. You can print_r() to find out what they
> contain.
>
> -- 
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com

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

Friday, October 31, 2003, 5:31:01 AM, you wrote:
wlcn> I'm sure I'm not the first person to find strict checking of whether
wlcn> or not variable (or array index) is set painful. I've considered
wlcn> just setting error_reporting() to some lax level on every script I
wlcn> write for the rest of my life, but have been thinking there might
wlcn> be a better way.

wlcn> What I'd like is a "sureset()" function ...there's probably a better 
wlcn> name, but what it would do is more important:

wlcn> function sureset($var) {

wlcn>   if(!isset($var) || empty($var))
wlcn>           return '';
wlcn>   else
wlcn>           return $var;
wlcn> }

wlcn> Of course, when you've got strict checking on, the above doesn't 
wlcn> work, because if the variable is unset you get caught on the fact 
wlcn> before the function call happens.

wlcn> Is there something like this already? Is there a way to make this 
wlcn> work? Or should I just go back to the idea of nuking error_reporting
wlcn> in all my scripts?

wlcn> Thanks,
wlcn>   Weston


wlcn> Thanks,

As an experiment i made an internal php function which I called if_isset() which
returned false if it was not set, but if it was it returned the value. It
replaced this construct which drives me crazy

$newvar = (isset($var))?$var:'';

it became

$newvar = if_isset($var);

It acually saved a few micro seconds too.

You could pester php internals to implement something like that but a plastic
antenna would probably be more receptive.

I also have a class to cope with this problems big brother:

if(isset($_POST['value']) && $_POST['value'] != ''){
  $name = $_POST['value'];
}else{
  $name = 'No Supplied';
}

I now type

$name = req::post('value','Not Supplied');

The class is very small and just needs including (I have it in an auto prepend
file) and you don't need to create an instance as it has no internal variables
to worry about.

<?php
class req {
        function get($var,$sub=False){
                return (isset($_GET[$var]))? $_GET[$var]:$sub;
        }
        function post($var,$sub=False){
                return (isset($_POST[$var]))? $_POST[$var]:$sub;
        }
        function request($var,$sub=False){
                return (isset($_REQUEST[$var]))? $_REQUEST[$var]:$sub;
        }
        function server($var,$sub=False){
                return (isset($_SERVER[$var]))? $_SERVER[$var]:$sub;
        }
        function session($var,$sub=False){
                return (isset($_SESSION[$var]))? $_SESSION[$var]:$sub;
        }
        function getEQ($var,$eq){
                return (req::get($var) == $eq)?True:False;
        }
        function postEQ($var,$eq){
                return (req::post($var) == $eq)?True:False;
        }
        function requestEQ($var,$eq){
                return (req::request($var) == $eq)?True:False;
        }
        function serverEQ($var,$eq){
                return (req::server($var) == $eq)?True:False;
        }
        function sessionEQ($var,$eq){
                return (req::session($var) == $eq)?True:False;
        }
}
?>

You may find it useful..
-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
hello,

is it possible to use an existing mysql connection created from
php-code $conn=mysql_connect('localhost','root','secret'); in an
php-extensions, e.g. by giving the ressource id to the extension as an
argument: my_extemsion_function('do_something',$conn); ?
because if i have to connect to the mysql server again from my
extension, i'll lose the performance-improvement gained from the
faster C++-code.

-- 
Adrian
mailto:[EMAIL PROTECTED]
www: http://www.planetcoding.net
www: http://www.webskyline.de

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


Try this:

mysql_pconnect($_host, $_user, $_password) or die("Could not connect: " . mysql_error());;

This open a permanent mysql connection. The first time you run it, it opens the connection, and the second time, etc, it just uses the one already opened.

On Friday, Oct 31, 2003, at 13:14 Europe/Amsterdam, Adrian wrote:

hello,

is it possible to use an existing mysql connection created from
php-code $conn=mysql_connect('localhost','root','secret'); in an
php-extensions, e.g. by giving the ressource id to the extension as an
argument: my_extemsion_function('do_something',$conn); ?
because if i have to connect to the mysql server again from my
extension, i'll lose the performance-improvement gained from the
faster C++-code.

--
Adrian
mailto:[EMAIL PROTECTED]
www: http://www.planetcoding.net
www: http://www.webskyline.de

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


--- End Message ---
--- Begin Message ---
I have been running it since 02-02-2003 without a problem on A FreeBSD
Server.  I started with Apache 2.0.44, PHP 4.3.0, and FreeBSD-RELEASE 4.7.
 I have upgraded every step of the way to currently running with Apache
2.0.48, PHP 4.3.3, and FreeBSD-RELEASE 4.8.  It is a low use server,
Apache only handles around 1,900 request a day, averaging about 16Kb a
request.

Here is my configure command I used for apache:
./configure \
--prefix=/usr/local/apache2 \
--enable-spelling \
--enable-so \
--enable-ssl \
--enable-info

And For PHP:
./configure \
--with-pgsql=/usr/local/pgsql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-xml \
--with-imap=/usr/local/imap-2002e \
--with-gettext \
--with-mhash \
--with-mcrypt \
--with-mime-magic=/usr/share/misc/magic.mime \
--with-openssl \
--enable-trackvars \
--enable-calendar \
--enable-ftp

>> PHP needs to speed up for its own good.
>
> PHP itself is not the issue.  Extensions to PHP are what may cause
> problems.  As Filip said, there are already many discussions about this on
> the web.
>
> Edward Dudlik
> "Those who say it cannot be done
> should not interrupt the person doing it."
>
> wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU
>
>
>
> ----- Original Message -----
> From: "Fernando Melo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, 30 October, 2003 08:53
> Subject: RE: [PHP] PHP & Apache 2
>
>
> And when will it be considered stable?  It's been a while since Apache 2
> was
> released.  PHP needs to speed up for its own good.
>
> -----Original Message-----
> From: Eugene Lee [mailto:[EMAIL PROTECTED]
> Sent: 30 October 2003 11:55
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP & Apache 2
>
> On Thu, Oct 30, 2003 at 11:22:38AM +0200, Fernando Melo wrote:
> :
> : I would like to use apache 2 in a production environment, but initially
> : there seemed to be some issues with the PHP module. Does anybody know
> : if it is ok use it now or is it still buggy with apache 2?
>
> The combination of PHP 4.x and Apache 2.x are not considered stable for
> a production environment.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


-- 
Thanks,
  Dean E. Weimer
  http://www.dwiemer.org/
  [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I am trying to figure out how to best handle a record that contains a zip
file (BLOB) in MySQL.

When I call it out from the table, is the best way to handle the file by
writing it to a temporary directory?

The BLOB represents a '.zip' file,  so should I be using: zip_open /zip_read
/ zip_close when loading and retrieving the file to/from the data table?  Or
would fopen and such in binary mode be sufficient?

I don't need to open the zip file and see what is inside per se - just want
to store into the data table and pull it out as a file that can be
downloaded.

:)

Thanks!

-Mike

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

I am creating a shopping cart but experiensing some difficulty in creating
unique shopping carts for each user. When I try to create a session I get
this error message:
Warning: session_start(): Cannot send session cookie - headers already sent

This is the code:
if(isset($_COOKIE["cartId"]))
{
return $_COOKIE["cartId"];
}
else
{
session_start();
session_register("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();
}

If I remove the session_start() and session_register it works fine, but then
everyone uses the same cart and that can't be good.

Thanx!!!

Regards
Tore

--- End Message ---
--- Begin Message --- Have you already sent anything to the browser? Once the first echo has been performed, you can't send header information, as the header is sent with the first bit of text.


On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay wrote:


Hi,

I am creating a shopping cart but experiensing some difficulty in creating
unique shopping carts for each user. When I try to create a session I get
this error message:
Warning: session_start(): Cannot send session cookie - headers already sent


This is the code:
if(isset($_COOKIE["cartId"]))
{
return $_COOKIE["cartId"];
}
else
{
session_start();
session_register("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();
}

If I remove the session_start() and session_register it works fine, but then
everyone uses the same cart and that can't be good.


Thanx!!!

Regards
Tore

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


--- End Message ---
--- Begin Message ---
Don't realy know.

Here is what I have:
1. An index.php that inculdes products.php if $file=products.php.
2. products.php includes db.php that contains databse connection and the
code for creating a session.
3. When I click "add product" $file=cart.php and cart.php includes the
db.php file that should connect me to the db and check if there is a
session.

It works fine if I go passed the index.php file. Maybe it is because the
index.php file has echoed information. Any idea????

Tore

"Gareth Williams" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> Have you already sent anything to the browser?  Once the first echo has
> been performed, you can't send header information, as the header is
> sent with the first bit of text.
>
>
> On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay
> wrote:
>
> > Hi,
> >
> > I am creating a shopping cart but experiensing some difficulty in
> > creating
> > unique shopping carts for each user. When I try to create a session I
> > get
> > this error message:
> > Warning: session_start(): Cannot send session cookie - headers already
> > sent
> >
> > This is the code:
> > if(isset($_COOKIE["cartId"]))
> > {
> > return $_COOKIE["cartId"];
> > }
> > else
> > {
> > session_start();
> > session_register("cartId", session_id(), time() + ((3600 * 24) * 30));
> > return session_id();
> > }
> >
> > If I remove the session_start() and session_register it works fine,
> > but then
> > everyone uses the same cart and that can't be good.
> >
> > Thanx!!!
> >
> > Regards
> > Tore
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

--- End Message ---
--- Begin Message ---
Do you see any information in your browser before the error appears? Perhaps you could also do a view source from the browser to see if anything has been sent out.


On Friday, Oct 31, 2003, at 16:06 Europe/Amsterdam, Tore E. Mackay wrote:

Don't realy know.

Here is what I have:
1. An index.php that inculdes products.php if $file=products.php.
2. products.php includes db.php that contains databse connection and the
code for creating a session.
3. When I click "add product" $file=cart.php and cart.php includes the
db.php file that should connect me to the db and check if there is a
session.


It works fine if I go passed the index.php file. Maybe it is because the
index.php file has echoed information. Any idea????


Tore

"Gareth Williams" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
Have you already sent anything to the browser? Once the first echo has
been performed, you can't send header information, as the header is
sent with the first bit of text.



On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay wrote:

Hi,

I am creating a shopping cart but experiensing some difficulty in
creating
unique shopping carts for each user. When I try to create a session I
get
this error message:
Warning: session_start(): Cannot send session cookie - headers already
sent


This is the code:
if(isset($_COOKIE["cartId"]))
{
return $_COOKIE["cartId"];
}
else
{
session_start();
session_register("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();
}


If I remove the session_start() and session_register it works fine,
but then
everyone uses the same cart and that can't be good.

Thanx!!!

Regards
Tore

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


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


--- End Message ---
--- Begin Message ---
why use a cookie - the $_SESSION is itself a cookie
I'd code it like

<php
session_start()

if (!isset($_SESSION['cart_id']))
{
        // code to get cart_id
        $_SESSION['cart_id'] = $cart_id;

}

include(db)
include(products)



Tore E. Mackay wrote:
Don't realy know.

Here is what I have:
1. An index.php that inculdes products.php if $file=products.php.
2. products.php includes db.php that contains databse connection and the
code for creating a session.
3. When I click "add product" $file=cart.php and cart.php includes the
db.php file that should connect me to the db and check if there is a
session.

It works fine if I go passed the index.php file. Maybe it is because the
index.php file has echoed information. Any idea????

Tore

"Gareth Williams" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]

Have you already sent anything to the browser?  Once the first echo has
been performed, you can't send header information, as the header is
sent with the first bit of text.


On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay wrote:


Hi,

I am creating a shopping cart but experiensing some difficulty in
creating
unique shopping carts for each user. When I try to create a session I
get
this error message:
Warning: session_start(): Cannot send session cookie - headers already
sent

This is the code:
if(isset($_COOKIE["cartId"]))
{
return $_COOKIE["cartId"];
}
else
{
session_start();
session_register("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();
}

If I remove the session_start() and session_register it works fine,
but then
everyone uses the same cart and that can't be good.

Thanx!!!

Regards
Tore

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


--- End Message ---
--- Begin Message ---
I think, as for PHP4, that the problem is this function:
    > function object_2(&$parent_object)
    > {
    > $this->my_parent = $parent_object;
    > }

Although you are passing the object by reference you're assigning a copy of
it.
Try this:
    $this->my_parent = &$parent_object;

Manu.

--- End Message ---
--- Begin Message ---
Hello All,

I am having a devil of a time getting PHP configured to work properly
with SQLite.

I am running PHP 4.3.3 on Redhat ES 2.1.

My configure statement for PHP is below.

I have run: pear download http://pecl.php.net/get/SQLite-1.0.tgz, no
problem here.

Then I run: pear install SQLite-1.0.tgz and get a make error of:
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:29:17: php.h: No such file or
directory
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:30:21: php_ini.h: No such file or
directory
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:31:31: ext/standard/info.h: No such
file or directory
make: *** [sqlite.lo] Error 1
`make' failed

The entire output is below.

Any advice would be appreciated.

Thanks!

JR


[EMAIL PROTECTED] html]# pear install SQLite-1.0.tgz
48 source files, building
running: phpize
You should update your `aclocal.m4' by running aclocal.
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010
building in /var/tmp/pear-build-root/SQLite-1.0
running: /tmp/tmpACnhIu/SQLite-1.0/configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr
checking for PHP includes... -Idir=/usr/include/php
-Idir=/usr/include/php/main -Idir=/usr/include/php/Zend
-Idir=/usr/include/php/TSRM
checking for PHP extension directory... /usr/lib/20020429
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking for sqlite support... yes, shared
checking size of char *... 4
checking for lemon... no
checking for usleep... yes
checking for nanosleep... yes
checking for time.h... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependant libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -B output... ok
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries...
yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
updating cache ./config.cache
creating ./config.status
creating config.h
running: make
sed -e s/--VERS--/2.8.3/ -e s/--ENCODING--/ISO8859/
/tmp/tmpACnhIu/SQLite-1.0/libsqlite/src/sqlite.h.in
>/tmp/tmpACnhIu/SQLite-1.0/libsqlite/src/sqlite.h
/bin/sh /var/tmp/pear-build-root/SQLite-1.0/libtool --mode=compile gcc
-I/tmp/tmpACnhIu/SQLite-1.0/libsqlite/src -I.
-I/tmp/tmpACnhIu/SQLite-1.0 -DPHP_ATOM_INC
-I/var/tmp/pear-build-root/SQLite-1.0/include
-I/var/tmp/pear-build-root/SQLite-1.0/main -I/tmp/tmpACnhIu/SQLite-1.0
-Idir=/usr/include/php -Idir=/usr/include/php/main
-Idir=/usr/include/php/Zend -Idir=/usr/include/php/TSRM  -DHAVE_CONFIG_H
-g -O2  -prefer-pic -c /tmp/tmpACnhIu/SQLite-1.0/sqlite.c -o sqlite.lo
gcc -I/tmp/tmpACnhIu/SQLite-1.0/libsqlite/src -I.
-I/tmp/tmpACnhIu/SQLite-1.0 -DPHP_ATOM_INC
-I/var/tmp/pear-build-root/SQLite-1.0/include
-I/var/tmp/pear-build-root/SQLite-1.0/main -I/tmp/tmpACnhIu/SQLite-1.0
-Idir=/usr/include/php -Idir=/usr/include/php/main
-Idir=/usr/include/php/Zend -Idir=/usr/include/php/TSRM -DHAVE_CONFIG_H
-g -O2 -c /tmp/tmpACnhIu/SQLite-1.0/sqlite.c  -fPIC -DPIC -o sqlite.lo
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:29:17: php.h: No such file or
directory
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:30:21: php_ini.h: No such file or
directory
/tmp/tmpACnhIu/SQLite-1.0/sqlite.c:31:31: ext/standard/info.h: No such
file or directory
make: *** [sqlite.lo] Error 1
`make' failed


 './configure' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--include' 'dir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr'
'--with-config-file-path=/etc' '--enable-force-cgi-redirect'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db3'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
'--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-mm' '--with-openssl'
'--with-png' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
'--enable-exif' '--enable-ftp' '--with-pear=/usr/share/pear'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--without-oci8' '--with-mysql' '--enable-memory-limit'
'--enable-bcmath' '--enable-shmop' '--enable-versioning'
'--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs'
'--with-sqlite=shared'

--- End Message ---
--- Begin Message ---
I'm now finding that persistent connections is allowing the temp table to
remain.  I have a sql query that creates the table and another that joins
the temp table to another for a result set that I use. If I press refresh on
the browser window I get an error that the sql query creating the table
fails.  I prepend a query that removes the table before the sql that creates
it and then hit refresh and the query works.  If I close the browser thus
ending the session and reopen the browser and log in, the script fails to
remove the temp table since it hasn't been created yet (and must have been
removed).  I changed my method of connecting to use mysql_connect instead of
mysql_pconnect and removed the drop temp sql and it loads and reloads fine.
Perhaps it is the combination of mysql_pconnect with sessions that creates
this problem.

-----Original Message-----
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:43 PM
To: Larry Brown; PHP List
Subject: Re: [PHP] php temp table question (for mysql)


From: "Larry Brown" <[EMAIL PROTECTED]>

> Does anyone know whether the use of persistent connections with php will
> allow a temp table created by a script to linger around

No, the table will still be removed at the end of the script whether you use
persistant connections or not.

> and cause a problem
> with the next execution of the script when it tries to create the temp
table

Temporary tables are unique for that specific question. So you can have the
same script creating the "same" temporary table and 100 people hit it
without issues. Each script creates it's own temporary table with a unique
name that only that connection has access to.

---John Holmes...

--- End Message ---
--- Begin Message --- I have installed PHP 4.3.3 with the installer.
i am runnig a PWS server on my Windows Me.
I have turned the cgi.force-redirect to 0.
When ii try to install acces a certain php script (the install script for PHPBB2 forum)
i get an error which says:


Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.


what is the problem???

_________________________________________________________________
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/

--- End Message ---

Reply via email to