PDA

View Full Version : HELP!!!!!!!!!!


Cold Steel
Wed 31st May '00, 2:08am
I told my host to change the settings that I read here in the forums...

Now this is what shows up on my index page (I was using a virtual include) at http://aforums.com :

0) { $url.="&username=$username&password=".substr(md5($password),0,strlen($password)); } else { $url.="?username=$username&password=".substr(md5($password),0,strlen($password)); } header("Location: $url"); // eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_login")."\",\"$url\");"); } else { eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_login")."\",\"index.php\");"); } exit; } echo " "; flush; $permissions=getpermissions($bbuserid,$bbusergroup id); if ($permissions[canview]!=1) { eval("echo standarderror(\$bbtitle,\"".gettemplate("error_nopermission")."\");"); exit; } if ($action=="showsmilies") { $smilies=$DB_site->query("SELECT smilietext,title,smiliepath FROM smilie ORDER BY title"); while ($smilie=$DB_site->fetch_array($smilies)) { $smilietext=$smilie[smilietext]; $smiliepath=$smilie[smiliepath]; $title=$smilie[title]; eval("\$smiliebits .= \"".gettemplate("smiliebit")."\";"); } eval("echo dovars(\"".gettemplate("smilies")."\");"); } if ($action=="bbcode") { eval("echo dovars(\"".gettemplate("bbcode")."\");"); } if ($action=="faq") { eval("echo dovars(\"".gettemplate("faq")."\");"); } if ($action=="showforums") { $numbersmembers=$DB_site->query_first("SELECT COUNT(userid) AS users FROM user"); $numbermembers=$numbersmembers[users]; // get total posts $countposts=$DB_site->query_first("SELECT COUNT(postid) AS posts FROM post"); $totalposts=$countposts[posts]; if ($totalposts=="") { $totalposts=0; } $countthreads=$DB_site->query_first("SELECT COUNT(threadid) AS threads FROM thread"); $totalthreads=$countthreads[threads]; if ($totalthreads=="") { $totalthreads=0; } // get newest member $getnewestusers=$DB_site->query_first("SELECT username,userid FROM user ORDER BY joindate DESC"); $newusername=$getnewestusers[username]; $newuserid=$getnewestusers[userid]; // if user is know, then welcome if ($bbusername!="") { $username=$bbusername; eval("\$welcometext = \"".gettemplate("welcometext")."\";"); eval("\$logincode = \"".gettemplate("logoutcode")."\";"); eval("\$newposts = \"".gettemplate("newposts")."\";"); } else { eval("\$newposts = \"".gettemplate("todayposts")."\";"); eval("\$logincode = \"".gettemplate("logincode")."\";"); } if (isset($categoryid)!=0 and $categoryid!=0) { $categoryid = verifyid("category",$categoryid); $selcategoryid=$categoryid; $categoriesonly=1; } if ($displayloggedin==1) { $datecut=time()-$cookietimeout; $loggedins=$DB_site->query("SELECT userid,username FROM user WHERE showemail=1 AND $datecutfetch_array($loggedins)) { $activeusers.="".htmlspecialchars($loggedin[username]).""; while ($loggedin=$DB_site->fetch_array($loggedins)) { $activeusers.=", ".htmlspecialchars($loggedin[username]).""; } eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";"); } } $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder"); while ($category=$DB_site->fetch_array($categorys)) { $categoryid=$category[categoryid]; $categorytitle=htmlspecialchars($category[title]); $categorytitle="$categorytitle"; if ($usecategories==1) { if ($blah==1) { $forumbits.=evaluatetemplate(gettemplate("categorybit")); } else { eval("\$forumbits .= \"".gettemplate("categorybit")."\";"); } } if ($categoriesonly==0 or $categoryid==$selcategoryid) { // make the forum bits $forums=$DB_site->query("SELECT forumid,title,description,displayorder,UNIX_TIMEST AMP(lastpost) AS lastpost,lastposter,replycount,threadcount,allowpo sting FROM forum WHERE active=1 AND displayorder<>0 AND categoryid=$categoryid ORDER BY displayorder"); while ($forum=$DB_site->fetch_array($forums)) { if ($blah==1) { $getperms[canview]=1; } else { $getperms=getpermissions($bbuserid,$bbusergroupid, $forum[forumid]); } if ($getperms[canview]==1) { // do light bulb if ($lastvisitdate=="Never") { $onoff="on"; } else { if ($bblastvisit<$forum[lastpost]) { $onoff="on"; } else { $onoff="off"; } } // $getperms=getpermissions($bbuserid,$bbusergroupid, $forum[forumid]); if ($forum[allowposting]==0) { // or $getperms[canpostnew]==0) { $onoff.="lock"; } // prepare template vars $forumid=$forum[forumid]; $forumtitle=htmlspecialchars($forum[title]); if ($showforumdescriptions==1) { $forumdescription=$forum[description]; } // post and thread counts $numberposts=$forum[replycount]; $numberthreads=$forum[threadcount]; // dates if ($forum[lastpost]>0) { $lastpostdate=date($dateformat,$forum[lastpost]+(($timeoffset+$bbtimezoneoffset)*3600)); $lastposttime=date($timeformat,$forum[lastpost]+(($timeoffset+$bbtimezoneoffset)*3600)); $lastposter="by $forum[lastposter]"; } else { $lastpostdate="Never"; $lastposttime=""; $lastposter=""; } $forummoderators=$DB_site->query("SELECT user.username,user.usergroupid FROM forumpermission,user WHERE user.usergroupid=forumpermission.usergroupid AND canadminedit=1 AND forumid=$forumid"); if ($moderator=$DB_site->fetch_array($forummoderators)) { $moderators=htmlspecialchars($moderator[username]); while ($moderator=$DB_site->fetch_array($forummoderators)) { $moderators.=", ".htmlspecialchars($moderator[username]); } } else { $moderators=" "; } eval("\$forumbits .= \"".gettemplate("forumbit")."\";"); } } } } eval("echo dovars(\"".gettemplate("forumhome")."\");"); } ?>

What the hell happened? Please help!

werehere
Wed 31st May '00, 2:20am
What exactely did you change?

Cold Steel
Wed 31st May '00, 11:00pm
OK, got it fixed.

Here's what the tech said:

The reason that your page was not being displayed properly was that your srm.conf file had the following lines added to the bottom of the file:

AddType application/x-httpd-php4 .phtml
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php4 .phtml
AddType application/x-httpd-php4 .php

Your test.php3 within the htdocs directory was working due to the fact that it was a .php3 file rather than just a .php file.

As php4 is not compiled into your Apache binary, any requests for a .php file would fail, as the last line of the config file states that ..

AddType application/x-httpd-php4 .php

So I simply commented out these lines and restarted the web server. I also added index.php to the DirectoryIndex listing of the srm.conf file. For reference, here is what the new line looks like:

DirectoryIndex index.shtml index.php index.php3 index.phtml index.html index.htm Index.html Index.htm IN
DEX.HTML INDEX.HTM

Unfortunaly, we do not currently support compiling php4 into the Apache binarys on our servers. In the future, if you wish to see which modules are compiled into Apache, just go into /usr/www/asiansi1/httpd/ and then ./httpd -l

Please be aware that this problem was not caused by error on Virtualis' part, but by that of the person who altered your srm.conf file without checking to verify whether or not mod_php4.c was compiled into Apache.

Thanks for your help though!