OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 14 May 2003 11:33:46 -0000 Issue 2056

php-general-digest-helplists.php.net
Date: Wed May 14 2003 - 06:33:46 CDT


php-general Digest 14 May 2003 11:33:46 -0000 Issue 2056

Topics (messages 147508 through 147561):

Re: Redirect After Edit
        147508 by: daniel.electroteque.org

Re: Class's and Variables
        147509 by: daniel.electroteque.org
        147514 by: Rudi Starcevic

Re: Reusable components
        147510 by: Frappy John

Custom error handling + trigger error + multiple classes
        147511 by: daniel.electroteque.org

Re: setting server to process html pages for php
        147512 by: Maxim Maletsky

Re: What program do you use to Create PHP Application?
        147513 by: Maxim Maletsky
        147516 by: daniel.electroteque.org
        147523 by: Chainy
        147541 by: Dan Anderson
        147543 by: daniel.electroteque.org
        147544 by: Dan Anderson

Abstracting markup
        147515 by: Dan Phiffer

best way to handle required form fields
        147517 by: daniel.electroteque.org
        147518 by: Dan Anderson
        147521 by: Rudi Starcevic
        147525 by: Manuel Lemos

Alternate colors
        147519 by: Aris Santillan
        147520 by: Jennifer Goodie
        147535 by: Jomi Garrucho

Session files in /tmp are zero length
        147522 by: Lee Stewart

problem uploading larger files
        147524 by: Francisco Hernandez

PHP + CHM
        147526 by: daniel.electroteque.org
        147534 by: David Robley

leaching information from a news site
        147527 by: Kevin Saenz
        147529 by: daniel.electroteque.org
        147536 by: Kevin Saenz
        147540 by: daniel.electroteque.org

Re: A good tutorail on templates?
        147528 by: olinux
        147530 by: daniel.electroteque.org

PHP Safe Mode
        147531 by: KEN - 2mediaZone

Good php application install script?
        147532 by: J J
        147533 by: daniel.electroteque.org

posting to an https server
        147537 by: Jomi Garrucho

Re: persistent storage in PHP
        147538 by: Lance Lovette

Re: session help
        147539 by: Tom Rogers

Can a variable being use twise?
        147542 by: Jack
        147551 by: PHP4 Emailer
        147555 by: Tim Grote

"ob_gzhandler" Vs mod_gzip
        147545 by: Chandu Nannapaneni

Executing PHP code during parse-time
        147546 by: Adams
        147547 by: Fatih Üstündað
        147548 by: Àíòîí
        147552 by: John Coggeshall

Re: cookies are not set
        147549 by: vishal.eluminoustechnologies.com
        147561 by: Marek Kilimajer

Re: is this good for date calculation
        147550 by: qt

Re: Totally OT, netscape screwing my neat table PLEASE HELP
        147553 by: Daevid Vincent

Re: include() is being EXTREMELY slow
        147554 by: Daevid Vincent

Session Variables
        147556 by: Paul Scarratt

Checking the contents of a file field
        147557 by: Shaun

php informix query
        147558 by: Mark Colvin

Re: Compiling PHP
        147559 by: volker

Session Time to Live
        147560 by: Bix

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

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

attached mail follows:


what exactly is $pk_user_id ?

whenever i do an update for instance my form would goto

?pk_user_id=2&action=update

then u can go

> header("Location: contact_detail.php?pk_user_id=".$_GET['pk_user_id']);

> Hi all,
>
> Newbee here.
> I've created a basic database here
> http://www.coolsolutions.com/rewards/
>
> But I'm having a problem getting PHP to display the "contact_detail"
> page after I edit a record on the "contact_edit" page.
>
> I'm using this header code at the end of my update script but it's not
> taking me anywhere.
>
> header("Location: contact_detail.php?pk_user_id=' . $pk_user_id . '");
>
> TIA,
>
> Kevin Millecam
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


prob not conventional but i usually set the connection outside my classes
then i import the connection id inside the constuctor

so my connection object pointer from my db class is $db

then inside the constructor it would look like

$this->db = $GLOBALS['db'];

so copy file would look like

 function CopyFile()
         {
         $sql = "INSERT INTO images ( i_base64 ) VALUES 'myImage');";
         $this->db->query($query);
         $this->db->close();
         }

> Hi,
>
> I've got a PHP class off the web and there's a change
> or two I'd like to make to one of the functions.
>
> So I have a question on adding private variables.
> Let's say I want to connect to my database, Postgresql,
> is it OK to just add the required variable's to the
> method itself or should the variable's be set at the
> start of the class.
>
> I hope my code example below helps explain my question:
>
> class UploadImage
> {
> var $image;
>
> function UploadImage($image)
> {
> $this->image=stripslashes($image);
> }
>
> function CopyFile()
> {
> $conn = pg_connect("dbname=oasis_net");
> $sql = "INSERT INTO images ( i_base64 ) VALUES 'myImage');";
> $res = pg_exec($conn,$sql);
> $conn = pg_close($conn);
> }
> }
>
> Is it OK to set the $res variable in CopyFile() like above or
> should it be set where the $image variable is set.
>
> Thanks heaps.
> Regards
> Rudi.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Daniel,

Thanks,

So for the case of the $sql variable it's OK to just create it in the
CopyFile() method ?
I guess this means the $sql variable will never be a $this->sql variable.
I know this will all work fine either way I'm just wanting to play by
the convention.

Thanks
Rudi.

danielelectroteque.org wrote:

>prob not conventional but i usually set the connection outside my classes
>then i import the connection id inside the constuctor
>
>so my connection object pointer from my db class is $db
>
>then inside the constructor it would look like
>
>$this->db = $GLOBALS['db'];
>
>
>so copy file would look like
>
> function CopyFile()
> {
> $sql = "INSERT INTO images ( i_base64 ) VALUES 'myImage');";
> $this->db->query($query);
> $this->db->close();
> }
>
>
>
>>Hi,
>>
>>I've got a PHP class off the web and there's a change
>>or two I'd like to make to one of the functions.
>>
>>So I have a question on adding private variables.
>>Let's say I want to connect to my database, Postgresql,
>>is it OK to just add the required variable's to the
>>method itself or should the variable's be set at the
>>start of the class.
>>
>>I hope my code example below helps explain my question:
>>
>>class UploadImage
>>{
>>var $image;
>>
>>function UploadImage($image)
>> {
>> $this->image=stripslashes($image);
>> }
>>
>>function CopyFile()
>> {
>> $conn = pg_connect("dbname=oasis_net");
>> $sql = "INSERT INTO images ( i_base64 ) VALUES 'myImage');";
>> $res = pg_exec($conn,$sql);
>> $conn = pg_close($conn);
>> }
>>}
>>
>>Is it OK to set the $res variable in CopyFile() like above or
>>should it be set where the $image variable is set.
>>
>>Thanks heaps.
>>Regards
>>Rudi.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
>
>
>

