php-general Digest 18 Jun 2012 00:11:28 -0000 Issue 7859

Topics (messages 318264 through 318270):

Re: reload page without use header
        318264 by: Stuart Dallas

phpinfo
        318265 by: Jim Giner
        318267 by: Matijn Woudt
        318268 by: Jim Giner
        318269 by: Jim Giner

Missing something simple
        318266 by: Lester Caine

Re: else if vs switch
        318270 by: Jim Lucas

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On 17 Jun 2012, at 09:06, Farzan Dalaee wrote:

> is there any way to reload page without using header('location :index.php'); 
> and javascript?

When you say "reload page" do you mean redirect to another page or refresh the 
current page?

You can reload or redirect a page using a meta tag in your HTTP head block -- 
http://en.wikipedia.org/wiki/Meta_refresh -- but if you're wanting to redirect 
the user to another page you really should use an HTTP header.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
When one executes a phpinfo call, the display of info broken into the
 various sections mostly makes sense. The $_SERVER vars are listed with a
 _SERVER name, the environment ones show _ENV, and so on.  But I question
 what are the duplicate ones that dont' have a prefix name.

 My concern is the PHP_AUTH_PW setting, which I was able to remove from the
 ENV and SERVER sections, but not from the section titled "Environment". 
How
 does one do this?




--- End Message ---
--- Begin Message ---
On Sun, Jun 17, 2012 at 10:22 PM, Jim Giner
<jim.gi...@albanyhandball.com> wrote:
> When one executes a phpinfo call, the display of info broken into the
>  various sections mostly makes sense. The $_SERVER vars are listed with a
>  _SERVER name, the environment ones show _ENV, and so on.  But I question
>  what are the duplicate ones that dont' have a prefix name.
>
>  My concern is the PHP_AUTH_PW setting, which I was able to remove from the
>  ENV and SERVER sections, but not from the section titled "Environment".
> How
>  does one do this?
>

Those are the ones returned from getenv [1] or apache_getenv [2], and
you can set them using putenv [3] resp. apache_setenv [4].

- Matijn

[1] www.php.net/getenv
[2] www.php.net/apache_getenv
[3] www.php.net/putenv
[4] www.php.net/apache_setenv

--- End Message ---
--- Begin Message ---
"Matijn Woudt" <tijn...@gmail.com> wrote in message 
news:cac_gtumpirenkswm2-lucwhbycmxdgg3a+hwr1aoqwiyz40...@mail.gmail.com...
On Sun, Jun 17, 2012 at 10:22 PM, Jim Giner
<jim.gi...@albanyhandball.com> wrote:
> When one executes a phpinfo call, the display of info broken into the
> various sections mostly makes sense. The $_SERVER vars are listed with a
> _SERVER name, the environment ones show _ENV, and so on. But I question
> what are the duplicate ones that dont' have a prefix name.
>
> My concern is the PHP_AUTH_PW setting, which I was able to remove from the
> ENV and SERVER sections, but not from the section titled "Environment".
> How
> does one do this?
>

Those are the ones returned from getenv [1] or apache_getenv [2], and
you can set them using putenv [3] resp. apache_setenv [4].

- Matijn

#1 - getenv does return the value that I expect
#2 - apache_getenv is not recognized by my php  It's in the php.net manual, 
but my editor doesn't like it and php errors out on it.  ??
#3 - I tried putenv to set the value to something like '' and then I did a 
phpinfo - now I have two names - one with a password and one with '' in it.
[1] www.php.net/getenv
[2] www.php.net/apache_getenv
[3] www.php.net/putenv
[4] www.php.net/apache_setenv 



--- End Message ---
--- Begin Message ---
oops - read the notes for PUTENV.  Did the 'delete' properly and now I have 
no entries for php_auth_pw.
For those reading along - to remove the variable use putenv("varname")  NOT 
putenv("varname= '' ");

Thanks Martijn!! 



--- End Message ---
--- Begin Message --- Serves me right for not starting this earlier, but I need to take a machine to site in the morning and now something is not playing ball.

Windows XP 32bit up to date with updates ...

PHP5.4.4 installed from php-5.4.4-Win32-VC9-x86.zip up and running fine from command line and via php -S giving clean phpinfo with all the modules expected.
at C:/Network/PHP5 - which is also in the windows path.

Apache2.4.2 installed from httpd-2.4.2-win32-VC9.zip and working fine
at C:/Network/Apache

Apache module from php5apache2_4.dll-php-5.4-win32.zip copied to C:/Network/PHP5 and the latest VisualC++ libraries installed

Enabling 'LoadModule' is giving the
"C:/Network/Apache/conf/httpd.conf:
Cannot load C:/Network/PHP5/php5apache2_4.dll into server:
The specified module could not be found."

Normally I'd just assume that PHP was not starting up, but since PHP is running from command line and the .dll is in the right place I'm now a little confused as to what I'm missing ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
On 6/15/2012 3:29 PM, Joshua Kehn wrote:
Way easier to just use a map.

$mapping = array(
        'Calgary' =>  "abc@emailaddress",
        'Brooks' =>  "def@emailaddress",
        // etc
);
$toaddress = $mapping[$city];

I would use this, but add a check to it.

$mapping = array(
  'default' => 'defa...@domain.tld',
...
);

...

if ( isset($mapping[$city]) ) {
  $toaddress = $mapping[$city];
} else {
  $toaddress = $mapping['default'];
}

Jim

--- End Message ---

Reply via email to