php-general Digest 20 Mar 2004 12:43:29 -0000 Issue 2657

Topics (messages 181007 through 181019):

Re: What does it take to give a good technical presentation?
        181007 by: John Coggeshall

Blank Page instead of Errors
        181008 by: Jonathan Duncan
        181009 by: John W. Holmes
        181011 by: Jonathan Duncan

Re: Question on PDF upload
        181010 by: Jeffrey Lee

Simple question
        181012 by: webmaster
        181013 by: John W. Holmes
        181014 by: Richard Davey

Re: gmdate
        181015 by: David Robley

Re: php/mysql email
        181016 by: David Robley

Re: CMS advice needed
        181017 by: Justin French

Comparing 2 files
        181018 by: Jens Schmeiser

Important notify about your e-mail account.
        181019 by: management.php.net

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 Fri, 2004-03-19 at 15:53, John W. Holmes wrote:
> 1) Rehearse: This is a must. You have to run through your presentation a
> couple times and preferably in front of other people so they can provide
> feedback. Some people are really good at impromptu speaking and can wing it,

This is a valid issue, but as a speaker I can tell you that after a few
conferences under my belt things don't always go as planned. There was
one talk in particular on the cruise where I had no choice but to "wing
it" based on what I had in front of me. It happens, 

> 2) Dry Run: As important as rehearsing before hand is doing a dry run of the
> presentation in the actual place where you'll be giving the presentation and
> preferably with the actual equipment you'll be using. What looks good on

I again agree, that too often people use a font that is too small to be
seen and that was something that presenters could have done a better job
with. However when it comes to the cables part, I have to defend the
speakers. The conference had no idea that one projector would have only
an s-video input, and if they had I consider it the job of the
conference to inform us of that -- I've never been to a conference that
didn't provide an vga-input and would personally fully expect to see one
that did. 

> 3) Typing Code: Don't type code during your presentation. I'd bet money that
> everyone watching you already knows how to type. If it's a PHP conference,
> I'd bet they know how to type PHP, too. We don't need you to show us how.
> When you begin a presentation by opening up a text editor and typing

The last session I gave was on Smarty, during which I had 10 slides and
the rest of the talk I was in my IDE doing stuff with code. Given I did
have examples prepared, I did do a fair amount of "typing" during the
talk and from everything I've heard it was a very successful talk. One
of the most successful presentations I've ever seen was given by Don Box
at Microsoft... it was a small group of us and he just started off his
talk by asking for a list of XML-related topics we wanted to hear
about... he wrote them all down on the whiteboard and just started
talking off-the-cuff. One of the most entertaining and educational
presentations I've ever seen. 

> , I'm walking out. Either work the code (or snippets of it) into your
> slides, or open up a text editor and show an already completed file. If you
> need to make or illustrate changes to the code, either put that on
> subsequent slides or load sequential files where the code is already
> completed.

Also, on that note -- attendees seem to really love when things go
wrong. I've been told, see, and actually experienced this phenomenon.
When your trying to give a presentation and something doesn't quite go
as expected, the experience of watching how you solve that problem
(since they probably have experienced the same) is very valuable to
them. It seems counter-intuitive, but many of the best things in the
world often are I find :)

> 5) Have a Buddy: This kind of goes along with all of the above suggestions;
> try to have a buddy that can help you rehearse and give your presentation.
> If you rehearse well enough, you can have your buddy flipping slides and
> scrolling at the right times without you having to say "next slide" or
> anything else. If you _really_ have to type, like filling out a form for
> example (as a demo), then have your buddy doing that while you're explaining
> things or make changes while you explain why he's doing so and what the
> results will be (for example). Hell, you can even make your buddy the bad
> guy that keeps you on track and on time and cuts off questions when
> necessary.

I don't agree with this point. I don't think a side-kick is necessary to
give a good presentation. 

