php-general Digest 29 Jan 2002 16:25:18 -0000 Issue 1140

Topics (messages 82513 through 82571):

Re: upload permission denied!
        82513 by: Jason Wong
        82515 by: Girish Nath
        82527 by: sundogcurt
        82530 by: Mike Frazer

Re: Session updates ok first time only.
        82514 by: Jason Wong

Re: problem with relative header
        82516 by: Bogdan Stancescu

Re: Resalution Dection
        82517 by: Justin French

Re: Back button to Query Pages
        82518 by: phantom

Mysql Connection
        82519 by: Uma Shankari T.
        82520 by: Chris Grigor
        82523 by: Uma Shankari T.
        82524 by: Jason Wong
        82536 by: David Robley

question the function begin with @
        82521 by: Vincent Ma
        82522 by: Chris Randall
        82525 by: Jason Wong

Re: why isn't this working? (many questions inside)
        82526 by: Robin Chen

After installing php-imap RPM, there's no --enable-imap when phpinfo()
        82528 by: gaukia 345

Re: Paypal Instant Payment Notification
        82529 by: Sondra Russell
        82555 by: David

Re: php vs asp
        82531 by: Mike Frazer

[ANNOUNCEMENT] Phpauction 2.1 released
        82532 by: Gianluca Baldo

Re: How do I use a confirm box to confirm before deletion from a database
        82533 by: Mike Frazer

broken imap client?
        82534 by: Cary Mathews
        82564 by: Cary Mathews

Re: mailing to 19000 users
        82535 by: Kancha .
        82542 by: val petruchek
        82552 by: Stefan Rusterholz

--enable-transid and slash URI's
        82537 by: Tomek Golembiewski
        82540 by: Yasuo Ohgaki

Re: Initializing Array
        82538 by: Tim Ward

HOWTO: detect browser's script enabled?
        82539 by: Ivo Stoykov
        82547 by: Martin Thoma
        82566 by: Todor Stoyanov

how to specify custom http header in fopen("http://...";,...)
        82541 by: g.p.ciceri
        82546 by: Joffrey van Wageningen

FOUND SOLUTION
        82543 by: phantom

Re: browser back button - "Page has Expired.. " problem
        82544 by: phantom

Error executing PHP-Scripts
        82545 by: Heiko Schneebeck

configuring php and apache
        82548 by: liz lynch
        82550 by: Neil Freeman
        82551 by: Neil Freeman
        82553 by: Mike Maltese

Re: PHP and Webmin...
        82549 by: Prakash

Opening an URL on an new window
        82554 by: Eduardo Melo
        82559 by: David Otton

include redirects
        82556 by: Calin Uioreanu
        82562 by: David Otton

HOW TO: How can I retrieve the HTTP Response Headers
        82557 by: Alexandre Ferreira Novello

Re: Need a little help
        82558 by: Brian V Bonini

is create_function slow?
        82560 by: Emile Bosch
        82561 by: Edward van Bilderbeek - Bean IT

One form - Two emails, I need some help please
        82563 by: Edward R. Bailey
        82571 by: Michael Kimsal

create xml document with PHP
        82565 by: Rodrigo Peres

preg_match won't match elements
        82567 by: Larry Brown

Feature requests for PHP development - where to post them?
        82568 by: Stefan Rusterholz

Custom email after form submission
        82569 by: Edward R. Bailey
        82570 by: Jason Cox

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Tuesday 29 January 2002 11:48, sundogcurt wrote:

> the directory permissions are set to 777 / 0777 any user, any group,
> etc. at least that is how I understand it. if i'm wrong please correct
> me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it 
should be OK. The only thing is whether you have set the *correct* directory? 
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/
  
Is this correct?


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
                -- Bette Davis
*/
--- End Message ---
--- Begin Message ---
Hi

For some reason i couldn't get the 777 thing to work on one of my hosts but
managed to get this syntax to work instead :

chmod o=rwx directoryname

***It's not exactly secure but might get the job done ***

Regards


Girish
--
www.girishnath.co.uk


----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 3:55 AM
Subject: Re: [PHP] upload permission denied!


On Tuesday 29 January 2002 11:48, sundogcurt wrote:

> the directory permissions are set to 777 / 0777 any user, any group,
> etc. at least that is how I understand it. if i'm wrong please correct
> me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it
should be OK. The only thing is whether you have set the *correct*
directory?
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/

Is this correct?


--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
-- Bette Davis
*/

--
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]


--- End Message ---
--- Begin Message ---
That is where the script is that uploads the file, the file should be 
going to  :

/home/gruesome/public_html/valeriemacwilliam/includes/content/

/home/gruesome/public_html/valeriemacwilliam/pics/
or /tmp/ or where ever I have tried a ton of different folders

[EMAIL PROTECTED] wrote:

>On Tuesday 29 January 2002 11:48, sundogcurt wrote:
>
>>the directory permissions are set to 777 / 0777 any user, any group,
>>etc. at least that is how I understand it. if i'm wrong please correct
>>me, I do appreciate the help thank you.
>>
>
>If they're set to 777 then anybody can do anything to it which means it 
>should be OK. The only thing is whether you have set the *correct* directory? 
>According to your code, I believe the file will be copied to:
>
>  /home/gruesome/public_html/valeriemacwilliam/includes/content/
>  
>Is this correct?
>
>

--- End Message ---
--- Begin Message ---
Try changing the permissions of the parent directory.  I've had that problem
in the past and that was the only thing that seemed to fix it.

Mike


"Sundogcurt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm not sure if this is a problem I can overcome with PHP or if I have
> to go directly to the Linux box to fix (I hope not).
>
> I have moved my development from a win32/apache/mysql box to a
> Mandrake/apache/mysqly box and have only one problem (that I know of) to
> overcome.
>
> When I try to upload an image (with scripts that worked just fine on the
> win32 system) I get a permission denied error. The dir that I am trying
> to write to has permissions for everybody to do anything! (777 or 0777
> how ever you want to format it). The scripts are located in my user dir
> under public_html etc etc. I can create directories in there but I can't
> seem to convince the darn thing to copy an image. It seems to upload (no
> errors) but that is where it ends. I don't know what other information
> you need from me or if this is even the proper list to be submitting to.
>
> Again I say I am able to create directories but not copy an image. ???
>
> Thanks and I'm sorry that my question has anything to do with uploading
> stuff eheheh
>
> ~Curtis~
>


--- End Message ---
--- Begin Message ---
On Tuesday 29 January 2002 06:36, Floyd Baker wrote:

> Yes I have a c:\tmp directory and I see the session being created in
> it.  And the page_view value of 1 after the first increment.  The
> editor wants to reload each time I hit the submit button after that
> but the value does not increase beyond 1.  It is also the same session
> each time.  No new sessions are being created.
>
> I have turned on the log and keep getting undefined_variables for
> those two lines in each page that call $page_view before it's
> incremented, unless I am engaging the $_SESSION call.  Then
> $table_view becomes 1 and there are no errors.  But the incremented
> value doesn't hold up.
>
> Almost like nothing is happening.., except the *editor* thinks there
> is something going on when looking at the session file??  Like a one
> is being loaded each time.  How could that be?  Or the original one is
> staying even though an overwrite is being attempted.

Here's an interesting snippet from the manual:

The track_vars and register_globals configuration settings influence how the 
session variables get stored and restored.
  
Note: As of PHP 4.0.3, track_vars is
     always turned on.
   
If track_vars is enabled and register_globals is disabled, only members of 
the global associative array $HTTP_SESSION_VARS can be registered as session 
variables. The restored session variables will only be available in the array
    $HTTP_SESSION_VARS.

Try the simple example in the manual:

<?php
session_register("count");
$_SESSION["count"]++;
echo "Count is " . $_SESSION["count"];
?>

> Now I have uploaded these scripts to my isp and they do not work up
> there either.  That is, using his ini, his php 4.0 with
> register_globals on, etc.  Could you perhaps test these scripts on
> your machine or create an 'accumulating' routine of your own that
> works?   So I can see where the difference might be coming in?

Your original scripts with the changes I suggested works on my system. 

--- End Message ---
--- Begin Message ---
This is way too simple, but maybe you didn't think of it:

echo("Location: http://"; . $HTTP_SERVER_VARS['HTTP_HOST']
.dirname($HTTP_SERVER_VARS['PHP_SELF']) . "/webmgr_prop.php?action=1");

Tom Beidler wrote:

> Any ideas?

--- End Message ---
--- Begin Message ---
Be carefull which version of javascript is in use (or more to the point,
which version of javascript the browser supports), because these goodies
aren't available in earlier versions (even 1.1 from memory), and you may
want to do a lot of testing before being happy.

Justin French
Indent.com.au
Soundpimps.com



Christian Blichmann wrote:
> 
> "Jeff Sheltren" <[EMAIL PROTECTED]> wrote in message
> 006901c1a552$ad42ebf0$0500a8c0@ellaptop">news:006901c1a552$ad42ebf0$0500a8c0@ellaptop...
> > Yes, you can use javascript to get the user's resolution:
> >
> > screen.width
> > screen.colorDepth
> 
> You can also use
> 
>     window.innerWidth
>     window.innerHeight
> 
> (at least in Opera 4.x+ and NN4.x) or use
> 
>     document.body.clientWidth
>     document.body.clientHeight
> 
> (in IE) or through the DOM (Document Object Model,
> see http://www.w3c.org):
> 
>     document.body.offsetWidth
>     document.body.offsetHeight
> 
> This might be helpful for you as well...
> 
> Christian Blichmann
> 
> _____________________________________________
> don't hesitate - email me with your thoughts:
> e-mail: [EMAIL PROTECTED]
>  - please remove the ".nospam" from address.
> _____________________________________________
> do you want to know more?
> web:    http://www.blichmann.de
> 
> --
> 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]
--- End Message ---
--- Begin Message ---
Yes, I would prefer using the back button and go to the page in the clients
cache but I think you are right, I may have place a back button on the page
that actually resubmits the query paramemters for me.

Finally found something that ASP pages can do better than PHP... but only one
thing. :)

Edward Van Bilderbeek - Bean It wrote:

> the moment I hit the send button I realised it myself too :-)
>
> but this is a pretty good alternative...
>
> Edward
>
> ----- Original Message -----
> From: "Nick Wilson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 28, 2002 10:15 AM
> Subject: Re: [PHP] Back button to Query Pages
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > * and then Edward van Bilderbeek - Bean IT blurted....
> > > Hi,
> > >
> > > a possible solution is also to provide the backbutton href with the
> original
> > > variable values...
> >
> > I'm pretty sure he means the /browser/ back button though.
> > - --
> >
> > Nick Wilson
> >
> > Tel: +45 3325 0688
> > Fax: +45 3325 0677
> > Web: www.explodingnet.com
> >
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> >
> > iD8DBQE8VRamHpvrrTa6L5oRAs5EAJ4kJyVPGdcvNmPkTEgCJkIUJZ20PwCgi4K0
> > XJCudv0n1sFrJBrH37W5mVg=
> > =ntoU
> > -----END PGP SIGNATURE-----
> >
> > --
> > 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]
> >

--- End Message ---
--- Begin Message ---

Hello,


  I have installed php3 in my system.I want to connect with mysql.I have
given this code

$link=mysql_connect("localhost","username","password") or die("could not
connect");


but it is giving Fatal error: Call to undefined function: mysql_connect()


Why it is showing like.........

Mysql is also running........


 Any one came to know this tell me as soon as possible....


Regards,
Uma     

--- End Message ---
--- Begin Message ---
Hey Uma

call to undefined function, well thats exactly what it means (it doesnt like
the function specified eg mysql_connect)this  means that your php
installation does not have support for mysql. 

You can check this with the following

<?php

phpinfo();

?>

run this via a browser and check the config of php... it should say
--with-mysql 
heres an examle of the config section it gives

Configure Command  

'./configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-bz2'
'--with-curl' '--with-db3' '--with-dom' '--with-exec-dir=/usr/bin'
'--with-gd' '--with-gdbm' '--with-gettext' '--with-jpeg-dir=/usr'
'--with-mm' '--with-openssl' '--with-png' '--with-regex=system' '--with-ttf'
'--with-zlib' '--with-layout=GNU' '--enable-debugger' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp'
'--enable-wddx' '--with-mysql' '--without-unixODBC' '--without-oracle'
'--without-oci8' '--with-pspell' '--with-xml' 

You will need to recompile php to use mysql 

Hope this answers your question, and once recompiled your mysql_connect()
function should work like a charm...


C-Ya

Chris








-----Original Message-----
From: Uma Shankari T. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 8:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mysql Connection



Hello,


  I have installed php3 in my system.I want to connect with mysql.I have
given this code

$link=mysql_connect("localhost","username","password") or die("could not
connect");


but it is giving Fatal error: Call to undefined function: mysql_connect()


Why it is showing like.........

Mysql is also running........


 Any one came to know this tell me as soon as possible....


Regards,
Uma     


-- 
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]
--- End Message ---
--- Begin Message ---


Hello,


How do i check php support mysql......


If any one came to know this tell me...


Regards,
Uma

--- End Message ---
--- Begin Message ---
On Tuesday 29 January 2002 15:29, Uma Shankari T. wrote:
> Hello,
>
>
> How do i check php support mysql......
>
>
> If any one came to know this tell me...

You have already been told how to. See the posting by Chris in response to 
your posting about the same question just a little while ago.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Hard reality has a way of cramping your style.
                -- Daniel Dennett
*/
--- End Message ---
--- Begin Message ---
In article <Pine.LNX.4.21.0201291202160.2265-
[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> 
> Hello,
> 
> 
>   I have installed php3 in my system.I want to connect with mysql.I have
> given this code
> 
> $link=mysql_connect("localhost","username","password") or die("could not
> connect");
> 
> 
> but it is giving Fatal error: Call to undefined function: mysql_connect()
> 
> 
> Why it is showing like.........
> 
> Mysql is also running........
> 
> 
>  Any one came to know this tell me as soon as possible....

The error message says that the installation of PHP you are using does 
not have MySQL support enabled/compiled in. If you are on a *nix system, 
you may need to recompile with mysql support; if on Windows you need to 
ensure that the mysql module (dll) is being used.

-- 
David Robley
Temporary Kiwi!
--- End Message ---
--- Begin Message ---
Hi everyone:

  I saw some code, the function is called with @..

  like "@copy(xxxx,xxxx)".  anyone can ask me what the purpose of the
function begin with symbol @

Vincent Ma


--- End Message ---
--- Begin Message ---
Ido believe the purpose of the '@' is to supress error messages from the particular 
function it is next to, it may also supress errors from the entire line it is on.
-chris
1/28/02 11:14:40 PM, "Vincent Ma" <[EMAIL PROTECTED]> wrote:

>Hi everyone:
>
>  I saw some code, the function is called with @..
>
>  like "@copy(xxxx,xxxx)".  anyone can ask me what the purpose of the
>function begin with symbol @
>
>Vincent Ma
>
>
>
>-- 
>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]
>
>
>



--- End Message ---
--- Begin Message ---
On Tuesday 29 January 2002 15:14, Vincent Ma wrote:
> Hi everyone:
>
>   I saw some code, the function is called with @..
>
>   like "@copy(xxxx,xxxx)".  anyone can ask me what the purpose of the
> function begin with symbol @

To suppress error reporting. Full details:

Manual -> Operators -> Error Control Operators



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Half a mind is a terrible thing to waste!
*/
--- End Message ---
--- Begin Message ---
Maybe your script timed out before it could finish.  Try
set_time_limit(0)

Another possibility is that your browser gave up.  You may need 4GB of
disk cache because browsers usually save all files in cache before
copying them to the place you designate.

Robin

Wei Weng wrote:
> 
> First, I am running (currently) php 4.0.6 under Redhat 7.2 with kernel
> 2.4.10
> 
> I know you can do the following:
> 
> <?
> 
> header("Content-type: application/force-download");
> header("Content-disposition: attachment; filename=blah.txt");
> readfile("blah.txt");
> 
> ?>
> 
> to force the user to download a file.
> 
> However, this wouldn't work if blah.txt is larger than 2G on my machine
> with php 4.0.6 for Redhat 7.2, because all the file I/O operations are
> done in 32 bits functions.
> 
> So here are two solutions i though about:
> 
> 1) instead of readfile("blah.txt"), do a passthru("cat blah.txt"). Since
> the basic idea of forcing a download is to pipe the file content to the
> standard output (which is the browser in this case), i don't understand
> why passthru("cat blah.txt") wouldn't do the trick. In fact, I can only
> download about 88Mbs of the whole 4G file I planned to download.
> 
> 2) recompile the php package with -D_FILE_OFFSET_BITS=64 enabled. However,
> with the ./configure; make; make install, i can't seem to figure out where
> to stick the option in. (prefer doing it in one of the configure arguments
> if possible)
> 
> Forgive me if I posted this to the wrong mailing list, I had been losing
> hairs over these puzzled questions.
> 
> TIA.
> 
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
> 
> --
> 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]
--- End Message ---
--- Begin Message ---
Good day ppl,

I installed php4.1.1 i586 RPM on my Mandrake linux. After downloading other 
dependencies and so on, I got it running. I know so when the phpinfo() 
function is showing the php info. However when I installed php-imap i586 RPM 
and all its needed dependencies, the page with the phpinfo() is not updated 
with a --enable-imap phrase that is supposed to appear near the top of page. 
But there's a table entitled "imap" in the page displaying the version 
number of the c-client.

The same thing also happens when I install php-mysql and its other 
dependencies. There's no --with-mysql appearing. Is it normal? If it is how 
do I then know whether both IMAP extension and mysql extension are 
installed?


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

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

i've been working on this darn "instant payment notification" script 
for weeks now.  I've gotten pretty close based on some recent posts 
that use the great Rasmus' postToHost function to talk to paypal and 
get the "confirmation".  However, the reply from paypal, instead of 
being "one word" (VALID or INVALID), is a whole web page.

I'm thinkin' the problem is that I'm not posting to 
https://www.paypal.com/blah, but to http://www.paypal.com/.  How do I 
use the posttohost function (or some other function) to post securely?

Best,
Sondra
--- End Message ---
--- Begin Message ---
 simply change the fsocketopen's socket from 80 to 443 (SSL port)

> I'm thinkin' the problem is that I'm not posting to 
> https://www.paypal.com/blah, but to 
> http://www.paypal.com/. How do I use the posttohost 
> function (or some other function) to post securely? 
--- End Message ---
--- Begin Message ---
If ASP is as slow with MySQL as it is with native Microsoft DBs (Access, SQL
Server), then you may be in trouble.  I did some work for a friend who owns
a hosting company on a site done in ASP and the worst part of the whole
thing was testing because the database was so slow.  He's got some high-end
servers, too, so it wasn't the system slowing it down.  I have my personal
site with him and it seems to load stuff from MySQL about 2-5 times as fast
as the ASP-based sites load from SQL Server.

My two cents.

Mike Frazer



"Jon Farmer" <[EMAIL PROTECTED]> wrote in message
025001c1a810$587b6730$[EMAIL PROTECTED]">news:025001c1a810$587b6730$[EMAIL PROTECTED]...
> > sorry i should have explained myself abit better.....i am a huge fan of
> php
> > hence why i subscribe to this mailing list. its just that i need to
settle
> > an argument. my understanding is that php works better with mysql
however
> a
> > friend of mine is adament that asp will work just as well. i am not
> > sure!!!!!!!!!!!!
>
>
> Hmm I have to say it would depend on the quality of the ODBC driver you
> would be using.
>
> For instance: would you be able to get the insert id with ASP as easily as
> PHP?
>
> Look at all the MySQL functions in PHP and ask your friend hwo they would
> accomplish this in ASP.
>
> I would be interested to hear what your friend has to say to this, I would
> appreciate if you would drop me his/her reaction..
>
> Regards
>
> Jon
>
>
> --
> Jon Farmer
> Systems Programmer, Entanet www.enta.net
> Tel 01952 428969
> PGP Key available, send email with subject: Send PGP Key
>


--- End Message ---
--- Begin Message ---
PHPAUCTION 2.1 has been released and is available in the downloads
section at http://phpauction.org .-

This release includes an installation script, edit live auctions, & post a question to
the seller. We have fixed bugs to make this a stable version.

Regards,

        Gianluca

--
ALBASOFTWARE
C/ Mallorca 186 - 3 1
08036 Barcelona (Spain)
Tel./Fax +34 934549324
[EMAIL PROTECTED]
http://www.gianlucabaldo.com
http://www.phpauction.org

--- End Message ---
--- Begin Message ---
Use Javascript on the links.  I've done this for all delete links I've done
with database-driven sites.  Place the following code in the <head> section
of the pages:

 <script language="Javascript">
  var goTo;
  function verifyClick(goTo) {
   var choice;
   choice = confirm("Are you sure you want to delete this entry?");
   if (choice) { window.location = goTo; }
  }
 </script>

