Re: [PHP] PHP Header issue

2009-09-18 Thread Angus Mann
Your code does not make sense (to me anyway).

It flags an error because you are sending HTML before the header command. Don't 
bother looking for whitespace etc...the  etc is more than 
enough to produce this error.

Using "Location" redirects to another URL. It does not make sense to redirect 
in the middle of a page.

I think instead of header, you meant to use "include" or "require" (same thing.)

Is your intention to "include" the file "advertise2.php" in the body section? 
If so, get rid of the header line, and use this :


Good luck with it!

 
  - Original Message - 
  From: Ernie Kemp 
  To: php-general@lists.php.net 
  Sent: Saturday, September 19, 2009 2:39 AM
  Subject: [PHP] PHP Header issue


   
   

   

  Contact Us 

   

   

  

   

  

  The above is just snippet of the code but even this simple example throws the 
Header Warning / Error.

   

  Warning: Cannot modify header information - headers already sent by (output 
started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
in/home/content/g/t/a /html/yourestate/advertise.php on line 6

   

  The anwser may be simple but I have looked a blanks or spaces around the 
 with no success.

  Ready need your help.

   

  Thanks,

  Ernie Kemp   

  Phone: 416 577 5565

  Email:   ek...@digitalbiz4u.com

   

  ...man will occasionally stumble over the truth, but usually manages to pick 
himself up, walk over or around it, and carry on.

  Winston S. Churchill 

   

   

   

   


Re: [PHP] Does anyone here use TCPDF?

2009-09-18 Thread Paul M Foster
On Sat, Sep 19, 2009 at 02:58:52AM +0900, Dave M G wrote:

> PHP List,
> 
> 
> I posted this question on the TCPDF forum on SourceForge, but it's
> getting no response. I'm not even sure how active their list is.
> http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/3400663
> 
> So I'm hoping someone here might be able to help if they are using
> TCPDF. I just need to get the key details to get started, and then I can
> probably start to roll on my own.
> 
> This is the question:
> 
> 
> Forgive me for what I would assume is a very obvious question, but I can
> not locate any clear instructions on what I want to do.
> 
> Simply, I want to take an existing PDF and write text on top of it.
> 
> The PDF is a single page, and it is a form that people fill out. What I
> need to do is fill out some of the fields in the form before sending it
> to the recipient.
> 
> So I need to do two simple tasks. One is to load an existing PDF file.
> The second is to place short lines of text into specific locations on
> the page (A4 size).
> 
> I know these two functions must be dead simple, and yet I am lost in the
> documentation.
> 
> If someone could tell me the right function calls or point me to the
> right place so that I can RTFM on my own, I would be very grateful.
> 
> Thank you for any advice.

I don't use TCPDF; I use FPDF, but I imagine the drill is about the
same. When I have to do what you're doing, I first write the code (using
the FPDF API/methods) to build the form fresh. I test this to ensure
everything is where it needs to be. Then I add code to that form which
fills in whatever fields need filling in. Then I output that.

What you're asking sounds like you want to *edit* an existing PDF via a
PHP class, and I don't know of a tool that does this except for Adobe
Acrobat and a few other non-PHP tools. It's something that's very
difficult to get right.

Therefore, I'd suggest instead using your existing TCPDF methods to
actually *build* the PDF from scratch, with additional method calls to
put in your content. That is, build and populate each time you need the
form.

Paul

-- 
Paul M. Foster

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



Re: [PHP] PHP Header issue

2009-09-18 Thread Ben Dunlap
> I will look into getting from one page to the next page after a Submit

If it's any help, I've got a light-weight contact-form code on github,
that's meant to be dropped into an otherwise-static site with minimal
fuss: http://github.com/bdunlap/Drop-in-Widgets/tree/master/contactform/

It uses a 3-page process: show form, process post, show thank you.
Feel free to read/criticize/modify/reuse. I hope I haven't reinvented
the wheel with it, but when I looked for a "wheel" first, I couldn't
find one.

Ben

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



Re: [PHP] Configure PHP 5.2.8 on AIX 5.3 With LDAP

2009-09-18 Thread Ben Dunlap
Sounds like you have 64-bit LDAP libraries installed on your system.
Do you also have 32-bit libraries installed, but PHP is ignoring them?

The --with-ldap configure option tells PHP where to look for ldap.h
and libldap.a -- but not directly. Here's the relevant bit from
php-src/trunk/ext/ldap/config.m4:

  if test -f $1/include/ldap.h; then
LDAP_DIR=$1
LDAP_INCDIR=$1/include
LDAP_LIBDIR=$1/$PHP_LIBDIR

So if you say "--with-ldap=/opt/freeware", the configure script is
going to look for /opt/freeware/include/ldap.h. If that file exists,
it uses "/opt/freeware" to set LDAP_INCDIR and LDAP_LIBDIR, which
leads to these two arguments on your gcc command line:

-I/opt/freeware/include -> gives gcc another path to find .h files
-L/opt/freeware/lib -> gives gcc another path to find .a files

If the configure script doesn't find /include/ldap.h, it fails
immediately -- which explains your second two errors.

As for the first error, either there isn't an
/opt/freeware/lib/libldap.a on your system, or if there is, the 64-bit
library that's symlinked in /usr/lib is taking precedence, because gcc
ALSO has the argument "-L/usr/lib", and that one shows up on the
command line before "-L/opt/freeware/lib":

> configure:53825: gcc -o conftest -I/usr/include -g -O2
> -I/opt/freeware/include -L/usr/lib  -L/opt/freeware/lib -L/o
> pt/freeware/lib conftest.c -lldap -llber -liconv -lm   1>&5

Ben

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



RE: [PHP] PHP Header issue

2009-09-18 Thread Ernie Kemp
Thanks everyone.

I was getting away with put the "header" anywhere I wished because the " 
output_buffering" was set to "On" in the php.ini file.
I have commented this out and now I get the Warning/Error on my local system.


I will look into getting from one page to the next page after a Submit
Thanks,
/Ernie
+++==

-Original Message-
From: Ernie Kemp [mailto:ernie.k...@sympatico.ca] 
Sent: September-18-09 2:27 PM
To: 'HallMarc Websites'; 'Jim Lucas'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue

The fundamental idea was to fill in a contact forum , submit it and then go to 
an upload page. 

I need to go from one page to another page.

Please point in the correct direction on this.

Thanks,
/Ernie
+++
-Original Message-
From: HallMarc Websites [mailto:m...@hallmarcwebsites.com] 
Sent: September-18-09 2:00 PM
To: 'Jim Lucas'; 'Ernie Kemp'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue



> -Original Message-
> From: Jim Lucas [mailto:li...@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
> 
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> Contact Us
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces around
> the
> >>  with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email:   ek...@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
> 
> Just to point out to everybody, you can actually do this.  And most of
> you
> probably already know how.
> 
> You can use output buffering.  :)
> 
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
> 
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution.  But it does work.
> 
> Jim
 


I thought of that too and I ran a test on my server just to make sure - guess 
what? it doesn't work either and I am assuming that is because I have it turned 
off in my php.ini I prefer not to use the ob because I do a lot of development 
on my server and don't want to wonder if a PHP error got lost in the buffer 
because the PHP error handling nixed the script before the error was sent to 
the screen.

The question I have is do you need this redirect to sit where it is? It would 
be so much easier to just write this page correctly.


Thank you,
Marc Hall
HallMarc Websites
610.446.3346
 

__ Information from ESET Smart Security, version of virus signature 
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 



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



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



Re: [PHP] PHP Header issue

2009-09-18 Thread Ben Dunlap
> The fundamental idea was to fill in a contact forum , submit it and then go 
> to an upload page.

By "upload", do you mean  "transmit the information that the user
entered into the contact form"? Or is the upload page supposed to do
something separate from the contact form?

Ben

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



RE: [PHP] PHP Header issue

2009-09-18 Thread HallMarc Websites
> -Original Message-
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Friday, September 18, 2009 2:31 PM
> To: Ernie Kemp
> Cc: 'HallMarc Websites'; 'Jim Lucas'; php-general@lists.php.net
> Subject: RE: [PHP] PHP Header issue
> 
> On Fri, 2009-09-18 at 14:26 -0400, Ernie Kemp wrote:
> 
> > The fundamental idea was to fill in a contact forum , submit it and
> then go to an upload page.
> >
> > I need to go from one page to another page.
> >
> > Please point in the correct direction on this.
> >
> > Thanks,
> > /Ernie
> > +++
> > -Original Message-
> > From: HallMarc Websites [mailto:m...@hallmarcwebsites.com]
> > Sent: September-18-09 2:00 PM
> > To: 'Jim Lucas'; 'Ernie Kemp'
> > Cc: php-general@lists.php.net
> > Subject: RE: [PHP] PHP Header issue
> >
> >
> >
> > > -Original Message-
> > > From: Jim Lucas [mailto:li...@cmsws.com]
> > > Sent: Friday, September 18, 2009 1:33 PM
> > > To: Ernie Kemp
> > > Cc: php-general@lists.php.net
> > > Subject: Re: [PHP] PHP Header issue
> > >
> > > Jim Lucas wrote:
> > > > Ernie Kemp wrote:
> > > >>
> > > >>
> > > >> 
> > > >>
> > > >> 
> > > >>
> > > >> Contact Us
> > > >>
> > > >> 
> > > >>
> > > >> 
> > > >>
> > > >> 
> > > >>
> > > >> 
> > > >>
> > > >> 
> > > >>
> > > >> The above is just snippet of the code but even this simple
> example
> > > throws
> > > >> the Header Warning / Error.
> > > >>
> > > >> Warning: Cannot modify header information - headers already sent
> by
> > > (output
> > > >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> > > >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> > > >>
> > > >
> > > > http://us2.php.net/manual/en/function.header.php
> > > >
> > > > From the manual page:
> > > >
> > > > Quote:
> > > > "Remember that header() must be called before any actual output
> is
> > > sent, either
> > > > by normal HTML tags, blank lines in a file, or from PHP. It is a
> very
> > > common
> > > > error to read code with include(), or require(), functions, or
> > > another file
> > > > access function, and have spaces or empty lines that are output
> > > before header()
> > > > is called. The same problem exists when using a single PHP/HTML
> > > file."
> > > >
> > > >> The anwser may be simple but I have looked a blanks or spaces
> around
> > > the
> > > >>  with no success.
> > > >>
> > > >> Ready need your help.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Ernie Kemp
> > > >>
> > > >> Phone: 416 577 5565
> > > >>
> > > >> Email:   ek...@digitalbiz4u.com
> > > >>
> > > >> ...man will occasionally stumble over the truth, but usually
> manages
> > > to pick
> > > >> himself up, walk over or around it, and carry on.
> > > >>
> > > >
> > > > Isn't that the truth!
> > > >
> > > >> Winston S. Churchill
> > > >
> > > >
> > > >
> > >
> > > Just to point out to everybody, you can actually do this.  And most
> of
> > > you
> > > probably already know how.
> > >
> > > You can use output buffering.  :)
> > >
> > > if you use ob_start() anywhere in your code before this statement,
> or
> > > you have
> > > output_buffering option enabled in the php configuration.
> > >
> > > Now, with that said, using output buffering to "fix" this "problem"
> is
> > > the wrong
> > > solution.  But it does work.
> > >
> > > Jim
> >
> >
> >
> > I thought of that too and I ran a test on my server just to make sure
> - guess what? it doesn't work either and I am assuming that is because
> I have it turned off in my php.ini I prefer not to use the ob because I
> do a lot of development on my server and don't want to wonder if a PHP
> error got lost in the buffer because the PHP error handling nixed the
> script before the error was sent to the screen.
> >
> > The question I have is do you need this redirect to sit where it is?
> It would be so much easier to just write this page correctly.
> >
> >
> > Thank you,
> > Marc Hall
> > HallMarc Websites
> > 610.446.3346
> >
> >
> > __ Information from ESET Smart Security, version of virus
> signature database 4438 (20090918) __
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
> >
> 
> Well, set the action of the form to the upload script. Then, in your
> upload script, check to see that all the fields are as required, and
> either upload the file from the form, or send them back to the form.
> 
> I'd tend to have all the logic on the same PHP file, just for neatness.
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 

You should be validating/cleansing the form input as a matter of SOP anyway.

