php-general Digest 24 Oct 2004 13:10:38 -0000 Issue 3071

Topics (messages 200171 through 200188):

Inconsistent file_exists()
        200171 by: Allen Watson

Re: enterprise php application automated testing
        200172 by: Bruno B B Magalhćes
        200175 by: Ramil Sagum

PHP Online Appointment Scheduler?
        200173 by: Galen
        200174 by: Galen

special request for windows 98 users to help develop PEAR's pear.bat
        200176 by: Greg Beaver

Re: [PEAR-DEV] windows 98 support?
        200177 by: Helgi Žormar
        200178 by: Rens Admiraal
        200179 by: Helgi Žormar

[Newbie Guide] For the benefit of new members
        200180 by: tech

PHP5 CLI Custom Error Reporting Doesn't Work as Expected
        200181 by: Daniel Talsky
        200185 by: Daniel Schierbeck

Re: Database search and results
        200182 by: Stuart Felenstein
        200186 by: Stuart Felenstein

File system management
        200183 by: Jose
        200188 by: raditha dissanayake

SOLVED Re: [PHP] Help: Database search and results
        200184 by: Stuart Felenstein

problem using error_reporting() PHP 5.0.2 (cli)
        200187 by: Yashesh Bhatia

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 Mac OS X, I have two directories:

/Documents
/Databases

When I use the file_exists() function, it fails to find files in my 
Documents directory, but works fine in Databases (and others). Both 
reside in the same parent folder. I've tried it with several different 
files in each directory. Nothing in Documents will report that it exists.

Protection on the two directories is identical.

Any ideas, anyone?

--- End Message ---
--- Begin Message ---
Well,

we call it pre-testing, the only way, and the better one, is doing it with the future users of your system!

Regards,
Bruno B B Magalhćes



On Oct 23, 2004, at 10:00 PM, blackwater dev wrote:

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!

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



--- End Message ---
--- Begin Message ---
On Sat, 23 Oct 2004 20:00:48 -0400, blackwater dev
<[EMAIL PROTECTED]> wrote:
> 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?
> 


Does exactly what you want + load testing

http://jakarta.apache.org/jmeter/index.html



-


ramil
http://ramil.sagum.net

--- End Message ---
--- Begin Message ---
Hi PHP people,

I'm working on a web project involving a small medical office. One of the things that has been discussed is online appointment scheduling. Before I go out and gut myself on anything, is there any online appointment scheduling software that complies with HIPAA privacy requirements? (This is a U.S. thing)

I did some googling, but now that google searches the URL as well as the content of the page for your query, searches including "php" have become dramatically less useful. (.php, ?phpsessid, etc)

Thoughts or products/projects anybody?

-Galen
--- End Message ---
--- Begin Message ---
Hi PHP people,

I'm working on a web project involving a small medical office. One of the things that has been discussed is online appointment scheduling. Before I go out and gut myself on anything, is there any online appointment scheduling software that complies with HIPAA privacy requirements? (This is a U.S. thing)

I did some googling, but now that google searches the URL as well as the content of the page for your query, searches including "php" have become dramatically less useful. (.php, ?phpsessid, etc)

Thoughts or products/projects anybody?

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

In the effort to improve pear.bat for windows users, I would like to ask any windows 98 users that are still left to try this simple test:

open a MS-DOS prompt and type:

C:\> mkdir C:\test
C:\> mkdir C:\test\me
C:\> echo "echo %~d0%~p0" > C:\test\me\test.bat
C:\> \test\me\test.bat
C:\> cd \test\me
C:\test\me> test.bat

If you don't see as output:

C:\> echo C:\test\me\test.bat
C:\test\me\

for the first and

C:\test\me> echo C:\test\me\test.bat
C:\test\me\

that's a problem. Please mail me OFFLIST any results, positive or negative. (On windows XP, %~d# where # is a number will spit out the drive, and %~p# will spit out the full path, I would like to see if this works in windows 98 as well)

Many Thanks,
Greg

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

Look at http://www.php.net/windows
like that page says as of 4.3.0 windows 95 isn't supported, so I guess
win98 is still supported ;) and for 4.2.0 windows 95 should work (which
of course is the current version PEAR needs at least, or did you higher
that number up in 1.4 ?)

