php-general Digest 24 Oct 2004 00:00:51 -0000 Issue 3070

Topics (messages 200147 through 200170):

Re: Form madness maybe OT
        200147 by: Andre Dubuc
        200148 by: Stuart Felenstein
        200150 by: Stuart Felenstein

allow set_time_limit on safe mode
        200149 by: Nenillo

Form containing 2 menus not returning anything
        200151 by: Ken Tozier
        200152 by: John Holmes
        200153 by: Ken Tozier
        200154 by: Marek Kilimajer
        200157 by: Robby Russell

How to parse this?
        200155 by: Jerry Swanson
        200159 by: Marek Kilimajer

Cant use MYSQLi with Zend Performance Suit 4.0.2
        200156 by: Unreal HSHH

Parsing
        200158 by: Jerry Swanson

Best Functions for Checking Remote File "last modified"?
        200160 by: Nick Wilson
        200161 by: Matthew Fonda

GD support on PHP 4.3.8
        200162 by: E SA

PHP5 Tutorials...?
        200163 by: Michael Lauzon

PHP framework
        200164 by: Igor
        200167 by: Bruno B B Magalhães

Good PHP framewok
        200165 by: Igor

Serial Communication
        200166 by: Ulrik Witschass
        200168 by: M. Sokolewicz
        200169 by: Ulrik Witschass

enterprise php application automated testing
        200170 by: blackwater dev

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 ---
On Saturday 23 October 2004 07:11 am, you wrote:
> --- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> > Stuart,
> >
> > I'm no expert, but did you flush your browser?
> >
> > Hth,
> > Andre
>
> Andre, thank you for the response.  I'm not sure what
> you mean by flush the browser ?
>
> Here is what I've been doing.  First, I have denied
> cookies from the site.  Second, I've logged out and
> logged back in again.  I think the sessionid would
> change then, as I've tested with the sessionid
> printing out.  Last, I've actually closed out of the
> browser and re-opened.
>
> Stuart


Stuart, 

Go to your browser settings, under 'Cache' (or something similar) then clear 
the cache. I struggled with a similar problem for days . . .

Andre

--- End Message ---
--- Begin Message ---
--- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> Stuart, 
> 
> Go to your browser settings, under 'Cache' (or
> something similar) then clear 
> the cache. I struggled with a similar problem for
> days . . .
> 
> Andre
> 
I did that, and didn't change the situation.  Also I
think the fact that using the original form will work
seems to indicate it's not a caching / cookie /
session problem.  Very strange
Stuart

--- End Message ---
--- Begin Message ---
Call off the troops.  I reconstructed the form, step
by step checking each step.  All seems to be working.

Stuart
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:

> 
> --- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> > Stuart, 
> > 
> > Go to your browser settings, under 'Cache' (or
> > something similar) then clear 
> > the cache. I struggled with a similar problem for
> > days . . .
> > 
> > Andre
> > 
> I did that, and didn't change the situation.  Also I
> think the fact that using the original form will
> work
> seems to indicate it's not a caching / cookie /
> session problem.  Very strange
> Stuart
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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

I want to allow the use of set_time_limit on any script but setting safe mode to ON, how can i do that? Is there any php.ini directive like "allowed_functions" or similar?

Thanks.
--- End Message ---
--- Begin Message --- I created an html form comprised of two menus but when the action method for the form calls my "handler.php" script, neither of the menu variables contain anything. Could someone point out what I'm doing wrong?

Thanks,

Ken

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

Here's the relevant html:
<form action="handler.php" method="post" name="select_view_form">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="labelTextBold" width="100px">Publication:</td>
<td class="labelText">
<select name="publication" onChange="MenuSubmit();">
<option value="none">none</option>
<option value="1">Ashland TAB</option>
<option value="2">Canton Journal</option>
</td>
</tr>
<tr>
<td class="labelTextBold" width="100px">View:</td>
<td class="labelText">
<select name="view" onChange="MenuSubmit();">
<option value="none">none</option>
<option value="1">Pub Status</option>
<option value="2">Pub Notes</option>
</select>
</td>
</tr>
</table>
</form>

And here's the PHP handler script:
<?php
        if ($view)
        {
                echo $publication."\n".$view;
        }
        else
        {
                echo "no values supplied";
        }
?>

--- End Message ---
--- Begin Message --- Ken Tozier wrote:
    if ($view)
    {
        echo $publication."\n".$view;
    }

if(isset($_POST['view'])) { echo $_POST['publication'] . '<br />' . $_POST['view']; }

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Thanks John, that did the trick.

I'm curious though, the PHP book I'm reading (PHP and PostgeSQL, Advanced web programming) specifically states that it's not necessary to grab form variables in this way, claiming PHP extracts all form variables behind the scenes for you. Was my original syntax something that used to be supported but has since been deprecated?

Ken

On Oct 23, 2004, at 10:13 AM, John Holmes wrote:

if(isset($_POST['view']))
{
        echo $_POST['publication'] . '<br />' . $_POST['view'];
}

--- End Message ---
--- Begin Message --- Ken Tozier wrote:
Thanks John, that did the trick.

I'm curious though, the PHP book I'm reading (PHP and PostgeSQL, Advanced web programming) specifically states that it's not necessary to grab form variables in this way, claiming PHP extracts all form variables behind the scenes for you. Was my original syntax something that used to be supported but has since been deprecated?

It has not been deprecated but depends on register_globals setting being on. The recomended way is to have this setting off and use $_GET, $_POST etc superglobals, it will help you keep your code secure. More here:

http://sk2.php.net/manual/en/security.globals.php


Ken

On Oct 23, 2004, at 10:13 AM, John Holmes wrote:

if(isset($_POST['view']))
{
    echo $_POST['publication'] . '<br />' . $_POST['view'];
}



--- End Message ---
--- Begin Message ---
On Sat, 2004-10-23 at 10:01 -0400, Ken Tozier wrote:
> I created an html form comprised of two menus but when the action 
> method for the form calls my "handler.php" script, neither of the menu 
> variables contain anything. Could someone point out what I'm doing 
> wrong?
> 
> Thanks,
> 
> Ken
> 
> ----------------------------------------
> 
> Here's the relevant html:
> <form action="handler.php" method="post" name="select_view_form">
>       <table width="90%" border="0" cellspacing="0" cellpadding="0" 
> align="center">
>               <tr>
>                       <td class="labelTextBold" width="100px">Publication:</td>
>                       <td class="labelText">
>                               <select name="publication" onChange="MenuSubmit();">
>                                       <option value="none">none</option>
>                                       <option value="1">Ashland TAB</option>
>                                       <option value="2">Canton Journal</option>
>                       </td>
>               </tr>
>               <tr>
>                       <td class="labelTextBold" width="100px">View:</td>
>                       <td class="labelText">
>                               <select name="view" onChange="MenuSubmit();">
>                                       <option value="none">none</option>
>                                       <option value="1">Pub Status</option>
>                                       <option value="2">Pub Notes</option>
>                               </select>
>                       </td>
>               </tr>
>       </table>
> </form>
> 
> And here's the PHP handler script:
> <?php
>       if ($view)
>       {
>               echo $publication."\n".$view;
>       }
>       else
>       {
>               echo "no values supplied";
>       }
> ?>
> 

Not sure where you learned how to handle form posts, but you might want
to spend some time reading the PHP site, specifically looking at how
global variables work.

Try changing $view to $_POST['view'];

-Robby

-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
I have huge html file.  I want to parse the data and get everything between
<b class="class1"> and <!-- Comments -->

What function is good for this purpose?

TH

--- End Message ---
--- Begin Message --- Jerry Swanson wrote:
I have huge html file.  I want to parse the data and get everything between
<b class="class1"> and <!-- Comments -->

What function is good for this purpose?

preg_match()
--- End Message ---
--- Begin Message ---
I am trying Zend Performance Suit,and using php5.0.2 w/ MySQL 4.1.6 on
my FreeBSD 4.10 box.

But it doesn't seem working,it make php core dump forever.
When the php script is calling MYSQLi functions , php core dump.

--- End Message ---
--- Begin Message ---
I have huge html file.  I want to parse the data and get everything between
<b class="class1"> and <!-- Comments -->

