httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Laberge <jlabe...@redboxstudios.com>
Subject Re: [users@httpd] PHP in Apache 2.0
Date Thu, 13 Mar 2003 19:11:49 GMT
On 3/13/03 2:07 PM, "John Lee" <jrlee@ddsystem.com> 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 <VirtualHost>
> 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" <jrlee@ddsystem.com> 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 .= "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


Mime
View raw message