attached mail follows:


> I would like to know if it's feasible to create classes of
> parts of the site I have made so I can implement them
> easily in future adaptations of a scheduling system.

The answer is Yes. Indeed code reusability is one of the
major motivations behind classes and OO.

The next question is: *How* do you go about doing this.

(Don't ask me. I'm still trying to figure it out myself.
Maybe we can learn together :)

--Frappy

On Tuesday 13 May 2003 06:31 pm, shaun wrote:
> Hi,
>
> I have created on online scheduling system for a client.
> The system works well but is customized specifically for
> the client. Making changes and implementing the system
> for a different client would be a complicated task. I
> would like to know if its feasible to create classes of
> parts of the site I have made so I can implement them
> easily in future adaptations of a scheduling system. I
> have briefly studied the concepts of object oriented
> programming, but would appreciate anyone's input on the
> viability of such an approach.
>
> Thank you for your time.

attached mail follows:


hi i am asking this question again , as i dont know if this is gonna work
for me , i have multiple classes with their own internal error handling ,
my authentication and db classes have both in their constructors

something like this

$GLOBALS['_ERROR_HANDLER_OBJECT_DB'] = &$this;
        $GLOBALS['_ERROR_HANDLER_METHOD_DB'] = '_db_catch';
                function db_error_handler($type, $message, $file=null,
$line=null, $vars=null) {
                        //die();
                        return $GLOBALS['_ERROR_HANDLER_OBJECT_DB']->
$GLOBALS['_ERROR_HANDLER_METHOD_DB']($type,$message, $file, $line, $vars);
        }
        set_error_handler('db_error_handler');

the issue is when i trigger an error within the class the catch function is
triggered from the last class that is set but they have different ways of
throwing the error

here is my catch function

function _db_catch($type, $code, $file=null, $line=null, $vars=null) {
                echo $type;
                die();
                switch ($type) {
                          case E_WARNING:
                                        //$_SESSION['php_error'] = $code;
                                        $errstr .= "Php Error: $code<br>\n";
                                        $errstr .= "On Line: $line<br>\n";
                                        $errstr .= "In File: $file<br>\n";
                                        //die($errstr);
                          break;
              case E_USER_WARNING:
                                         $this->_throw($code,$file,$line);
              break;

                }
        }

here is the throw function, the real code is commented out

function _throw($code=null,$file,$line) {
                //if ($this->show_errors) {

                        die($this->print_body($this->print_error($_SESSION
['sql_query'],$custom,$line,$file,$break)));
                //} else {
                // $_SESSION['mysql_error'] = $this->print_body($this-
>print_error($query,$custom,$line,$file,$break));
                // $this->redirect("mysql_error.php");
                //}
        }

basically the throw function for my db class is either going to die to the
screen with my own custom db error parsing which will show the query and
the mysql error and the line and file or go silently to a friendly error
page and email me the error, and the auth class throw function returns to
the previous page with a custom error code set in a session which outputs
the error message

here is the original trigger error

function _trigger_error($query=null,$custom_code=null) {
                //die($custom_code);
                unset($_SESSION['sql_query']);
                if ($query) $_SESSION['sql_query'] = $query;
                $trace = debug_backtrace();
                $line = $trace[2][line];
                $file = $trace[2][file];
                die($this->print_body($this->print_error($_SESSION
['sql_query'],$custom,$line,$file,$break)));
                //if ($query) $custom_code = $this->print_body($this-
>print_error($query,$custom,$line,$file,$break));
                //return trigger_error($custom_code, E_USER_WARNING);
        }

as both error handlers in the classes will be triggered from the
E_USER_WARNING the last class is going to handle it, i was hoping it would
be handled internally , is there anyway to set trigger error up so i can do
something like

return trigger_error($custom_code, DB_USER_WARNING);

and for the auth

return trigger_error($custom_code, AUTH_USER_WARNING);

so then it is seperated and only the DB_USER_WARNING will trigger the db
class and the AUTH_USER_WARNING will trigger the auth class please let me
know i'm stumped :\

attached mail follows:


On Tue, 13 May 2003 16:03:49 -0700
"Joshua Chapman" <webmasterfaxonautolit.com> wrote:

> Hello!
>
> I'm running a windows 2000 server with IIS and I'd like for PHP to pre-process .html pages for .php...
> I'm not too server savvy. Tried putting a html extension in to be processed by php.exe like the .php extension was but that didn't work...
> Does anyone know how I might get it to work?
>
> Thanks!
> -Josh

It would be clever to pass this message onto php-winlists.php.net
mailing list. They will know.

--
Maxim Maletsky
maximphp.net

attached mail follows:


On Tue, 13 May 2003 16:15:59 -0700
Sam <phpitab.com> wrote:

> > What program do you use to Create PHP Application? I am tired of doing this
> > in notepad or other editor and Front page.
> >
>
> DreamWeaver, BBEdit, Apache and MySQL all running on a Powerbook.
>
> DreamWeaver can set up the basic: Find, display with X records per page and
> next previous page links, the link to detail to edit or delete pages in 15 -
> 30 minutes.
>
> Running the web server and MySQL on the same portable mean you can develop
> in the back of your surf van on the way to the beach.
>
> Now if MS would only use the same code for both the Mac and Win browser I
> could check the layout of the page too.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Edit Plus is enough. Search archives for this list on topic: "PHP editor"

--
Maxim Maletsky
maximphp.net

attached mail follows:


i generally use homesite as it colours the code , but its bloat ware, i am
helping the phpedit guys with their product its pretty insane very good
idea for an IDE , i dont recommend using it for production though i already
lost a file when it crashed, but for home use it should be fine but is
terribly buggy and system intensive until they get it right , but when it
is right i highly recommend it.

>
> On Tue, 13 May 2003 16:15:59 -0700
> Sam <phpitab.com> wrote:
>
>> > What program do you use to Create PHP Application? I am tired of
>> > doing this in notepad or other editor and Front page.
>> >
>>
>> DreamWeaver, BBEdit, Apache and MySQL all running on a Powerbook.
>>
>> DreamWeaver can set up the basic: Find, display with X records per
>> page and next previous page links, the link to detail to edit or
>> delete pages in 15 - 30 minutes.
>>
>> Running the web server and MySQL on the same portable mean you can
>> develop in the back of your surf van on the way to the beach.
>>
>> Now if MS would only use the same code for both the Mac and Win
>> browser I could check the layout of the page too.
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
> Edit Plus is enough. Search archives for this list on topic: "PHP
> editor"
>
> --
> Maxim Maletsky
> maximphp.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


