Nov 8, 2009

Parsing Html As Php - and XAMPP as the server version on Windows

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > PHP Programming

Parsing Html As Php - and XAMPP as the server version on Windows

jlhaslip
On my Trap17 account here, I have an .htaccess file with the following declaration which (I think) forces all html files to be parsed by the PHP Parsing engine and therefore I can insert snippets of php scripts into html files.
CODE
AddType application/x-httpd-php .html .htm

However, when I add an .htaccess file to the local directory of the version of XAMPP on my local machine, it fails. I have tried to add the .htaccess file to the htdocs folder and elsewhere, but it still doesn't work to parse html through the php parser. Any ideas on how to get these html files through the php parser?

XAMPP running PHP 5.0 on a windows 98 se machine. htdocs folder as localhost.

Comment/Reply (w/o sign-up)

Tyssen
I've had trouble with .htaccess on my local machine too. I think even though you're running an Apache installation that it doesn't work right with Windows. Or there could be some setting in the config file which is turned off by default which you need to find and turn on.

Comment/Reply (w/o sign-up)

michaelper22
Maybe you could try adding the directive (or a similar directive) to the httpd.conf file. Or try creating a file by the name of htaccess.txt and renaming it to .htaccess.

Comment/Reply (w/o sign-up)

Hamtaro
Do you have any other settings in your .htaccess file? If you don't, One thing that you could do, is check the AllowOverride directive in your httpd.conf file. If you set it to "AllowOverride All" that should work. However, it has been so long so I've used httpd.conf, that I've forgotten.
If you do have other settings in it, then I have no idea what's wrong.

If you do add it to httpd.conf, you will need to restart the server.

Comment/Reply (w/o sign-up)

jlhaslip
Nope, doesn't work. Gives a 500 Server Error. Won't even do a php file if I set it to All.

Comment/Reply (w/o sign-up)

Tyssen
Is this line commented: LoadModule rewrite_module modules/mod_rewrite.so

Comment/Reply (w/o sign-up)

jlhaslip
Tried it both ways, no luck. I have the config file set back to default now. I'll just leave it there.

Thanks for everyone's input.

Comment/Reply (w/o sign-up)