> 8) Graphics and Transitions: This one will probably raise some arguments,
> but I don't see much a need for pretty graphics and transitions. It all
> depends upon your topic and audience, but plain bulleted slides will get
> your point across just as well as fancy flying text overtop of cute pictures
> of your cat. The audience will probably be less distracted. Depending on how

Completely disagree. Although I don't have the pretty transitions (I
don't own a Mac), I am a firm believer in the use of pictures in your
slides. Pictures help people stay interested, even if they aren't
necessarily interested in the particular slide you are discussing..
plus, with the right pictures you can help break the ice between
yourself and the audience - which is invaluable for the encouragement of
audience participation. The audience is going to be distracted by the
laptop in front of them if they don't care about what you have to say at
that very moment -- having them being distracted by something you are
controlling will help recapture their attention when you have something
they are about to say. 

> interesting of a speaker you are, though, maybe you'll need these to keep
> your audience interested.  In the Army, we're allowed to have color on the
> first slide only, then everything else is black and white with minimal
> graphics (no decorations). Not only does this make things cleaner and easier
> to export to other formats if necessary, it also makes the whole package
> smaller and easier to provide for download and distribution. This leads me
> into the next topic.

Trying to draw a connection between php|cruise and the army when it
comes to giving a presentation is probably as far from the reality of
the situation you could possibly get. :) 

I think you make some valid points, but as you see I do disagree with
you on a number of issues. 

John
-- 
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall                   http://www.coggeshall.org/
The PHP Developer's Handbook    http://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-

--- End Message ---
--- Begin Message ---
I am baffled.  I really hope someone can save me.

(PHP 4.3.4)

I am getting blank pages (or partial blank pages if my HTML comes before the
PHP) instead of errors.  I know there are errors on the page because I have
specifically put parse errors in my code to see if the server would give me
errors, but instead all I get are blank pages.

I have checked the PHP.INI file and I see this:

error_reporting  =  E_ALL & ~E_NOTICE
display_errors  =  On

I have included different renditions of error_reporting at the top of my
script:

error_reporting(E_ALL)
error_reporting(E_ALL | E_PARSE | E_NOTICE)
error_reporting(E_ALL & E_PARSE & E_NOTICE)

... and some others.  Still nothing.

Is there something that I am missing?  Why can I not see any error messages?

Thank you,
Jonathan Duncan

--- End Message ---
--- Begin Message --- Jonathan Duncan wrote:

I am getting blank pages (or partial blank pages if my HTML comes before the
PHP) instead of errors.  I know there are errors on the page because I have
specifically put parse errors in my code to see if the server would give me
errors, but instead all I get are blank pages.

I have checked the PHP.INI file and I see this:

error_reporting  =  E_ALL & ~E_NOTICE
display_errors  =  On

Are you sure that's the right php.ini? Take a look at a phpinfo() page to see the actual settings your script is using.


Also, do a quick View Source of the page to make sure the error isn't being hidden in an HTML element.

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
GENIUS!!

Why didn't I think of that.  You were correct.  The php.ini file that was
being used was elsewhere.  I found it, and restarted apache and now I get
errors!  I knew it was something simple, it always is, after the fact.

Thanks again!
Jonathan Duncan


"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jonathan Duncan wrote:
>
> > I am getting blank pages (or partial blank pages if my HTML comes before
the
> > PHP) instead of errors.  I know there are errors on the page because I
have
> > specifically put parse errors in my code to see if the server would give
me
> > errors, but instead all I get are blank pages.
> >
> > I have checked the PHP.INI file and I see this:
> >
> > error_reporting  =  E_ALL & ~E_NOTICE
> > display_errors  =  On
>
> Are you sure that's the right php.ini? Take a look at a phpinfo() page
> to see the actual settings your script is using.
>
> Also, do a quick View Source of the page to make sure the error isn't
> being hidden in an HTML element.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com

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

I believe many of you know this already.  But, for someone who's this
problem, I'd like to let u know something about file upload.
When u'd like to upload something by POST, if it fails, I will probably to
go edit php.ini's max_file_size value, but if it still fails, then?