*opens a fresh can of worms*
 

__ Information from ESET Smart Security, version of virus signature
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 


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



RE: [PHP] PHP Header issue

2009-09-18 Thread Ashley Sheridan
On Fri, 2009-09-18 at 14:26 -0400, Ernie Kemp wrote:

> The fundamental idea was to fill in a contact forum , submit it and then go 
> to an upload page. 
> 
> I need to go from one page to another page.
> 
> Please point in the correct direction on this.
> 
> Thanks,
> /Ernie
> +++
> -Original Message-
> From: HallMarc Websites [mailto:m...@hallmarcwebsites.com] 
> Sent: September-18-09 2:00 PM
> To: 'Jim Lucas'; 'Ernie Kemp'
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] PHP Header issue
> 
> 
> 
> > -Original Message-
> > From: Jim Lucas [mailto:li...@cmsws.com]
> > Sent: Friday, September 18, 2009 1:33 PM
> > To: Ernie Kemp
> > Cc: php-general@lists.php.net
> > Subject: Re: [PHP] PHP Header issue
> > 
> > Jim Lucas wrote:
> > > Ernie Kemp wrote:
> > >>
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> Contact Us
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> The above is just snippet of the code but even this simple example
> > throws
> > >> the Header Warning / Error.
> > >>
> > >> Warning: Cannot modify header information - headers already sent by
> > (output
> > >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> > >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> > >>
> > >
> > > http://us2.php.net/manual/en/function.header.php
> > >
> > > From the manual page:
> > >
> > > Quote:
> > > "Remember that header() must be called before any actual output is
> > sent, either
> > > by normal HTML tags, blank lines in a file, or from PHP. It is a very
> > common
> > > error to read code with include(), or require(), functions, or
> > another file
> > > access function, and have spaces or empty lines that are output
> > before header()
> > > is called. The same problem exists when using a single PHP/HTML
> > file."
> > >
> > >> The anwser may be simple but I have looked a blanks or spaces around
> > the
> > >>  with no success.
> > >>
> > >> Ready need your help.
> > >>
> > >> Thanks,
> > >>
> > >> Ernie Kemp
> > >>
> > >> Phone: 416 577 5565
> > >>
> > >> Email:   ek...@digitalbiz4u.com
> > >>
> > >> ...man will occasionally stumble over the truth, but usually manages
> > to pick
> > >> himself up, walk over or around it, and carry on.
> > >>
> > >
> > > Isn't that the truth!
> > >
> > >> Winston S. Churchill
> > >
> > >
> > >
> > 
> > Just to point out to everybody, you can actually do this.  And most of
> > you
> > probably already know how.
> > 
> > You can use output buffering.  :)
> > 
> > if you use ob_start() anywhere in your code before this statement, or
> > you have
> > output_buffering option enabled in the php configuration.
> > 
> > Now, with that said, using output buffering to "fix" this "problem" is
> > the wrong
> > solution.  But it does work.
> > 
> > Jim
>  
> 
> 
> I thought of that too and I ran a test on my server just to make sure - guess 
> what? it doesn't work either and I am assuming that is because I have it 
> turned off in my php.ini I prefer not to use the ob because I do a lot of 
> development on my server and don't want to wonder if a PHP error got lost in 
> the buffer because the PHP error handling nixed the script before the error 
> was sent to the screen.
> 
> The question I have is do you need this redirect to sit where it is? It would 
> be so much easier to just write this page correctly.
> 
> 
> Thank you,
> Marc Hall
> HallMarc Websites
> 610.446.3346
>  
> 
> __ Information from ESET Smart Security, version of virus signature 
> database 4438 (20090918) __
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
>  
> 
> 
> 

Well, set the action of the form to the upload script. Then, in your
upload script, check to see that all the fields are as required, and
either upload the file from the form, or send them back to the form.

I'd tend to have all the logic on the same PHP file, just for neatness.

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] A little slow lately???

2009-09-18 Thread Jay Blanchard
[snip]
If anybody is interested, give it a call

(541) 323-9089
[/snip]

That is awesome! Happy weekend everybody! 

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



RE: [PHP] PHP Header issue

2009-09-18 Thread Ernie Kemp
The fundamental idea was to fill in a contact forum , submit it and then go to 
an upload page. 

I need to go from one page to another page.

Please point in the correct direction on this.

Thanks,
/Ernie
+++
-Original Message-
From: HallMarc Websites [mailto:m...@hallmarcwebsites.com] 
Sent: September-18-09 2:00 PM
To: 'Jim Lucas'; 'Ernie Kemp'
Cc: php-general@lists.php.net
Subject: RE: [PHP] PHP Header issue



> -Original Message-
> From: Jim Lucas [mailto:li...@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
> 
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> Contact Us
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces around
> the
> >>  with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email:   ek...@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
> 
> Just to point out to everybody, you can actually do this.  And most of
> you
> probably already know how.
> 
> You can use output buffering.  :)
> 
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
> 
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution.  But it does work.
> 
> Jim
 


I thought of that too and I ran a test on my server just to make sure - guess 
what? it doesn't work either and I am assuming that is because I have it turned 
off in my php.ini I prefer not to use the ob because I do a lot of development 
on my server and don't want to wonder if a PHP error got lost in the buffer 
because the PHP error handling nixed the script before the error was sent to 
the screen.

The question I have is do you need this redirect to sit where it is? It would 
be so much easier to just write this page correctly.


Thank you,
Marc Hall
HallMarc Websites
610.446.3346
 

__ Information from ESET Smart Security, version of virus signature 
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 



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



RE: [PHP] PHP Header issue

2009-09-18 Thread HallMarc Websites


> -Original Message-
> From: Jim Lucas [mailto:li...@cmsws.com]
> Sent: Friday, September 18, 2009 1:33 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
> 
> Jim Lucas wrote:
> > Ernie Kemp wrote:
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> Contact Us
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> The above is just snippet of the code but even this simple example
> throws
> >> the Header Warning / Error.
> >>
> >> Warning: Cannot modify header information - headers already sent by
> (output
> >> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> >> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >>
> >
> > http://us2.php.net/manual/en/function.header.php
> >
> > From the manual page:
> >
> > Quote:
> > "Remember that header() must be called before any actual output is
> sent, either
> > by normal HTML tags, blank lines in a file, or from PHP. It is a very
> common
> > error to read code with include(), or require(), functions, or
> another file
> > access function, and have spaces or empty lines that are output
> before header()
> > is called. The same problem exists when using a single PHP/HTML
> file."
> >
> >> The anwser may be simple but I have looked a blanks or spaces around
> the
> >>  with no success.
> >>
> >> Ready need your help.
> >>
> >> Thanks,
> >>
> >> Ernie Kemp
> >>
> >> Phone: 416 577 5565
> >>
> >> Email:   ek...@digitalbiz4u.com
> >>
> >> ...man will occasionally stumble over the truth, but usually manages
> to pick
> >> himself up, walk over or around it, and carry on.
> >>
> >
> > Isn't that the truth!
> >
> >> Winston S. Churchill
> >
> >
> >
> 
> Just to point out to everybody, you can actually do this.  And most of
> you
> probably already know how.
> 
> You can use output buffering.  :)
> 
> if you use ob_start() anywhere in your code before this statement, or
> you have
> output_buffering option enabled in the php configuration.
> 
> Now, with that said, using output buffering to "fix" this "problem" is
> the wrong
> solution.  But it does work.
> 
> Jim
 


I thought of that too and I ran a test on my server just to make sure - guess 
what? it doesn't work either and I am assuming that is because I have it turned 
off in my php.ini I prefer not to use the ob because I do a lot of development 
on my server and don't want to wonder if a PHP error got lost in the buffer 
because the PHP error handling nixed the script before the error was sent to 
the screen.

The question I have is do you need this redirect to sit where it is? It would 
be so much easier to just write this page correctly.


Thank you,
Marc Hall
HallMarc Websites
610.446.3346
 

__ Information from ESET Smart Security, version of virus signature 
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 


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



[PHP] Does anyone here use TCPDF?

2009-09-18 Thread Dave M G
PHP List,


I posted this question on the TCPDF forum on SourceForge, but it's
getting no response. I'm not even sure how active their list is.
http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/3400663

So I'm hoping someone here might be able to help if they are using
TCPDF. I just need to get the key details to get started, and then I can
probably start to roll on my own.

This is the question:


Forgive me for what I would assume is a very obvious question, but I can
not locate any clear instructions on what I want to do.

Simply, I want to take an existing PDF and write text on top of it.

The PDF is a single page, and it is a form that people fill out. What I
need to do is fill out some of the fields in the form before sending it
to the recipient.

So I need to do two simple tasks. One is to load an existing PDF file.
The second is to place short lines of text into specific locations on
the page (A4 size).

I know these two functions must be dead simple, and yet I am lost in the
documentation.

If someone could tell me the right function calls or point me to the
right place so that I can RTFM on my own, I would be very grateful.

Thank you for any advice.

-- 
Dave M G



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



RE: [PHP] PHP Header issue

2009-09-18 Thread Ernie Kemp
I think you may have something there Ben.

This code is in my php.ini file. This was 'on' by default.

; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit.  You can enable output buffering during runtime by calling the output
; buffering functions.  You can also enable output buffering for all files
by
; setting this directive to On.  If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On',
as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = On

I will comment it out and try on my local system again.

Thanks,
/Ernie

+++=

-Original Message-
From: Ben Dunlap [mailto:bdun...@agentintellect.com] 
Sent: September-18-09 1:41 PM
To: Jim Lucas
Cc: Ernie Kemp; php-general@lists.php.net
Subject: Re: [PHP] PHP Header issue

> if ... you have
> output_buffering option enabled in the php configuration.

Which is probably the case on the OP's local machine, and would
explain why the code doesn't fail for him there.

Ben


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



[PHP] Configure PHP 5.2.8 on AIX 5.3 With LDAP

2009-09-18 Thread Ginny Jaworski
I am having problems configuring PHP 5.2.8 with ldap on a AIX 5.3 ldap 
server.  I have also downloaded openldap to try to configure PHP.   LDAP 
is installed in /opt/IBM/ldap/V6.0 and openldap in /opt/freeware. 
PATH=/opt/freeware/bin:/usr/local/apache/build/libtool:/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin:/usr/java14/jre/bin:/usr/java14/bin
 
 
Configure statement is:  ./configure 
--with-apxs2=/usr/local/apache/bin/apxs --without-pear 
--with-ldap=/opt/freeware --disable-xmlwriter  --disable-simplexml 
--disable-libxml --disable-xml --disable-dom --enable-cli 

Configure Error: 
  configure:53825: gcc -o conftest -I/usr/include -g -O2 
-I/opt/freeware/include -L/usr/lib  -L/opt/freeware/lib -L/o
pt/freeware/lib conftest.c -lldap -llber -liconv -lm   1>&5
ld: 0711-736 ERROR: Input file /usr/lib/libldap.a:
XCOFF64 object files are not allowed in 32-bit mode. 

/usr/lib/libldap.a is a symbolic link to the ldap libraries 
/opt/IBM/ldap/V6.0/lib64/libidsldap.a.   Why is it looking in /usr/lib 
when I specified --with-ldap=/opt/freeware . 

If I change configure to:  ./configure 
--with-apxs2=/usr/local/apache/bin/apxs --without-pear 
--with-ldap=/opt/freeware/lib32 --disable-xmlwriter  --disable-simplexml 
--disable-libxml --disable-xml --disable-dom --enable-cli 

Configure Error:
  configure: error: Cannot find ldap.h

Tried this configure with same error: Cannot find ldap.h 
INCLUDE=/opt/freeware/include ./configure 
--with-apxs2=/usr/local/apache/bin/apxs --without-pear 
--with-ldap=/opt/freeware/lib32 --disable-xmlwriter --disable-xmlreader 
--disable-simplexml --disable-libxml --disable-xml --disable-dom 
--enable-cli


 ldap.h exists in : 

/opt/freeware/include/ldap.h
/opt/freeware/lib64/ldap.h
/opt/freeware/ldap.h
/opt/IBM/ldap/V6.0/include/ldap.h
/opt/IBM/ldap/V6.0/lib64/ldap.h
/usr/include/ldap.h
/usr/ldap/include/ldap.h

Where do I point --with-ldap to?   Thanks so much for your help. 

