Re: [PHP] foreach fails on unitialized array?

2002-08-29 Thread Eric Pignot
I would expect foreach to treat an unitialized variable as an empty array and hence do nothing. Is this the expected behaviour? if(is_array($myvar)) foreach($myvar as $key = $value ) { ... } other possibility, so that the foreach is run each time (and it doesn't affect the source code, you

[PHP] Re: tmpnam filename

2002-08-29 Thread Eric Pignot
Why do you use tmpfile and not tempnam, as you write it in the header of your message ? it returns the name of the file, as you expect... string tempnam ( string dir, string prefix) Then, you'll just need to open the file returned by tempnam and write all data inside... regards Eric Rus

[PHP] Re: Cannot get data from form.

2002-08-29 Thread Eric Pignot
This is really a FAQ, I would suggest that you read a bit more documentation before posting. Eric Le Van Thanh [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] - I have installed PHP4.2.2 with Apache 1.3.26 on Solaris7. And now I have problems with getting data from form. I

Re: [PHP] Re: Doing system things with PHP

2002-08-26 Thread Eric Pignot
kill -HUP `cat /var/run/httpd.pid` If you execute this as nobody, I believe it will work, but I haven't tested it. nope, it won't, as you need to be the owner to send a signal to a process. regards. Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Eric Pignot
the method explained by Stas is the most common method used on all boards. But if you need a more precise method, that will also require more ressources from you server, what you can do is have a specific DB table called msg_read taking 2 parameters : msg_id, user_id. - Each time a user reads a

Re: [PHP] check unread messages in a forum

2002-08-26 Thread Eric Pignot
the method explained by Stas is the most common method used on all boards. But if you need a more precise method, that will also require more ressources from you server, what you can do is have a specific DB table called msg_read taking 2 parameters : msg_id, user_id. - Each time a user reads a

[PHP] Re: Output Compression output buffering..

2002-08-26 Thread Eric Pignot
Hi Gerard, I never had any problem using output buffering... Do you correctly dump the buffer when an error occurs ? I suppose you have built your own error() function, a bit like this one : exit_on_error($msg){ ob_end_clean(); echo $msg; exit(); } can you tell us a bit more

[PHP] Re: Can someone - anyone see my error?

2002-08-25 Thread Eric Pignot
form enctype=multipart/form-data action=postbit.php method=post input type=hidden name=5400 value=1000 Send this file: input name=userfile type=file input type=submit value=Send File /form I am not really replying to your question, but just as a remark, in php, a variable needs to start

[PHP] Re: Doing system things with PHP

2002-08-25 Thread Eric Pignot
Hi ! there is no way to apply a config file to apache without restarting the webserver the only way I know (which really does not mean that it is the only one !), is to use the command apachctl or httpd. But those command need to be launched as root, I think (try to login as root, then to a