Go Back   Tech Support Forum > Design Forum > Web Serving and Management

User Tag List

Handling files by http server

This is a discussion on Handling files by http server within the Web Serving and Management forums, part of the Tech Support Forum category. As i understand when the server (e.g. Apache) receives a request it looks for file name extension to find associated


Closed Thread
 
Thread Tools Search this Thread
Old 08-26-2016, 07:21 AM   #1
Registered Member
 
Join Date: May 2016
Posts: 13
OS: win7



As i understand when the server (e.g. Apache) receives a request it looks for file name extension to find associated mime-type. Then it looks for the handler handling this mine-type (i'm stating it based off adding PHP support to Apache). And here are my questions:
  1. Is the above statement correct?
  2. If so when there is no handler for given mime-type does it mean the default behavior - that is just send a file to the client?
  3. If there is even no explicit extension - mime-type association defined (e.g. .html) the default action again is just send a file to the client?
  4. According to some sources to add PHP support to Apache we have to use
    addType directive: AddType application/x-httpd-php .php while others say to use addHandler directive: AddHandler application/x-httpd-php .php which in my opinion is the only correct because addType should be used only for static documents. So why the addType version is still correct?
  5. I found somewhere such a lines:
Code:
AddType text/html .php .phps 
AddHandler application/x-httpd-php .php 
AddHandler application/x-httpd-php-source .phps
Does it mean that AddType directive will be used if the server can't find the handler for application/x-httpd-php mime-type and the action would be just to send .php source file to the client with text/html mime-type in response?
mulligan81 is offline  
Sponsored Links
Advertisement
 
Old 08-26-2016, 08:48 PM   #2
Manager
- Alternative Computing
- Design
 
wmorri's Avatar
 
Join Date: May 2008
Location: New York
Posts: 6,492
OS: Window 7/Ubuntu/Fedora/Backtrack 5

My System

Send a message via AIM to wmorri Send a message via MSN to wmorri

Hmm, it has been a long time since I have dealt with anything like this. First off, if you are just talking about PHP then have you installed PHP and have you looked to see if it is working? I would create a info.php file with the following.

PHP Code:
<?php info(); ?>
If you are able to access this file then things sound be working for you. As for your first question, I do believe that your correct. As for the rest of your questions this isn't something i deal a lot with.
__________________


Linux Forever!|html5 boilerplate
wmorri is offline  
Old 09-15-2016, 02:50 PM   #3
TSF Enthusiast
 
BrentC's Avatar
 
Join Date: May 2007
Posts: 1,117
OS: Vista Home Premium



You also need Apache Server that will 'execute' the PHP file.

To make it all easier, I recommend you download WAMP Server. Here is a site which will download WAMP for you.

https://wampserver.en.softonic.com/

WAMP is an acronym for Windows/Apache/MySQL/PHP. These 3 modules will be installed on your system. Download WAMP to the base directory (C;\) and it will create a folder named 'wamp' with all its folders.

To execute PHP files, place those files in the wamp/www folder. To execute a file, enter in the address bar: localhost/phpfile.php with the actual name of the file. (do not enter www before the file name).

Try entering just localhost and see what displays.

Any Questions? I am here.
BrentC is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
infected with javaws.exe
i have 33 programs installed but task manager shows %100 usage with no programs running. there are so many instances of javaws.exe running i can't count them. when i googled it one of the possible ways to remove led me to a program that didn't even identify it. :banghead: i tried adaware and...
imchar Inactive Malware Help Topics 5 09-23-2015 02:56 PM
I just installed a program and now my browser keeps crashing...
I downloaded "Mipony" under the false pretense that it was a safe program. Now Google Chrome has some weird add-ins, but it also crashes within a minute of use. Whenever I try to type in a website, the URL also changes by itself to something else. Thank you in advance! DDS...
Sylvir Virus/Trojan/Spyware Help 0 05-16-2013 10:11 PM
Virus plays random audio ads
Hello, I have had this virus a few times before, and usually would simply system restore and it went away. However, this time I've been doing a lot recently and don't want to have to reinstall or re download all my stuff, so any advice I could get would be greatly appreciated. Basically, I'll be...
Deatho Resolved HJT Threads 24 07-23-2012 11:16 AM
Downloads from IE say that they have a virus
Good Evening Tech Support Forum, Been awhile since I've been here. Working on my sister-in-laws notebook and it has some issues. First, Vista SP2 would not install. Got it to install after running the Vista SP2 fix from Microsoft. After that, I was able to get all of the updates installed...
mrmuggyd Resolved HJT Threads 19 06-02-2012 08:12 PM
Problem with windows live movie maker -the system cannot find path specified
Typical, I updated my spybot, spyware blaster and ad-adware. I ran them and since i did i found a few problems. My keyboard switched to US style. I fixed that but when I tried to run windows movie maker i found the problem "the system cannot find the path specified". there may be more...
paul2louise Windows 7 , Windows Vista Support 4 05-16-2012 06:45 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts