View Single Post
  #1 (permalink)  
Old 01-25-2006, 12:52 AM
macca macca is offline
Member
 
Join Date: Sep 2005
Posts: 74
macca is on a distinguished road
php / apache configuration problem: apache not parsing php correctly?

I am having trouble that I believe is caused by some issue with my apache / php configuration. My environment is XAMPP on windows xp.

This issue is around passing objects. Things work find when I debug my code in my IDE (PHP Designer 2006). The problem comes when I actually invoke the pages in the browswer. What has worked correctly in the debugger then fails in the browser.

Specifically, the browser simply returns the source code of the php file instead of what that code is supposed to return. It is as if it does not recognize the php tags and then just treats it as if it were just html text to output.

The code itself is quite simple:

<?php
//include Track class
require("Track.php");

//get parameters from query string
//load into $mycri

$mycri = array('rock','party');

//create Track object and run query
$mytrack = new Track();

$myarray = $mytrack->find($mycri);

//print out results
print_r($myarray);

?>

This generally happens only with includes.

Any thoughts?

Reply With Quote