Re: [PHP] PHP Header issue

2009-09-18 Thread Ben Dunlap
> if ... you have
> output_buffering option enabled in the php configuration.

Which is probably the case on the OP's local machine, and would
explain why the code doesn't fail for him there.

Ben

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



Re: [PHP] PHP Header issue

2009-09-18 Thread Jim Lucas
Jim Lucas wrote:
> Ernie Kemp wrote:
>>  
>>
>>  
>>
>>  
>>
>> Contact Us 
>>
>>  
>>
>>  
>>
>> 
>>
>>  
>>
>> 
>>
>> The above is just snippet of the code but even this simple example throws
>> the Header Warning / Error.
>>
>> Warning: Cannot modify header information - headers already sent by (output
>> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
>> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>>
> 
> http://us2.php.net/manual/en/function.header.php
> 
> From the manual page:
> 
> Quote:
> "Remember that header() must be called before any actual output is sent, 
> either
> by normal HTML tags, blank lines in a file, or from PHP. It is a very common
> error to read code with include(), or require(), functions, or another file
> access function, and have spaces or empty lines that are output before 
> header()
> is called. The same problem exists when using a single PHP/HTML file."
> 
>> The anwser may be simple but I have looked a blanks or spaces around the
>>  with no success.
>>
>> Ready need your help.
>>
>> Thanks,
>>
>> Ernie Kemp   
>>
>> Phone: 416 577 5565
>>
>> Email:   ek...@digitalbiz4u.com
>>
>> ...man will occasionally stumble over the truth, but usually manages to pick
>> himself up, walk over or around it, and carry on.
>>  
> 
> Isn't that the truth!
> 
>> Winston S. Churchill 
> 
> 
> 

Just to point out to everybody, you can actually do this.  And most of you
probably already know how.

You can use output buffering.  :)

if you use ob_start() anywhere in your code before this statement, or you have
output_buffering option enabled in the php configuration.

Now, with that said, using output buffering to "fix" this "problem" is the wrong
solution.  But it does work.

Jim


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



Re: [PHP] A little slow lately???

2009-09-18 Thread Jim Lucas
HallMarc Websites wrote:
> yay for the infinite monkeys! 

We have a monkey line here at the office.

We created it just as a gage line to transfer the techs to just to goof around.
 Well, we have found that it works really well for those "annoying sales calls"!

If anybody is interested, give it a call

(541) 323-9089

I just had a client ask if I have 3-5 years
> experience developing websites in Linux. 
> 

Man, that "Linux development" is so difficult sometimes... :)

>  
> 
> I agree with Jim - I hope you all have a great weekend!
> 
>  
> 
>  
> 
> Thank you,
> 
> Marc Hall
> 
> HallMarc Websites
> 
> 610.446.3346
> 
> 



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



RE: [PHP] Re: PHP Header issue

2009-09-18 Thread Andrea Giammarchi


> I think this sort of issue arises particularly because of the
> misconception that PHP is embedded inside HTML pages. Once a person has
> that idea in their head, they will start to work with an HTML template
> and add PHP as necessary. While that can work, in cases such as this,
> it's best to remember that HTML (and XML or other languages, etc) is
> inserted into PHP scripts.

I think PHP embedded is not a good idea in any case, the output should be the 
last thing ever to manage/perform, and not vice-versa: PHP in the middle of an 
output stream.

This simply means more speed, less implicit or explicit echo/parsing/flow 
interruptions, more control, and more flexibility, since last part ever of the 
required page could decide at the end to produce an html page, an XML, 
eventually transformed via XSL (or transformed via client later), a JSON 
response, a PDF, an csv ... etc etc ... php embedded is the reason php is so 
popular but the reason there are a lot of bad applications as well - not 
because of its embeddable nature, simply 'casue being simple often means being 
used by lots of wannabe programmers sometimes not even interested about 
learning it more than they already know.

I always says PHP is easy to use, but extremely hard to use properly.

The learning curve is often stuck miles before 100/100 ... and I do not 
absolutely consider myself a 100/100 PHP dev ... actually, I do not know 
anybody that "cool", maybe because at some point people switch into another 
language a la Python, C#, or Java ...

Just my opinion,
Regards

_
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

RE: [PHP] PHP Header issue