vi, the powerful version.

Chainy

El mar, 13 de 05 de 2003 a las 18:41, Rouvas Stathis escribió:
> vi.
>
> -Stathis.
>
> Kevin Ison wrote:
> >
> > Komodo, crimson editor, aceHTML, etc....
> >
> > "Grant" <Grantnutrikids.com> wrote in message
> > news:20030513153601.36870.qmailpb1.pair.com...
> > > What program do you use to Create PHP Application? I am tired of doing
> > this
> > > in notepad or other editor and Front page.
> > >
> > >
> > >
>
> --
> Rouvas Stathis
> rouvasdi.uoa.gr
> http://www.di.uoa.gr/~rouvas
--
Chainy <chainyinfonegocio.com>

attached mail follows:


Whether you're on Windoze or Linux Emacs, hands down.

http://www.gnu.org/software/emacs/emacs.html

Download the PHP mode for it from:

http://sourceforge.net/projects/php-mode/

Fair Warning:

Emacs can be painful to use for a noob. It's like driving a car --
takes a while to learn, but you'll never walk anywhere again.

-Dan

attached mail follows:


i absolutely cant stand programing via terminal , reason being sure vi can
colour code , i like the control of the mouse to select code , copy and
pasting , deleting , lots of control functionality which u can do through a
terminal .

> Whether you're on Windoze or Linux Emacs, hands down.
>
> http://www.gnu.org/software/emacs/emacs.html
>
> Download the PHP mode for it from:
>
> http://sourceforge.net/projects/php-mode/
>
> Fair Warning:
>
> Emacs can be painful to use for a noob. It's like driving a car --
> takes a while to learn, but you'll never walk anywhere again.
>
> -Dan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


> i absolutely cant stand programing via terminal , reason being sure vi can
> colour code , i like the control of the mouse to select code , copy and
> pasting , deleting , lots of control functionality which u can do through a
> terminal .

Emacs supports X and Windows -- and all the graphical goodies like mouse
support. Vim even has a gVim -- graphical. And these work under
windows, *nix, etc.

And if you /really/ need graphical goodness grab XEmacs from xemacs.org.

So please refraim from spreading incorrect information in the future.

-Dan

attached mail follows:


Hello folks,

I'm toying with the idea of maximizing the flexibility of a homebrew
templating utility by abstracting page markup into PHP objects. Has anybody
done this successfully? I threw together a trivial demo of how this might
work in practice:

http://osp.claremont.edu/~dan/temp/hello.php
http://osp.claremont.edu/~dan/temp/hello.phps

Assuming this would only be dealing with varieties of XHTML, would the
XML_Tree PEAR class be an appropriate datastructure for this situation?
Comments and suggestions would be awesome!

Thanks,
-Dan

attached mail follows:


hi there i was wondering what would be the most ideal way to handle
required form fields say if they were empty and are required , should i do
a check and send an error and return to the page with the required fields
in red or would a javascript alert box (ugly) be ok ? reason being my
prefered way would be sending an error although with my previous issue with
custom error handlers might be tedious :|

attached mail follows:


You could do a check with Javascript to make sure the required fields
were filled out and had a valid value to them. Since PHP is completely
server side, you would have to check after the page had been submitted.
Let's say you have a text field named "foo", ie.

<INPUT TYPE=TEXT NAME="foo">

You could use:

<?php

if ($_POST['foo'])
{
  do_something();
}
else
{
  error();
}

?>

This is because like many programming languages 0 is false and
everything else is true. Form values that are not submitted are equal
to NULL -- i.e. false. You could use as many OR statements as necessary
to check that everything was submitted.

-Dan

On Tue, 2003-05-13 at 20:20, danielelectroteque.org wrote:
> hi there i was wondering what would be the most ideal way to handle
> required form fields say if they were empty and are required , should i do
> a check and send an error and return to the page with the required fields
> in red or would a javascript alert box (ugly) be ok ? reason being my
> prefered way would be sending an error although with my previous issue with
> custom error handlers might be tedious :|
>
>

attached mail follows:


For easy form validation, including the red highlighting, maybe check
out the qForms library - it's free and very powerful.

www.pengoworks.com

Cheers
Rudi.

Dan Anderson wrote:

>You could do a check with Javascript to make sure the required fields
>were filled out and had a valid value to them. Since PHP is completely
>server side, you would have to check after the page had been submitted.
>Let's say you have a text field named "foo", ie.
>
><INPUT TYPE=TEXT NAME="foo">
>
>You could use:
>
><?php
>
>if ($_POST['foo'])
>{
> do_something();
>}
>else
>{
> error();
>}
>
>?>
>
>This is because like many programming languages 0 is false and
>everything else is true. Form values that are not submitted are equal
>to NULL -- i.e. false. You could use as many OR statements as necessary
>to check that everything was submitted.
>
>-Dan
>
>On Tue, 2003-05-13 at 20:20, danielelectroteque.org wrote:
>
>
>>hi there i was wondering what would be the most ideal way to handle
>>required form fields say if they were empty and are required , should i do
>>a check and send an error and return to the page with the required fields
>>in red or would a javascript alert box (ugly) be ok ? reason being my
>>prefered way would be sending an error although with my previous issue with
>>custom error handlers might be tedious :|
>>
>>
>>
>>
>
>
>
>

attached mail follows:


Hello,

On 05/13/2003 09:20 PM, danielelectroteque.org wrote:
> hi there i was wondering what would be the most ideal way to handle
> required form fields say if they were empty and are required , should i do
> a check and send an error and return to the page with the required fields
> in red or would a javascript alert box (ugly) be ok ? reason being my
> prefered way would be sending an error although with my previous issue with
> custom error handlers might be tedious :|

If you redisplay the form marking the invalid fields with HTML, that
will work when Javascript is disabled.

You may want to check the examples this class for generating and
validating forms that do it that way:

http://www.phpclasses.org/formsgeneration

--

Regards,
Manuel Lemos

attached mail follows:


hi

im querying data from database
fetching all the rows in it.

how can i display it in html
with an alternate colors in
the rows!!!

attached mail follows:


> how can i display it in html
> with an alternate colors in
> the rows!!!

quick, dirty example of aleternating something
$bgcolor = (++$i%2)?"#FFFFFF":"#CCCCCC";

For a more complete answer, search the archive, this is asked about once a
day, it seems.
http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=alternate+color&q=b

