php-general Digest 7 May 2001 07:13:23 -0000 Issue 671

Topics (messages 51650 through 51703):

Really easy question
        51650 by: biscut
        51653 by: Tom Carter
        51663 by: biscut
        51664 by: Jack Dempsey
        51666 by: heinisch.creaction.de
        51667 by: biscut
        51668 by: biscut
        51670 by: Steve Maroney
        51671 by: Chris Mason
        51675 by: biscut
        51690 by: Dan Lowe

Re: Flash/PHP/MySQL
        51651 by: Chris Adams

Re: php4apachi.dll
        51652 by: Chris Adams

newbie setting up searches
        51654 by: Greg Kelly

while($fbuffer=fread($fp,4096)) and xml_parse($xml_parser,$fbuffer,feof($fp))
        51655 by: Dominique Hermsdorff

Re: Passing variables to another page - newbie
        51656 by: Philip Olson
        51678 by: Dean Martin
        51679 by: Jason Murray
        51681 by: Jason Brooke
        51691 by: Dan Lowe

Trim a string
        51657 by: Kyle Mathews
        51659 by: Jack Dempsey
        51661 by: Jason Lotito
        51662 by: Kyle Mathews

Image Upload
        51658 by: Kyle Mathews
        51665 by: Henrik Hansen

Re: quicker query?
        51660 by: Michael Roark
        51669 by: Gyozo Papp

URL redirection
        51672 by: Jamie Saunders
        51673 by: Markus Fischer
        51674 by: Tyler Longren

Re: IIS instead of PWS!!! what else can i do..
        51676 by: MaD dUCK
        51693 by: Thomas Edison Jr.

FILE () STRIPS BLANKS FROM THE ARRAY - HOW CAN I STOP IT
        51677 by: Jay Lepore

PHP based Reminder System
        51680 by: Chris Aitken

Offshore merchant account
        51682 by: Offshore Merchant Centre

Re: Databases and HTML forms
        51683 by: Manuel Lemos

setcookie()
        51684 by: patricktan.mydestiny.net

Your Internet Education!
        51685 by: Noel Hadfield

Re: checking if e-mail address and syntax are valid
        51686 by: Manuel Lemos

Re: Mailing list script ?
        51687 by: Manuel Lemos

Re: PHP, MSSQL7 & Transactions
        51688 by: Manuel Lemos

converting fields from a fixed length text file into an array
        51689 by: Jay Lepore
        51694 by: heinisch.creaction.de
        51696 by: steve

Re: PHP on PWS not working! : WORKING NOW!!
        51692 by: Thomas Edison Jr.

files
        51695 by: php
        51697 by: Zak Greant

Problem trying to get "ftp_get" to work connected to FreeBSD
        51698 by: steve

ldap  problem
        51699 by: Wolfgang Ebneter

PHP 4.0.5 Parse Problems
        51700 by: Ben Gollmer
        51702 by: CC Zona

Decoding .txt attachments
        51701 by: ~~~i LeoNid ~~
        51703 by: Zak Greant

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]


----------------------------------------------------------------------


How can i check to see if PHP has been enabled, I enabled the modules etc
after they were compiled and i have managed to get Apache working properly
again but now even when i do the basic tutorial stuff then I get a blank
page rather than what I am supposed to get, the tutorial page is no help as
all it says is "see your network admin to get PHP enabled" this is only on
my home machine so I guess I am the network admin...kind of anyway...can
someone please help...

thanks very much
biscut





The easiest way is to create a simple page (called say test.php) with the
following

<?php
phpinfo();
?>

This should display a page with all sorts of information about your PHP,
and serves as a good test as to whether or not PHP is working

Good luck!

Tom Carter
Web Architect
roundcorners ltd.

On Sun, 6 May 2001, biscut wrote:

> How can i check to see if PHP has been enabled, I enabled the modules etc
> after they were compiled and i have managed to get Apache working properly
> again but now even when i do the basic tutorial stuff then I get a blank
> page rather than what I am supposed to get, the tutorial page is no help as
> all it says is "see your network admin to get PHP enabled" this is only on
> my home machine so I guess I am the network admin...kind of anyway...can
> someone please help...
>
> thanks very much
> biscut
>
>
>





Thanks very much for your help on this, turns out there wasnt anything
"wrong" with it, I was trying to view the page with Netscape 4.7 on hte
Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
windows machine then everything works fine...I have no idea why this is
happening but at least it works and I am not going completely mad...

Thanks again
biscut


> -----Original Message-----
> From: Tom Carter [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 20:44
> To: biscut
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Really easy question
>
>
> The easiest way is to create a simple page (called say test.php) with the
> following
>
> <?php
> phpinfo();
> ?>
>
> This should display a page with all sorts of information about your PHP,
> and serves as a good test as to whether or not PHP is working
>
> Good luck!
>
> Tom Carter
> Web Architect
> roundcorners ltd.
>
> On Sun, 6 May 2001, biscut wrote:
>
> > How can i check to see if PHP has been enabled, I enabled the
> modules etc
> > after they were compiled and i have managed to get Apache
> working properly
> > again but now even when i do the basic tutorial stuff then I get a blank
> > page rather than what I am supposed to get, the tutorial page
> is no help as
> > all it says is "see your network admin to get PHP enabled" this
> is only on
> > my home machine so I guess I am the network admin...kind of anyway...can
> > someone please help...
> >
> > thanks very much
> > biscut
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





check your html whenver you see blank pages in netscape, but they work in
IE...

-jack

-----Original Message-----
From: biscut [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 5:03 PM
To: Tom Carter
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Really easy question


Thanks very much for your help on this, turns out there wasnt anything
"wrong" with it, I was trying to view the page with Netscape 4.7 on hte
Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
windows machine then everything works fine...I have no idea why this is
happening but at least it works and I am not going completely mad...

Thanks again
biscut


> -----Original Message-----
> From: Tom Carter [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 20:44
> To: biscut
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Really easy question
>
>
> The easiest way is to create a simple page (called say test.php) with the
> following
>
> <?php
> phpinfo();
> ?>
>
> This should display a page with all sorts of information about your PHP,
> and serves as a good test as to whether or not PHP is working
>
> Good luck!
>
> Tom Carter
> Web Architect
> roundcorners ltd.
>
> On Sun, 6 May 2001, biscut wrote:
>
> > How can i check to see if PHP has been enabled, I enabled the
> modules etc
> > after they were compiled and i have managed to get Apache
> working properly
> > again but now even when i do the basic tutorial stuff then I get a blank
> > page rather than what I am supposed to get, the tutorial page
> is no help as
> > all it says is "see your network admin to get PHP enabled" this
> is only on
> > my home machine so I guess I am the network admin...kind of anyway...can
> > someone please help...
> >
> > thanks very much
> > biscut
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






At 06.05.01  22:03, you wrote:
>
>Thanks very much for your help on this, turns out there wasnt anything
>"wrong" with it, I was trying to view the page with Netscape 4.7 on hte
>Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
>windows machine then everything works fine...I have no idea why this is
>happening but at least it works and I am not going completely mad...
>
>Thanks again
>biscut
Hi biscut,
you are wise if you use NS to view your pages, because if you make a mistake
NS will show it, mostly nothing.
Look at the source (right mouse button) sometimes the wrong oart of code
will be shown blinking.
Otherwise check your code for missing endtags like </td></tr></table>.
These guys at MS couldn´t program a correct html - engine in their
Office packages, therfor they made their IE a little tolerant ;-)
Best is to check the code with tidy (http://www.w3c.com or something like this)
You will get all errors shown.
HTH Oliver





I did, even to the extent of copying and pasting the text straight off of
the tutorial into the file that I created using vi.

Very strange
biscut


> -----Original Message-----
> From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 22:10
> To: biscut; Tom Carter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> check your html whenver you see blank pages in netscape, but they work in
> IE...
>
> -jack
>
> -----Original Message-----
> From: biscut [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 5:03 PM
> To: Tom Carter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> Thanks very much for your help on this, turns out there wasnt anything
> "wrong" with it, I was trying to view the page with Netscape 4.7 on hte
> Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
> windows machine then everything works fine...I have no idea why this is
> happening but at least it works and I am not going completely mad...
>
> Thanks again
> biscut
>
>
> > -----Original Message-----
> > From: Tom Carter [mailto:[EMAIL PROTECTED]]
> > Sent: 06 May 2001 20:44
> > To: biscut
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Really easy question
> >
> >
> > The easiest way is to create a simple page (called say
> test.php) with the
> > following
> >
> > <?php
> > phpinfo();
> > ?>
> >
> > This should display a page with all sorts of information about your PHP,
> > and serves as a good test as to whether or not PHP is working
> >
> > Good luck!
> >
> > Tom Carter
> > Web Architect
> > roundcorners ltd.
> >
> > On Sun, 6 May 2001, biscut wrote:
> >
> > > How can i check to see if PHP has been enabled, I enabled the
> > modules etc
> > > after they were compiled and i have managed to get Apache
> > working properly
> > > again but now even when i do the basic tutorial stuff then I
> get a blank
> > > page rather than what I am supposed to get, the tutorial page
> > is no help as
> > > all it says is "see your network admin to get PHP enabled" this
> > is only on
> > > my home machine so I guess I am the network admin...kind of
> anyway...can
> > > someone please help...
> > >
> > > thanks very much
> > > biscut
> > >
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Believe it or not then the code is right...exactly right (I know you dont
believe it *grin* even the code that Tom kindly wrote in didnt work and I
only had <html> and </html> on either side of what he wrote...I don't
understand why but at least it partially works...better than what I thought
I had

Regards
biscut


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 22:15
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> At 06.05.01  22:03, you wrote:
> >
> >Thanks very much for your help on this, turns out there wasnt anything
> >"wrong" with it, I was trying to view the page with Netscape 4.7 on hte
> >Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
> >windows machine then everything works fine...I have no idea why this is
> >happening but at least it works and I am not going completely mad...
> >
> >Thanks again
> >biscut
> Hi biscut,
> you are wise if you use NS to view your pages, because if you
> make a mistake
> NS will show it, mostly nothing.
> Look at the source (right mouse button) sometimes the wrong oart of code
> will be shown blinking.
> Otherwise check your code for missing endtags like </td></tr></table>.
> These guys at MS couldn´t program a correct html - engine in their
> Office packages, therfor they made their IE a little tolerant ;-)
> Best is to check the code with tidy (http://www.w3c.com or
> something like this)
> You will get all errors shown.
> HTH Oliver
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






create a new php file. If you call the function phpinfo(), you should get
a bunch of useful information. If you're getting an error message
complianing about PHP not being enabled, then check out your configuration
file.

I think there is an line something like enable engine. That might be
turned off, but it should be on by default.

Hope this helps,
Steve Maroney
[EMAIL PROTECTED]




On Sun, 6 May 2001, biscut wrote:

> How can i check to see if PHP has been enabled, I enabled the modules etc
> after they were compiled and i have managed to get Apache working properly
> again but now even when i do the basic tutorial stuff then I get a blank
> page rather than what I am supposed to get, the tutorial page is no help as
> all it says is "see your network admin to get PHP enabled" this is only on
> my home machine so I guess I am the network admin...kind of anyway...can
> someone please help...
>
> thanks very much
> biscut
>
>
>





Check for output compression in output buffering in your php script, I don't
think it always works.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
biscut
Sent: Sunday, May 06, 2001 5:21 PM
To: Jack Dempsey
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Really easy question


I did, even to the extent of copying and pasting the text straight off of
the tutorial into the file that I created using vi.

Very strange
biscut


> -----Original Message-----
> From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 22:10
> To: biscut; Tom Carter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> check your html whenver you see blank pages in netscape, but they work in
> IE...
>
> -jack
>
> -----Original Message-----
> From: biscut [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 5:03 PM
> To: Tom Carter
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> Thanks very much for your help on this, turns out there wasnt anything
> "wrong" with it, I was trying to view the page with Netscape 4.7 on hte
> Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
> windows machine then everything works fine...I have no idea why this is
> happening but at least it works and I am not going completely mad...
>
> Thanks again
> biscut
>
>
> > -----Original Message-----
> > From: Tom Carter [mailto:[EMAIL PROTECTED]]
> > Sent: 06 May 2001 20:44
> > To: biscut
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Really easy question
> >
> >
> > The easiest way is to create a simple page (called say
> test.php) with the
> > following
> >
> > <?php
> > phpinfo();
> > ?>
> >
> > This should display a page with all sorts of information about your PHP,
> > and serves as a good test as to whether or not PHP is working
> >
> > Good luck!
> >
> > Tom Carter
> > Web Architect
> > roundcorners ltd.
> >
> > On Sun, 6 May 2001, biscut wrote:
> >
> > > How can i check to see if PHP has been enabled, I enabled the
> > modules etc
> > > after they were compiled and i have managed to get Apache
> > working properly
> > > again but now even when i do the basic tutorial stuff then I
> get a blank
> > > page rather than what I am supposed to get, the tutorial page
> > is no help as
> > > all it says is "see your network admin to get PHP enabled" this
> > is only on
> > > my home machine so I guess I am the network admin...kind of
> anyway...can
> > > someone please help...
> > >
> > > thanks very much
> > > biscut
> > >
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








I know this is probably going to sound really silly but can you explain that
to me in plain simple english ?? :-) I only started looking at PHP yesterday
*grin*

Thanks for your help
biscut


> -----Original Message-----
> From: Chris Mason [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2001 23:04
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> Check for output compression in output buffering in your php
> script, I don't
> think it always works.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> biscut
> Sent: Sunday, May 06, 2001 5:21 PM
> To: Jack Dempsey
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Really easy question
>
>
> I did, even to the extent of copying and pasting the text straight off of
> the tutorial into the file that I created using vi.
>
> Very strange
> biscut
>
>
> > -----Original Message-----
> > From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
> > Sent: 06 May 2001 22:10
> > To: biscut; Tom Carter
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Really easy question
> >
> >
> > check your html whenver you see blank pages in netscape, but
> they work in
> > IE...
> >
> > -jack
> >
> > -----Original Message-----
> > From: biscut [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, May 06, 2001 5:03 PM
> > To: Tom Carter
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Really easy question
> >
> >
> > Thanks very much for your help on this, turns out there wasnt anything
> > "wrong" with it, I was trying to view the page with Netscape 4.7 on hte
> > Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
> > windows machine then everything works fine...I have no idea why this is
> > happening but at least it works and I am not going completely mad...
> >
> > Thanks again
> > biscut
> >
> >
> > > -----Original Message-----
> > > From: Tom Carter [mailto:[EMAIL PROTECTED]]
> > > Sent: 06 May 2001 20:44
> > > To: biscut
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Really easy question
> > >
> > >
> > > The easiest way is to create a simple page (called say
> > test.php) with the
> > > following
> > >
> > > <?php
> > > phpinfo();
> > > ?>
> > >
> > > This should display a page with all sorts of information
> about your PHP,
> > > and serves as a good test as to whether or not PHP is working
> > >
> > > Good luck!
> > >
> > > Tom Carter
> > > Web Architect
> > > roundcorners ltd.
> > >
> > > On Sun, 6 May 2001, biscut wrote:
> > >
> > > > How can i check to see if PHP has been enabled, I enabled the
> > > modules etc
> > > > after they were compiled and i have managed to get Apache
> > > working properly
> > > > again but now even when i do the basic tutorial stuff then I
> > get a blank
> > > > page rather than what I am supposed to get, the tutorial page
> > > is no help as
> > > > all it says is "see your network admin to get PHP enabled" this
> > > is only on
> > > > my home machine so I guess I am the network admin...kind of
> > anyway...can
> > > > someone please help...
> > > >
> > > > thanks very much
> > > > biscut
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Previously, biscut said:
> Thanks very much for your help on this, turns out there wasnt anything
> "wrong" with it, I was trying to view the page with Netscape 4.7 on hte
> Linux machine and getting blank pages, if I viewed it with IE 5.5 on a
> windows machine then everything works fine...I have no idea why this is
> happening but at least it works and I am not going completely mad...

You probably forgot to close a table with the </TABLE> tag.  IE bends the
rules a bit and allows that to be omitted, Netscape doesn't, and an
unclosed table in Netscape is invisible.

 -dan

-- 
If one synchronized swimmer drowns, do the rest have to drown too?
                                         -George Carlin




On 6 May 2001 10:25:19 -0700, FredrikAT <[EMAIL PROTECTED]> wrote:
> Can Flash import some text from a database (e.g MySQL) and print it on the
> fly?

Yes. It's actually pretty easy - you can tell flash to load a bunch of
variables from a URL. Your URL can return the encoded data (basically a
URL-style Variable=foo&OtherVariable=Bar format - check the Flash docs) and
Flash will create/update those variables to have the values returned. This can
be as easy as creating a text entry box and having a URL return a variable with
the same name - flash will update the contents of the text box automatically.




On 6 May 2001 05:53:54 -0700, Darren <[EMAIL PROTECTED]> wrote:
> Hi. I just installed a fresh copy a windows 95. I installed winsock 2,
> apache 1.3.19 and php4. I followed the instructions with the php
> installation and I booted apache, I got a missing dll error message from
> apache. I got the impression that it wasn't php4apache.dll that was missing
> as it was there and http.conf was pointing to it. I can only assume that
> there is another dll somewhere that is missing. Any ideas?

Try running the CGI version of PHP - you should get a nice error saying what
couldn't be loaded. The most common cause of this is due to extensions - either
it can't find the extension itself or, more commonly, the extension needs to
load another DLL and it can't find that. It may help to simply clear out your
php.ini's extension section and see if the problem goes away.

Chris




I am setting up a dating site and I would like to know the best way to do searchs on 
things like city , state, male , or female, age and so on. Any help would be 
appreciated. On my forms I will have drop down menus..

Thanks 




Hi,

Using PHP 4.0.4pl1 (I did not try with PHP 4.0.5).

While parsing a large file (>100MB) and using the following (simplified)
piece of code:

while(($fbuffer=fread($fp,4096)) && $continue){
    //
    // ...
    //
  if(xml_parse($xml_parser,$fbuffer,feof($fp))){
  } else {
      // report error
  }  
  if(...){
    $continue=false;
  }
}

I discover discrepancies in the final result. Some elements or attributes
were lost and some data was truncated. It (obviously) looked like being a
so-called "random" behavior. I did install some debug code to eventually
arrive at the conclusion that there could be an issue when the limit of the
read buffer ends up right in the middle of a tag or data. I modified the
code as follows:

$unparsed_buffer="";
while(($fbuffer=fread($fp,4096)) && $continue){
    //
    // ...
    //
  $fbuffer=$unparsed_buffer.$fbuffer;
  $last_tag_pos=strrpos($fbuffer,">");
  $unparsed_buffer=substr($fbuffer,$last_tag_pos+1);
  $fbuffer=substr($fbuffer,0,$last_tag_pos+1);
   //
  if(xml_parse($xml_parser,$fbuffer,feof($fp))){
  } else {
      // report error
  }  
  if(...){
    $continue=false;
  }
}

That solved the problems I was having.

My feeling is that when you pass "false" in the "isFinal" 3rd parameter to
xml_parse it means "don't scream if the input ends up right in the middle of
a structure" or other similar XML level object, but you have to pass a
buffer that ends up "correctly" (for instance, not cutting "<element_name>"
into "<eleme" and "nt_name").

Or did I miss a piece of documentation somewhere?

--
Dominique Hermsdorff





index.php?fruit=apple&color=green&lang=php

If register_globals setting in php.ini configurations is 'on' 
then the following should all work :

  echo $fruit;                   // apple
  echo $color;                   // green
  echo $lang;                    // php

  echo $HTTP_GET_VARS['fruit'];  // apple
  echo $HTTP_GET_VARS['color'];  // green
  echo $HTTP_GET_VARS['lang'];   // php

If register_globals setting is off, access them through
HTTP_GET_VARS, as $fruit and $color will NOT exist.  See :

  http://php.net/manual/en/configuration.php#ini.register-globals

Also see :

  http://php.net/manual/en/language.variables.php
  http://php.net/manual/en/language.variables.external.php
  http://php.net/manual/en/language.variables.predefined.php

regards,
philip






Thanks to everyone for the help - unfortunately my problem seems to be the
function I'm using to do the redirecting.  header() is supposed to be the
first item passed.  What I'm trying to do is use a line of code well down
into the logic of my script to redirect the user to another page along with
the necessary variables.

I may need to validate input on one page, have another form inside my code
that is executed after the first form posts, then when they choose payment
type that form can post to the appropriate payment site....  Seems like an
extra step.

Dean

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 1:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Passing variables to another page - newbie


also is you want to add more than one variable in the example given you use
the '&' Sign

ex with one var:

header("Location: http://something.foo.bar.com/page.extension?var1=etc";);

ex with 3 vars:

header("Location:
http://something.foo.bar.com/page.extension?var1=etc&var2=123&var3=abc";);


----- Original Message -----
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Dean Martin" <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 11:01 AM
Subject: RE: [PHP] Passing variables to another page - newbie


> header("Location: http://something.foo.bar.com/page.extension?var1=etc";);
>
> -----Original Message-----
> From: Dean Martin [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 1:50 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Passing variables to another page - newbie
>
>
> I have an order form that is validating input, mailing me the results of
the
> form, then I want to pass the user off to either Paypal or Revecom
> (depending on their choice) for processing.
>
> Everything works except trying to pass the variables to the payment
> processor.  I thought that
>
> header("location://url?var1=value1?var2=value2") would work but not luck.
>
> Could someone point me in the right direction please?
>
> Thanks,
> Dean Martin
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





> Thanks to everyone for the help - unfortunately my problem 
> seems to be the function I'm using to do the redirecting.  header() is 
> supposed to be the first item passed.  What I'm trying to do is use a line
of 
> code well down into the logic of my script to redirect the user to another

> page along with the necessary variables.

Rather than echo or print every line out, append them to an 
output buffer / variable, and echo it at the end of the script.

This lets you do a Header() anywhere you need to do it.

Jason




> Thanks to everyone for the help - unfortunately my problem seems to be the
> function I'm using to do the redirecting.  header() is supposed to be the
> first item passed.  What I'm trying to do is use a line of code well down
> into the logic of my script to redirect the user to another page along with
> the necessary variables.
> 
> I may need to validate input on one page, have another form inside my code
> that is executed after the first form posts, then when they choose payment
> type that form can post to the appropriate payment site....  Seems like an
> extra step.
> 
> Dean

Why would you need to print anything out before redirecting them? 

jason 







Previously, Dean Martin said:
> Thanks to everyone for the help - unfortunately my problem seems to be the
> function I'm using to do the redirecting.  header() is supposed to be the
> first item passed.  What I'm trying to do is use a line of code well down
> into the logic of my script to redirect the user to another page along with
> the necessary variables.

Use output buffering.

    http://www.php.net/manual/en/function.ob-start.php

 -dan

-- 
"Contrariwise", continued Tweedledee, "If it was so, it might be; and if it
were so, it would be; but as it isn't, it ain't. That's logic." -Lewis Carroll




Hello:

I have a signup form that asks for a website address.
I don't need them to put in the http://, but I'm thinking that some will try
anyway.
Is there a way to check for this and remove it when the user submits the
form?

Thanks,
Kyle
[EMAIL PROTECTED]
http://www.thedip.net






if you're string is a variabe $address, then
eregi("http://",$address) will tell you if they've put in the http part, and
$address = substr("$address",7);
will slice off and store the text after the http://

you'll find lots of different ways to do this...whatever suits you, go for
it...

-jack

-----Original Message-----
From: Kyle Mathews [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Trim a string


Hello:

I have a signup form that asks for a website address.
I don't need them to put in the http://, but I'm thinking that some will try
anyway.
Is there a way to check for this and remove it when the user submits the
form?

Thanks,
Kyle
[EMAIL PROTECTED]
http://www.thedip.net



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






> -----Original Message-----
> From: Kyle Mathews [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 4:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Trim a string
> 
> 
> Hello:
> 
> I have a signup form that asks for a website address.
> I don't need them to put in the http://, but I'm thinking that 
> some will try
> anyway.
> Is there a way to check for this and remove it when the user submits the
> form?
> 
> Thanks,
> Kyle
> [EMAIL PROTECTED]
> http://www.thedip.net


str_replace()

$string = "http://www.foo.com";;

$string = str_replace("http://","",$string);

echo $string;

Will echo out:

www.foo.com

For more information:
http://www.php.net/str-replace

Jason Lotito
Webmaster Newbie Network -> http://www.NewbieNetwork.net
EIC PHP Weekly Newsletter -> http://www.newbienetwork.net/ciao.php






Thanks, that worked great.

- Kyle



""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you're string is a variabe $address, then
> eregi("http://",$address) will tell you if they've put in the http part,
and
> $address = substr("$address",7);
> will slice off and store the text after the http://
>
> you'll find lots of different ways to do this...whatever suits you, go for
> it...
>
> -jack
>
> -----Original Message-----
> From: Kyle Mathews [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 4:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Trim a string
>
>
> Hello:
>
> I have a signup form that asks for a website address.
> I don't need them to put in the http://, but I'm thinking that some will
try
> anyway.
> Is there a way to check for this and remove it when the user submits the
> form?
>
> Thanks,
> Kyle
> [EMAIL PROTECTED]
> http://www.thedip.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hello:

I'm looking for some code that will upload images to my server from a form
submission.
I'd also like it to check for a max file size of the images.

Any help would be appreciated.

Thanks,
Kyle
[EMAIL PROTECTED]
http://www.thedip.net







"Kyle Mathews" <[EMAIL PROTECTED]> wrote:

 > Hello:
 > 
 > I'm looking for some code that will upload images to my server from a form
 > submission.
 > I'd also like it to check for a max file size of the images.
 > 

look at the getimagesize() function

-- 
Henrik Hansen





Its a different problem to explain Let me show you part o the contents from
universe.

+---------+--------+--------+------------------------+---------------+------
+--------+--------+
| cluster | galaxy | planet | planet_name            | ruler         | size
| score  | rank   |
+---------+--------+--------+------------------------+---------------+------
+--------+--------+
|       1 |      1 |      1 | Stomp                  | Pomp          |    9
|  46175 |  97055 |
|       1 |      1 |      2 | The Burping World      | Burp          |   28
| 125263 |  42971 |
|       1 |      1 |      3 | xion                   | KLS           |   31
|  97106 |  59469 |
|       1 |      1 |      4 | madlosers              | madloser      |   55
| 104154 |  55094 |
|       1 |      1 |      5 | Troy                   | Lanfeust      |   10
|  25311 | 115558 |
|       1 |      1 |      6 | Infinte Space          | The Watcher   |   52
| 131190 |  39903 |
|       1 |      1 |      7 | Kjempefćl planet       | EkvALiser     |   23
|  83264 |  68716 |
|       1 |      1 |      8 | Edinazu                | Jaypallas     |   30
| 129877 |  40601 |
|       1 |      1 |      9 | Gracen and Gracen inc. | Jim Profit    |   33
|  74665 |  74957 |
|       1 |      1 |     10 | Hades                  | DarkkAngel    |   39
| 109799 |  51718 |
|       1 |      1 |     11 | ziggy                  | zigzac        |   28
|  86054 |  66746 |
|       1 |      1 |     12 | Promt  L- pop          | Kaaleb        |   55
| 156840 |  28239 |
|       1 |      1 |     13 | Wicka                  | Wreck         |   11
|  52938 |  91364 |
|       1 |      1 |     14 | Karak Azhul            | Morglum       |   45
| 155288 |  28907 |
|       1 |      1 |     15 | your fate              | decider       |   44
| 153838 |  29491 |
|       1 |      1 |     16 | Poison                 | BlackWidow    |   10
|  48655 |  94916 |
|       1 |      1 |     17 | Veilside               | Sik Silvia    |   21
|  83891 |  68266 |
|       1 |      1 |     18 | Sontis                 | Bobshi        |   45
| 112186 |  50353 |
|       1 |      1 |     19 | Midkemia               | Milamber      |   40
| 130165 |  40444 |
|       1 |      1 |     20 | Fortezza               | Saratoga      |   39
| 114699 |  48883 |
|       1 |      1 |     21 | blackdeath             | ~~blackwing~~ |   33
| 107266 |  53248 |
|       1 |      1 |     22 | Lightforge             | Darkangel     |   36
|  95566 |  60445 |
|       1 |      1 |     23 | Knor's Planet          | Knor          |   54
| 181835 |  19500 |
|       1 |      1 |     24 | Popelplanet            | Earthbrain    |    1
|   9008 | 133733 |
|       1 |      1 |     25 | Infected Earth         | TeRRoR        |   75
| 187138 |  17817 |
+---------+--------+--------+------------------------+---------------+------
+--------+--------+



cluster, galaxy and planet are coordinates. The code I posted loops through
the universe and adds up size and score for each galaxy. There are 742
clusters each with 25 galaxies and each galaxy has 25 planets. I average the
cluster and galaxy sum the score and size then insert the results into a new
table. The script goes on to the next cluster galaxy and does the same
thing. It does this till it gets to cluster 742 galaxy 25.

----- Original Message -----
From: "Gyozo Papp" <[EMAIL PROTECTED]>
To: "Michael Roark" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 6:51 AM
Subject: Re: [PHP] quicker query?


hello,
maybe there is another solution that should be quicker, because it uses
fewer DB query.

I don't have a clear view what you want from this query, so if you can give
me a short description about it
it would be appriciated. I think this one does the same job:

INSERT INTO galaxy
SELECT
    cluster AS gcluster,
    sum(size) as gsize,
    sum(score) as gscore,
    galaxy AS ggalaxy
FROM universe
WHERE cluster BETWEEN 1 AND 200 AND galaxy BETWEEN 1 AND 26
GROUP BY cluster, galaxy;


----- Original Message -----
From: "Michael Roark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 6. 05:27
Subject: [PHP] quicker query?


Is there a faster (better) way to do the following:

if ($result) {
for ($cluster=1;$cluster<200;$cluster++) {
for($galaxy=1;$galaxy<26;$galaxy++) {

$sql="insert into galaxy select avg(cluster) as gcluster,sum(size) as
gsize,sum(score) as gscore,avg(galaxy) as ggalaxy from universe where
cluster='$cluster' and galaxy='$galaxy'";
$result=db_query($sql);

Thanks

Michael



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hello Michael,

I'm bit confused now.
In your first letter, you wrote this simple code :
---
if ($result) {
for ($cluster=1;$cluster<200;$cluster++) {
for($galaxy=1;$galaxy<26;$galaxy++) {

$sql="insert into galaxy select avg(cluster) as gcluster,sum(size) as
gsize,sum(score) as gscore,avg(galaxy) as ggalaxy from universe where
cluster='$cluster' and galaxy='$galaxy'";
$result=db_query($sql);
---
(by the way where you close the braces? after db_query?)

So, your script iterates on $cluster and $galaxy. In each iteration you select those 
rows from the table universe
whose $galaxy and $cluster attributes match the respective variables. [ Here comes 
where I'm messed up. ]
Therefore your select statement fetch rows with the same galaxy and cluster value, 
then why to calculate avg() on these fields?


> cluster, galaxy and planet are coordinates. The code I posted loops through
> the universe and adds up size and score for each galaxy. 

adds up  size and score is the sum () in select?

> There are 742 clusters each with 25 galaxies and each galaxy has 25 planets. I 
>average the
> cluster and galaxy sum the score and size then insert the results into a new

so please give me a light why to average when these values are the same for each row?
Did i miss  something?

but I suggest to you writing out these $sql queries and attach it to your mail (not 
the whole just the first 100). 
Maybe it helps me to understand.

Papp Gyozo 
- [EMAIL PROTECTED]

----- Original Message ----- 
From: "Michael Roark" <[EMAIL PROTECTED]>
To: "Gyozo Papp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 2001. május 6. 22:53
Subject: Re: [PHP] quicker query?

> Its a different problem to explain Let me show you part o the contents from
> universe.
> 
> +---------+--------+--------+------------------------+---------------+------
> +--------+--------+
> | cluster | galaxy | planet | planet_name            | ruler         | size
> | score  | rank   |
> +---------+--------+--------+------------------------+---------------+------
> +--------+--------+
> |       1 |      1 |      1 | Stomp                  | Pomp          |    9
> |  46175 |  97055 |
> |       1 |      1 |      2 | The Burping World      | Burp          |   28
> | 125263 |  42971 |
> |       1 |      1 |      3 | xion                   | KLS           |   31
> |  97106 |  59469 |
> |       1 |      1 |      4 | madlosers              | madloser      |   55
> | 104154 |  55094 |
> |       1 |      1 |      5 | Troy                   | Lanfeust      |   10
> |  25311 | 115558 |
> |       1 |      1 |      6 | Infinte Space          | The Watcher   |   52
> | 131190 |  39903 |
> |       1 |      1 |      7 | Kjempefćl planet       | EkvALiser     |   23
> |  83264 |  68716 |
> |       1 |      1 |      8 | Edinazu                | Jaypallas     |   30
> | 129877 |  40601 |
> |       1 |      1 |      9 | Gracen and Gracen inc. | Jim Profit    |   33
> |  74665 |  74957 |
> |       1 |      1 |     10 | Hades                  | DarkkAngel    |   39
> | 109799 |  51718 |
> |       1 |      1 |     11 | ziggy                  | zigzac        |   28
> |  86054 |  66746 |
> |       1 |      1 |     12 | Promt  L- pop          | Kaaleb        |   55
> | 156840 |  28239 |
> |       1 |      1 |     13 | Wicka                  | Wreck         |   11
> |  52938 |  91364 |
> |       1 |      1 |     14 | Karak Azhul            | Morglum       |   45
> | 155288 |  28907 |
> |       1 |      1 |     15 | your fate              | decider       |   44
> | 153838 |  29491 |
> |       1 |      1 |     16 | Poison                 | BlackWidow    |   10
> |  48655 |  94916 |
> |       1 |      1 |     17 | Veilside               | Sik Silvia    |   21
> |  83891 |  68266 |
> |       1 |      1 |     18 | Sontis                 | Bobshi        |   45
> | 112186 |  50353 |
> |       1 |      1 |     19 | Midkemia               | Milamber      |   40
> | 130165 |  40444 |
> |       1 |      1 |     20 | Fortezza               | Saratoga      |   39
> | 114699 |  48883 |
> |       1 |      1 |     21 | blackdeath             | ~~blackwing~~ |   33
> | 107266 |  53248 |
> |       1 |      1 |     22 | Lightforge             | Darkangel     |   36
> |  95566 |  60445 |
> |       1 |      1 |     23 | Knor's Planet          | Knor          |   54
> | 181835 |  19500 |
> |       1 |      1 |     24 | Popelplanet            | Earthbrain    |    1
> |   9008 | 133733 |
> |       1 |      1 |     25 | Infected Earth         | TeRRoR        |   75
> | 187138 |  17817 |
> +---------+--------+--------+------------------------+---------------+------
> +--------+--------+
> 
> 
> 
> cluster, galaxy and planet are coordinates. The code I posted loops through
> the universe and adds up size and score for each galaxy. There are 742
> clusters each with 25 galaxies and each galaxy has 25 planets. I average the
> cluster and galaxy sum the score and size then insert the results into a new
> table. The script goes on to the next cluster galaxy and does the same
> thing. It does this till it gets to cluster 742 galaxy 25.
> 
> ----- Original Message -----
> From: "Gyozo Papp" <[EMAIL PROTECTED]>
> To: "Michael Roark" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, May 06, 2001 6:51 AM
> Subject: Re: [PHP] quicker query?
> 
> 
> hello,
> maybe there is another solution that should be quicker, because it uses
> fewer DB query.
> 
> I don't have a clear view what you want from this query, so if you can give
> me a short description about it
> it would be appriciated. I think this one does the same job:
> 
> INSERT INTO galaxy
> SELECT
>     cluster AS gcluster,
>     sum(size) as gsize,
>     sum(score) as gscore,
>     galaxy AS ggalaxy
> FROM universe
> WHERE cluster BETWEEN 1 AND 200 AND galaxy BETWEEN 1 AND 26
> GROUP BY cluster, galaxy;
> 
> 
> ----- Original Message -----
> From: "Michael Roark" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: 2001. május 6. 05:27
> Subject: [PHP] quicker query?
> 
> 
> Is there a faster (better) way to do the following:
> 
> if ($result) {
> for ($cluster=1;$cluster<200;$cluster++) {
> for($galaxy=1;$galaxy<26;$galaxy++) {
> 
> $sql="insert into galaxy select avg(cluster) as gcluster,sum(size) as
> gsize,sum(score) as gscore,avg(galaxy) as ggalaxy from universe where
> cluster='$cluster' and galaxy='$galaxy'";
> $result=db_query($sql);
> 
> Thanks
> 
> Michael
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 






Hi,

Is there a PHP function that will redirect the current page to another url?

e.g.

         if ($varTwo == $varOne) {

                 URL redirection code

                 } else {

                         echo "You stay right where you are!";
}

Thanks.


Jamie Saunders
Mail: [EMAIL PROTECTED]
Web: http://jamie-s.co.uk





header( 'Location: rediret_me_here.php');

- Markus
----- Original Message -----
From: "Jamie Saunders" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 12:20 AM
Subject: [PHP] URL redirection


>
> Hi,
>
> Is there a PHP function that will redirect the current page to another
url?
>
> e.g.
>
>          if ($varTwo == $varOne) {
>
>                  URL redirection code
>
>                  } else {
>
>                          echo "You stay right where you are!";
> }
>
> Thanks.
>
>
> Jamie Saunders
> Mail: [EMAIL PROTECTED]
> Web: http://jamie-s.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





if ($varTwo == $varOne) {
        header('Location: http://www.location.com/page.html');
} 
else {
        echo "You stay right where you are!";
}

Tyler

> -----Original Message-----
> From: Jamie Saunders [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 5:21 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] URL redirection
> 
> 
> 
> Hi,
> 
> Is there a PHP function that will redirect the current page to 
> another url?
> 
> e.g.
> 
>          if ($varTwo == $varOne) {
> 
>                  URL redirection code
> 
>                  } else {
> 
>                          echo "You stay right where you are!";
> }
> 
> Thanks.
> 
> 
> Jamie Saunders
> Mail: [EMAIL PROTECTED]
> Web: http://jamie-s.co.uk
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




also sprach Thomas Edison Jr. (on Sat, 05 May 2001 11:52:34PM -0700):
> i think i'm almost at the verge of giving up...somehow
> the PWS in my system is ruined forever...i'd done
> everything..and i mean *EVERYTHING*...but PHP just
> doesn't seem to be working with my PWS. In fact, even
> my ASP scripts are not working anymore on PWS. I've
> uninstalled & reinstalled PWS twice already. it's just
> *&*%^. anyways, i think i'm gonna be trying out the
> IIS option. Is IIS ok to work with PHP4? any problems?
> and is there anywhere on the Internet that i can get
> IIS 4 from?

if i were you, and i am serious about this, then i'd install apache on
your windoze system. it was the best move i ever made back then when i
was still using windoze.

martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
-- 
above all, we should not wish to divest
our existence of its rich ambiguity.
                                                          -- nietzsche




Already Did sir! and am as happy as u would've been.
finally i can test http authentication 2. 

Cheers,
T. Edison jr.

"We're out of our medicines and out of our minds..."

--- MaD dUCK <[EMAIL PROTECTED]> wrote:
> also sprach Thomas Edison Jr. (on Sat, 05 May 2001
> 11:52:34PM -0700):
> > i think i'm almost at the verge of giving
> up...somehow
> > the PWS in my system is ruined forever...i'd done
> > everything..and i mean *EVERYTHING*...but PHP just
> > doesn't seem to be working with my PWS. In fact,
> even
> > my ASP scripts are not working anymore on PWS.
> I've
> > uninstalled & reinstalled PWS twice already. it's
> just
> > *&*%^. anyways, i think i'm gonna be trying out
> the
> > IIS option. Is IIS ok to work with PHP4? any
> problems?
> > and is there anywhere on the Internet that i can
> get
> > IIS 4 from?
> 
> if i were you, and i am serious about this, then i'd
> install apache on
> your windoze system. it was the best move i ever
> made back then when i
> was still using windoze.
> 
> martin;              (greetings from the heart of
> the sun.)
>   \____ echo mailto: !#^."<*>"|tr "<*> mailto:";
> net@madduck
> -- 
> above all, we should not wish to divest
> our existence of its rich ambiguity.
>                                                     
>      -- nietzsche
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




I have an ASCII fixed width text file I'm trying to convert to an array of
fields.  But I need to keep the spaces in tact so I know exactly where one
field ends and another begins.

Do you know of any way to modify the default behavior of file() which strips
the blanks spaces out when returning the array?

[EMAIL PROTECTED]






Hey all,

Im just wondering if anyone has come across a PHP based system which allows 
people to log in, and set reminders for themselves, and at the time 
specified, emails them the reminder ?

I know a system could be written utilising cron/php/sendmail etc but I was 
thinking that maybe a system has already been written doing this.


Cheers


Chris





--
       Chris Aitken - Webmaster/Database Designer - IDEAL Internet
email: [EMAIL PROTECTED]  phone: +61 2 4628 8888  fax: +61 2 4628 8890
             --------------------------------------------

       Unix -- because a computer's a terrible thing to waste!





Dear Webmaster,

We have looked at your website and noticed that you might be interested in an offshore 
merchant account for your credit card processing. 
OMC is ready to provide you with the best offshore merchant solution. Our latest 
technology 
gateway and direct relations with large European acquiring banks will guarantee you a 
fast 
approval and direct control over your own offshore merchant account. 
We accept gaming, adult, telemarketing, webhosting, lottery, and other high-risk 
businesses. 

Some Merchant Account Benefits are:

* Low rate and transaction fees
* High chargeback threshold - up to 5%
* Access to your funds every 72 hours
* Acquiring banks include Paribas Bank (France), Raiffeisen Zentralbank (Austria) and 
others
* No volume caps or upfront security deposits
* 5% rolling reserve or no reserve at all
* Virtual POS is available for MOTO merchants
* Application requirements are minimal

OMC is based in Denmark and works closely with large European and Caribbean banks 
and other financial institutions including CyberSource to provide you the lowest rates 
and 
best fraud screening for your credit card transactions. 

If you are interested in this offshore merchant solution please fax the following 
information 
to our US fax number: (413) 622-5876:

1. Company name: 
2. Type of business:
3. Monthly credit card sales (USD):
4. Contact name:
5. Contact email (required):
6. Contact phone/fax (optional):

Don't miss this great opportunity - Apply today!

Best regards,

Jorgan Stevasson
Sales Dept
Offshore Merchant Centre Ltd.






Hello Michael,

On 20-Apr-01 14:38:48, you wrote:

>I'm needing to have a form that pulls a bunch of database fields into it and
>then allows you to modify the fields and does the subsequent update in the
>database.  This seems like something that has to be done all the time.  Is
>there a right way to go about doing this?  Some kind of class library or
>anything?  Or do I just kind of code it up?  Thanks for any responses.

Right, you may want to check this PHP class that does exactly what you
need:

http://phpclasses.UpperDesign.com/browse.html/package/231

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--






<<< multipart/mixed; boundary="--------part3af60cf00dceb": Unrecognized >>>




Learn about computers and the Internet and build a business while you are 
doing it.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Education

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove




Hello Carlos,

On 24-Apr-01 17:12:53, you wrote:

>I would like to know if anyone has or know any PHP code to verify if a form
>entered e-mail address is valid?

>I would like that things like 4$%^%$@@.com.br could not be sent. I only has
>to verify the syntax of it, the existance I believe should be harder to
>verify but if it is possible I would be glad if anyone could point me the
>way.

These PHP classes do exactly what you need:

Forms generation and validation:
http://phpclasses.UpperDesign.com/browse.html/package/1

E-mail address validation:
http://phpclasses.UpperDesign.com/browse.html/package/13

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--





Hello Toxik,

On 16-Apr-01 10:38:13, you wrote:

>Hello,

>I'd like to know if there is a script with the same (or more) functionality
>as SubscribePro at: http://cgi.elitehost.com/subpro/

Maybe you would like to try this PHP class that provides a Web interface to
manage mailing lists using ezmlm/qmail:

http://phpclasses.UpperDesign.com/browse.html/package/177


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--





Hello rememberthatstore.com,

On 25-Apr-01 17:55:49, you wrote:


>I am trying to implement transactions using PHP and MSSQL 7 (Microsoft). 
>Please tell me if there is a simple way of doing this, as there is for
>Interbase or Oracle, using the appropriate functions.eg ***_rollback or
>whatever.

Maybe you would like to try Metabase, that not only provides a easy
interface to manage database transactions, but also works seeminglessly
with different types of databases: MSSQL, Oracle, Interbase, etc...

http://phpclasses.UpperDesign.com/browse.html/package/20


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--





:Please forgive me for having posted this more than once.  I am trying to
reword it here to make it more plain.
---------------
I have a fixed length text file I'm trying to import and send into MySQL.

A record line is about 1600 characters long and includes many blank spaces.

I thought by using file('FILENAME.TXT') I would have a nice neat array of
each record in the file based on each line being a record.
Here's an example txt file:

ABCDEFG HIJ     KLMNOP
YASFSEFAFSAFSDFFDS
(notice the 4 spaces after J and before K on line 1 of the above text file)

So, I went on breaking up the line into fields by doing this:

$ra=$recordArray=file('FILENAME.TXT');

for($index=0;$index<count($ra);$index++) {
$FIELD_1[]=substr($ra[$index],0,18);
$FIELD_2[]=substr($ra[$index],18,19);
$FIELD_3[]=substr($ra[$index],19,20);
}

I expected that to give me 3 fields on line 1 that would have looked like
this:

FIELD 1 = ABCDEFG HIJ    KLM
FIELD 2 = N
FIELD 3 = OP

Instead it gave me:

FIELD 1 = ABCDEFG HIJ KLMOP
FIELD 2 =
FIELD 3 =

because it stripped out the empty spaces along the way.

Can you tell me how I might prevent that from happening?

Thanks very much,

Jay Lepore
[EMAIL PROTECTED]






At 06.05.01  23:28, you wrote:
>:Please forgive me for having posted this more than once.  I am trying to
>reword it here to make it more plain.
>---------------
>I have a fixed length text file I'm trying to import and send into MySQL.
>A record line is about 1600 characters long and includes many blank spaces.
>I thought by using file('FILENAME.TXT') I would have a nice neat array of
>each record in the file based on each line being a record.
>Here's an example txt file:
>ABCDEFG HIJ     KLMNOP
>YASFSEFAFSAFSDFFDS
>(notice the 4 spaces after J and before K on line 1 of the above text file)
>So, I went on breaking up the line into fields by doing this:
>$ra=$recordArray=file('FILENAME.TXT');
>for($index=0;$index<count($ra);$index++) {
>$FIELD_1[]=substr($ra[$index],0,18);
>$FIELD_2[]=substr($ra[$index],18,19);
>$FIELD_3[]=substr($ra[$index],19,20);
>}
>I expected that to give me 3 fields on line 1 that would have looked like
>this:
>FIELD 1 = ABCDEFG HIJ    KLM
>FIELD 2 = N
>FIELD 3 = OP
>Instead it gave me:
>FIELD 1 = ABCDEFG HIJ KLMOP
>FIELD 2 =
>FIELD 3 =
>because it stripped out the empty spaces along the way.
>Can you tell me how I might prevent that from happening?
>Thanks very much,
>Jay Lepore
>[EMAIL PROTECTED]
Hello Jay
I´m a little "old style" an read about file() the first time. I haven´t 
used file yet.
For your problem try this "old style method, which I use with success.
$fp=fopen("filename.txt","r")
while(! feof($fp))
{
         $buffer=fgets($fp,$qty_to_read);
         $part[1]=substr($buffer,0,18);
         $part[2]=substr($buffer,0,18);
         ....
}
fclose($fp);
You would like tohave an easier job with extracting your sentences(when the 
appear in a logical order)
if you use an array, where to chop them
$where_to_chop=array(18,25,36,72);
for ($i=0; $i < count($where_to_chop);$i++)
{
         $part[$i]=substr($buffer,$where_to_chop[$i],$where_to_chop[$i+1]);
         ....
         $i++;
}
HTH Oliver





Hello:

I have a problem trying to get "ftp_get" to work connected FreeBSD.
When I try to run the code below, it just hangs. When I try to run
the same code connected to a Linux system, it works just fine.

The difference between my home FreeBSD system and my work
Linux system is:

FreeBSD:
    - DHCP to @home
    - no anomymous FTP so I use user "test" and password "none"

Linux:
    - has IP connected to the net
    - I think it too has no anomyouse FTP

code:
================================================

<html>
<body>
<?php

if(!($ftp=ftp_connect("localhost")))
{
  print("unable to connect<br>\n");
  exit;
}

print("connected<br>\n");

if(!ftp_login($ftp,"test","none"))
{
  print("unable to login!<br>\n");
  exit;
}

ftp_get($ftp,"/tmp/test.jpg","test.jpg",FTP_IMAGE);
print("done<br>\n");

ftp_quit($ftp);

?>
</body>
</html>

============================================

Any idea why?

TIA

Steve







thankx a lot sir, i guess your guessing worked real
well...after 5 days of headbanging and trying
everything, it worked....i did what u said...removed
all references to the isapi dll and  converted the php
module to php cgi and it's working on PWS. 
i guess i'm gonan use my apache server for the Module
part.

thankx again.
T. Edison jr.

--- Phil Driscoll <[EMAIL PROTECTED]> wrote:
> I dont' have PWS so I#m guessing, but you probably
> have to remove the PHP
> ISAPI module from the list of installed ISAPI
> filters (you do have to do
> this on IIS so I assume PWS is the same). No idea
> where the user interface
> to this might be found though. Failing all else,
> deleting php4isapi.dll and
> rebooting will ensure that the module is no longer
> loaded in the filters
> list, and as long as PWS still starts then you are
> on to a winner!
> 
> Cheers
> --
> Phil Driscoll
> Dial Solutions
> +44 (0)113 294 5112
> http://www.dialsolutions.com
> http://www.dtonline.org
> 


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/





Good day to you all

How can I keep php scripts from reading the /etc/passwd (for example) or
any other file?

Sincerely,
G. Dimitrov




Change the permissions of the /etc/passwd file, use safe mode or suExec


--zak

----- Original Message ----- 
From: "php" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 11:14 PM
Subject: [PHP] files


> 
> Good day to you all
> 
> How can I keep php scripts from reading the /etc/passwd (for example) or
> any other file?
> 
> Sincerely,
> G. Dimitrov
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 







> Hello:
>
> I have a problem trying to get "ftp_get" to work connected FreeBSD.
> When I try to run the code below, it just hangs. When I try to run
> the same code connected to a Linux system, it works just fine.
>
> The difference between my home FreeBSD system and my work
> Linux system is:
>
> FreeBSD:
>     - DHCP to @home
>     - no anomymous FTP so I use user "test" and password "none"
>
> Linux:
>     - has IP connected to the net
>     - I think it too has no anomyouse FTP
>
> code:
> ================================================
>
> <html>
> <body>
> <?php
>
> if(!($ftp=ftp_connect("localhost")))
> {
>   print("unable to connect<br>\n");
>   exit;
> }
>
> print("connected<br>\n");
>
> if(!ftp_login($ftp,"test","none"))
> {
>   print("unable to login!<br>\n");
>   exit;
> }
>
> ftp_get($ftp,"/tmp/test.jpg","test.jpg",FTP_IMAGE);
> print("done<br>\n");
>
> ftp_quit($ftp);
>
> ?>
> </body>
> </html>
>
> ============================================
>
> Any idea why?
>
> TIA
>
> Steve
>





Hi list,

i've compiled php-4.0.4pl1 with ldap support. It compiled nice and clean. A 
"make install" put the lib in apache's libexec directory. When I start apache 
I get the following : cannot load .../libphp4.so into server undefined symbol 
: ldap_value_free
I checked the ldap.c file and found multiple references to ldap_value_free 
but did not find any declaration of the function. 
How should I proceed to get a working libphp4.so with ldap support compiled 
in?

I've got openldap-1.2.11
apache-1.2.19

Thanks for your help

Wolfgang




Hi all -

Today I compiled and installed PHP 4.0.5 on my Linux server (Apache 
1.3.19, linked statically with php & mod_ssl). Suddenly, many of my 
files would no longer be parsed by PHP - instead, they spit raw code 
onto the page.

I created most of the files on my MacOS X machine using the text editor 
Pepper. Some were also created on Windows 2000 using Notepad. Previously 
I noticed a post to this list noting a problem with line endings:

        >With 4.0.4pl1 and earlier, this did not occur, but with 4.0.5, there
        >are some files on our server that are not getting parsed as php, and
        >just showing up as the code itself.  The problem files are a mess, but
        >I only mention them since they got parsed before.  They are php files
        >that the designers here have created in HomeSite and saved as PC
        >format, so they are basically 1 long line when I open them in vi, and
        >have ^M's everywhere.  If they pull them back into HomeSite and save
        >as UNIX format and upload, no problem.  What changed in PHP that would
        >make this difference.  I would just tell them to do this with all the
        >problem ones, but there are a lot.
        >This is on OpenBSD, btw.  Thanks.
        >-Ken

I tried changing the line endings of some of my files, but to no avail. 
The only thing that seems to work for me is to create a new file using 
vi or pico - PHP then parses it perfectly. For now, PHP 4.0.5 isn't a 
must-have upgrade, so I went back to 4.0.4pl1.

Is this a bug, or some change in PHP that is causing it to ignore 
alternative (non-UNIX) line endings? If there is a problem with PHP, I 
want to make sure everyone is aware of it so it can be fixed in 4.0.6.

Ben Gollmer




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Ben Gollmer) wrote:

>       >I only mention them since they got parsed before.  They are php files
>       >that the designers here have created in HomeSite and saved as PC
>       >format, so they are basically 1 long line when I open them in vi, and
>       >have ^M's everywhere.  If they pull them back into HomeSite and save
>       >as UNIX format and upload, no problem.  What changed in PHP that would
>       >make this difference.  I would just tell them to do this with all the
>       >problem ones, but there are a lot.
>       >This is on OpenBSD, btw.  Thanks.
>       >-Ken
> 
> I tried changing the line endings of some of my files, but to no avail. 
> The only thing that seems to work for me is to create a new file using 
> vi or pico - PHP then parses it perfectly. For now, PHP 4.0.5 isn't a 

What transfer mode is your FTP client using to transfer the files?  I 
forget whether it's binary or ASCII mode (I *think the latter...) that 
automatically adjusts linebreak/newline characters for you, but you might 
want to try toggling the client's setting to see if those "changed" line 
endings can be made to stay "changed" after transfer.  (BTW, text editors 
often have an option allowing the user to specify which OS's linebreak 
style to use when saving.  Sounds like 4.0.5. may be requiring more of us 
to take advantage of this type of feature.)

-- 
CC




Hello PHP-ers - General`s:),

(How)Is it possible to decode text file attachments starting with 
"begin 644". I tried "base64_decode();" with no joy (stick:). 
"imap_base64 ();" is not defined on my system. Is there a function, or
just a table with the HARD way of manual decoding possible? 
Thanks.
--
Leo n id




The file is likely uuencoded, AFAIK PHP does not have a built-in function to
handle this. IIRC there is a function on http://px.sklar.com/ that does
this.

--zak


----- Original Message -----
From: "~~~i LeoNid ~~" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 12:06 AM
Subject: [PHP] Decoding .txt attachments


> Hello PHP-ers - General`s:),
>
> (How)Is it possible to decode text file attachments starting with
> "begin 644". I tried "base64_decode();" with no joy (stick:).
> "imap_base64 ();" is not defined on my system. Is there a function, or
> just a table with the HARD way of manual decoding possible?
> Thanks.
> --
> Leo n id




Reply via email to