Tyssen
Yeah, I think it's a limitation of a Windows Apache package.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : parsing, html, php, xampp, server, version, windows

  1. Weird Formatting: Embedding Php Into Html
    (10)
  2. Dohwow
    4 my private server (2)
    how do i add php into the website im so lost ^^ /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" />....
  3. Xampp How Can I Generate "automatic Start Sites"
    (8)
    I am new using XAMPP and PHP. I am trying to build website using Joomla which is required my
    computer to have php. So i installed this XAMPP and install my joomla website. My questions is
    everytime i type localhost is not going to my joomla website that i built. it always goes to
    localhost/xampp. i know i have to configure the httpd.conf but i have no idea how to configure this.
    can anyone help me with this. my website folder called "test". how do i redirect to this test folder
    so that everytime i type local host it will open the test website. I really appreciate your he....
  4. How To Use Xampp To Test Php
    (4)
    Hi, I'm new at trap17, and it's a good host, but there are too many forums so sorry if I got
    this is the wrong forum. I am using Fedora 9 (Linux) and I want to test PHP locally and one of the
    moderators said XAMPP is good. I''ve got it installed and that, and I can go to the XAMPP
    page by going to http://localhost/xampp/ and logging in. However, I want to know how I can use
    XAMPP to test PHP locally. Any help would be appreciated. /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
  5. Html Form!
    Using MySQL?! (4)
    Hey, I need your help again! I need some good working tutorial how I can update my SQL through HTML
    form. I did use some tutorials online found with the help of google; but they do not work properly;
    I mean there are still small mistakes. I need to have a good tutorial to follow. It should be
    based on security and more things. It has to be done in proper way.......
  6. Compiling Php On Windows
    (5)
    hello all im trying to compile php 5 on my windows box with visual studio 2005 , every thing goes
    fine on my computer ,but when i moved the php.exe and the dll corresponding to it to another
    computer nothing happend , the program won't work. what can i do to make it working? ....
  7. How Do I Get The Result To "stick" And Add Html Tags?
    Help please? (14)
    $changepage = $_REQUEST ; echo " $changepage "; ?> Okay, I need a way for any
    information typed in my textarea to "stick" on the page in which it "posts". Since I am creating a
    way for my registered users to decorate their "homepages". So any help, tutorials, etc. would be
    greatly appreciated. ^^ Thanks.....
  8. Mozilla Out With Firefox 3 Beta 4
    The beta 4 version of FireFox 3 is out .. (1)
    QUOTE The just-released beta 4 version of Firefox 3 offers a few visible additions to the
    browser. For example, the download manager has been improved, making it simpler to locate and work
    with downloaded files. It's quite nice -- you can easily search through your downloads. Also,
    Firefox now integrates directly with your virus scanner, and shows the scanning being done right
    inside the download manager. And you can see the icon of the file you've downloaded, making it a
    lot quicker to identify. The primary interface has been somewhat modified to look more....
  9. Windows Can Be Hacked Via Firewire
    (11)
    QUOTE A New Zealand security researcher has published a software tool allowing attackers to
    quickly gain access to Windows systems via a Firewire port. The tool, which can only be used by
    attackers with physical access to a system, comes shortly after the publication of research on
    gaining access to encrypted hard drives via physical access to memory. Researcher Adam Boileau, a
    consultant with Immunity, originally demonstrated the access tool at a security conference in 2006,
    but decided not to release the code any further at the time. Two years later, however, not....
  10. Php Without Server
    (16)
    I have just recently bought a laptop and would like to use PHP for local reasons on it, but I am not
    allowed to setu p a local webserver because it would slow down our already crappy internet. Is there
    a way for me to run local PHP without using Apache or any other webserver for purely local uses.....
  11. File Checker-how To Check File Whith Html Through Html?
    (2)
    edit:sorry for the mistake it is php not html and its with not whith my code checking script= CODE
    $file = '$CHECK'; if (file_exists($file)) {     echo "The file $filename exists"; } else
    {     echo "The file $filename does not exist"; } ?> my question is how to check the file whith
    html example:on a page a text box is provided and a button the user writes a file name (or website)
    the user clicks on the submit button then it checks and show it (with the code above) i got the
    code CODE $filename=$_POST ; if (file_exists($filename)) {     echo "The....
  12. Html Code Tester. Online Script
    (15)
    Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
    this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
    Current script: CODE //Save this as something like htmltest.php function CheckForm() {
    $html_unsafe=$_POST ; //Gives us our user input $html_safe=str_replace(" //Starts security measures
    $html_safe=str_replace("?>"," ",$html_safe); //User input now secure server side //Still security
    issues client side echo $html_safe; //echos our statement } //End function //Main script....
  13. Html Site With Login
    Is it possible? (2)
    Hello. I´m building my own site and I need some help... Is it possible to use a login sistem in php
    and mysql database in a html site? ....
  14. Script To Translate Into Bbcode From Html Tags
    (1)
    I was wanting to know how to make a form like they use here for the website form. I want to be able
    to turn stuff in to bbcode. If you know how or would be willing to write the script for me could
    you email me. will@darkzone3.com . I am william to give all credit to who ever makes it. and i can
    put a link back to a site if you want. Please be specific with the topic title. "Help" is never a
    good topic title. This is explained in our forum rules. Title modified. ....
  15. Windows Login Credentials
    (0)
    On an intranet I'm running php. apache and mysql. We use Windows logins. I have a form that
    users can submit. This will require a login. I would prefer to use the windows login and passwords.
    can I link to the windows authentication? The issue I see is when a user changes the password. My
    link would need to update the password....
  16. Php Pages Permission On Apache Server
    PHP pages permission on Apache Server (1)
    Hello, I want to know what permissions for PHP pages should be given on Apache web server so that
    PHP pages can be executed. If PHP pages are in a folder, what permissions should be given for that
    folder? ....
  17. <?php ?> Marking Up With Php
    How to simply add HTML tags with PHP (0)
    Just a simple function to mark your queries /smile.gif" style="vertical-align:middle" emoid=":)"
    border="0" alt="smile.gif" /> CODE $uzorak = 'Hosting credit'; //use post to get
    $uzorak variable $tapeti = "Hosting credits are collected by posting at the forums. The hosting
    credits are given after your posts are filtered and depending on its size, you get proportional
    hosting credits. Once you get the required credits you can post an application for hosting. One of
    our admins will then approve your application after which you can register an account at ht....
  18. Help With Moving Html Form Results To Shopping Cart?
    (3)
    Hello All- So I think I'm tackling a pretty big project here and was looking for some help... I
    am fairly new to extensive coding (beyond HTML and a little bit of JavaScript) and wanted to know
    how I can recall HTML form results on the next page (in a shopping cart) with a price based on the
    choices picked in the form. It sounds complicated...look at this example: Check out this page:
    http://www.plugcomputers.com/intelprobuild.php See how when the user goes through and picks all
    their computer parts a price at the bottom shows the system price based on their sel....
  19. Can Php Interact With A Visual Basic App On A Server
    (10)
    I am currently making a game. And I want to use a command through php to ineract with a visual
    basic app on my server. Is it possible? and how?....
  20. Sub Domain Help In Xampp
    Sub Domain Help in xampp (4)
    I am trying to work out how to get subdomains working in xampp. I have tried all of the tutorials
    on the net but I still cant work it out. Any Ideas? Thanks Rob....
  21. Php Escaped Control Characters And Windows
    they aren't working for me. (3)
    In php coding, when you escape certain characters, they have an impact on the output of an
    echo'd or printed string. ie "\r\n\t" should give you a new line and a tab before outputting the
    content for a line of printing. They vary by OS, I know, but I have tried all the variations I can
    think of and can't seem to control output using them. Believe me, I have tried multiple
    variations and nothing works for me. I have checked the php.ini file for settings but I can't
    find where you can modify them. So the question is : Where do i look to confirm the setting....
  22. Wappyftp V1.00
    upload to server via ftp from your mobile phone :-) (8)
    wappyFTP v1.00 by wappy --- site: http://cult.trap17.com mail: admin@cult.trap17.com --- -Welcome
    to wappyFTP, with this wap script your users can upload files directly to their server via FTP from
    a mobile phone! --- -Its extremley easy to install, open index.php and put the name of your site
    instead of YOURSITE.COM -Upload the folder wappyFTP_v1.00 to the root directory of your web server
    -Link to it like wappyFTP_v1.00/index.php -Its all done ENJOY --- YOU MAY DISTRIBUTE AND/OR EDIT
    THIS SCRIPT BUT DO NOT REMOVE THE AUTHORS NAME! --- ©2006-2007 wappyCULT /tongue.g....
  23. Wappychat_oldskool
    old version of my wap chat script :-) (15)
    here is a very old version of my wap chat script, its not very advanced but has privates, smileys
    etc. I will post some further versions (with owner, admin, mod status and profiles) when i have time
    to write the readme/install instructions for them. You will find instructions inside the zip. If you
    have any problems post here but i know it don't work on all servers for some reason but it does
    work on the trap server so will be cool ok /tongue.gif" style="vertical-align:middle" emoid=":P"
    border="0" alt="tongue.gif" /> ....
  24. [help]: Php To Html (static) Converter
    I need help to use PHP to HTML Conversion (3)
    Hello Guys, I want to use PHP 2 HTML Conversion for my PHP-Nuke CMS And my PHPbb or IPB Forum, but
    don't know or does't have any idea about it. If any know about it than please tell me. In
    Trap17.com forum PHP to HTML (Static) conversion example is their, you can see it on your Address
    bar, Same thing i want to use with my PHP Codes........ Thanks in advance, i am waiting for your
    suggestion....
  25. I Need Webmail On My Server
    (so admins on my site can access it) (0)
    Right now, if i go to the cpanel of my site, I can access webmail of any of the email addresses I
    have. Unfortunatly, I would prefer it if the administrators did not know the password to the
    cpanel. I want them to be able to access mail from 1 of the email accounts. I have tried letting
    all the admins access the account through their own cliants, but it became a mess, not knowing wich
    admins have responded to which emails, because most emails are hosted localy when received by
    cliants such as outlook. Then I had the idea of making one page, with webmail on it. Where....
  26. Php Server Time
    (4)
    i think i may asked this question awhile back but i never really got it solved. ok..i had a block
    that told me the server time info or whatever. and the GMT wus at 00:00 i wanted to change it to
    -5:00 but i didnt know how, so how can i change it? im not sure of the codes in the php to change it
    to the right GMT time becuase im always gettn the wrong times n day....
  27. Logging Dowload Files From Your Server Onto A Html File
    (1)
    Well, i had the idea of logging the downloads from my web in a html file few weeks ago, and i solved
    it with a lil php page included in my homepage. You could name the links with a name like
    "download.php?file=filename.ext" and then, in the download.php put the next code: (well you put
    the html and head and body tags if u want, i only write the php here) CODE if (isset($_GET ))
    $file=$_GET ; //so it gets the GET data from url (file=filename.ext); $ip=$_SERVER ;
    $file=fopen('download_log.html','a'); $date=date('d-m-y H:i:s'); $text="
    ".$....
  28. Php And Disabling Html Tags
    how can i do this? (11)
    Hello everyone Im TRYING to make a forum and obviously for security i need to disable HTML tags
    being used in posts. i know how to use the str_replace() function but to be honest i think id have
    to do that for every single tag. I also trued using the html CODE stuff tag but i need to
    be able to use the new line tag to make a new line as all the posts are stored as HTML. if this isnt
    clear let me give an example: QUOTE NEW POST PAGE > user makes new post and posts it > PHP
    PROCCESSOR PAGE MAKES HTML FILE > NEW HTML FILE CONTAINING THE POST > user veiws ....
  29. Script Won't Work At Trap17 -- Version Differences?
    But works flawlessly in my machine... (12)
    Here is the code: CODE $data_array = array(); $data_array2 = array(); $file_name =
    "menu_data.txt"; $handle = @fopen($file_name, "r"); if (!$handle)  {     echo "File Handle Not
    Available For Use"; exit;         } while (($data = fgetcsv( $handle, 1000, ",")) !== FALSE) {
            if ( (strpos ($data ,"$page=")))     {                     $data_array =  trim(substr($data
    , 6) );                 }         } fclose($handle); $data_array2 = array_unique( $data_array );
    $submit = $_GET ; if( !isset($_GET )  ||  ($_GET == "" )  ) {                 if (file_exists($....
  30. Adapting Html Code Embed To Work On Phpnuke
    Help With This Html Code Pls (7)
    QUOTE how can get this html code to work on my phpnuke site? what tags would i
    have to enable in the $Allowable HTML part of my config.php file?? Edited topic title. Moved to
    Programming. ....

    1. Looking for parsing, html, php, xampp, server, version, windows
Similar
Weird Formatting: Embedding Php Into Html
Dohwow - 4 my private server
Xampp How Can I Generate "automatic Start Sites"
How To Use Xampp To Test Php
Html Form! - Using MySQL?!
Compiling Php On Windows
How Do I Get The Result To "stick" And Add Html Tags? - Help please?
Mozilla Out With Firefox 3 Beta 4 - The beta 4 version of FireFox 3 is out ..
Windows Can Be Hacked Via Firewire
Php Without Server
File Checker-how To Check File Whith Html Through Html?
Html Code Tester. Online Script
Html Site With Login - Is it possible?
Script To Translate Into Bbcode From Html Tags
Windows Login Credentials
Php Pages Permission On Apache Server - PHP pages permission on Apache Server
<?php ?> Marking Up With Php - How to simply add HTML tags with PHP
Help With Moving Html Form Results To Shopping Cart?
Can Php Interact With A Visual Basic App On A Server
Sub Domain Help In Xampp - Sub Domain Help in xampp
Php Escaped Control Characters And Windows - they aren't working for me.
Wappyftp V1.00 - upload to server via ftp from your mobile phone :-)
Wappychat_oldskool - old version of my wap chat script :-)
[help]: Php To Html (static) Converter - I need help to use PHP to HTML Conversion
I Need Webmail On My Server - (so admins on my site can access it)
Php Server Time
Logging Dowload Files From Your Server Onto A Html File
Php And Disabling Html Tags - how can i do this?
Script Won't Work At Trap17 -- Version Differences? - But works flawlessly in my machine...
Adapting Html Code Embed To Work On Phpnuke - Help With This Html Code Pls

Searching Video's for parsing, html, php, xampp, server, version, windows
See Also,
advertisement


Parsing Html As Php - and XAMPP as the server version on Windows

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com