Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 54342 invoked by uid 500); 13 Mar 2003 18:05:41 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 54298 invoked from network); 13 Mar 2003 18:05:41 -0000 Received: from email.starprecision.com (65.116.245.2) by daedalus.apache.org with SMTP; 13 Mar 2003 18:05:41 -0000 Received: from JWHITLOCK [65.116.245.3] by email.starprecision.com with ESMTP (SMTPD32-7.07) id A7D96E0196; Thu, 13 Mar 2003 11:03:05 -0700 From: "Jeremy Whitlock" To: Date: Thu, 13 Mar 2003 11:03:05 -0700 Organization: Star Precision, Inc. Message-ID: <005601c2e98a$cbd667e0$e0c7c7c7@starprecision.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <51E7E765DC694149A2C49B4BDD17C7B3074870@ntserver.local.ddsystem.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] PHP in Apache 2.0 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 =3D "text/html". Once I did that, all worked fine. Hope this helps, Jeremy -----Original Message----- From: John Lee [mailto:jrlee@ddsystem.com]=20 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 =3D 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 =3D = $homepageid; } $qry =3D mysql_query_check("select * from page, template where pagid = =3D $pageid and pagtemplateid =3D temid and pagvisible=3D1"); if (mysql_num_rows($qry) =3D=3D 0) { // if we could not find this page = $message =3D "Could not find the page"; } else { $row =3D = mysql_fetch_array($qry); $showpage =3D 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 =3D> $value) { $$field =3D $value; } // read settings $inifile =3D readsettings(); // read the font list from table "font" $qry =3D mysql_query_check("select fonfontlist from font where fonid =3D ".$inifile["General"]["Font"]); $row =3D mysql_fetch_array($qry); $fontlist =3D $row["fonfontlist"]; mysql_free_result($qry); // set some variables for later use if ($inifile["Header Section"]["LinkColor"]) { $head_link =3D "#".$inifile["Header Section"]["LinkColor"]; } if ($inifile["Header Section"]["ActiveLinkColor"]) { $head_alink =3D "#".$inifile["Header Section"]["ActiveLinkColor"]; } if ($inifile["Header Section"]["ActiveLinkBackgroundColor"]) { $head_abglink =3D "#".$inifile["Header Section"]["ActiveLinkBackgroundColor"]; } if ($pagbackgroundcolor) { $det_bkcol =3D "#".$pagbackgroundcolor; } elseif ($inifile["Details Area"]["BackgroundColor"]) { $det_bkcol =3D "#".$inifile["Details Area"]["BackgroundColor"]; } else { $det_bkcol =3D ""; } // write hits = to table $table=3Dlogezboo; chdir("cms/webstats"); include ("write_logs.php"); chdir("../.."); connect_db(); if ($c =3D=3D "addcustomer") { $fields =3D 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)=3D=3D0) || (strlen($cuslastname)=3D=3D0) || (strlen($cusemail)=3D=3D0)) { $errormessage =3D "First Name, Last Name = and E-mail address are mandatory. "; $detailssent=3D0; // give them back the values they entered foreach($fields as $field) { $fname =3D "c_".$field; $$fname =3D = $$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."=3D"); // header("Set-Cookie: c_".$field."=3D".urlencode($$field)); } $cusdatecreated =3D date("Y-m-d H:i:s"); $sql =3D "insert into customer = ("; $sql2 =3D ") values ("; foreach($fields as $field) { $sql .=3D $field . = ", "; $sql2 .=3D "'" . $$field . "', "; } $sql =3D substr($sql, 0, strlen($sql)-2); $sql2 =3D substr($sql2, 0, strlen($sql2)-2); $sql .=3D $sql2 . ")"; $qry =3D mysql_query_check($sql); echo mysql_error(); if (strlen($pagsection2)>0) { $message =3D "A customer has registered their details on your site.\n\n"; $message .=3D "Name: $custitle $cusfirstname $cuslastname\n\n"; $message .=3D "Company: $cuscompany\n\n"; $message = .=3D "Job Title: $cusjobtitle\n\n"; $message .=3D "Address:\n $cusaddress1\n $cusaddress2\n $cusaddress3\n $cusaddress4\n"; $message .=3D " Postcode: $cuspostcode\n\n"; $message .=3D "E-Mail: $cusemail\n"; $message .=3D = "Tel: $custel\n"; $message .=3D "Fax: $cusfax\n\n"; $message .=3D "Questions = or Comments:\n$cuscomments\n\n"; $message .=3D "Send Newsletter: "; if ($cusnewsletter) { $message .=3D "Yes\n"; } else { $message .=3D "No\n"; = } $message .=3D "Notify of site updates: "; if ($cusupdate) { $message = .=3D "Yes\n"; } else { $message .=3D "No\n"; } $header =3D "From: info@$SERVER_NAME\r\n"; @mail($pagsection2, "New Customer", $message, $header); } $detailssent=3D1; } } ?> 0) { $width =3D $inifile["Header Section"]["ForegroundImageW"]; $height =3D $inifile["Header Section"]["ForegroundImageH"]; $dimensions =3D getimagesize($DOCUMENT_ROOT."/images/".$img); if ($width=3D=3D"") $width = =3D $dimensions[0]; if ($height=3D=3D"") $height =3D $dimensions[1]; = $imagehtml =3D "\n"; $imagehtml .=3D "\n"; $imagehtml .=3D "\n"; } $flash =3D $inifile["Header Section"]["FlashMovie"]; if (strlen($flash) > 0) { $width =3D $inifile["Header Section"]["FlashMovieW"]; $height =3D $inifile["Header Section"]["FlashMovieH"]; $dimensions =3D getimagesize($DOCUMENT_ROOT."/flash/".$flash); if ($width=3D=3D"") = $width =3D $dimensions[0]; if ($height=3D=3D"") $height =3D $dimensions[1]; = $flashhtml =3D "\n"; $flashhtml .=3D ""; $flashhtml .=3D ""; } ?> "> ">=20 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]=20 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" 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=20 > or I get a blank page. Were should I look to solve this problem? I=20 > have used the standard settings with a basic install. >=20 > regards > jrlee >=20 >=20 > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server=20 > Project. See for more=20 > 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 >=20 --=20 Art visuel, communication, multim=E9dia et internet Jonathan Laberge jlaberge@redboxstudios.com Les Studios RedBox inc. 9643 boul. LaSalle LaSalle (Qu=E9bec) 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 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 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 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