2009-09-18 Thread Ashley Sheridan
On Fri, 2009-09-18 at 13:12 -0400, Ernie Kemp wrote:
> Thanks for your reply Andrew.
> I think you can add the "Header" in your body.
> 
> The code working on my local system.
> 
> Thanks,
> .../Ernie
> 
> -Original Message-
> From: Andrew Ballard [mailto:aball...@gmail.com] 
> Sent: September-18-09 12:44 PM
> To: Ernie Kemp
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] PHP Header issue
> 
> On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp  wrote:
> >
> > 
> >
> > 
> >
> > Contact Us
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > The above is just snippet of the code but even this simple example throws 
> > the Header Warning / Error.
> >
> >
> >
> > Warning: Cannot modify header information - headers already sent by (output 
> > started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
> > in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> >
> >
> >
> > The anwser may be simple but I have looked at blanks or spaces around the 
> >  with no success.
> >
> > Ready need your help.
> >
> >
> >
> > Thanks,
> >
> > Ernie Kemp
> >
> > Phone: 416 577 5565
> >
> > Email:   ek...@digitalbiz4u.com
> 
> It's all that HTML above and before  ?>
> 
> You can't send ANY content to the client before sending headers.
> 
> Andrew
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

You really can't add the header() where you have it. It must come before
*any* output sent to the browser. This includes any single character,
either if it's part of a tag, a word or even a single space or line
break.

Thanks,
Ash
http://www.ashleysheridan.co.uk




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



RE: [PHP] PHP Header issue

2009-09-18 Thread HallMarc Websites
I'm bewildered, bemused, astonished 
and am trying really hard not to lash out


Thank you,
Marc Hall
HallMarc Websites
610.446.3346 

 

__ Information from ESET Smart Security, version of virus signature 
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 


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



RE: [PHP] Re: PHP Header issue

2009-09-18 Thread Bob McConnell
From: Ashley Sheridan
> On Fri, 2009-09-18 at 19:01 +0200, Ralph Deffke wrote:
>> sorry man, but no blancs etc. means NOTHING should be send before the
header
>> 
>> it should look like this:
>> > 
>> header("Location: advertise2.php"); 
>> 
>> ?>
>> 
>> here u can do ur html
>> 
>> 
>> 
>> not one! single char incl. space should be outputted before the
> header e.g. before the php open tag.
>> 
> 
> I think this sort of issue arises particularly because of the
> misconception that PHP is embedded inside HTML pages. Once a person
has
> that idea in their head, they will start to work with an HTML template
> and add PHP as necessary. While that can work, in cases such as this,
> it's best to remember that HTML (and XML or other languages, etc) is
> inserted into PHP scripts.

After using Perl to generate HTML, that is exactly what it looks like. I
always believed that was the way PHP was designed, so the PHP scripts
are embedded inside the HTML. It is a much more logical construct than
trying to use Perl, or C or ...

Bob McConnell

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



RE: [PHP] A little slow lately???

2009-09-18 Thread HallMarc Websites
yay for the infinite monkeys! I just had a client ask if I have 3-5 years
experience developing websites in Linux. 

 

I agree with Jim - I hope you all have a great weekend!

 

 

Thank you,

Marc Hall

HallMarc Websites

610.446.3346



RE: [PHP] PHP Header issue

2009-09-18 Thread Ernie Kemp
Thanks for your reply Andrew.
I think you can add the "Header" in your body.

The code working on my local system.

Thanks,
.../Ernie

-Original Message-
From: Andrew Ballard [mailto:aball...@gmail.com] 
Sent: September-18-09 12:44 PM
To: Ernie Kemp
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Header issue

On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp  wrote:
>
> 
>
> 
>
> Contact Us
>
> 
>
> 
>
> 
>
> 
>
> 
>
> The above is just snippet of the code but even this simple example throws the 
> Header Warning / Error.
>
>
>
> Warning: Cannot modify header information - headers already sent by (output 
> started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>
>
>
> The anwser may be simple but I have looked at blanks or spaces around the 
>  with no success.
>
> Ready need your help.
>
>
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email:   ek...@digitalbiz4u.com

It's all that HTML above and before 

You can't send ANY content to the client before sending headers.

Andrew

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



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



RE: [PHP] A little slow lately???

2009-09-18 Thread Andrea Giammarchi


> Maybe people really have started to rtfm!
> 
> Ash

well, apparently not everybody, somebody put right now a header call in the 
middle of the page declaring "there're no white space around, I've checked it!"

maybe other realized that a search in the manual takes less time than a mail 
here ... who knows ...

Regards

_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

RE: [PHP] PHP Header issue

2009-09-18 Thread HallMarc Websites
http://us3.php.net/manual/en/function.header.php


Thank you,
Marc Hall
HallMarc Websites
610.446.3346
 

__ Information from ESET Smart Security, version of virus signature 
database 4438 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 


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



Re: [PHP] Re: PHP Header issue

2009-09-18 Thread Ashley Sheridan
On Fri, 2009-09-18 at 19:01 +0200, Ralph Deffke wrote:
> sorry man, but no blancs etc. means NOTHING should be send before the header
> 
> it should look like this:
>  
> header("Location: advertise2.php"); 
> 
> ?>
> 
> here u can do ur html
> 
> 
> 
> not one! single char incl. space should be outputted before the header e.g. 
> before the php open tag.
> 
> 
> 
> ralph_def...@yahoo.de
> 
> 
> 
>   ""Ernie Kemp""  wrote in message 
> news:blu0-smtp35a2b5ec02eb211ecaa8b1f9...@phx.gbl...
>
>
> 
>
> 
>   Contact Us 
> 
>
> 
>
> 
>   
> 
>
> 
>   
> 
>   The above is just snippet of the code but even this simple example throws 
> the Header Warning / Error.
> 
>
> 
>   Warning: Cannot modify header information - headers already sent by (output 
> started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> 
>
> 
>   The anwser may be simple but I have looked a blanks or spaces around the 
>  with no success.
> 
>   Ready need your help.
> 
>
> 
>   Thanks,
> 
>   Ernie Kemp   
> 
>   Phone: 416 577 5565
> 
>   Email:   ek...@digitalbiz4u.com
> 
>
> 
>   ...man will occasionally stumble over the truth, but usually manages to 
> pick himself up, walk over or around it, and carry on.
>   
> Winston S. Churchill 
> 
>
> 
I think this sort of issue arises particularly because of the
misconception that PHP is embedded inside HTML pages. Once a person has
that idea in their head, they will start to work with an HTML template
and add PHP as necessary. While that can work, in cases such as this,
it's best to remember that HTML (and XML or other languages, etc) is
inserted into PHP scripts.

Thanks,
Ash
http://www.ashleysheridan.co.uk




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



Re: [PHP] PHP Header issue

2009-09-18 Thread Jim Lucas
Ernie Kemp wrote:
>  
> 
>  
> 
>  
> 
> Contact Us 
> 
>  
> 
>  
> 
> 
> 
>  
> 
> 
> 
> The above is just snippet of the code but even this simple example throws
> the Header Warning / Error.
> 
> Warning: Cannot modify header information - headers already sent by (output
> started at /home/content/g/t/a /html/yourestate/advertise.php:6)
> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> 

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

>From the manual page:

Quote:
"Remember that header() must be called before any actual output is sent, either
by normal HTML tags, blank lines in a file, or from PHP. It is a very common
error to read code with include(), or require(), functions, or another file
access function, and have spaces or empty lines that are output before header()
is called. The same problem exists when using a single PHP/HTML file."

> The anwser may be simple but I have looked a blanks or spaces around the
>  with no success.
> 
> Ready need your help.
> 
> Thanks,
> 
> Ernie Kemp   
> 
> Phone: 416 577 5565
> 
> Email:   ek...@digitalbiz4u.com
> 
> ...man will occasionally stumble over the truth, but usually manages to pick
> himself up, walk over or around it, and carry on.
>  

Isn't that the truth!

> Winston S. Churchill 



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



[PHP] Re: PHP Header issue

2009-09-18 Thread Ralph Deffke
sorry man, but no blancs etc. means NOTHING should be send before the header

it should look like this:


here u can do ur html



not one! single char incl. space should be outputted before the header e.g. 
before the php open tag.



ralph_def...@yahoo.de



  ""Ernie Kemp""  wrote in message 
news:blu0-smtp35a2b5ec02eb211ecaa8b1f9...@phx.gbl...
   
   

   

  Contact Us 

   

   

  

   

  

  The above is just snippet of the code but even this simple example throws the 
Header Warning / Error.

   

  Warning: Cannot modify header information - headers already sent by (output 
started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
in/home/content/g/t/a /html/yourestate/advertise.php on line 6

   

  The anwser may be simple but I have looked a blanks or spaces around the 
 with no success.

  Ready need your help.

   

  Thanks,

  Ernie Kemp   

  Phone: 416 577 5565

  Email:   ek...@digitalbiz4u.com

   

  ...man will occasionally stumble over the truth, but usually manages to pick 
himself up, walk over or around it, and carry on.

  Winston S. Churchill 

   

   

   

   


Re: [PHP] A little slow lately???

2009-09-18 Thread Jim Lucas
Ashley Sheridan wrote:
> On Fri, 2009-09-18 at 12:49 -0400, HallMarc Websites wrote:
> 
>> Slower than I was used to.. I wonder if it is because the economy is still
>> sucking..
>>
>>  
>>
>> __ Information from ESET Smart Security, version of virus signature
>> database 4437 (20090918) __
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>  
>>
>>
> 
> 
> Maybe people really have started to rtfm!
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 

That is what I am hoping.

Or, they have been reading the archives and are afraid they will start the next
holy war that will get twisted 6 ways to Sunday before they give up on trying to
get an answer.  And after 4 people have decided to --> | /dev/null each others
replies.

Let me say it first to everybody,  To all, have a wonderful weekend!

Jim Lucas


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



RE: [PHP] A little slow lately???

2009-09-18 Thread Ashley Sheridan
On Fri, 2009-09-18 at 12:49 -0400, HallMarc Websites wrote:

> Slower than I was used to.. I wonder if it is because the economy is still
> sucking..
> 
>  
> 
> __ Information from ESET Smart Security, version of virus signature
> database 4437 (20090918) __
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
>  
> 
> 


Maybe people really have started to rtfm!

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] A little slow lately???

2009-09-18 Thread HallMarc Websites
Slower than I was used to.. I wonder if it is because the economy is still
sucking..

 

__ Information from ESET Smart Security, version of virus signature
database 4437 (20090918) __

The message was checked by ESET Smart Security.

http://www.eset.com
 


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



Re: [PHP] PHP Header issue

2009-09-18 Thread Andrew Ballard
On Fri, Sep 18, 2009 at 12:39 PM, Ernie Kemp  wrote:
>
> 
>
> 
>
> Contact Us
>
> 
>
> 
>
> 
>
> 
>
> 
>
> The above is just snippet of the code but even this simple example throws the 
> Header Warning / Error.
>
>
>
> Warning: Cannot modify header information - headers already sent by (output 
> started at /home/content/g/t/a /html/yourestate/advertise.php:6) 
> in/home/content/g/t/a /html/yourestate/advertise.php on line 6
>
>
>
> The anwser may be simple but I have looked a blanks or spaces around the 
>  with no success.
>
> Ready need your help.
>
>
>
> Thanks,
>
> Ernie Kemp
>
> Phone: 416 577 5565
>
> Email:   ek...@digitalbiz4u.com

It's all that HTML above and before 

You can't send ANY content to the client before sending headers.

Andrew

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



[PHP] PHP Header issue

2009-09-18 Thread Ernie Kemp
 

 

 

Contact Us 

 

 



 



The above is just snippet of the code but even this simple example throws
the Header Warning / Error.

 

Warning: Cannot modify header information - headers already sent by (output
started at /home/content/g/t/a /html/yourestate/advertise.php:6)
in/home/content/g/t/a /html/yourestate/advertise.php on line 6

 

The anwser may be simple but I have looked a blanks or spaces around the
 with no success.

Ready need your help.

 

Thanks,

Ernie Kemp   

Phone: 416 577 5565

Email:   ek...@digitalbiz4u.com

 

...man will occasionally stumble over the truth, but usually manages to pick
himself up, walk over or around it, and carry on.
 
Winston S. Churchill 

 

 

 

 



[PHP] A little slow lately???

2009-09-18 Thread Jim Lucas
Has this ML been a little slow lately, or is it just me?

And, is that good or bad?

Jim Lucas


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



RE: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Andrea Giammarchi


> You can not pass this myPHPvar javascript var as an input in a form. if you
> want to change its value and maintein it, must to use an static var, and
> only can access to this values via javascript functions where an event is
> invoked  (in case you want to read or write values)

with all due respect, there is absolutely nothing you can do better or 
differently with an hidden input.
I can send and manage a JS var the same way you do via input, except I do not 
need to search a node, get it, and put it back every time I need to modify that 
var.

Remote scripting, JSONP, Ajax are ways to do it since ages.

Persistence, if we are talking about refer the variable rather than recreate 
it, is something not possible with or without the input, 'cause as PHP 
serialize/unserialize session vars, in JS you can save the var in JSON format 
and recreate it for each page reload, unless you do not use ajax, but in that 
case we are talking about synchronization between a client/server mirrored 
variable status.

If you use Ajax for the entire client session, you need to update the varialbe 
status only once on page unload and that's it.

If you want to change a user status step by step you use localStorage, Gears, 
or other technologies, unless you do jnot want to overload the server with 
useless requests performed for each operation over the variable.

Regards

_
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

Re: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Jonathan Vivero
And of course, sorry for my english!!! I correct!!


Imagine you have an assoc. array that you encode with json and save into the
> js var. Ok.
>
> This way is perfect. But you can do less with this values than using my
> solution. Important: Each case is different, and may be studied in
> particular.
>
> You can not send by request this myPHPvar javascript var as an input in a
> form. if you want to change its value and maintain it, must to use an static
> var, and only can access to this value via javascript functions when an
> event is invoked  (in case you want to read or write values)
>
> And I repeat: My solution is not the best, of course, but in many cases
> (for me), data maintainance in hidden inputs, and using DOM to access it,
> allow an easiest dinamic treatment of data without reloading a web page.
> Even more if you are using jQwey or Prototype.
>
>
>
> 2009/9/18 Andrea Giammarchi 
>
>  Actually, it's even more simple ... forgive me:
>>
>> echo 'var
>> myPHPvar='.json_encode($myPHPvar).';';
>>
>> that's pretty much it
>>
>> > From: an_...@hotmail.com
>> > To: jonathan.desarro...@gmail.com; mail2gautambha...@gmail.com
>> > CC: saeed@gmail.com; php-general@lists.php.net
>> > Date: Fri, 18 Sep 2009 13:01:28 +0200
>> > Subject: RE: [PHP] how i assign a js variable to a php variable
>> >
>> >
>> >
>> > > basicly is use hidden inputs as a container for php variables, and
>> transform
>> > > through js.
>> >
>> > really? I though the other way round was extremely simple:
>> >
>> > echo 'var
>> myPHPvar=eval("('.addslashes(json_encode($myPHPvar)).')");';
>> >
>> > why would you use hidden input, plus DOM to get data, etc, etc?
>> >
>> > _
>> > Show them the way! Add maps and directions to your party invites.
>> > http://www.microsoft.com/windows/windowslive/products/events.aspx
>>
>> --
>> With Windows Live, you can organize, edit, and share your 
>> photos.
>>
>
>


Re: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Jonathan Vivero
imagine you have an assoc. array that you encode with json and save in the
js var. Ok.

This way is perfect. But you can do less with this values than using my
solution. Important: Each case is different, and may be studied in
particular.

You can not pass this myPHPvar javascript var as an input in a form. if you
want to change its value and maintein it, must to use an static var, and
only can access to this values via javascript functions where an event is
invoked  (in case you want to read or write values)

And I repeat: My solution is not the best, of course, but in many cases (for
my), mantaninance of data in hidden input and using DOM for accessing it,
allow an easiest dinamic treatment of data without reload a web page. Even
more if using jQwey or Prototype.



2009/9/18 Andrea Giammarchi 

>  Actually, it's even more simple ... forgive me:
>
> echo 'var
> myPHPvar='.json_encode($myPHPvar).';';
>
> that's pretty much it
>
> > From: an_...@hotmail.com
> > To: jonathan.desarro...@gmail.com; mail2gautambha...@gmail.com
> > CC: saeed@gmail.com; php-general@lists.php.net
> > Date: Fri, 18 Sep 2009 13:01:28 +0200
> > Subject: RE: [PHP] how i assign a js variable to a php variable
> >
> >
> >
> > > basicly is use hidden inputs as a container for php variables, and
> transform
> > > through js.
> >
> > really? I though the other way round was extremely simple:
> >
> > echo 'var
> myPHPvar=eval("('.addslashes(json_encode($myPHPvar)).')");';
> >
> > why would you use hidden input, plus DOM to get data, etc, etc?
> >
> > _
> > Show them the way! Add maps and directions to your party invites.
> > http://www.microsoft.com/windows/windowslive/products/events.aspx
>
> --
> With Windows Live, you can organize, edit, and share your 
> photos.
>


RE: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Andrea Giammarchi

Actually, it's even more simple ... forgive me:

echo 'var 
myPHPvar='.json_encode($myPHPvar).';';

that's pretty much it

> From: an_...@hotmail.com
> To: jonathan.desarro...@gmail.com; mail2gautambha...@gmail.com
> CC: saeed@gmail.com; php-general@lists.php.net
> Date: Fri, 18 Sep 2009 13:01:28 +0200
> Subject: RE: [PHP] how i assign a js variable to a php variable
> 
> 
> 
> > basicly is use hidden inputs as a container for php variables, and transform
> > through js.
> 
> really? I though the other way round was extremely simple:
> 
> echo 'var 
> myPHPvar=eval("('.addslashes(json_encode($myPHPvar)).')");';
> 
> why would you use hidden input, plus DOM to get data, etc, etc?
> 
> _
> Show them the way! Add maps and directions to your party invites. 
> http://www.microsoft.com/windows/windowslive/products/events.aspx

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx

RE: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Andrea Giammarchi


> basicly is use hidden inputs as a container for php variables, and transform
> through js.

really? I though the other way round was extremely simple:

echo 'var 
myPHPvar=eval("('.addslashes(json_encode($myPHPvar)).')");';

why would you use hidden input, plus DOM to get data, etc, etc?

_
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/products/events.aspx

Re: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Jonathan Vivero
Or you can also do this way:

on loading
";
[...]
echo "


functino recalculateValue(){

var myText = document.getElementById("myphpvar");
var myValue = myText.value;
/*
operations with myText
*/

myText.value = myRecalcValue;

}



once changed, you choose how to proceed, maybe executing any other js
funcion that use new value of/for the input, maybe submit the form an take
it from the request in the next page (in the server side, this time).

basicly is use hidden inputs as a container for php variables, and transform
through js.

2009/9/18 Gautam Bhatia 

> hello,
>
> You can also try using AJAX technology to communicate with the server
> side code that is your php :).
>
> Regards,
> Gautam Bhatia
> Punjab,India
> mail2gautambha...@gmail.com
>
>
> On Fri, 2009-09-18 at 02:16 +0700, saeed ahmed wrote:
> > hello guys,
> >
> > i'm new here in this list. guys i need a help. i can't assign a js
> variable
> > value to a php variable. how can i do this?
> >
> >
> > --
> > Regards,
> > Saeed Ahmed
> > Rajshahi, Bangladesh
> > Blog: http://saeed05.wordpress.com
> > --
> > Follow Me Linkedin
> > Twitter
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] how i assign a js variable to a php variable

2009-09-18 Thread Gautam Bhatia
hello,
 
You can also try using AJAX technology to communicate with the server
side code that is your php :).

Regards,
Gautam Bhatia
Punjab,India
mail2gautambha...@gmail.com


On Fri, 2009-09-18 at 02:16 +0700, saeed ahmed wrote:
> hello guys,
> 
> i'm new here in this list. guys i need a help. i can't assign a js variable
> value to a php variable. how can i do this?
> 
> 
> --
> Regards,
> Saeed Ahmed
> Rajshahi, Bangladesh
> Blog: http://saeed05.wordpress.com
> --
> Follow Me Linkedin
> Twitter


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