SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Brazil
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Weird PHP Behaviour with Apache

    Hello!

    I recently did a full format and reinstalled windows XP... instead of using pre-built server packages (apache+php+mysql), I decided to install everything myself ... well, I installed Apache as a service, installed MySQL and then followed the instructions to install php ... everything seemed to work fine until some strange behavior started to happen - let me explain it trough an example:

    This script works fine:
    PHP Code:
    <?php phpinfo(); ?>
    This script also works (it is parsed by php), but the output is not sent to the browser as html it is sent as a regular file download instead (script from gateway.php part of the AMFPHP package):

    PHP Code:
    <?php
        
    /*
            $Id: gateway.php,v 1.3 2003/03/28 05:38:03 ktukker Exp $
        */

       /*
            change this to

            include("/path/to/your/flashservices/app/Gateway.php");

            if you are not using the php_include_path functionality.
        */
        
       
       
        
    include "flashservices/app/Gateway.php";

        
    $gateway = new Gateway();
        
    $gateway->setBaseClassPath("php/cconline_services");
        
    $gateway->service();

    ?>
    I already tried re-configuring everything but the problem stills... what could be happening?

    Thanks in advance,

    Marcelo.
    Last edited by FFighter; Feb 2, 2005 at 10:59. Reason: being more specific

  2. #2
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Brazil
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some helpīd be much appreciated... I have no clue on whats going on...

  3. #3
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by FFighter
    the output is not sent to the browser as html it is sent as a regular file download instead
    service() doesn't produce any html content, the data it sends to browser has other mime type ("application/x-amf" to be precise). This mimetype is most probably not registered, so the data gets downloaded. This is normal.

  4. #4
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Brazil
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for the reply stereofrog... thanks for clearing my mind

    After doing some research, I found that this should happen with the gateway.php file (as you said, the MIME type is not registered and shouldnīt as this file will never be called directly by the browser :P)

    Cheers,

    Marcelo.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •