[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] [RaQ4] PHP without .php



At 05:21 PM 19/08/02 -0500, you wrote:
>>>>>> A user brought to my attention that on his php enabled site,
>>>>>> "phpscriptname.php" and "phpscriptname" both execute the file.
>>>>>>
>>>>>> Can anyone explain why?
>>>>>> Does php parse every file?
>>>>>> -----------------------
>>>>>> Does the site have any related mod-rewrite rules either in the
>>>>>> httpd.conf or in an .htaccess files for the related director(y|ies)?
>>>>>
>>>>> I also notice that this works with other sites on the server - is this
>>>>> the default behavior for php? Can somebody test it on their box also?
>>>>
>>>> I just tested this on my machine (RaQ3 w/ php 4.2.2.). It does not
> work.
>>>> Outside of the incident you describe, as far as I am aware, PHP does
> not
>>>> parse files that it is not specified to do so in your httpd.conf file.
>>>>
>>>> Hope this helps,
>>>> Kam.
>>>
>>> Thanks Kam, now I have conflicting info :)
>>>
>>> I'm running PHP 4.1.2-3 on a RaQ4.
>>> Results from anyone else?
>>>
>>> - Bill
>>
>> i ran this script:
>>
>> <?
>> print(phpinfo());
>> ?>
>>
>> called just test - i.e. no .php
>> on a raq4 with php enabled and it didn't parse it as php.
>>
>> andy
>
> can you call it test.php and try again?
>
> My users file is named forloop.php but it will run when called as:
> www.domain.tld/forloop
> -----------------------------
>
> Does your httpd.conf or .htaccess file contain any script-alaises
> or rerwite rules that set the mine-type, i.e.,  something like:
>
> RewriteCond %{REQUEST_FILENAME}.php   -s
> RewriteRule ^([^.]+)$          $1.php   [T=application/x-httpd-cgi,L]
> RewriteCond %{REQUEST_FILENAME}    -s
> ReWriteRile ^[^.]+$               -  [T=application/x-httpd-cgi,L]
>
We are running a stop Raq4 with pkgmasters php4.1.2 pkg.
Haven't looked at the conf file yet.

Dave

Also stock RaQ4 with pkgmasters php and openwebmail.

<VirtualHost xx.xx.xx.xx>
ServerName www.domain.tld
ServerAdmin admin
DocumentRoot /home/sites/site3/web
ServerAlias domain.tld www.other.domain.tld other.domain.tld
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^xxx.xxx.xxx.xxx(:80)?$
RewriteCond %{HTTP_HOST}                !^www.domain.tld(:80)?$
RewriteRule ^/(.*)                      http://www.domain.tld/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType    text/html     .shtml
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
</VirtualHost>

- Bill



---------------------------------
William J.A. Brillinger
Precision Design Co.

E-Mail:   mailto:billy@xxxxxxxxxx
Web site: http://www.pdcweb.net