httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Whitlock" <jwhitl...@starprecision.com>
Subject RE: [users@httpd] PHP in Apache 2.0
Date Thu, 13 Mar 2003 18:03:05 GMT
Jrlee,
	I ran into a similar problem when viewing JSP and Servlets from
Mozilla and other browsers other than IE.  The code was dumped onto the
page but if viewed from IE, everything worked fine.  The resolution was
to set the content type = "text/html".  Once I did that, all worked
fine.  Hope this helps, Jeremy

-----Original Message-----
From: John Lee [mailto:jrlee@ddsystem.com] 
Sent: Thursday, March 13, 2003 11:01 AM
To: users@httpd.apache.org
Subject: RE: [users@httpd] PHP in Apache 2.0

Redhat 8.0 installs PHP 4.2. In the migration document it suggest
turning register_globals = On if there is a problem with the php
scripts. I have tried this and there is no effect.

Here is what displays when the index.php page is requested. Data for the
page is pulled from a mysql database.

-1) { // a home page is essential if (!$pageid) { $pageid = $homepageid;
} $qry = mysql_query_check("select * from page, template where pagid =
$pageid and pagtemplateid = temid and pagvisible=1"); if
(mysql_num_rows($qry) == 0) { // if we could not find this page $message
= "Could not find the page"; } else { $row = mysql_fetch_array($qry);
$showpage = TRUE; } mysql_free_result($qry); } if (!$showpage) { echo
"\n"; echo "\n"; echo "\n"; echo "Error: ". $message . "
\n"; echo "\n"; die; } // read page values foreach($row as $field =>
$value) { $$field = $value; } // read settings $inifile =
readsettings(); // read the font list from table "font" $qry =
mysql_query_check("select fonfontlist from font where fonid =
".$inifile["General"]["Font"]); $row = mysql_fetch_array($qry);
$fontlist = $row["fonfontlist"]; mysql_free_result($qry); // set some
variables for later use if ($inifile["Header Section"]["LinkColor"]) {
$head_link = "#".$inifile["Header Section"]["LinkColor"]; } if
($inifile["Header Section"]["ActiveLinkColor"]) { $head_alink =
"#".$inifile["Header Section"]["ActiveLinkColor"]; } if
($inifile["Header Section"]["ActiveLinkBackgroundColor"]) {
$head_abglink = "#".$inifile["Header
Section"]["ActiveLinkBackgroundColor"]; } if ($pagbackgroundcolor) {
$det_bkcol = "#".$pagbackgroundcolor; } elseif ($inifile["Details
Area"]["BackgroundColor"]) { $det_bkcol = "#".$inifile["Details
Area"]["BackgroundColor"]; } else { $det_bkcol = ""; } // write hits to
table $table=logezboo; chdir("cms/webstats"); include
("write_logs.php"); chdir("../.."); connect_db(); if ($c ==
"addcustomer") { $fields = array( "cusdatecreated", "custitle",
"cusfirstname", "cuslastname", "cuscompany", "cusjobtitle",
"cusaddress1", "cusaddress2", "cusaddress3", "cusaddress4",
"cuspostcode", "cusemail", "custel", "cusfax", "cuscomments",
"cusnewsletter", "cusupdate"); // if mandatory fields are missing, show
error message and ask use to fill them in again. if
((strlen($cusfirstname)==0) || (strlen($cuslastname)==0) ||
(strlen($cusemail)==0)) { $errormessage = "First Name, Last Name and
E-mail address are mandatory.
"; $detailssent=0; // give them back the values they entered
foreach($fields as $field) { $fname = "c_".$field; $$fname = $$field; }
// otherwise send email and add entry to DB } else { // clean out any
old cookie values, and pop the new ones in there. foreach($fields as
$field) { setcookie("c_".$field, ""); setcookie("c_".$field, $$field,
time()+(3600*24*365*10)); // header("Set-Cookie: c_".$field."="); //
header("Set-Cookie: c_".$field."=".urlencode($$field)); }
$cusdatecreated = date("Y-m-d H:i:s"); $sql = "insert into customer (";
$sql2 = ") values ("; foreach($fields as $field) { $sql .= $field . ",
"; $sql2 .= "'" . $$field . "', "; } $sql = substr($sql, 0,
strlen($sql)-2); $sql2 = substr($sql2, 0, strlen($sql2)-2); $sql .=
$sql2 . ")"; $qry = mysql_query_check($sql); echo mysql_error(); if
(strlen($pagsection2)>0) { $message = "A customer has registered their
details on your site.\n\n"; $message .= "Name: $custitle $cusfirstname
$cuslastname\n\n"; $message .= "Company: $cuscompany\n\n"; $message .=
"Job Title: $cusjobtitle\n\n"; $message .= "Address:\n $cusaddress1\n
$cusaddress2\n $cusaddress3\n $cusaddress4\n"; $message .= " Postcode:
$cuspostcode\n\n"; $message .= "E-Mail: $cusemail\n"; $message .= "Tel:
$custel\n"; $message .= "Fax: $cusfax\n\n"; $message .= "Questions or
Comments:\n$cuscomments\n\n"; $message .= "Send Newsletter: "; if
($cusnewsletter) { $message .= "Yes\n"; } else { $message .= "No\n"; }
$message .= "Notify of site updates: "; if ($cusupdate) { $message .=
"Yes\n"; } else { $message .= "No\n"; } $header = "From:
info@$SERVER_NAME\r\n"; @mail($pagsection2, "New Customer", $message,
$header); } $detailssent=1; } } ?> 0) { $width = $inifile["Header
Section"]["ForegroundImageW"]; $height = $inifile["Header
Section"]["ForegroundImageH"]; $dimensions =
getimagesize($DOCUMENT_ROOT."/images/".$img); if ($width=="") $width =
$dimensions[0]; if ($height=="") $height = $dimensions[1]; $imagehtml =
"\n"; $imagehtml .= "\n"; $imagehtml .= "\n"; } $flash =
$inifile["Header Section"]["FlashMovie"]; if (strlen($flash) > 0) {
$width = $inifile["Header Section"]["FlashMovieW"]; $height =
$inifile["Header Section"]["FlashMovieH"]; $dimensions =
getimagesize($DOCUMENT_ROOT."/flash/".$flash); if ($width=="") $width =
$dimensions[0]; if ($height=="") $height = $dimensions[1]; $flashhtml =
"\n"; $flashhtml .= ""; $flashhtml .= ""; } ?> "> "> 

Its is as if apache just dumps the code back to the requester. Also
error is in the header bar if Internet Explorer and the browser sits
there trying to retrieve data.

When I try phpinfo(); I get a blank page. If I can get this to work then
I can remove one possible cause of the output above.

Regards
jrlee

-----Original Message-----
From: Jonathan Laberge [mailto:jlaberge@redboxstudios.com] 
Sent: 13 March 2003 17:41
To: users@httpd.apache.org
Subject: Re: [users@httpd] PHP in Apache 2.0


On 3/13/03 12:31 PM, "John Lee" <jrlee@ddsystem.com> wrote: What kind of
gobbledy gouk, I would like to see. Did you also update php? If so did
you leave register_globals to off or on. What Apache 2.0 release do you
have?

> I have gone through the migration document that comes with Redhat 8.0.

> Unfortunately when I try to load php files I either get gobbledy gouk 
> or I get a blank page. Were should I look to solve this problem? I 
> have used the standard settings with a basic install.
> 
> regards
> jrlee
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project. See <URL:http://httpd.apache.org/userslist.html> for more 
> info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

-- 

Art visuel, communication, multim├ędia et internet

Jonathan Laberge
jlaberge@redboxstudios.com

Les Studios RedBox inc.
9643 boul. LaSalle
LaSalle (Qu├ębec)
Canada H8R 2N7

www.redboxstudios.com

514 368 3962 bur/off
514 368 9212 tel/fax
514 865 2554 cell/mob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message