Then just have it print something like the following for the links:

<a href="javascript:verifyClick("delete.php?id=xxx")">Delete</a>

of course you'll need to set up the link however your scripts require, but
the basic idea here is that if the user clicks OK then the link passed to
the javascript function verifyClick() is executed.

Hope that helps.

Mike Frazer



"Ivan Carey" <[EMAIL PROTECTED]> wrote in message
006301c1a7f4$a195ea60$0201a8c0@icarey">news:006301c1a7f4$a195ea60$0201a8c0@icarey...
Hello,
Thankyou for your reply.

When a user clicks upon a delete link that deletes a record from a database,
I would like to be able to give them the option to OK or Cancel this action.

I have tried coding the browsers built in confirm box (I can bring up this)
but am unable to combine it with php or a combination of php and a
javascript funtion

Thanks,
Ivan




--- End Message ---
--- Begin Message ---
I've been trying to compile php_4.1.1 with imap support for the last
couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
of the c-client2000 libraries, along with the source of pine4.44, which
uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
and it configures and builds just fine.  But when I attempt to install it
as a DSO in Apache, and do an apachectl configtest I get the following:
/usr/libexec/ld.so: Undefined symbol "_mail_string" in
httpd:/usr/local/apache/libexec/libphp4.so

So I try to install it as a static module in Apache, and Apache bombs on
the build with:
/usr/libexec/ld.so: Undefined symbol "_mm_dlog" in
gen_test_char:{lib dir}/libc-client.so.2.1
*** Error code 1

In short, I think the c-client libraries are broken, at least as far as
php is concerned, but the php documentation says that the c-client libs
are required for IMAP support.  Can someone help me understand what I am
doing wrong?

Thanks in advance,
Cary


--- End Message ---
--- Begin Message ---

> > I've been trying to compile php_4.1.1 with imap support for the last
> > couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
> > of the c-client2000 libraries, along with the source of pine4.44, which
> > uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
> > and it configures and builds just fine.  But when I attempt to install it
> > as a DSO in Apache, and do an apachectl configtest I get the following:
> > /usr/libexec/ld.so: Undefined symbol "_mail_string" in
> > httpd:/usr/local/apache/libexec/libphp4.so
> >
> > So I try to install it as a static module in Apache, and Apache bombs on
> > the build with:
> > /usr/libexec/ld.so: Undefined symbol "_mm_dlog" in
> > gen_test_char:{lib dir}/libc-client.so.2.1
> > *** Error code 1
>
> a common mistake in compiling php is thinking installing the c-client on
> your system is enough :)
>
> a little cut'n'paste from the docs:
>
[snip cut'n'paste]
>
> did you rename the files?


(Was I supposed to rename the files?) I've followed the directions from
the docmuentation, to the 'T'. Unless apache is looking for the rfc822.h
et al in /usr/local/include and _not_ /usr/local/include/c-client, I
don't see why I'm having  so many problems.  I'll try moving those *.h
files up a directory and try once more...[sigh]

[snip some rant about the c-client being broken... ;-)]
>
> the c-client libs arnt broken :)
I'll take your word for it. But as for getting it to work...

--Cary

--- End Message ---
--- Begin Message ---
How about creating a mailing list will 19000 users and
then using the mail() function to send mail to that
list. so that you will not have to loop through.

--- John Meyer <[EMAIL PROTECTED]> wrote:
> How about croning the job and splitting up the load
> as you go.
> ----- Original Message ----- 
> From: "Mostafa Al-Mallawani" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 27, 2002 11:23 PM
> Subject: [PHP] mailing to 19000 users
> 
> 
> > hi, does anyone know how to send mail to 19000
> users using the mail()
> > function, I need to create a mailing list of this
> number of users and
> > looping on 19000 users takes up a heck of a lot of
> resources...any
> > solutions? thanks.
> >  
> > 
> 
> 
> -- 
> 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]
> 


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
> How about creating a mailing list will 19000 users and
> then using the mail() function to send mail to that
> list. so that you will not have to loop through.

The main disadvantage (not sure of such long $to) is that EVERY user will
receive e-mail's of others.


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
Read through the according rfc's.
http://www.ietf.org/rfc/rfc0821.txt could match (else do a google search on
"rfc +mail" without parenthesis)
I didn't find anything about length limitation (but I didn't read it _very_
seriously) so I think it's theoretically not limited. But I could imagine
that (once more) theory and reality diverge so that some mail-servers _have_
limitations (due to memory issues or whatever - I'm not a specialist here as
I mentioned).
If you have a domainname with e-mail address supporting wildcards, just try
it out sending yourself one or two hundreds of mails. 190 loops shouldn't be
bad.

good luck
stefan rusterholz

----- Original Message -----
From: "val petruchek" <[EMAIL PROTECTED]>
To: "Stefan Rusterholz" <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 12:00 PM
Subject: Re: [PHP] mailing to 19000 users


>
> > I have no experience with this stuff, but some thoughts
> > split the recipients up into groups of 100-1000 persons. put that group
of
> > recipients into bbc (all) so nobody will see the others mail address.
>
>
> And what about $bcc  length? Has it any length limitations?
>
> Valentin Petruchek (aki Zliy Pes)
> *** Cut the beginning ***
> http://zliypes.com.ua
> mailto:[EMAIL PROTECTED]
>
>
>
>
>
>

--- End Message ---
--- Begin Message ---
I've got a problem. I want to propagate sessionid using this greate php 
feature --enable-transid but I want pretty slash url too (I mean 
www.eee.com/w/12/2344556b44455).
I don't want transid to add sessionid at the end of each link with ? or &, I 
want only slah
(/session_id_here). Is the any way to change this behaviour?
--- End Message ---
--- Begin Message ---
Tomek Golembiewski wrote:
> I've got a problem. I want to propagate sessionid using this greate php 
> feature --enable-transid but I want pretty slash url too (I mean 
> www.eee.com/w/12/2344556b44455).
> I don't want transid to add sessionid at the end of each link with ? or &, I 
> want only slah
> (/session_id_here). Is the any way to change this behaviour?
> 

Disable trans-sid and do it by yourself :)
-- 
Yasuo Ohgaki

--- End Message ---
--- Begin Message ---
As far as using them is concerned they are already zero (as indeed are
undefined elements). If you want force the type you'll have to step through
the array.

$pos[17][7][3] = 0; // will only set the value of that element, in PHP or C

Tim
www.chessish.com <http://www.chessish.com> 

        ----------
        From:  pong-TC [SMTP:[EMAIL PROTECTED]]
        Sent:  28 January 2002 19:07
        To:  [EMAIL PROTECTED]
        Subject:  Initializing Array

        Hello All

        I would like to initialize the array $pos[17][7][3] to zero.  Can i
do
        like in C ie. $pos[17][7][3] = 0;?  Or, will I have to do initialize
every
        single element of array to zero by using loop?

        Thank you.
        Pong
        