attached mail follows:


you can try this

<table>
<?

for ($test=0;$test<=10;$test++){
    $a++;
    if (($a%2)==0){
        $bcolor="red";
    }else{
        $bcolor="blue";
    }
    print "<tr bgcolor=$bcolor><td >&nbsp;</td></tr> ";

}

?>
</table>
----- Original Message -----
From: "Aris Santillan" <arisfemalenetwork.com>
To: "Php (E-mail)" <php-generallists.php.net>
Sent: Wednesday, May 14, 2003 8:48 AM
Subject: [PHP] Alternate colors

hi

im querying data from database
fetching all the rows in it.

how can i display it in html
with an alternate colors in
the rows!!!

attached mail follows:


Hi..
I'm migrating a web application from PHP 4.0.3 on Linux to 4.2.2 and
having trouble with the session variables.

The code has various statements like:
    session_register("varname");

I get the sess_... files in /tmp, but they're all zero length, so of
course the application doesn't work...

register_globals is ON and I've even tried sticking a
     global $varname;
ahead of the session_register, but nothing seems to force it to save it
in the sess_... file.

Any suggestions for this relative novice?
Lee Stewart

attached mail follows:


hello, i've been running into a problem on my server where if i try and
upload files that are about 2 megs or larger, the apache process quits or
php.., now i dont know if its an apache problem or a php problem but in my
php.ini i have upload_max_filesize = 200M and uploads are enabled, uploading
smaller files works fine, its just the larger files i have a problem with,
what can i do on the php side or apache side of things to find out what
exactly is going on and why my uploads are woring for large files?
itll be uploading files then i get a browser error about losing the
connection, im stumped.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

attached mail follows:


hi there , i am nearly finishing off a project , and have to create user
documentation including help files , i was thinking of the best way to do
this , should i simply create a popup box with the help html , or i was
thinking of creating a CHM with php databased content or maybe just html ,
is there anyway to do this i hope this is still on topic cheers

attached mail follows:


In article <37143.203.15.102.65.1052879039.squirrelwww.electroteque.org>,
danielelectroteque.org says...
> hi there , i am nearly finishing off a project , and have to create user
> documentation including help files , i was thinking of the best way to do
> this , should i simply create a popup box with the help html , or i was
> thinking of creating a CHM with php databased content or maybe just html ,
> is there anyway to do this i hope this is still on topic cheers

Slightly OT, but... Consider what is cross platform compatible??

--
Quod subigo farinam

attached mail follows:


Hi all,

I am new to the php list. I have a problem and would like to know
how I could solve it with php.

I would like to grab headlines from a news site in Australia.
So that I could display it on my site, also I would like to
create the link to the story

What would I need to grab all information from the line

<p><span class='blackheading'>BREAKING NEWS</span><br><img
src='/images/1p_black.gif' width=468 height=1><br><br>

up untill the following lines

<br><img src="/images/blank.gif" border="0" width="1" height="20"><br>
<img src="/images/heading_underline.gif" width="468" height="4"><br>
<table width=100%>

--
Regards,

Kevin Saenz
 
Spinaweb
Your one stop shop for I.T solutions.
 
Ph: 02 4620 5130
Fax: 02 4625 9243
Mobile: 0418455661
Web: http://www.spinaweb.com.au

attached mail follows:


well have u asked the website if its kool ? usually they would have an xml
feed if they allow that sort of thing , what u would need to do is fopen
the frontpage and do a shit load of regex, or the best would be preg_match

> Hi all,
>
> I am new to the php list. I have a problem and would like to know
> how I could solve it with php.
>
> I would like to grab headlines from a news site in Australia.
> So that I could display it on my site, also I would like to
> create the link to the story
>
> What would I need to grab all information from the line
>
> <p><span class='blackheading'>BREAKING NEWS</span><br><img
> src='/images/1p_black.gif' width=468 height=1><br><br>
>
> up untill the following lines
>
> <br><img src="/images/blank.gif" border="0" width="1" height="20"><br>
> <img src="/images/heading_underline.gif" width="468" height="4"><br>
> <table width=100%>
>
>
> --
> Regards,
>
> Kevin Saenz
>
> Spinaweb
> Your one stop shop for I.T solutions.
>
> Ph: 02 4620 5130
> Fax: 02 4625 9243
> Mobile: 0418455661
> Web: http://www.spinaweb.com.au
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


I have checked the news site I would like to leach from This is what
they say in their FAQ.

Content for your own website

 Can I link to NEWS.com.au?
NEWS.com.au welcomes links from other sites on the web. You can also use
our headlines to link to individual stories. Due to copyright
restrictions, you should not reproduce the text of the story.

So I would have to search using the regex? No they don't have an xml
feed

> well have u asked the website if its kool ? usually they would have an xml
> feed if they allow that sort of thing , what u would need to do is fopen
> the frontpage and do a shit load of regex, or the best would be preg_match
>
> > Hi all,
> >
> > I am new to the php list. I have a problem and would like to know
> > how I could solve it with php.
> >
> > I would like to grab headlines from a news site in Australia.
> > So that I could display it on my site, also I would like to
> > create the link to the story
> >
> > What would I need to grab all information from the line
> >
> > <p><span class='blackheading'>BREAKING NEWS</span><br><img
> > src='/images/1p_black.gif' width=468 height=1><br><br>
> >
> > up untill the following lines
> >
> > <br><img src="/images/blank.gif" border="0" width="1" height="20"><br>
> > <img src="/images/heading_underline.gif" width="468" height="4"><br>
> > <table width=100%>
> >
> >
> > --
> > Regards,
> >
> > Kevin Saenz
> >
> > Spinaweb
> > Your one stop shop for I.T solutions.
> >
> > Ph: 02 4620 5130
> > Fax: 02 4625 9243
> > Mobile: 0418455661
> > Web: http://www.spinaweb.com.au
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Regards,

Kevin Saenz
 
Spinaweb
Your one stop shop for I.T solutions.
 
Ph: 02 4620 5130
Fax: 02 4625 9243
Mobile: 0418455661
Web: http://www.spinaweb.com.au

attached mail follows:


there are tonnes of news feed scripts around check hotscripts and places
like that i've never done it before