Here's my personal opinion, be aware ;) I think we should give up on
windows 95/98 and ME, because no healthy person uses that as a server
(well development env is maybe a different story)

But what we should do to keep flexibility and compatibility is to follow
what PHP does, and thus we should have support for win98, and even 95 if
we'll have the required PHP version still at 4.2.0

But then we come down to maintenance cost/time (time is money so it's
all the same) and if removing the win98 support in PEAR 1.4.0 makes
things more simpler then that's probably the best road to go.

As a side note, correct me if I'm wrong, but didn't MS discount anymore
support/updates to win98 sometime this year, thus making that OS even
more unsecure, so maybe like I pointed out above, is too much work to
support such legacy OS.

Regards
Helgi

On Sun, 2004-10-24 at 04:51, Greg Beaver wrote:
> As I understand it, PHP no longer actively supports windows 98 (correct 
> me if I'm wrong).  I wonder if we can go the same route in PEAR safely? 
>   If so, I can simplify the pear.bat file, making go-pear completely 
> unnecessary for a default installation using the techniques described in 
> my email to pear-dev regarding testing a batch file in windows 98.
> 
> This would affect PEAR 1.4.0 and newer
> 
> Greg

--- End Message ---
--- Begin Message ---
Helgi,

/quote:
As a side note, correct me if I'm wrong, but didn't MS discount anymore
support/updates to win98 sometime this year, thus making that OS even
more unsecure, so maybe like I pointed out above, is too much work to
support such legacy OS./

Supporting an OS is also depending on how many people are still using it, don't you 
think?
If I would even count how many times I still have to make full 800*600 support on my 
projects, and still having complaints that people can't see the complete screen, and 
have to scroll to much... There are still people using 640*480... And, isn't that old? 
So, win98 support looks useful to me...

And, greg, sorry, I don't have it :-)




Helgi Žormar wrote:

Hi

Look at http://www.php.net/windows
like that page says as of 4.3.0 windows 95 isn't supported, so I guess
win98 is still supported ;) and for 4.2.0 windows 95 should work (which
of course is the current version PEAR needs at least, or did you higher
that number up in 1.4 ?)

Here's my personal opinion, be aware ;) I think we should give up on
windows 95/98 and ME, because no healthy person uses that as a server
(well development env is maybe a different story)

But what we should do to keep flexibility and compatibility is to follow
what PHP does, and thus we should have support for win98, and even 95 if
we'll have the required PHP version still at 4.2.0

But then we come down to maintenance cost/time (time is money so it's
all the same) and if removing the win98 support in PEAR 1.4.0 makes
things more simpler then that's probably the best road to go.

As a side note, correct me if I'm wrong, but didn't MS discount anymore
support/updates to win98 sometime this year, thus making that OS even
more unsecure, so maybe like I pointed out above, is too much work to
support such legacy OS.

Regards
Helgi

On Sun, 2004-10-24 at 04:51, Greg Beaver wrote:


As I understand it, PHP no longer actively supports windows 98 (correct me if I'm wrong). I wonder if we can go the same route in PEAR safely? If so, I can simplify the pear.bat file, making go-pear completely unnecessary for a default installation using the techniques described in my email to pear-dev regarding testing a batch file in windows 98.

This would affect PEAR 1.4.0 and newer

Greg






--- End Message ---
--- Begin Message ---
On Sun, 2004-10-24 at 08:02, Rens Admiraal wrote:
> Helgi,
> 
> quote:
> As a side note, correct me if I'm wrong, but didn't MS discount anymore
> support/updates to win98 sometime this year, thus making that OS even
> more unsecure, so maybe like I pointed out above, is too much work to
> support such legacy OS.
> 
> Supporting an OS is also depending on how many people are still using it, don't you 
> think?
> If I would even count how many times I still have to make full 800*600 support on my 
> projects, and still having complaints that people can't see the complete screen, and 
> have to scroll to much... There are still people using 640*480... And, isn't that 
> old? So, win98 support looks useful to me...
> 
> And, greg, sorry, I don't have it :-)
> 

Hi,

Well, yes, but we're talking about servers here, not desktop users, also
in addition like I said before, those are all my personal thoughts, not
something that should be done rather then something else, but like I
raised before, we do have to keep in mind that sometimes laying of some
support is needed if that keeps the code simpler and more maintainable,
thus less time has to be spent on it, like for example, we could
*probably* (I'm saying this though with out being sure) make PEAR
support also PHP's lower then 4.2.0 with some extra code, thus more
maintenance has to be done and thus the code becomes more complex, but
it all comes down to the person that will maintain this all, so greg
it's mostly up to you IMHO since I guess you'll maintain this.

</personal_rant>

Regards
Helgi

> Helgi Žormar wrote: 
> > Hi
> > 
> > Look at http://www.php.net/windows
> > like that page says as of 4.3.0 windows 95 isn't supported, so I guess
> > win98 is still supported ;) and for 4.2.0 windows 95 should work (which
> > of course is the current version PEAR needs at least, or did you higher
> > that number up in 1.4 ?)
> > 
> > Here's my personal opinion, be aware ;) I think we should give up on
> > windows 95/98 and ME, because no healthy person uses that as a server
> > (well development env is maybe a different story)
> > 
> > But what we should do to keep flexibility and compatibility is to follow
> > what PHP does, and thus we should have support for win98, and even 95 if
> > we'll have the required PHP version still at 4.2.0
> > 
> > But then we come down to maintenance cost/time (time is money so it's
> > all the same) and if removing the win98 support in PEAR 1.4.0 makes
> > things more simpler then that's probably the best road to go.
> > 
> > As a side note, correct me if I'm wrong, but didn't MS discount anymore
> > support/updates to win98 sometime this year, thus making that OS even
> > more unsecure, so maybe like I pointed out above, is too much work to
> > support such legacy OS.
> > 
> > Regards
> > Helgi
> > 
> > On Sun, 2004-10-24 at 04:51, Greg Beaver wrote:
> >   
> > > As I understand it, PHP no longer actively supports windows 98 (correct 
> > > me if I'm wrong).  I wonder if we can go the same route in PEAR safely? 
> > >   If so, I can simplify the pear.bat file, making go-pear completely 
> > > unnecessary for a default installation using the techniques described in 
> > > my email to pear-dev regarding testing a batch file in windows 98.
> > > 
> > > This would affect PEAR 1.4.0 and newer
> > > 
> > > Greg
> > >     
> >   

--- End Message ---
--- Begin Message ---
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en first. You
can download a copy and use it offline also.

Please also try
http://www.php.net/manual/faq.php
for answers to frequently answered questions
about PHP (added by Christophe Chisogne).

2. Try http://www.google.com next. Searching
for "php YOUR QUERY" may fetch you relevant
information within the first 10 results.

3. There is a searchable archive of the
mailing list discussion at
http://phparch.com/mailinglists. Many of the
common topics are discussed repeatedly, and
you may get answer to your query from the
earlier discussions.

For example: One of the repeatedly discussed
question in the list is "Best PHP editor".
Everyone has his/her favourite editor.
You can get all the opinions by going through
the list archives. If you want a chosen list
try this link :
http://www.thelinuxconsultancy.co.uk/phpeditors/
(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want
find out what extensions are available to
you?

Just put the following code into a file with
a .php extension and access it through your
webserver:

<?php
phpinfo();
?>

If PHP is installed you will see a page with
a lot of information on it. If PHP is not
installed (or not working correctly) your
browser will try to download the file.

(contributed by Teren and reworded by Chris W
Parker)

5. If you are stuck with a script and do not
understand what is wrong, instead of posting
the whole script, try doing some research
yourself. One useful trick is to print
the variable/sql query using print or echo
command and check whether you get what you
expected.

After diagnosing the problem, send the
details of your efforts (following steps 1,
2 & 3) and ask for help.

6. PHP is a server side scripting language.
Whatever processing PHP does takes place
BEFORE the output reaches the client.
Therefore, it is not possible to access
users' computer related information (OS,
screen size etc) using PHP. Nor can you
modify any the user side settings. You need
to go for JavaScript and ask the question in
a JavaScript list.

On the other hand, you can access the
information that is SENT by the user's
browser when a client requests a page from
your server. You can find details about
browser, OS etc as reported by
this request. - contributed by Wouter van
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line.
Avoid general subjects like "Help!!", "A
Question" etc. Especially avoid blank
subjects.

8. When you want to start a new topic, open a
new mail composer and enter the mailing list
address [EMAIL PROTECTED] instead of
replying to an existing thread and replacing
the subject and body with your message.

9. Only quote the relevant parts of
an email when replying. Do not Quote
everything (including huge code snippets)
only to say "I agree", for instance.
[contribued by Paul Waring]

10. It's always a good idea to post back to
the list once you've solved your problem.
People usually add [SOLVED] to the subject
line of their email when posting solutions.
By posting your solution you're helping the
next person with the same question.
[contribued by Chris W Parker]

11. Ask smart questions
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

12. Do not send your email to the list with
attachments. If you don't have a place to
upload your code, try the many pastebin
websites (such as www.pastebin.com).
[contributed by Burhan Khalid]

Following these guidelines will ensure that
you get effective responses from the list
members. Otherwise, your questions might not
be answered.

Hope you have a good time programming with
PHP.
--
Integrated Management Tools for leather
industry
----------------------------------
http://www.leatherlink.net
S.Gnanavel,
BSG LeatherLink (P) Ltd,
Chennai - 600106

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

--- End Message ---
--- Begin Message ---
Included is my reproduce code.

I'm trying to write a custom error logger for my PHP CLI script.

The main problem is that when I try something like a failed require()
statement, my custom error reporting function tells me it got an
E_WARNING, but it stops program execution, which is not what the docs
say it should do.

When I try some other fatal error like trying to call an undefined
function foobar(), then it doesn't run my custom error loggin function
at all, just stops program execution.

I tried to report this as a bug, and it was closed with no
explanation...this is driving me to the brink of sanity.  Can anyone
help?

#!/usr/local/bin/php -c /usr/local/etc/php.ini
<?php
function pv_shell_error_logger(
  $errno, $errstr, $errfile, $errline){

  switch ($errno){

    case E_ERROR:
      print('E_ERROR'."\n");
    break;

    case E_WARNING:
      print('E_WARNING'."\n");
    break;

    default:
      print('OTHER:'.$errno."\n");
    break;

  }
  return true;
}

error_reporting(0);
// set to the user defined error handler
set_error_handler("pv_shell_error_logger",
  (E_ALL));

// FIRST TEST, PRINTS 'E_WARNING'
// But also stops program execution even though I'm not doing anything.
//require ('foo');

// FIRST TEST, PRINTS NOTHING
// And also stops program execution even though I'm not doing anything.
//foobar();

?>

--- End Message ---
--- Begin Message --- Daniel Talsky wrote:
Included is my reproduce code.

I'm trying to write a custom error logger for my PHP CLI script.

The main problem is that when I try something like a failed require()
statement, my custom error reporting function tells me it got an
E_WARNING, but it stops program execution, which is not what the docs
say it should do.

When I try some other fatal error like trying to call an undefined
function foobar(), then it doesn't run my custom error loggin function
at all, just stops program execution.

I tried to report this as a bug, and it was closed with no
explanation...this is driving me to the brink of sanity.  Can anyone
help?

#!/usr/local/bin/php -c /usr/local/etc/php.ini
<?php
function pv_shell_error_logger(
  $errno, $errstr, $errfile, $errline){

  switch ($errno){

    case E_ERROR:
      print('E_ERROR'."\n");
    break;

    case E_WARNING:
      print('E_WARNING'."\n");
    break;

    default:
      print('OTHER:'.$errno."\n");
    break;

  }
  return true;
}

error_reporting(0);
// set to the user defined error handler
set_error_handler("pv_shell_error_logger",
  (E_ALL));

// FIRST TEST, PRINTS 'E_WARNING'
// But also stops program execution even though I'm not doing anything.
//require ('foo');

// FIRST TEST, PRINTS NOTHING
// And also stops program execution even though I'm not doing anything.
//foobar();

?>
As far as I know the only errors you can handle through a user-defined function are of levels E_USER_ERROR, E_USER_WARNING and E_USER_NOTICE.


php.net (http://dk2.php.net/manual/en/function.set-error-handler.php) says this:


Note: The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and E_STRICT.

--
Daniel Schierbeck

Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/register&r=6584
--- End Message ---
--- Begin Message ---
I have created a database search and results set. 
Things seem to work fine until I add the join
statements into the results page query string. 
If I don't use the joins , the search works great.  It
returns the correct results based on the criteria
input. If I add the joins in, then basically all i get
regardless of my search criteria is a complete dump of
every listing.

NOW - I don't expect any suggestions based on my above
question, but was not sure if it was okay to post the
code.  Both pages total about 325 lines.  If it's okay
to post it I will. 

Thank you ,
Stuart

--- End Message ---
--- Begin Message ---
Ooops, not solved yet.
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:

I have created a database search and results set. 
Things seem to work fine until I add the join
statements into the results page query string. 
If I don't use the joins , the search works great.  It
returns the correct results based on the criteria
input. If I add the joins in, then basically all i get
regardless of my search criteria is a complete dump of
every listing.

NOW - I don't expect any suggestions based on my above
question, but was not sure if it was okay to post the
code.  Both pages total about 325 lines.  If it's okay
to post it I will. 

Thank you ,
Stuart

--- End Message ---
--- Begin Message ---
Hi,
Some of the filesystem function can't be executed in a linux httpd server.
I tried,
mkdir();
chmod();
fwrite(); and some other filesystem functions. Those worked in widows enviornment but 
in linux i got a message "Permission denied"
My PHP version is 4.2.3 in linux.
What are the configurations should i make to creating directories and file uploading 
and to execute those filesystem functions in linux?
 

Yahoo! India Matrimony: Find your life partneronline.

--- End Message ---
--- Begin Message ---
Jose wrote:

Hi,
Some of the filesystem function can't be executed in a linux httpd server.
I tried,
mkdir();
chmod();
fwrite(); and some other filesystem functions. Those worked in widows enviornment but in linux i got a message "Permission denied"
My PHP version is 4.2.3 in linux.
What are the configurations should i make to creating directories and file uploading and to execute those filesystem functions in linux?


As the error message says it's all to do with permissions. `man chmod` might be usefull reading.



Yahoo! India Matrimony: Find your life partneronline.




--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Wow~! I'm getting good.
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:

> I have created a database search and results set. 
> Things seem to work fine until I add the join
> statements into the results page query string. 
> If I don't use the joins , the search works great. 
> It
> returns the correct results based on the criteria
> inp..............

--- End Message ---
--- Begin Message ---
Hi:


  I'm using 
[EMAIL PROTECTED] etc]# php -version
PHP 5.0.2 (cli) (built: Oct  9 2004 01:47:08)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies

and have the following entry in the php.ini file 

error_reporting = E_ALL

i then invoke the script from my browser

[EMAIL PROTECTED] php_tut]$ cat ref_obj1.php
<pre>
<?php
 
error_reporting(E_STRICT|E_ALL);
 
class Class1 {
  var $var1=11;
 
  public function displayVars(){
    echo("var1 = $this->var1\n");
  }
} // end of class Class1
 
$instance1 = new Class1();
$instance1->displayVars();
 
$instance2 =& new Class1();
$instance2->displayVars();
 
?>
</pre>
[EMAIL PROTECTED] php_tut]$

I donot see the warning messages (which i'm supposed to) inspite of
having enabled E_STRICT at runtime.

However if i change the entry in the php.ini file to
error_reporting = E_ALL | E_STRICT

and restart apache
and invoke the same script, i get the messages
Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers in
/usr/local/htdocs/yvb/php_tut/ref_obj1.php on line 7

Strict Standards: Assigning the return value of new by reference is
deprecated in /usr/local/htdocs/yvb/php_tut/ref_obj1.php on line 17

My question is why is the funtion call

error_reporting(E_ALL|E_STRICT);

not enabling E_STRICT at runtime ?

my os is
[EMAIL PROTECTED] etc]# uname -a
Linux bfc11 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686 i686 i386 GNU/Linux

and my webserver is
[EMAIL PROTECTED] etc]# httpd -v
Server version: Apache/2.0.52
Server built:   Oct  8 2004 02:13:40

Appreciate any help on fixing the above problem.

Thanks.

Yashesh Bhatia.

--- End Message ---

Reply via email to