--- End Message ---
--- Begin Message ---
Hi

I've fillowing (dull perhaps) question:

Could I chanck somehow whether the browser has script enabled. I'd like to
use it for my statistics.
I saw such into http://www.extreme-dm.com/tracking/ free tracking service.

Thank you.

Ivo


--- End Message ---
--- Begin Message ---
Hm, the easiest way would be, try
<SCRIPT LANGUAGE="Javascript" SRC="myfile.js"></SCRIPT>

where myfile.js contains simply nothing. Everytime the file is downloaded,
someone uses Javascript.


--- End Message ---
--- Begin Message ---
use the <noscript></noscript>   tag


"Ivo Stoykov" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I've fillowing (dull perhaps) question:
>
> Could I chanck somehow whether the browser has script enabled. I'd like to
> use it for my statistics.
> I saw such into http://www.extreme-dm.com/tracking/ free tracking service.
>
> Thank you.
>
> Ivo
>
>


--- End Message ---
--- Begin Message ---
Hello all,
I've a bunch of PHP program that heavily depends 
on remote services via fopen("http://...";,...) costruct.

Now I've installed mod_gzip on the remote server 
and so if I can specify "Accept-Encoding: gzip,deflate" in 
my http header request, I can have a (much) smaller network traffic.

My question: how can I specify a custom HTTP header
in the fopen("http://...";,...) function ???

Any help will be highly appreciated.

TIA
/gp


-- 
"anyone can create a cryptography product that he himself cannot break."
                                                Bruce Schneier

"If you don't know the things, study them."
                                                g.p.

"But writing non-free software is another matter.  Non-free software is
a plan for subjugating and dividing the people who use it--an
antisocial practice.  Our goal is to bring that practice to a halt." 
                                                Richard Stallman 

  Gian Paolo Ciceri        via B.Diotti 45 - 20153 Milano MI ITALY
      CTO @ Louise         mobile :   ++39 348 3658272       
                           eMail  :   [EMAIL PROTECTED],
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> I've a bunch of PHP program that heavily depends 
> on remote services via fopen("http://...";,...) costruct.
> 
> Now I've installed mod_gzip on the remote server 
> and so if I can specify "Accept-Encoding: gzip,deflate" in 
> my http header request, I can have a (much) smaller network traffic.
> 
> My question: how can I specify a custom HTTP header
> in the fopen("http://...";,...) function ???

i think the best way is to use
http://www.php.net/manual/en/function.fsockopen.php
and send your your own headers...

mvgr,
Joffrey van Wageningen

ps/1: hows the smog in milano? :P

--
.-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]--------------
| Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue
| PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863
| * We demand guaranteed rigidly defined areas of doubt and uncertainty.
|                                                       -- Douglas Adams

--- End Message ---
--- Begin Message ---
Doing some research I found that session cache paramemters may be set in
PHP.INI or overridden by inserting the following header() lines into the
php for the page you want to cache on the clients browser.

Allow Cache Expire time is set in php.ini in minutes.  Search php.ini for
key word cache and it will be the first time that comes up.

header("Cache-Control: public");
header("Cache-Control: max-age=" . $this->allowcache_expire * 60);

--- End Message ---
--- Begin Message ---
Also consider:

header("Cache-Control: public");
header("Cache-Control: max-age=" . $this->allowcache_expire * 60);

This will allow to set the expiration of the cached file on the on the clients
browser.  The Cache Expire time is in minutes and can be found (and changed)
in the php.ini file.  Search keyword Cache in php.ini and it will be the first
thing you find.

Alex Vargas wrote:

> Just add this header
>
> header ("Cache-Control: public");
>
> Alex.
>
> ----- Original Message -----
> From: "Lee P Reilly" <[EMAIL PROTECTED]>
> To: "PHP List" <[EMAIL PROTECTED]>
> Sent: Monday, January 28, 2002 11:26 PM
> Subject: [PHP] browser back button - "Page has Expired.. " problem
>
> > Hi,
> >
> > I wonder if anyone can offer me a few pointers..?
> >
> > I'm building a portal to do various bits and bobs. I'm using sessions to
> > facilitate the user authentication/login, etc. The only problem I have
> > is that when viewing these (.php) pages in IE once the session variable
> > has been set, a "Warning: Page has Expired " page is displayed whenever
> > the 'Back' button is pressed. This means that the user can only access
> > the page again by hitting 'Refresh' (and therefore posting the form data
> > back & executing whatever scripts again).
> >
> > The rest of IE's error message reads, "The page you requested was
> > created using information you submitted in a form. This page is no
> > longer available. As a security precaution, Internet Explorer does not
> > automatically resubmit your information for you."
> >
> > I know from using other web applications (Hotmail is one example), that
> > this doesn't always have to be the case. Is there anyway I can eliminate
> > this security precaution on the *server side* i.e. without telling users
> > to ditch IE ;-)
> >
> > Thanks very much in advance for any advice.
> >
> > - Best regards,
> >
> >    Lee
> >
> >
> > --
> > 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]
> >

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

everytime I request a phpscript form my Apache I got an segmentation fault 11 in 
apaches errorlog.

System is:
Apache 1.3.22, PHP 4.1.1, SuSE Linux 7.2 (2.2.19)

The backtrace:
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x80bdafc in ap_table_setn ()
(gdb) bt
#0  0x80bdafc in ap_table_setn ()
#1  0x80671be in execute ()
#2  0x40362b84 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at zend.c:814
#3  0x40376091 in php_execute_script (primary_file=0xbffff4d8) at main.c:1307
#4  0x40370a40 in apache_php_module_main (r=0x82a28c8, display_source_mode=0)
    at sapi_apache.c:90
#5  0x403719c0 in send_php (r=0x82a28c8, display_source_mode=0,
    filename=0x82a4400 "/www/htdocs/info.php") at mod_php4.c:575
#6  0x40371a43 in send_parsed_php (r=0x82a28c8) at mod_php4.c:590
#7  0x80c2089 in ap_invoke_handler ()
#8  0x80d813f in process_request_internal ()
#9  0x80d81b2 in ap_process_request ()
#10 0x80cec96 in child_main ()
#11 0x80cee75 in make_child ()
#12 0x80ceff6 in startup_children ()
#13 0x80cf69d in standalone_main ()
#14 0x80cff1c in main ()
#15 0x400a5c6f in __libc_start_main () from /lib/libc.so.6
(gdb)

Can someone tell me what's going wrong?

Heiko
--- End Message ---
--- Begin Message ---
hi all,
i have installed php and apache on my home computer..i am running xp home edition.
the problem is that the php and apache are not working together. what i have done so 
far:

1. configured the httpd.conf file by adding the following lines:
ScriptAlias /php/ "c:/php/" 
AddType application/x-httpd-php .php .phtml 
Action application/x-httpd-php "/php/php.exe"

2.moved the php4ts.dll file to windows\system32....note i do not have a directory 
called winnt

3.configured the php.ini file(located in windows dir)so that:

    extension_dir = c:\windows\system32    //points to where i located the php4ts.dll 
file 