> I have checked the news site I would like to leach from This is what
> they say in their FAQ.
>
>
> Content for your own website
>
> Can I link to NEWS.com.au?
> NEWS.com.au welcomes links from other sites on the web. You can also
> use our headlines to link to individual stories. Due to copyright
> restrictions, you should not reproduce the text of the story.
>
> So I would have to search using the regex? No they don't have an xml
> feed
>
>> well have u asked the website if its kool ? usually they would have an
>> xml feed if they allow that sort of thing , what u would need to do is
>> fopen the frontpage and do a shit load of regex, or the best would be
>> preg_match
>>
>> > Hi all,
>> >
>> > I am new to the php list. I have a problem and would like to know
>> > how I could solve it with php.
>> >
>> > I would like to grab headlines from a news site in Australia.
>> > So that I could display it on my site, also I would like to
>> > create the link to the story
>> >
>> > What would I need to grab all information from the line
>> >
>> > <p><span class='blackheading'>BREAKING NEWS</span><br><img
>> > src='/images/1p_black.gif' width=468 height=1><br><br>
>> >
>> > up untill the following lines
>> >
>> > <br><img src="/images/blank.gif" border="0" width="1"
>> > height="20"><br> <img src="/images/heading_underline.gif"
>> > width="468" height="4"><br> <table width=100%>
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Kevin Saenz
>> >
>> > Spinaweb
>> > Your one stop shop for I.T solutions.
>> >
>> > Ph: 02 4620 5130
>> > Fax: 02 4625 9243
>> > Mobile: 0418455661
>> > Web: http://www.spinaweb.com.au
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> --
> Regards,
>
> Kevin Saenz
>
> Spinaweb
> Your one stop shop for I.T solutions.
>
> Ph: 02 4620 5130
> Fax: 02 4625 9243
> Mobile: 0418455661
> Web: http://www.spinaweb.com.au
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


the Smarty manual is a pretty good intro
http://smarty.php.net

Also some cool things like FAQ in the Smarty wiki
http://smarty.incutio.com

and a pretty basic article from php|architect
Using, Reusing and Extending Smarty
http://www.phparch.com/issuedata/2003/feb/sample.php

olinux

--- "Denis L. Menezes" <menezesdsingnet.com.sg>
wrote:
> Hello friends.
>
> Can someone suggest a good tutorial on templates?
>
> Thanks
> Denis

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

attached mail follows:


i quite like phemplate

simple , does what i need it to do, doesnt have or require dirty code

http://pukomuko.esu.lt/phemplate/

tutorial is not in english apart from the code but its pretty good ,
although i have made some changes to the class , the clean up unknown vars
tends to remove my curly braces from javascript :|

> the Smarty manual is a pretty good intro
> http://smarty.php.net
>
> Also some cool things like FAQ in the Smarty wiki
> http://smarty.incutio.com
>
> and a pretty basic article from php|architect
> Using, Reusing and Extending Smarty
> http://www.phparch.com/issuedata/2003/feb/sample.php
>
> olinux
>
>
> --- "Denis L. Menezes" <menezesdsingnet.com.sg>
> wrote:
>> Hello friends.
>>
>> Can someone suggest a good tutorial on templates?
>>
>> Thanks
>> Denis
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Hello, I'm having a problem about disabling PHP Safe Mode.
I have a dedicated server and I need to disable PHP Safe Mode because of my
shopping cart script.

I edited php.ini and disable PHP Safe Mode as like " safe_mode = Off " and I
restarted web server.

But my test scripts return that PHP Safe Mode is still Enabled.

Is anyone that has experience like this or know about this problem?

By the way my test script is as follows.

<?php

function on_off($var) {
 return ($var ? "On" : "Off");
}

 $res = ini_get("safe_mode");
 $status = (!empty($res) ? 0 : 1);
 $ck_res &= $status;

?>

<html>
<head>
<title>Safe Mode Test Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>

<body>
<table width=500 border=0 align=left>

 <TR>
  <TD>PHP Safe mode is ... <? echo on_off(!$status) ?></TD>
 </TR>

</table>

</body>
</html>

KEN

attached mail follows:


Does anyone know of a good example of an install
script for a php/mysql application?

Something that you go to install.php and it walks you
through the install. From config setup, database
setup, maybe the ability to select an option or two to
be activated (checkboxes or drop-down) in the
application.

Something along those lines. Thanks for any examples
or pointers!

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

attached mail follows:


i didnt know anything like that could run under root unless its a cgi , why
bother ? if you are installing something you have ssh access right ? its
command line or nothing else really , how are u supposed to configure php
with a dozen extensions on a multi line configure
>
> Does anyone know of a good example of an install
> script for a php/mysql application?
>
> Something that you go to install.php and it walks you
> through the install. From config setup, database
> setup, maybe the ability to select an option or two to
> be activated (checkboxes or drop-down) in the
> application.
>
> Something along those lines. Thanks for any examples
> or pointers!
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


im trying to pass and retrieve values using post to an https server,
I am trying to connect using the code below it returns with this error
message.

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

===code===
$Header .= "POST $URI HTTP/1.0\n";
$Header .= "Host: www.somesecurehost.com\n";
$Header .= "User-Agent: 007\n";
$Header .= "Content-Type: application/x-www-form-urlencoded\n";
$Header .= "Content-Length: 13\n\n";
$Header .= "var1=1&var2=2\n";

$socket = fsockopen( "www.somesecurehost.com", 443, $errno, $errstr, 10);
if($socket){
    fputs($socket, $Header);
    while (!feof($socket)) {
        print fgets ($socket,128);
    }
 
}else{
   print "noconn";
}
==end code=

attached mail follows:


If you are not running PHP under a Windows platform and can compile
extensions into PHP the most efficient way to solve your problem may be with
a PHP extension I developed. It handles constants and provides a type of
persistent variable too. It has been immensely useful for my projects.

http://pwee.sourceforge.net/

Lance

> -----Original Message-----
> From: starkstark.dyndns.tv [mailto:starkstark.dyndns.tv]On Behalf Of
> Greg Stark
> Sent: Wednesday, May 07, 2003 6:34 PM
> To: php-generallists.php.net
> Subject: [PHP] persistent storage in PHP
>
>
>
> How do I cache data persistently across page calls? As near as I
> can tell all
> the variable scopes in PHP terminate at the end of a page and the
> next page
> starts with a clean slate.
>
> Surely that's not 100% true and there's some way to store data
> that will be
> available on the next invocation? Perhaps there's some external
> shared library
> solution that stores data conveniently?
>
> I know I could write out a file and then load it back next time
> but if I do
> that I may as well just go back to the database. I'm going to have tons of
> itty bitty bits of data all coming from the database and I want
> to just cache
> in an associative array to reduce traffic since they're
> infrequently updated
> data.
>
> --
> greg
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi,

Wednesday, May 14, 2003, 2:50:45 AM, you wrote:
BVB> First crack at sessions and I'm obviously missing something .

BVB> I have this at the very top of the page.

BVB> $thepassword = 'pass';

