G'day all,
I have just tried to port some PHP/MYSQL code from a Linux (Ubuntu 12.04) server to WAMP server. This code works fine on the Linux box.
First attempt is a dismal failure. OK, I know the access to the Database will fail cos the code has local references, but that is not what worries me.
The main problem is that the web pages do not render correctly. Part of the PHP code is shown on the resulting web page. Tables get drawn OK, but their contents is shown as the PHP variable names.
This is the first few lines of the html/php :
------------------------------------------------
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"[
www.w3.org]\">
<html>
<head>
<title>BHA Web</title>
</head>
<body bgcolor=#CFFFC6>
<h1>BHA-CMS - Test of All DB direct access functions </h1>
<?php
include 'BUS_functions.php';
include 'one_off_functions.php';
//-----------
print "<h2>BHA-CMS - Test of Person functions STARTED</h2>\n\n";
print "<p>1 - Write to Database\n\n";
$first_name = 'BHA-'.rand(0,999);
$surname = 'Surname-'.rand(1000,1999);
$postcode = '3'.rand(0,999);
$sex_code = rand(1,9);
$result = add_New_Person_Data('Mr', $first_name, 'George', $surname, '1 Silly St',
'', 'Dopeyville', 'Vic', $postcode, '1950-01-01', 'N',
'03 1234 5678', '0400 000 000', 'fred@nurcks.com.ru', $sex_code, '2010-01-27',
'Australia', 'Yellow Pages', 'blah blah') ;
print "<p> new person entry added has person_id of : " . $result."\n" ;
--------------------------------------------------------------
and then this is what is displayed :
--------------------------------------------------------------
BHA-CMS - Test of All DB direct access functions
BHA-CMS - Test of Person functions STARTED\n\n'; print '
1 - Write to Database\n\n'; $first_name = 'BHA-'.rand(0,999); $surname = 'Surname-'.rand(1000,1999); $postcode = '3'.rand(0,999); $sex_code = rand(1,9); $result = add_New_Person_Data('Mr', $first_name, 'George', $surname, '1 Silly St', '', 'Dopeyville', 'Vic', $postcode, '1950-01-01', 'N', '03 1234 5678', '0400 000 000', 'fred@nurcks.com.ru', $sex_code, '2010-01-27', 'Australia', 'Yellow Pages', 'blah blah') ; print "
new person entry added has person_id of : " . $result."\n" ; print "
--------------------------------------------------------------
Anybody have any idea what is going wrong here. I have checked the error logs, but there there is no relevant info.
Any help greatly appreciated.
..Paul
Melbourne, Australia