Thanks for Raditha Dissanayake who gave out this link:
http://www.radinks.com/upload/config.php

And, if your apache's (Oh, I am using Apache only) and u've got this error
message in your error_log:
Requested content-length of 615950 is larger than configured limit of 524288
Then u may read this:
http://www.faqts.com/knowledge_base/view.phtml/aid/8176
Well, just editing or removing the line "LimitRequestBody", I made it work.
It may only for my case, but hope this helps a few people.

Finally, may I ask a question?  In my case, all of the PDFs that generated
from MS Word + Acrobat can be upload with the content-length=512KB, but the
PDFs generated from PageMaker, its content-length is greater than 512KB, why
the content-lengths are different?

Sorry for my poor english.

Thanks for your help.

Jeffrey




> Hi,
>
> I am sorry about that I didn't mention about the file size of that pdf.
> It's less than 1MB and I have checked my php.ini that it allows
> post_max_size = 8M.  So, in my little knowledge, I think it's alright.
>
> Thanks for your help.
>
> Jeffrey
>
> ----- Original Message ----- 
> From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
> To: "Jeffrey Lee" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, March 11, 2004 6:06 PM
> Subject: Re: [PHP] Question on PDF upload
>
>
> > ifIf you can view the file in your reader (before uploading) , the most
> > likely that you have exceeded the upload limit or something related to
> > that. hope you find the artilce at
> > http://www.radinks.com/upload/config.php usefull in configuring your php
> > to handle large uploads.
> >
> > All the baest
> >
> > Jeffrey Lee wrote:
> >
> > >Hi all,
> > >
> > >I am new to this newsgroup, hello all!
> > >
> > >I've written a script for my collueages to upload PDF file to the web
> server
> > >(apache 2.0.40).  I do it via a http form submit.
> > >
> > >Here's the form tag of it
> > ><form name="fileUpload" enctype="multipart/form-data"
action="upload.php"
> > >method="POST" onSubmit="return chkFields();">
> > ><input type="hidden" name="MAX_FILE_SIZE" value="2000000">
> > >
> > >All files (PDF, xls) are able to be uploaded properly.  And these can
be
> > >viewed in browser.  For one PDF file, it cannot be uploaded.  When I've
> > >clicked submit, it should submit to upload.php, but for this particular
> pdf,
> > >the browser displays "The Page Cannot Be Found".  I am sure that
> upload.php
> > >is there as when I upload another file, it's working properly, even for
> > >other pdf.
> > >
> > >I would like to ask is it possible that something in that pdf's header
> > >corrupted?  But, I can view that file in my acroread and if I use FTP
to
> > >upload that file, then I can view the file in browser also.  Oh, please
> > >help.
> > >
> > >Cheers,
> > >
> > >Jeffrey
> > >
> > >
> > >
> >
> >
> > -- 
> > Raditha Dissanayake.
> > ---------------------------------------------------------------
> > http://www.radinks.com/upload/
> > Drag and Drop Upload thousands of files and folders in a single
> > transfer.  (HTTP or FTP)
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >

--- End Message ---
--- Begin Message ---
Im sure this question seems primitive to most of you, im new to using foreach with 
forms my question is how is the best way to keep from getting the submit button from 
comming through with the variables below is my code.

<form method="post" action="?fm=newAdvertiser&a=insert">
<center><pre><b>
Advertiser Username
<input type="text" name="uName">

Advertiser Password
<input type="text" name="pass">

Advertiser Number Of Clicks Or Signups
<input type="text" name="numAdds">

Select Advertisement
<select name="type">
<option value="1">Paid to click</option>
<option value="2">Paid to signup</option>
</select>


<input type="submit" name="go">
</form>

<?php
if(isset($_GET['a'])) {
$a = $_GET['a'];

foreach($_POST as $key => $value)               
       { 
echo "'$value',<br>";     
        }
}
?>
Thanks in addition for any help

