HELP with PHP auth


#1

i used to use this two variables in my PHP
$_SERVER[‘PHP_AUTH_USER’]
$_SERVER[‘PHP_AUTH_PW’]

when i move to dreamhost, it doesn’t work.
Help…!!


#2

[quote]i used to use this two variables in my PHP
$_SERVER[‘PHP_AUTH_USER’]
$_SERVER[‘PHP_AUTH_PW’]

when i move to dreamhost, it doesn’t work.
Help…!![/quote]
According to the documentation, those two server variables are only available when running PHP as an Apache module. The default arrangement here is to run PHP as a CGI application.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

ar… so is there any way i can do similar thing?


#4

The PHP.net page that I linked to has examples of similar or alternative solutions in its comments. I don’t know anything about it myself, except to say that you could always switch to using mod PHP in the Control Panel (although I gather this functionality has been withdrawn from some domains, for reasons I cannot fathom).


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

do u know where is that in Control Panel?


#6

Control Panel >> Domains >> Manage Domains

Under the Web Hosting column, click the [Edit] link that corresponds to the domain you wish to change. If you have not had the functionality removed, you will be able to choose from the following PHP versions:

  1. 5.1.2
  2. 4.4.2.
  3. mod_php 4.4.2

You need option 3 in order to restore the functionality you are missing. If option 3 is unavailable, you will need to find an alternative solution.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#7

if i dun see the 3rd options… that means i am doomed?
just curious, if i ask for a full refund, will my referral be charged too?


#8

It just means you need to seek an alternative solution. There are plenty of ways to skin that cat.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]