doc_root = c:\program files\apache group\apache\htdocs    //points to the document 
root file. i will be storing my files in the htdocs dirrectory.


what am i doing wrong
--- End Message ---
--- Begin Message ---
What problems/errors are you getting?

Place the following code into a .php file under htdocs:

<?php

phpinfo();

?>

and then enter something like http://localhost/xxx.php into your browser.

Neil

liz lynch wrote:

> hi all,
> i have installed php and apache on my home computer..i am running xp home edition.
> the problem is that the php and apache are not working together. what i have done so 
>far:
>
> 1. configured the httpd.conf file by adding the following lines:
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php .phtml
> Action application/x-httpd-php "/php/php.exe"
>
> 2.moved the php4ts.dll file to windows\system32....note i do not have a directory 
>called winnt
>
> 3.configured the php.ini file(located in windows dir)so that:
>
>     extension_dir = c:\windows\system32    //points to where i located the 
>php4ts.dll file
>
> doc_root = c:\program files\apache group\apache\htdocs    //points to the document 
>root file. i will be storing my files in the htdocs dirrectory.
>
> what am i doing wrong
>
> ***************************************************************
>  This message was virus checked with: SAVI 3.53 Jan 2002
>  last updated 28th January 2002
> ***************************************************************

--
--------------------------------
 Email:  [EMAIL PROTECTED]
         [EMAIL PROTECTED]
--------------------------------


--- End Message ---
--- Begin Message ---
Oh yeah... extension_dir should also have a trailing '\' I believe.

Neil

liz lynch wrote:

> hi all,
> i have installed php and apache on my home computer..i am running xp home edition.
> the problem is that the php and apache are not working together. what i have done so 
>far:
>
> 1. configured the httpd.conf file by adding the following lines:
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php .phtml
> Action application/x-httpd-php "/php/php.exe"
>
> 2.moved the php4ts.dll file to windows\system32....note i do not have a directory 
>called winnt
>
> 3.configured the php.ini file(located in windows dir)so that:
>
>     extension_dir = c:\windows\system32    //points to where i located the 
>php4ts.dll file
>
> doc_root = c:\program files\apache group\apache\htdocs    //points to the document 
>root file. i will be storing my files in the htdocs dirrectory.
>
> what am i doing wrong
>
> ***************************************************************
>  This message was virus checked with: SAVI 3.53 Jan 2002
>  last updated 28th January 2002
> ***************************************************************

--
--------------------------------
 Email:  [EMAIL PROTECTED]
         [EMAIL PROTECTED]
--------------------------------


--- End Message ---
--- Begin Message ---
Problems I see:

First, use forward slashes!

    extension_dir = c:\windows\system32    //points to where i located the
php4ts.dll file

    This should be the folder that contains extension dll's. If you used the
installer it will be "C:/php/extensions" (no quotes) or wherever you
installed PHP.


    doc_root = c:\program files\apache group\apache\htdocs

    Same thing about forward slashes here.

Good luck!

----- Original Message -----
From: "liz lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 3:00 AM
Subject: [PHP] configuring php and apache


hi all,
i have installed php and apache on my home computer..i am running xp home
edition.
the problem is that the php and apache are not working together. what i have
done so far:

1. configured the httpd.conf file by adding the following lines:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"

2.moved the php4ts.dll file to windows\system32....note i do not have a
directory called winnt

3.configured the php.ini file(located in windows dir)so that:

    extension_dir = c:\windows\system32    //points to where i located the
php4ts.dll file

doc_root = c:\program files\apache group\apache\htdocs    //points to the
document root file. i will be storing my files in the htdocs dirrectory.


what am i doing wrong


--- End Message ---
--- Begin Message ---
PLEASE, can someone tell me how may I reach someone that can help me in this
problem ?!?
I've already asked in the PHP-DEV mailing list, but I've seen no answers at
all also there...! IMHO, it can be very useful to use php as a remote
administration language!!!

thanks,
    prakash


----- Original Message -----
From: "Prakash" <[EMAIL PROTECTED]>