BVB> if(isset($_POST['my_button'])) {
BVB> if($password) {
BVB> if ($password == $thepassword) {
BVB> //ini_set("session.use_cookies", "0");
BVB> session_start();
BVB> header("Cache-control: private"); // IE 6 Fix.
BVB> $pass = $_POST['password'];
BVB> session_register('pass');
BVB> $_SESSION['pass'] = $pass;
BVB> } else {
BVB> $error_message = "Invalid password, try again";
BVB> }
BVB> } else {
BVB> $error_message = "You must enter a password";
BVB> }
BVB> }

BVB> Further down I have these:

BVB> if(isset($_SESSION['pass'])) {
BVB> if ($_SESSION['pass'] == $thepassword) {
BVB> echo "<p style=\"font-weight: bold;\">Add new record:</p>";
       
BVB> echo "<FORM METHOD=\"POST\" ACTION=\"w_insert.php\">";
BVB> echo "Date (yyyy-mm-dd):<input type=\"text\" name=\"date\">";
BVB> echo "Company:<input type=\"text\" name=\"company\">";
BVB> echo "Title:<input type=\"text\" name=\"title\">";
BVB> echo "Actor:</td><td><input type=\"text\"
name=\"actor\">></td></tr>";
BVB> echo "Role:</td><td><input type=\"text\" name=\"role\">";
BVB> echo "<input type=\"SUBMIT\" name=\"do_sql\" \value=\"S
ubmit\">>";
            
BVB> echo"</FORM>";
BVB> echo "<br><a href=\"w_logout.php?log_out=1\">Log Out</a><br>";
BVB> }
BVB> } elseif (isset($error_message)){
BVB> echo $error_message . ": <a href=\"$PHP_SELF?admin=1\">Try
BVB> Again</a>";
BVB> }

BVB> if (isset($admin)) {
BVB> echo "<FORM METHOD=\"POST\" ACTION=\"$PHP_SELF\">";
BVB> //echo "Enter your Name: <input type=\"text\" name=\"name\">";
BVB> echo "Enter your Password: <input type=\"password\"
name=\"password\">>";
BVB> echo "<input type=\"SUBMIT\" name=\"my_button\" \value=\"Submit\">";
BVB> echo"</FORM>";
BVB> }

BVB> Everything here works fine but when I submit the top form above that
BVB> calls w_insert.php it does not seem to transfer $_SESSION['pass'] and
BVB> perhaps it should not but it seems as though it should, shouldn't it? I
BVB> thgought that was the point of sessions...

BVB> w_insert.php just contains this for the moment:

BVB> <?php
BVB> session_start();
BVB> if(isset($_POST['do_sql'])) {
BVB> if ($_SESSION['pass'] == $thepassword) {
BVB> echo "do sql query";
BVB> }
BVB> }
?>>

Do you have session_start() on w_insert.php as well?

--
regards,
Tom

attached mail follows:


Dear all
First of all, please have a look on my source code :