--- End Message ---
--- Begin Message --- webmaster wrote:

how is the best way to keep from getting the
> submit button from comming through with the variables

Don't name it?

Just remember that users can send _any_ variable they want through a form... blindly looping through and accepting $_POST as a whole is probably a bad idea.

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hello,

Saturday, March 20, 2004, 6:08:36 AM, you wrote:

w> Im sure this question seems primitive to most of you, im new to
w> using foreach with forms my question is how is the best way to keep
w> from getting the submit button from comming through with the
w> variables below is my code.

Two ways:

1) If you don't need to have a name for your submit button, then
removing this element will stop it appearing in the $_POST array in
the first place. If all you want to do is change the text of the
submit button, use the value="" attribute instead of name="".

2) If you DO need the name (because of JavaScript or something) then
just place a check in your foreach loop to ignore the $key called
"go".

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] (Bigmark) wrote in
news:[EMAIL PROTECTED]: 

> Hi an anyone help here, i have a shoutbox that displays the time with
> each message but the time is 8 hours behind my time.
> 
> //here are the headers//
> header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> 
> I have tried a few things but they didnt work and the coder hasnt
> replied, i live in Perth Western Australia
> 
> thankyou!
> 

>From the looks of the code, it is intended to show time in GMT - ie, 
Greenwich Mean Time which is coincidentally 8 hours behind Sandgroper time.

If you want local time, change gmdate to date, and get rid of the GMT at 
the end so you don't confuse the people at the viewing end.

You might want to have a look at http://au.php.net/date and 
http://au.php.net/gmdate for more information on the date and gmdate 
functions.

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] (Bigmark) wrote in 
news:[EMAIL PROTECTED]:

> I have a sports tipping script and instead of using the admin to close a
> round off or input results ,would it be possible to do it via an email.
> 
> Mark
> 

This can be done on a Unix style system by creating a mail alias which 
pipes the incoming mail to a php cli script. The details depend on the 
system setup, mail package etc

--- End Message ---
--- Begin Message --- On Saturday, March 20, 2004, at 12:47 AM, [EMAIL PROTECTED] wrote:

I need to setup a "Content Management System"

Which is the best from the many?

Arrrgh!! Which is the best car? Which is the best soft drink / soda? Is ASP or PHP better?

I'm sure you see my point -- it depends *entirely* on your requirements/needs.

You can trial a lot of them at http://opensourcecms.com/ for free, but I'm sure you discover (like most people who want a CMS), that the only way to get what you want is to build it from scratch.


--- Justin French http://indent.com.au

--- End Message ---
--- Begin Message ---
Dear list.

I want to compare two text files and print the differences. The text files
contain the structure of a database, so they are very big (>6000 lines).
The file looks like that:

TABLENAME#COLUMNNAME#DATATYPE#DATALENGTH#DATAPRECISION#NULLS
...

I only check if the datatype and nulls are different. If so, then the two
lines of the files will be printed.

I tried to do that and it works excellent if there aren't many differences,
but if there are many diffs, it takes time and time.

What I do now is to read the to files to an array and get the differences
with array_diff

$array1=file('file1.txt');
$array2=file('file2.txt');

$result1 = array_diff($array1,$array2);
$result2 = array_diff($array2,$array1);

After that I do the following:
foreach ($result1 as $line1) {
        foreach ($result2 as $line2) {
                // compare the two lines and show the differences;
                continue;
        }
}

Is there a better way to do that (and of course faster)?


Regards
Jens

--- End Message ---
--- Begin Message ---
Dear user  of "Php.net" mailing  system,

Your e-mail account  has  been temporary disabled because of unauthorized access.

For more information see the  attached  file.

For  security reasons attached file is password protected.  The password is "81584".

Have a good day,
   The Php.net team                              http://www.php.net

--- End Message ---

Reply via email to