What function is good for this purpose?

TH

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

I need to connect to a remote http server and pick up a file *only* if
it has been modified since i last did this.

The file is in csv format (not tht i think that matters?) and is http
password protected.

Which functions should I look at for acheiving this please?

Thanks very much!
-- 
Nick W

--- End Message ---
--- Begin Message ---
You could try using filectime

http://us2.php.net/manual/en/function.filectime.php

On Sat, 2004-10-23 at 09:45, Nick Wilson wrote:
> Hello, 
> 
> I need to connect to a remote http server and pick up a file *only* if
> it has been modified since i last did this.
> 
> The file is in csv format (not tht i think that matters?) and is http
> password protected.
> 
> Which functions should I look at for acheiving this please?
> 
> Thanks very much!
> -- 
> Nick W
-- 
Regards,
Matthew Fonda

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

I am trying to compile PHP with GD support.

My config line is:

./configure --prefix=/data/PHP\
  --with-config-file=/etc/php.ini\
  --disable-debug --enable-safe-mode\
  --with-mysql=/data/MySQL_4.0.21\
  --with-openssl=/data/OpenSSL\
  --with-apxs2=/data/Apache/bin/apxs\
  --with-gd\
  --with-jpeg-dir=/usr\
  --with-png-dir=/usr\
  i586-suse-linux

The libpng library is installed; however, I am 
getting the following error message:

checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
configure: error: libpng.(a|so) not found.

The files are in /usr/lib:

lrwxrwxrwx  1 root root     17 Aug 30 09:35
/usr/lib/libpng.so.3 -> libpng.so.3.1.2.5
-rwxr-xr-x  1 root root 202905 Aug 13 15:03
/usr/lib/libpng.so.3.1.2.5
lrwxrwxrwx  1 root root     19 Aug 30 09:35
/usr/lib/libpng12.so.0 -> libpng12.so.0.1.2.5
-rwxr-xr-x  1 root root 202905 Aug 13 15:03
/usr/lib/libpng12.so.0.1.2.5

Any ideas?

Beforehand, thank you for your help!


                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

--- End Message ---
--- Begin Message ---
Where can I find detailed PHP5 tutorials, but written for the
beginner...they must be online tutorials as I cannot afford any
computer books at the moment?!

-- 
Michael Lauzon
http://phantasyrpg.com/main.php?view=9898

--- End Message ---
--- Begin Message ---
I need to develop an PHP/MySql application (about 20 db tables and 70 
screens).  I was wandering if there is a solid framework out there that 
could help development.
Also, I would appreciate any recommendations for books/docs on good 
development practices and php app. architecture.
Thanks!

Igor

--- End Message ---
--- Begin Message ---
Igor,

the problem on using a framework is that you have to learn it before you take advantage of its features, I mean you must consider the learning curve in your time schedule.
There are pretty good frameworks out there, but each one with your pros and cons, and with your own goals, I mean, a strong and reliable framework doesn´t mean it is extensible or even template driven, or also even easy to learn.

I developed my own framework, witch I am using on almost all my projects (course I won´t kill a fly with a hammer!) for one year and half, and still on version 0.5dev! :)

Some of then:
http://www.zope.org
http://www.fusebox.org
http://www.mojavi.org
http://www.binarycloud.com
http://www.eZpublish.com
http://amb.sourceforge.net
http://www.phpmvc.net
http://phrame.itsd.ttu.edu
http://www.horde.org


Best Regards, Bruno B B Magalhães

On Oct 23, 2004, at 4:04 PM, Igor wrote:

I need to develop an PHP/MySql application (about 20 db tables and 70
screens).  I was wandering if there is a solid framework out there that
could help development.
Also, I would appreciate any recommendations for books/docs on good
development practices and php app. architecture.
Thanks!

Igor

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



--- End Message ---
--- Begin Message ---
Im starting to develop a PHP/MySql application that is going to have about 
20 db tables and about 70 screens. I am wondering if there is a solid 
general PHP framework out there that would be a good starting point. I would 
also apreciate any document/book recomendations on good development 
practices.
Thanks!

Igor

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

Hello List,

I have managed to communicate with the serial device with the following
code:

'mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=n';            //the config the
device needs

$fp = fopen("COM1:", "rb+");            //also tried only "r+" here
if(!$fp) die();

$query = chr(59).chr(32)."0".chr(13).chr(10);

fputs($fp, $query);

$reply = fgets($fp, 32);

print($reply);


This works, the "0"-command requests the ID of the device and the reply I
get in $reply is exactly what it should be. The problem:

it takes around 5 seconds until this reply is there, I tried different
lengths to buffer in fgets, tried fgetc, fread, everything, always the same.
It can't be the device blocking it, because if I send a couple of commands
(to position the devices measurement head) it reacts to all of these
commands in lightning speed, so I don't think it is the device slowing the
thing down, BUT what could it be? Does anybody have any experience with
this??? Basically, fread/fgets/fgetc just hangs the PHP core for several
seconds, with 0-1% CPU load...something just stalls PHP for this peroid of
time.

If this is an internal problem of PHP: does anybody know a source where I
can find some hints on how to communicate with the serial port over the COM
implementation of php-win? Googling for "com serial port php" is a bit
troublesom, since "com" in this case finds dozens of sites where com refers
to "com1" and not the COM system of Win32.

Any help is greatly appreciated!

best regards

Ulrik

--- End Message ---
--- Begin Message --- Ulrik Witschass wrote:

Hello List,

I have managed to communicate with the serial device with the following
code:

'mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=n';            //the config the
device needs

$fp = fopen("COM1:", "rb+");                //also tried only "r+" here
if(!$fp) die();

$query = chr(59).chr(32)."0".chr(13).chr(10);

fputs($fp, $query);

$reply = fgets($fp, 32);

print($reply);


This works, the "0"-command requests the ID of the device and the reply I get in $reply is exactly what it should be. The problem:

it takes around 5 seconds until this reply is there, I tried different
lengths to buffer in fgets, tried fgetc, fread, everything, always the same.
It can't be the device blocking it, because if I send a couple of commands
(to position the devices measurement head) it reacts to all of these
commands in lightning speed, so I don't think it is the device slowing the
thing down, BUT what could it be? Does anybody have any experience with
this??? Basically, fread/fgets/fgetc just hangs the PHP core for several
seconds, with 0-1% CPU load...something just stalls PHP for this peroid of
time.

If this is an internal problem of PHP: does anybody know a source where I
can find some hints on how to communicate with the serial port over the COM
implementation of php-win? Googling for "com serial port php" is a bit
troublesom, since "com" in this case finds dozens of sites where com refers
to "com1" and not the COM system of Win32.

Any help is greatly appreciated!

best regards

Ulrik
You could try the same thing using windows' HyperTerminal. Connecting trough it and sending the same commands, and check if it takes as long aswell. That way you can rule out at least half of the possible problems (are they windows/COM related or PHP related). Basically, last time I tried something similair, I noticed my system "freezing" for a few secs on sending the first command. But this was with a faulty cable, so I'm not sure if that means anything...
--- End Message ---
--- Begin Message ---
Thanks for the help,

when communicating to it via hyperterminal (or other software) it responds
immidiately. I will try it on different machines within the next few
days...hopefully it is just a hardware/software problem with my
dev-system...

best regards

Ulrik



//You could try the same thing using windows' HyperTerminal. Connecting
trough it and sending the same commands, and check if it takes as long
aswell. That way you can rule out at least half of the possible problems
(are they windows/COM related or PHP related). Basically, last time I
tried something similair, I noticed my system "freezing" for a few secs
on sending the first command. But this was with a faulty cable, so I'm
not sure if that means anything...

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

--- End Message ---
--- Begin Message ---
Hello all,

I know I can use simpletest to test my application at the class level
but I need a tool to test it at a much higher level.  I need something
to enter data in forms, click links, etc.  I have played some with
simpletest's web tester without much luck.  I am just curious how
others are effectively testing their large php enterprise
applications?  Years ago I wrote Visual test scripts and it had a
feature where I could record all my keystrokes as I entered, clicked,
etc...I guess I am curious if there is anything like that..open
source?

Any suggestions are welcome.
Thanks!

--- End Message ---

Reply via email to