<?
while ($row=mysql_fetch_object($select_temp_date))
  {
print $row->sign_date;
 $create_joindatauser_query=mysql_query("create temporary table data_user
select temp_control_form.name as signed,temp_control_form.sign_date
,temp_signoff_user.name as name temp_signoff_user.department as dept from
temp_signoff_user left join temp_control_form on
temp_signoff_user.name=temp_control_form.name",$link);
  $sql=mysql_query("select * from data_user where
sign_date='$row->sign_date'"); <<<<<<<<<<<<<<<<<<<<
   while($row1=mysql_fetch_object($sql))
   {
   $sql_temp=mysql_query("delete from data_user where
name='$row1->signed'");
   }
 $sql2=mysql_query("select * from data_user order by name");
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
   while($row2=mysql_fetch_object($sql2))
   {
   print ("<TR>\n");
   print ("<TD><font face='Arial, Helvetica, sans-serif'
size='1'>".$row2->name."</font></TD><TD><font face='Arial, Helvetica,
sans-serif' size='1'>".$row->sign_date."</font></TD>");
   print ("</TR>\n");
   }
   $drop_datauser_query=mysql_query("drop table data_user");

 }
?>

When i run this code, it says there is an error on line where i marked
"<<<<<" on it.
To what i understand is $sql and $sql2 is being used twise, for the first
time it is fine, but when comes to the second time, it look like it can't
get through!

Can anyone pls tell me is there possible way that a variable can be assign
twise when running a loop condition?

Thx alot!

Jack

attached mail follows:


Jack, kinda new here to php, but your "<<<<<<.....", Im wondering if that is
intended to be a comment for a line break in the code for you to reference
later when changing your own code? If it is, I don't believe that's the best
way to comment out your code. :)

Try this -
// <<<<<<<<

  OR This -
# <<<<<<<

        OR Even This -
/*for multilined or blocked
comments just like this*/

I believe any of them would work for this situation.

I checked the site, and I don't see anywhere that this "<<<<<<" is code for
anything other than assigning a <<<COMMENT to a variable like the example on
this page at the bottom
http://www.php.net/manual/sk/language.basic-syntax.comments.php, anyhow
don't get upset if this doesn't fix it and this wasn't what you where
looking for, I am still learning php, just thought I'd throw in my 2cents.

Best of Luck,
Wolf Smart Enterprises
http://www.wolfsmart.com

-----Original Message-----
From: Jack [mailto:nedcor4nedcor.com.hk]
Sent: Tuesday, May 13, 2003 11:21 PM
To: php-generallists.php.net
Subject: [PHP] Can a variable being use twise?

Dear all
First of all, please have a look on my source code :

<?
while ($row=mysql_fetch_object($select_temp_date))
  {
print $row->sign_date;
 $create_joindatauser_query=mysql_query("create temporary table data_user
select temp_control_form.name as signed,temp_control_form.sign_date
,temp_signoff_user.name as name temp_signoff_user.department as dept from
temp_signoff_user left join temp_control_form on
temp_signoff_user.name=temp_control_form.name",$link);
  $sql=mysql_query("select * from data_user where
sign_date='$row->sign_date'"); <<<<<<<<<<<<<<<<<<<<
   while($row1=mysql_fetch_object($sql))
   {
   $sql_temp=mysql_query("delete from data_user where
name='$row1->signed'");
   }
 $sql2=mysql_query("select * from data_user order by name");
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
   while($row2=mysql_fetch_object($sql2))
   {
   print ("<TR>\n");
   print ("<TD><font face='Arial, Helvetica, sans-serif'
size='1'>".$row2->name."</font></TD><TD><font face='Arial, Helvetica,
sans-serif' size='1'>".$row->sign_date."</font></TD>");
   print ("</TR>\n");
   }
   $drop_datauser_query=mysql_query("drop table data_user");

 }
?>

When i run this code, it says there is an error on line where i marked
"<<<<<" on it.
To what i understand is $sql and $sql2 is being used twise, for the first
time it is fine, but when comes to the second time, it look like it can't
get through!

Can anyone pls tell me is there possible way that a variable can be assign
twise when running a loop condition?

Thx alot!

Jack

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

attached mail follows:


your code:
$sql=mysql_query("select * from data_user where
sign_date='$row->sign_date'");

my code:
$sql=mysql_query("select * from data_user where
sign_date='".$row->sign_date."'");

should work better.

I havent tried using objects in strings, but I know it doesnt work with
arrays.
So I guess you also have to get the objects out of the string.

Jack <nedcor4nedcor.com.hk> schrieb in im Newsbeitrag:
20030514042121.57973.qmailpb1.pair.com...
> Dear all
> First of all, please have a look on my source code :
>
> <?
> while ($row=mysql_fetch_object($select_temp_date))
> {
> print $row->sign_date;
> $create_joindatauser_query=mysql_query("create temporary table data_user
> select temp_control_form.name as signed,temp_control_form.sign_date
> ,temp_signoff_user.name as name temp_signoff_user.department as dept from
> temp_signoff_user left join temp_control_form on
> temp_signoff_user.name=temp_control_form.name",$link);
> $sql=mysql_query("select * from data_user where
> sign_date='$row->sign_date'"); <<<<<<<<<<<<<<<<<<<<
> while($row1=mysql_fetch_object($sql))
> {
> $sql_temp=mysql_query("delete from data_user where
> name='$row1->signed'");
> }
> $sql2=mysql_query("select * from data_user order by name");
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> while($row2=mysql_fetch_object($sql2))
> {
> print ("<TR>\n");
> print ("<TD><font face='Arial, Helvetica, sans-serif'
> size='1'>".$row2->name."</font></TD><TD><font face='Arial, Helvetica,
> sans-serif' size='1'>".$row->sign_date."</font></TD>");
> print ("</TR>\n");
> }
> $drop_datauser_query=mysql_query("drop table data_user");
>
> }
> ?>
>
>
> When i run this code, it says there is an error on line where i marked
> "<<<<<" on it.
> To what i understand is $sql and $sql2 is being used twise, for the first
> time it is fine, but when comes to the second time, it look like it can't
> get through!
>
> Can anyone pls tell me is there possible way that a variable can be assign
> twise when running a loop condition?
>
> Thx alot!
>
> Jack
>
>
>
>

attached mail follows:


I have already posted this yesterday but got replies from the list,

Can anybody tell me which one is better
"ob_gzhandler" in PHP or "Apache+mod_gzip"
assuming that there is going to be a good number of
simultaneous requests for the webserver.

/Chandu

--
------------------------------
           PHP for Life :-)

attached mail follows:


I want to execute PHP code that i generate while parsing the page
ex:

<?php
$phpcode='echo "Hello 1";';

... some code here

now i want to execute PHP code in $phpcode here
how can i do that?
?>

Thaks

attached mail follows:


you can use eval() function.

eval($phpcode);

-----Original Message-----
From: Adams [mailto:lonereckhotmail.com]
Sent: Wednesday, May 14, 2003 10:39 AM
To: php-generallists.php.net
Subject: [PHP] Executing PHP code during parse-time

I want to execute PHP code that i generate while parsing the page
ex:

<?php
$phpcode='echo "Hello 1";';

... some code here

now i want to execute PHP code in $phpcode here
how can i do that?
?>

Thaks

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

attached mail follows:


A> I want to execute PHP code that i generate while parsing the page
A> ex:

A> <?php
A> $phpcode='echo "Hello 1";';

A> ... some code here

A> now i want to execute PHP code in $phpcode here
A> how can i do that?

Did you try:

eval($phpcode);

Anton

attached mail follows:


> I want to execute PHP code that i generate while parsing the page

Look at the eval() function in the manual.

John

--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Thankx for the reply.

I have already set the value session.use_cookies = 1 in php.ini. Still not
working.
Any other solution / sugesstion will be appreciated.

Thank you,
Vishal.
----- Original Message -----
From: "Thomas Mundal" <thmundalsolgt.biz>
To: <vishaleluminoustechnologies.com>
Sent: Tuesday, May 13, 2003 6:23 PM
Subject: Re: cookies are not set

> Helo!
> It looks like you have to edit your php.ini file. Change this line:
> session.use_cookies = 0
> to:
> session.use_cookies = 1
>
> It is easier to find if you use the search feature in notepad to search fo
> "cookies", then it is the second hit you come to... :)
>
> ----- Original Message -----
> From: <vishaleluminoustechnologies.com>
> Newsgroups: php.general
> To: "PHP" <php-generallists.php.net>
> Sent: Tuesday, May 13, 2003 2:16 PM
> Subject: cookies are not set
>
>
> > Hello All,
> >
> > While executing a php script on the browser the cookies are not set.
> > I have set the Privacy Policy of My IE 6 to LOW and have win2000 Still
> the
> > cookies are not enabled."
> > could this be the problem from php.ini or its my browser.
> >
> > Any help will be appreaciated.
> >
> > Regards,
> > Vishal.
> >
> >
> >
> >
> >
>
>
>
>

attached mail follows:


Connect directly to your http server and request the page that should
set the cookie, and observe the headers you get back. If the cookie is
there, check the time it should expire and if it is not in the past on
your client machine.

vishaleluminoustechnologies.com wrote:

>Thankx for the reply.
>
>I have already set the value session.use_cookies = 1 in php.ini. Still not
>working.
>Any other solution / sugesstion will be appreciated.
>
>Thank you,
>Vishal.
>
>
>
>
>

attached mail follows:


I look already but I can notfind to add days with mktime() any idea?

"John Coggeshall" <johncoggeshall.org> wrote in message
news:1052861194.23340.11.camelcoogle.localdomain...
> Look up the mktime() function in the PHP Manual.
>
> John
> --
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> John Coggeshall
> john at coggeshall dot org http://www.coggeshall.org/
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Dunno if it's still an issue or not, but it used to be that Nutscrape
would not like

    <td background="images/o_r4_c1.jpg">&nbsp;</td>
    <td background="images/o_r4_c2.jpg">&nbsp;</td>

You had to do this instead:

    <td background="images/o_r4_c1.jpg">&nbsp;</td><td
background="images/o_r4_c2.jpg">&nbsp;</td>

When you were lining up images in a table to get no gaps. Just something
else to be aware of...

attached mail follows:


Another wild guess might be to check your search paths for includes. It
could be that you aren't telling PHP where to look exactly, and so it
has to search through various dirs EACH TIME to find the file.

attached mail follows:


Hi,

I'm running PHP v4.3.1 on Apache v2 but am having problems with sessions.

My sessions seem to be created ok, its just that the variables values are
not stored - below is a copy of the session file stored on my machine...

sessionLanguage|N;sessionFirstname|N;sessionStatus|N;sessionUsername|N;

Any ideas?

attached mail follows:


Hi,

how can i make sure that someone has selected a file to upload, the
following doesn't seem to work:

if(empty($_POST['document'])){
   $error = "Please select a file";

Thanks for our help

attached mail follows:


The following excerpt of code:

   $sSql = "select max(resdate) as maxdate from tctores"
           . " where ornum = " . $iOrnum
           . " and oritem = " . $iOritem;

   $iResultid = ifx_query($sSql, $iConnection);
   $Row = ifx_fetch_row($iResultid);
   $iRes = ifx_free_result($iResultid);

Produces this warning:

Warning: Open cursor fails ( [SQLSTATE=00 000 SQLCODE=-242]) in
/var/www/html/includefiles/ifx_ddlfunctions.inc on line 58
Line 58 is the line that runs ifx_query. This code is part of a function
that returns order details and works for most orders I pass into it. Most
orders have about 50 records to calculate the max(resdate) but the order
producing the above warning has about no records for this particular table.
(Not sure if this is relevant). Informix database is 7.2 SE. PHP is v4.1.2.
The sqlcode 242 suggests a table permission problem but it is not this as
other orders will work OK with this code.

****************************************************
This e-mail is intended for the recipient only and
may contain confidential information. If you are
not the intended recipient then you should reply
to the sender and take no further ation based
upon the content of the message.
Internet e-mails are not necessarily secure and
CCM Limited does not accept any responsibility
for changes made to this message.
Although checks have been made to ensure this
message and any attchments are free from viruses
the recipient should ensure that this is the case.
****************************************************

attached mail follows:


> Do I need any compile programs?

you need a good working gcc and the needed libraries installed and compiled.
i think the list PHP-INST is quite the better discussion board for
compiling and installing php ,)

volker

<zitiere wer="Thomas Mundal">
> Do I need any compile programs?
> "Volker" <volkermultiartstudio.de> wrote in message
> news:62217.80.128.221.102.1052833260.squirrelmail.multiartstudio.com...
>> hi,
>>
>> i dont know any resources where to look for examples, my english is also
>> very bad
>> i could tell you your first steps:
>> 1. download php source (4.3.1 is stable and latest i think, i use it
>> with
>> very good results)
>> make /usr/src/php a link to your sourcedir
>> 2. unpack the source and check configure options how to enable modules
> etc.
>> '/usr/src/php/configure --help'
>> first, read the README and INSTALL File
>>
>> optional: (3. decide if you want a staticall binarie (a hery big
>> http-binary with php included) i would prefer a statical binray with
>> everything comiled in.)
>>
>> 4. type 'configure' and 'make', check output for errors, if OK, install
>> ,)
>>
>> if you want more details, tell me, but i can only tell you how to set up
>> a
>> statical http binary with php 4.3.1+apache 1.3.27 +gdlib 2.0.12 +
>> freetype+mysql and more, i got a little script-set to do that
>>
>> but statical! i dont tried the (cgi)mod-version
>>
>> my compilation does it with:
>>
>> cd /usr/src/php &&
>> make clean &&
>> rm -f ./config.status
>> rm -f config.cache
>> ./configure \
>> --prefix=/home/php/4.3.1 \
>> --with-pcre-regex=/usr/local \
>> --with-imap \
>> --enable-blowfish \
>> --enable-bcmath \
>> --with-flatfile \
>> --enable-dbase \
>> --enable-dbx \
>> --with-pear \
>> --with-db3=/usr/local/BerkleyDB \
>> --enable-exif \
>> --enable-memory-limit \
>> --with-jpeg-dir=/usr/src/jpeg-6b \
>> --with-bz2 \
>> --with-zlib \
>> --with-zip \
>> --with-tiff-dir=/usr/src/libtiff \
>> --enable-ftp \
>> --with-memcache=/usr/src/libmm \
>> --enable-sysvshm \
>> --enable-sysvem \
>> --without-tsrm-threads \
>> --enable-static=all \
>> --enable-shmob \
>> --enable-sockets \
>> --with-t1lib=/usr/src/t1lib \
>> --with-ttf=/usr/src/freetype \
>> --with-pgsql=/home/pgsql/7.1 \
>> --with-openssl=/usr/local/openssl \
>> --with-apache=/home/SRC/apache \
>> --with-mcrypt=/usr/src/libmcrypt/lib \
>> --enable-calendar \
>> --enable-ctype \
>> --enable-inline-optimization \
>> --with-gd=/usr/local \
>> --with-freetype-dir=/usr/src/freetype-2.0.2 \
>> --with-pdflib=/usr/local/pdflib5/c \
>> --with-swf \
>> --with-java=/usr/lib/jdk1.3.1 \
>> --with-mysql=/home/mysql &&
>>
>> i had to install a lot of libraries first. maybe ldap is missing ,)
>>
>> echo 'ready to: make && make install'
>> volker
>>
>> <zitiere wer="Thomas Mundal">
>> > Hi! I'm Quite amateur on using php, and I have seen many places that
>> if
> i
>> > want to use additional functinallity with php, i need to compile php
> with
>> > that function... or something.. Can anyone tell me how to do that, or
> send
>> > me a link to where i can learn it? I want to use PHP with LDAP support
> for
>> > quering Active Directory.. :)
>> >
>> > Thanx in advance..
>> >
>> >
>> >
>> > --
>> > 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
>
>

multi.art.studio
http://www.multiartstudio.com
multi.art.sudio - SUPPORT
https://support.multiartstudio.de

+++NEW+++
whois domain agent
http://test.multiartstudio.de/whois

mCMS (mas Contentmanagement-System)
http://www.erdtrabant.de

Hanauer Linux User Group
Infos unter:
http://www.hulug.de

mach mal Pause
http://www.bueropause.de

attached mail follows:


Hi all,

Is there any way of setting a time to live on sessions stored in php? I have
tried session_cache_expire(10); but the SIDs are still valid and return
session variables after that time. I am trying to avoid people 'hacking' my
user's sessions.

A long winded way i know would be to have a mysql table with sessions and
datestamps with a crontab to clear old sessions from validity, but this
means more server load and more time.

Any help is appreciated, thanks.

Bix