This is a discussion on PHP as CGI and .htaccess within the PHP Language forums, part of the PHP Programming Forums category; Hi folks, I have the Apacha server (2.2.8) with PHP installed as CGI Binary. This, as i'm ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi folks,
I have the Apacha server (2.2.8) with PHP installed as CGI Binary. This, as i'm discovering, means that I can't change php configurations through .htaccess. Is my searches right or there is a way of change a PHP - CGI Bynary - setting using .htaccess? Thanks, Thiago |
|
|||
|
Thiago Macedo wrote:
> Hi folks, > > I have the Apacha server (2.2.8) with PHP installed as CGI Binary. > This, as i'm discovering, means that I can't change php configurations > through .htaccess. > Is my searches right or there is a way of change a PHP - CGI Bynary - > setting using .htaccess? > > Thanks, > > Thiago > True. Why not install PHP as an Apache module? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
Thiago Macedo escribió:
> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. > This, as i'm discovering, means that I can't change php configurations > through .htaccess. > Is my searches right or there is a way of change a PHP - CGI Bynary - > setting using .htaccess? As far as I know, there isn't. You need to change them in your per-user php.ini file or from PHP itself, if such settings would allow ini_set(). I normally make my scripts check whether they have the correct settings and refuse to run if they don't. That way I immediately notice that ..htaccess is not working and I can make the appropriate changes in my custom php.ini file. -- -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programación web: http://bits.demogracia.com -- Mi web de humor al baño María: http://www.demogracia.com -- |
|
|||
|
On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Thiago Macedo wrote: > > Hi folks, > > > I have the Apacha server (2.2.8) with PHP installed as CGI Binary. > > This, as i'm discovering, means that I can't change php configurations > > through .htaccess. > > Is my searches right or there is a way of change a PHP - CGI Bynary - > > setting using .htaccess? > > > Thanks, > > > Thiago > > True. Why not install PHP as an Apache module? > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== I can't do it. I followed the install instructions but it doesn't work for PHP 4. PHP 5 everything goes OK. |
|
|||
|
Thiago Macedo wrote:
> On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> Thiago Macedo wrote: >>> Hi folks, >>> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. >>> This, as i'm discovering, means that I can't change php configurations >>> through .htaccess. >>> Is my searches right or there is a way of change a PHP - CGI Bynary - >>> setting using .htaccess? >>> Thanks, >>> Thiago >> True. Why not install PHP as an Apache module? >> >> -- >> ================== >> Remove the "x" from my email address >> Jerry Stuckle >> JDS Computer Training Corp. >> jstuck...@attglobal.net >> ================== > > I can't do it. I followed the install instructions but it doesn't work > for PHP 4. PHP 5 everything goes OK. > I've installed both PHP 4 and 5 as Apache modules, and it works fine. You just can't have both installed on the same system. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
On 7 maio, 11:28, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Thiago Macedo wrote: > > On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote: > >> Thiago Macedo wrote: > >>> Hi folks, > >>> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. > >>> This, as i'm discovering, means that I can't change php configurations > >>> through .htaccess. > >>> Is my searches right or there is a way of change a PHP - CGI Bynary - > >>> setting using .htaccess? > >>> Thanks, > >>> Thiago > >> True. Why not install PHP as an Apache module? > > >> -- > >> ================== > >> Remove the "x" from my email address > >> Jerry Stuckle > >> JDS Computer Training Corp. > >> jstuck...@attglobal.net > >> ================== > > > I can't do it. I followed the install instructions but it doesn't work > > for PHP 4. PHP 5 everything goes OK. > > I've installed both PHP 4 and 5 as Apache modules, and it works fine. > You just can't have both installed on the same system. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== "Module not found" error. Specified the PATH and php ini_dir, while the other httpd directives. Other anoying problem is that as CGI binary (PHP 4) i cant install extensions :p thanks for reply. Thiago |
|
|||
|
Thiago Macedo wrote:
> On 7 maio, 11:28, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> Thiago Macedo wrote: >>> On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote: >>>> Thiago Macedo wrote: >>>>> Hi folks, >>>>> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. >>>>> This, as i'm discovering, means that I can't change php configurations >>>>> through .htaccess. >>>>> Is my searches right or there is a way of change a PHP - CGI Bynary - >>>>> setting using .htaccess? >>>>> Thanks, >>>>> Thiago >>>> True. Why not install PHP as an Apache module? >>>> -- >>>> ================== >>>> Remove the "x" from my email address >>>> Jerry Stuckle >>>> JDS Computer Training Corp. >>>> jstuck...@attglobal.net >>>> ================== >>> I can't do it. I followed the install instructions but it doesn't work >>> for PHP 4. PHP 5 everything goes OK. >> I've installed both PHP 4 and 5 as Apache modules, and it works fine. >> You just can't have both installed on the same system. >> > > "Module not found" error. Specified the PATH and php ini_dir, while > the other httpd directives. > Other anoying problem is that as CGI binary (PHP 4) i cant install > extensions > :p > > thanks for reply. > > Thiago > Then you have done something wrong. It works fine, when you specify things correctly. But not knowing what you did, it's impossible to say. It could be anything from an incorrect statement to security issues (the Apache user not having permission to execute the module) to an associated module missing. But it does work - quite well, in fact. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
On 7 maio, 13:56, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Thiago Macedo wrote: > > On 7 maio, 11:28, Jerry Stuckle <jstuck...@attglobal.net> wrote: > >> Thiago Macedo wrote: > >>> On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote: > >>>> Thiago Macedo wrote: > >>>>> Hi folks, > >>>>> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. > >>>>> This, as i'm discovering, means that I can't change php configurations > >>>>> through .htaccess. > >>>>> Is my searches right or there is a way of change a PHP - CGI Bynary - > >>>>> setting using .htaccess? > >>>>> Thanks, > >>>>> Thiago > >>>> True. Why not install PHP as an Apache module? > >>>> -- > >>>> ================== > >>>> Remove the "x" from my email address > >>>> Jerry Stuckle > >>>> JDS Computer Training Corp. > >>>> jstuck...@attglobal.net > >>>> ================== > >>> I can't do it. I followed the install instructions but it doesn't work > >>> for PHP 4. PHP 5 everything goes OK. > >> I've installed both PHP 4 and 5 as Apache modules, and it works fine. > >> You just can't have both installed on the same system. > > > "Module not found" error. Specified the PATH and php ini_dir, while > > the other httpd directives. > > Other anoying problem is that as CGI binary (PHP 4) i cant install > > extensions > > :p > > > thanks for reply. > > > Thiago > > Then you have done something wrong. It works fine, when you specify > things correctly. > > But not knowing what you did, it's impossible to say. It could be > anything from an incorrect statement to security issues (the Apache user > not having permission to execute the module) to an associated module > missing. > > But it does work - quite well, in fact. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== yes, for sure it works and i'm missing something. Can you tell me about this security issues? what is the user apache works on? the associated modules are in the ./dlls path and must be copied to the php root directory, right? other consideration.. in PHP 5 package we have a module for Apache 2.2 and one for 2.0. I'm trying to install them in Apache 2.2. PHP 4 works on it, while it have just an module for Apache 2? Thanks again, Thiago |
|
|||
|
Thiago Macedo wrote:
> On 7 maio, 13:56, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> Thiago Macedo wrote: >>> On 7 maio, 11:28, Jerry Stuckle <jstuck...@attglobal.net> wrote: >>>> Thiago Macedo wrote: >>>>> On 27 abr, 23:46, Jerry Stuckle <jstuck...@attglobal.net> wrote: >>>>>> Thiago Macedo wrote: >>>>>>> Hi folks, >>>>>>> I have the Apacha server (2.2.8) with PHP installed as CGI Binary. >>>>>>> This, as i'm discovering, means that I can't change php configurations >>>>>>> through .htaccess. >>>>>>> Is my searches right or there is a way of change a PHP - CGI Bynary - >>>>>>> setting using .htaccess? >>>>>>> Thanks, >>>>>>> Thiago >>>>>> True. Why not install PHP as an Apache module? >>>>>> -- >>>>>> ================== >>>>>> Remove the "x" from my email address >>>>>> Jerry Stuckle >>>>>> JDS Computer Training Corp. >>>>>> jstuck...@attglobal.net >>>>>> ================== >>>>> I can't do it. I followed the install instructions but it doesn't work >>>>> for PHP 4. PHP 5 everything goes OK. >>>> I've installed both PHP 4 and 5 as Apache modules, and it works fine. >>>> You just can't have both installed on the same system. >>> "Module not found" error. Specified the PATH and php ini_dir, while >>> the other httpd directives. >>> Other anoying problem is that as CGI binary (PHP 4) i cant install >>> extensions >>> :p >>> thanks for reply. >>> Thiago >> Then you have done something wrong. It works fine, when you specify >> things correctly. >> >> But not knowing what you did, it's impossible to say. It could be >> anything from an incorrect statement to security issues (the Apache user >> not having permission to execute the module) to an associated module >> missing. >> >> But it does work - quite well, in fact. >> >> -- >> ================== >> Remove the "x" from my email address >> Jerry Stuckle >> JDS Computer Training Corp. >> jstuck...@attglobal.net >> ================== > > yes, for sure it works and i'm missing something. > Can you tell me about this security issues? what is the user apache > works on? > the associated modules are in the ./dlls path and must be copied to > the php root directory, right? > other consideration.. in PHP 5 package we have a module for Apache 2.2 > and one for 2.0. I'm trying to install them in Apache 2.2. PHP 4 works > on it, while it have just an module for Apache 2? > > Thanks again, > > Thiago > Your sysadmin should be able to help you out with the security issues. But I may have to backtrack on that PHP 4 issue. I never tried installing it on Apache 2.2 (just read back and put 2 and 2 together). I had gone to PHP 5 long before that. So it may not work for you. You may have to install it as a cgi, in which case your .htaccess won't work. Personally, I don't know why you'd use an unsupported version of PHP anyway, but I'm sure you have your reasons. But if you want to use it, you'll probably have to download the source files and compile it yourself. It's not that hard under Unix, but some of the Apache API's have changed and I don't know if it can even be compiled against Apache 2.2 libs. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |