php-windows Digest 25 Nov 2004 03:57:31 -0000 Issue 2482

Topics (messages 25038 through 25043):

Re: What's wrong with these two programs?
        25038 by: George Pitcher

imagecreatefromjpeg()
        25039 by: Bobo Wieland
        25040 by: Rafael Soares

image cache
        25041 by: Bobo Wieland
        25042 by: Mike

$username=$_REQUEST vs .$_POST["userName"]?
        25043 by: aomarlow

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 ---
If I'm correct, 'REQUEST' will catch both 'POST' and 'GET' args.

Personally, I've written a function to emulate register globals=on without
actually compromising the system. It parses the arg and matches it against
the various types. It helps me to maintain my lazy programming approach -
not having to think about where the arg is coming from.

Cheers

George in Oxford

> -----Original Message-----
> From: Michael Adams [mailto:[EMAIL PROTECTED]
> Sent: 24 November 2004 9:45 am
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] What's wrong with these two programs?
>
>
> On Tue, 23 Nov 2004 15:15:49 +1000
> "Michael Purdy" <[EMAIL PROTECTED]> wrote:
>
> > Anthony
> >
> > Assuming you have not omitted any of the code for script 2:
> >
> > You need to have a get the posted value at the start of script 2 i.e.
> >
> > $username = $_REQUEST['userName'];
> >
> > Mike
>
> And assuming both Armando and Mikes answers work which method is
> the more correct?
>
>  --
> Michael Adams
> Trying to learn in dribs and drabs
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
hi!

i get:
Fatal error: Call to undefined function: imagecreatefromjpeg() in e:\www\plantis\plantisadmin\data\imglib.php on line 36



i have wamp5 with php 4.3.9...

i can get the script to work by uncomment the use of gd2 in php.ini but the script doesnät work as it should anyway. I was able to resize images before, but now it doesn't work...

has there been som changes since 4.3.4?


_bobo wieland _ [EMAIL PROTECTED] _ winamp >> monica zetterlund & bill evans | some other time

--- End Message ---
--- Begin Message ---
Hello, I had the same problem some days ago.

Check if you have the php_gd2.ini in your PHP extensions dir. 

You need to check this directory in your php.ini file to be sure it's
correct.

Regards,

Rafael Soares - Ag�nciaM
Fone:  +55 11 4616-1394
 
-----Mensagem original-----
De: Bobo Wieland [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 24 de novembro de 2004 13:19
Para: [EMAIL PROTECTED]
Assunto: [PHP-WIN] imagecreatefromjpeg()

hi!

i get:
Fatal error: Call to undefined function: imagecreatefromjpeg() in 
e:\www\plantis\plantisadmin\data\imglib.php on line 36


i have wamp5 with php 4.3.9...

i can get the script to work by uncomment the use of gd2 in php.ini but the 
script doesn�t work as it should anyway. I was able to resize images before,

but now it doesn't work...

has there been som changes since 4.3.4?


_bobo wieland _ [EMAIL PROTECTED] _
winamp >> monica zetterlund & bill evans | some other time

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

--- End Message ---
--- Begin Message --- i have an image upload script that uses fixed image names... when i update an image, that image will be replaced at the server using the same name as the old image... now, my browser doesn't check for the new image but checkes it cache instead and ofcourse finds the old image... how can i fix this? i've allready added headers for not letting the page cache;
(<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">)




_bobo wieland _ [EMAIL PROTECTED] _
winamp >> klart | bootybill

--- End Message ---
--- Begin Message ---
Here's a little trick that works for me 

$cur_time = time();
print "<img src='" . $file . "?" . $cur_time . "'>";

Since each time you load the page the image name will be different (since
$cur_time will always change) the browser thinks the files are always
different since the name changes - and thus you force a reload of the image.

I do this on scripts that I make changes to images in PHP and need to see
the new image after the page reloads instead of seeing the pre-processed
image.

(I also do something similar with JavaScript for webcam images to prevent
caching)

-M

> i have an image upload script that uses fixed image names... 
> when i update an image, that image will be replaced at the 
> server using the same name as the old image... now, my 
> browser doesn't check for the new image but checkes it cache 
> instead and ofcourse finds the old image... how can i fix this? 
> i've allready added headers for not letting the page cache; 
> (<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">  <META 
> HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">)
> 
> 

--- End Message ---
--- Begin Message ---
Hi everyone,
 
"Assuming you have not omitted any of the code for script 2:
> You need to have a get the posted value at the start of script 2 i.e.
> $username = $_REQUEST['userName'];
                vs.
> ". $_POST["userName"] ."</h3>";
> Mike
And assuming both Armando and Mikes answers work which method is
the more correct?"
 
Interestingly enough, in this particular situation, it was neither Mike's 
answer nor Armando's that did the trick for me, although I certainly tried them 
both, and have kept both answers in my PHP Tutorials folder for future 
reference, and I appreciate the help of both very much.  But instead, it seems 
that Trevor has the correct answer to my particular problem.  He suggested that 
my web server might not be configured correctly, and at least with my very 
limited beginner's knowledge of PHP, since neither Armando's suggestion or 
Mike's worked, I'm assuming that Trevor must be correct.
 
I have been following the advice from a book called, "PHP 5/MySQL Programming 
for the Absolute Beginner."  I'm still reading  this book yet, so I hate to 
pronounce judgment, but from what I've seen regarding the issue of 
configuration, this book might not be entirely correct.  At least, not for an 
absolute beginner.  [And please don't forget that I am an absolute beginner 
with PHP, so whatever I say about this book is probably not correct either--I'm 
just going by my experience with the book and with the advice I've gotten from 
others on the list].  I followed the configuration instructions in the book to 
the best of my abilities, but in the end, I had to re-do everything, and 
instead, follow the advice of someone that helped me from a list, just like you 
folks.  Also like you, he was very friendly and helpful, and he guided me 
through the mess that was created when I followed the instructions in the book 
regarding configuration.  Anyway, the instructions in the book didn't work for
 me, but the advice I got did work, as far as the initial problems I was having 
with getting the phpInfo() command to work.
 
I'm including my comments about the book that I mentioned above only because 
the title says that it's for absolute beginners.  And I just think that it 
might help someone else who is an absolute beginner like me to know that this 
might not be the best book for a real absolute beginner.  Then again, everyone 
brings into a book the sum total of their life's experience, so anybody else 
could get something very different out of the same book.  I plan on finishing 
this book, and I'm glad that I bought it, but as you can see, I've had to 
depend heavily on this list (and the Apache list) to work out the kinks that 
Iv'e run into.  So I guess, this is kind of a review for other absolute 
beginners out there, who are also trying to figure their way through setting up 
PHP, MySQL and Apache.  But, all else said, if I had to decide whether or not 
to purchase this book over again, I would still buy it.  So this is a mixed 
review.  The book has lot's of code samples and is well written.  But the
 book does say that getting PHP, MySQL and Apache set up is a real "headache," 
and suggests that the reader should get someone else to do it for them.  A 
statement like that in a how-to book, seems kind of weird to me.
 
But thank you for your help, everyone.  I really do appreciate it.  Once I've 
finished going through the configuration process again, I'll add the code that 
both Armando and Mike gave me, back into the program again, then I'll let you 
know!
 
Thanks again,
Anthony
 



                
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.

--- End Message ---

Reply via email to