> Hi,
>     I'm trying to execute a Webmin script where I can use php as scripting
> language... (It will be good to work with a language as php in a remote
> administration server, as root! potentially dangerous but good!)
>
> Now the STRANGE problem: (seems to be some env variables (maybe I'm wrong)
> when executing PHP as CGI...)
>
> When I execute a test.cgi program from Webmin, it's executed as root, as
it
> was from command line... that's good. The problem is that Webmin execute
> well _every_ program I tried , EXCEPT php !
>
> It seems that php needs some env variables to work well, and these
variables
> aren't provided from the Webmin interface, so to solve the problem I've
> first to understand WHY php does not work...
>
> ---------------------
>
> Maybe I can better explain with 2 samples:
>
> > file aaa.cgi
> >
> >     #!/bin/bash
> >     echo "Content-type: text/plain"
> >     echo
> >     echo "aaa"
> >     touch /home/test.txt
>
> > file bbb.cgi
> >
> >     #!/usr/local/bin/php -q
> >     <?php
> >         echo "Content-type: text/plain\n\n";
> >         echo "aaa\n";
> >         $fd = fopen("/home/test.txt","w");
> >         fclose($fd);
> >     ?>
>
> Now, the 2 programs are quite the same... (if test.txt does not exist...)
> But, the 2 programs behave the same way only if you execute them _from
> command line_.
> If you execute them from the Webmin interface (very good for remote
> administration, that lets execute programs as user root), they behave
> differently:
> aaa.cgi is the same, displays "aaa" on the remote web-browser, and creates
> (well, if text.txt doesn't exist) a local file.
> bbb.cgi does nothing, sends no http headers, no aaa, and does not create
the
> file...
>
> It seems that PHP needs some env variables, and without them, it suddenly
> stops without parsing the file... am I right ?!?
>
> I've also tried to escape from this problem (until understood and solved)
> with a third program:
>
> > file ccc.cgi
> >
> >     #!/bin/bash
> >     /usr/bin/at -f /path/bbb.cgi now+1minute
> >     touch /home/test2.txt
>
> If I call ccc.cgi from Webmin and then from command line, the 2 executions
> are scheduled properly, and look really the same (root user,same
> program,...) but the task scheduled from Webmin is not executed
> properly...
> the php seems to stop with no output.
>
> Also with a file like this:
>
> > file ddd.cgi
> >
> >     #!/bin/bash
> >     /path/bbb.cgi 2>&1 > test3.txt
>
> show that php really has no output on stdout or stderr (test3.txt is
> created, but 0 bytes long when invoked from Webmin!)
>
> So, the BIG problem is: if Webmin can execute all programs, running them
as
> root, WHY doesn't work well with php scripts ?!?
> I think that the PHP need something, and not having it it suddenly
stops...
> but what ?!?
>
> Are there some developer that can help ?!?
>
> (Writing Webmin modules in perl is not good, if you work mainly with php,
> and webmin can be the best remote administration utility...)
>
> thanks to all,
>      waiting for some news...
> prakash
>
>
> --
> 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]
>

--- End Message ---
--- Begin Message ---
There is a way to open an URL in a new window using JAVASCRIP commands as 
such as window.open

where is the documentation for JAVASCRIP commands ?

thanks

Eduardo Melo
copmuter programmer

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--- End Message ---
--- Begin Message ---
On Tue, 29 Jan 2002 09:46:39 -0200, you wrote:

>There is a way to open an URL in a new window

<a href="blah" target="_blank"></a>

>using JAVASCRIP commands as such as window.open

[windowVar = ][window].open("URL", "windowName", ["windowFeatures"])

Where windowFeatures is a comma-separated list of any of the following
:

   toolbar[=yes|no]|[=1|0]
   location[=yes|no]|[=1|0]
   directories[=yes|no]|[=1|0]
   status[=yes|no]|[=1|0]
   menubar[=yes|no]|[=1|0]
   scrollbars[=yes|no]|[=1|0]
   resizable[=yes|no]|[=1|0]
   width=pixels
   height=pixels

>where is the documentation for JAVASCRIP commands ?

http://directory.google.com/Top/Computers/Programming/Languages/JavaScript/References/

>thanks

But please don't do this without a very good reason. It disrupts the
flow of the user's session, and only serves to annoy him. Trying to
second-guess the user's needs in this way is bad user-interface
design.

(Oh, and you posted to a PHP list... you know that, right?)

>Eduardo Melo
>copmuter programmer

*sigh*...

djo

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

I have a problem with a redirect. I have a file that includes a content from
another PHP script,
parses the content as string with output buffering and displays it.

The problem is that the include function doesn't seem to handle redirects.
When that other
PHP script makes a Header relocate the fopen from my initial file is lost
and I get
Warning  fopen No such file or directory
I get the same when I try include.

Do you know a solution to insert remote content handling eventual redirects
in the remote?
Something like a browser.

--

Regards,
----------------------------------------------
Calin Uioreanu
[EMAIL PROTECTED]
Tel: +49 - (0) 89 - 25 55 17 07
http://www.ciao.com
Mnchen, Germany
----------------------------------------------


--- End Message ---
--- Begin Message ---
On Tue, 29 Jan 2002 12:51:15 +0100, you wrote:

>Do you know a solution to insert remote content handling eventual redirects
>in the remote?
>Something like a browser.

fopen() the file you're trying to include, and handle the response
from the server yourself. If it returns 301 or 302, you have to find
the Location header, parse the URL out of it, and retry the fopen().

When you finally have a URL that returns 200 OK, include() it.

Having said that, I'd bet there's a class somewhere that will do the
response parsing for you.
http://php.resourceindex.com/Functions_and_Classes/Clients_and_Servers/HTTP/

Yes, this is a failing of the include() statement... it really should
handle HTTP response codes if it's going to do HTTP. I'm kinda
surprised it doesn't... are you certain?

djo

--- End Message ---
--- Begin Message ---
Hello guys,

I asked that before, but I will explain my problem with more details.

How can I retrieve the HTTP Response Headers using iPlanet or an
independent SAPI function?

Does these variables could come in any $HTTP_*_VARS or $_*?

In Apache we have a function called getallheaders(), but this functions
only returns the HTTP Request Headers, I need the HTTP Response Headers
and it works only under Apache.

For example, suppose there is a function called getallresponseheaders()
that is independent of the Web Server (in fact I did one that just works
under apache,
because it is similar to the getallheaders())

If I write a script like this:

<?
    header("TEST_HEADER: TEST_VALUE");
    var_dump(getallresponseheaders());
?>

I would like to have a result like this:

array(2) {
   ["X-Powered-By"]=>
   string(12) "PHP/4.0.3pl1"
   ["TEST_HEADER"]=>
   string(10) "TEST_VALUE"
}

If anyone has any tip, please, dont worry to write.

A whole project that is already done is dependent of just this feature.

    Thanks a lot
    Novello


--- End Message ---
--- Begin Message ---
What browser are you using?

I just read in the annotated manual there
may be issues wiht this using ie5.x.

Do you have the script running on a public webserver
where I can try it from here just to see if
I get the same results?

-Brian

> -----Original Message-----
> From: Girish Nath [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 28, 2002 7:55 PM
> To: Brian V Bonini
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Need a little help
>
>
> Hi Brian
>
> I've just setup the RedirectMatch in Apache and tried the PHP script
> (test.php) out and it worked fine.
>
> The only thing that caused broken image symbols to appear was if the image
> redirect script (test.php) created any output before the header()
> functions.
> Check for whitespace or any functions that might be outputting error
> messages within test.php
>
> Regards
>
>
> Girish
> --
> www.girishnath.co.uk
>
>
>
> ----- Original Message -----
> From: "Brian V Bonini" <[EMAIL PROTECTED]>
> To: "Girish Nath" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, January 28, 2002 8:17 PM
> Subject: RE: [PHP] Need a little help
>
>
> hmmm, I think I see where your going but
> that either just puts out a lot of garbage
> on the screen:
>
> X!l`7-Y \t1h^?(uT"3? J2'O\'G)G^
> -.tZ-(S!n3pPsfVo`\Z"2'?;Ure8hS??0t^%;-,X
> 9>cI%",(CqxpR "4ȶ&%03. `?P? r ~T
> "^I.Z^:;},,XOWH0PE8,Sx'^TSrc`rB7T
> |+iJFA?ERKf4
> Jв
> etc.....
>
> or a broken image symbol.
>
> -B
>
> > -----Original Message-----
> > From: Girish Nath [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 28, 2002 11:21 AM
> > To: Brian V Bonini
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Need a little help
> >
> >
> > Hi
> >
> > This should send different images to the referer based on what
> parse_url()
> > returns:
> >
> > <?php
> >
> >  $url=parse_url($HTTP_REFERER);
> >  if ($url[host] == "domain.com") {
> >   $requestImage = "images/domain_A.gif";
> >  }
> >  else {
> >   $requestImage = "images/domain_B.gif";
> >  }
> >
> >  header ("Content-Type: image/gif");
> >  header ("Content-Length: ". filesize($requestImage));
> >  header ("Content-Disposition: filename=" . $requestImage);
> >  readfile($requestImage);
> >
> > ?>
> >
> > You may need to modify it a bit perhaps with a "switch"
> statement for more
> > flexibilty. Let me know how you get on.
> >
> > Regards
> >
> >
> > Girish
> > --
> > www.girishnath.co.uk
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Brian V Bonini" <[EMAIL PROTECTED]>
> > To: "PHP Lists" <[EMAIL PROTECTED]>
> > Sent: Monday, January 28, 2002 4:02 PM
> > Subject: [PHP] Need a little help
> >
> >
> > I'm trying to redirect based on referring host
> > and request.
> >
> > I have an .htaccess set up like this:
> > RedirectMatch (.*)\.gif$ http://www.domain.com/_borders/test.php
> > to redirect all requests for .gif's to a php script which then
> > determines the referring host.
> >
> > $url=parse_url($HTTP_REFERER);
> > if ($url[host] == "domain.com") {
> > file://this is where I get stuck
> >   do something
> > } else {do some thing}
> >
> > how to I return the correct image. I.e. if the referring page
> > has an <img src="mydomain.com/image"> link and I redirect requests for
> > that image to the php script to determine the host how can I now
> > return a different image for display into the page. Make sense?
> > Is it possible?
> >
> > -Brian
> >
> > --
> > 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]
>

--- End Message ---
--- Begin Message ---
Hi, is create function slow? Or has it a very significant slowdown compared
to an include?

i might want to create functions on the fly if it isn't tooo slow..

warm regards,
Emile Bosch


--- End Message ---
--- Begin Message ---
including a file is nothing more then placing the text of the include file
at the place you called "include()".... so I think there's no reason why it
should be quicker or slower...

Edward



Hi, is create function slow? Or has it a very significant slowdown compared
to an include?

i might want to create functions on the fly if it isn't tooo slow..

warm regards,
Emile Bosch



--
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]



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

I am trying to submit the contents of a form via email to a set address
and then send a confirmation email based on the entered email address
from the form.

Sending the confirmation email works fine but the second email
confirming delievery of the email is not working. Right now the script
is not picking up the user email varible from the form. The email field
name is biz_email and you can see where I set the varible in the script
$mailto=$biz_email. When I test the form I get the first email without
any problems but the second email comes back to me with the error
stating the user is unknown and I see nobody@"domain name" in the To:
field. So I guess the varible from the form is not being picked up. Any
ideas

Below is the relevent code - I would greatly appreciate any help -
thanks

if (isset($PHP_MAIL_FORM)) {
        include("classes/MailClass.php");
        $tgFormMail=new phpMailer();
        $mailto= "Webmaster Form Submission email address";
        $subject="Basic Registration Submission Form";
        $from="Website";
        $FormMail_sent ="home.php";
        if ($from ==""){
                $lol =$HTTP_HOST;
                $a = str_replace ("www.","",$lol);
                $replaced = "webmaster@$a";
                $from = $replaced;
        }
        if($subject ==""){
                $subject ="Server Generated Email";
        }
        $i=0;
        $arr = array($HTTP_POST_VARS);
        while(list($key, $val) = each($HTTP_POST_VARS)) {
                $mex = $mex."$key: $val\n";
        }
        $FormMail->AddSender($from,$HTTP_HOST);
        $FormMail->AddAddress($mailto,$mailto);
        $FormMail->SetSubject($subject);
        $FormMail->AddBody($mex);
        $FormMail->Send();
        if($tgFormMail_sent != ""){
                header("Location: $FormMail_sent");
        }
}
if ($PHP_MAIL_FORM=true){
   include("classes/MailClass.php");
   $FormMail=new phpMailer();
   $mailto=$biz_email;
   $subject1="Your Submission has been recieved";
   $message="Submission email body";
 
   $FormMail->AddSender($from,$HTTP_HOST);
   $FormMail->AddAddress($to,$to);
   $FormMail->SetSubject($subject1);
   $FormMail->AddBody($messsage);
   $FormMail->Send();
        if($tgFormMail_sent != ""){
        header("Location: $FormMail_sent");
    }
}

--- End Message ---
--- Begin Message ---
Edward R. Bailey wrote:

if ($PHP_MAIL_FORM=true){

should probably be

if ($PHP_MAIL_FORM==true){



Try that.

--------------------------------
Michael Kimsal
http://www.tapinternet.com/php
PHP Training Courses
734-480-9961




--- End Message ---
--- Begin Message ---
Hi list,

I'm new to the xml world, and I need to create a page with data retrieved
from my database using PHP. The process is the same of create an html page??
I mean I can use echo to output the xml tags and values?? Since this page
will be dinamically generated what kind of headers I need to use to this
page become an xml???
I saw many docs in web but all about parse an xml, but not in how to build
one.
-- 



Thank's in advance

Rodrigo

--- End Message ---
--- Begin Message ---
I have two arrays and need to perform the array_diff function.  However,
since it is broken in 4.x, I'm trying to get the same outcome.  Due to the
nature of my call to this function the selected is always going to be a
number of items selected from the connections.  For some reason the outcome
does not work sometimes.  The following is the code I set up.  Please excuse
any poor abilities on my part for constructing the code efficiently (I'm
pretty new at this stuff)....

function array_dif($slctd, $connctns)
        {
                for($i = 0; $i < count($slctd); $i++)
                {
                        if(preg_match("/\b$slctd[$i]\b/", "$connctns[$i]"))
                        {
                                unset($connctns[$i]);
                                unset($slctd[$i]);
                                echo "match0";
                        }
                        for($j = 1 ; $j < count($connctns); $j++)
                        {
                                if(preg_match("/\b$slctd[$i]\b/", "$connctns[$j]"))
                                {
                                        unset($connctns[$j]);
                                        unset($slctd[$i]);
                                        echo "match[$i]";
                                }
                        }
                }
                $k = array_merge($connctns, $selected);
                return $k;
        }

$selected = preg_split("/\,/", $pltoload);
echo "<TH>Select:<TH>";
echo '<BR><select multiple name="plutoload[]">';

for ($i = 0; $i < count($selected); $i++)
{
                echo '<option selected value="', "$selected[$i]", '">', 
"$selected[$i]";
                $trimselect = array();
                array_push($trimselect, (trim($selected[$i])));
}
$unselect = array_dif($trimselect, $connections);
for ($s = 0; $s < count($unselect); $s++)
{
                echo '<option value="conn ', "$unselect[$s]", '">', "$unselect[$s]";
}
echo "</select>";

I trimmed the selected value of white spaces and left the connection
elements alone.  Note the value of $pltoload will be connection, connection,
connection or connection,connection,connection.  If anyone can tell why some
matches don't work when I can view the element in each array and they are
identical in the exception of the key value within their respective array.


Larry

PS. HTML-Kit kicks butt!


--- End Message ---
--- Begin Message ---
Is there a place especially meant to make feature-requests to the
php-development team?

TIA
stefan rusterholz

--- End Message ---
--- Begin Message ---
Can anyone point me in the right direction about how to send a custom
email to a user after a form submission. The user would provide their
email address in the form.

Thanks

Ed

--- End Message ---
--- Begin Message ---
Sorry. I forgot to reply to the list.

----- Original Message -----
From: "Jason Cox" <[EMAIL PROTECTED]>
To: "Edward R. Bailey" <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 8:27 AM
Subject: Re: [PHP] Custom email after form submission


> Ed,
>
> Check the manual for the mail() function.  Here's a link:
> http://www.php.net/manual/en/ref.mail.php
>
> Good Luck,
> Jason Cox
>
> ----- Original Message -----
> From: "Edward R. Bailey" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 29, 2002 8:25 AM
> Subject: [PHP] Custom email after form submission
>
>
> > Can anyone point me in the right direction about how to send a custom
> > email to a user after a form submission. The user would provide their
> > email address in the form.
> >
> > Thanks
> >
> > Ed
> >
> >
> > --
> > 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]
> >
> >
> >
>

--- End Message ---

Reply via email to