php files not opening in firefox

Tapas Mishra mightydreams at gmail.com
Wed Feb 9 17:59:46 UTC 2011


On Wed, Feb 9, 2011 at 10:51 PM, Paulo Sampaio
<paulo.vicente.neto at gmail.com> wrote:
> /var/www/ is the root folder of Apache, everything inside it would be in
> localhost/
>
> Example:
> /var/www/myscript.php = http://localhost/myscript.php
>
> /var/www/some_directory/myscript.php =
> http://localhost/some_directory/myscript.php
>
> and so on.
>
> This rule can be modified, by using mod_rewrite you can create rules mapping
> the url to specific scripts. That is a more complex aproach, i think the
> best is to master absolute paths and urls, and only after that try to learn
> about mod_rewrite.
>
> Atenciosamente,
> __
> Paulo Sampaio
> Desenvolvimento Web
>
>
> 2011/2/9 Ashim Kapoor <ashimkapoor at gmail.com>
>>
>>> That is not the right way to open php scripts, you should navigate to
>>> them using yout browser. If you simply double click the php file, firefox
>>> will load something like:
>>>
>>> file:///var/www/myscript.php
>>>
>>> It won't work because php needs to be interpreted on demand. Apache, your
>>> webserver runs this task diferently it invokes the php interpreter runs it
>>> and the result is then presented to the browser. For that you to access,
>>> thru your browser, something like
>>>
>>> http://localhost/myscript.php
>>>
>>
>> How would i open this file:///var/www/Php and MySql Bible/ch4/file1.php
>> with the localhost way ?
>> As far as i remember till today afternoon ALL php files withing the
>> var/www folder would open in FF by clicking on them.
>>
Paste the output of following also

ls -l /var/

--




More information about the ubuntu-users mailing list