Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 37527 invoked by uid 500); 14 Mar 2003 17:46:30 -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 37514 invoked from network); 14 Mar 2003 17:46:30 -0000 Received: from web40505.mail.yahoo.com (66.218.78.122) by daedalus.apache.org with SMTP; 14 Mar 2003 17:46:30 -0000 Message-ID: <20030314174633.13540.qmail@web40505.mail.yahoo.com> Received: from [204.68.210.59] by web40505.mail.yahoo.com via HTTP; Fri, 14 Mar 2003 09:46:33 PST Date: Fri, 14 Mar 2003 09:46:33 -0800 (PST) From: David H To: users@httpd.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] PHP in Apache 2.0 Did you check if short tag is on or off? Try --- Jonathan Laberge wrote: > On 3/13/03 2:07 PM, "John Lee" > wrote: > Okay.... > > > Um, the last thing I can think of is this: > The php4_module modules/libphp4.so line implements > that you must have a > libphp4.so in your modules directory. Make sure it > is their... Or try > rebuilding php and reinstalling it... > > Sorry I can't be of any other help, I only have a > couple of months under my > tie according to linux > > > > > If I interpret the migration document correctly, > Mime types are now set in > > /etc/mime.types file. PHP is set from a php.conf > file in /etc/httpd/conf.d/. I > > tried the setting you describe and received an > error when I tried to start > > httpd that directed me to the migration.html file. > The > > 'application/x-httpd-php .php' line was added to > the mime.type file. > > > > If I add this 'LoadModule php4_modules/libphp4.so' > to httpd.conf, I get an > > error that php4 is already loaded and the > directive is ignored. > > > > Everything you have mentioned here works in Apache > 1.3, but with the changes > > in Apache 2.0 there seems to be something I am > missing as to what needs to get > > where. I have been through the migration document > and made the changes > > mentioned, but I am still no closer to getting php > script to run in my > > installation of Apache 2.0. > > > > Additional information: > > I am running this installation of redhat 8.0 in a > virtual pc on my > > workstation. I has assigned a non routable ip > number from my local lan and > > have given the server a domain name of local.com. > I then edited my host file > > on my pc to point local.com to the ip address of > the virtual server. I > > wouldn't think this would be part of the problem > as the > > directive in httpd.conf works, but at this point > it could be anything. > > > > Regards > > jrlee > > > > > > -----Original Message----- > > From: Jonathan Laberge > [mailto:jlaberge@redboxstudios.com] > > Sent: 13 March 2003 18:15 > > To: users@httpd.apache.org > > Subject: Re: [users@httpd] PHP in Apache 2.0 > > > > > > On 3/13/03 1:00 PM, "John Lee" > wrote: > > AS you can see your server isn't interpreting php. > > > > -Did you put this line in your httpd.conf > > LoadModule php4_module modules/libphp4.so > > > > Probably so but let's move on, > > -Di you also put this in that same file: > > AddType application/x-httpd-php .php4 > > AddType application/x-httpd-php .php3 > > AddType application/x-httpd-php .php > > > > > > So check that out and tell me what goes on. > > > >> 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 truncated === __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com --------------------------------------------------------------------- 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