willshire Posted July 26, 2007 Share Posted July 26, 2007 Hi, I install apache (2.2.x) and installed php. My goal here is to run a ventrilo server control panel, I have all the files so I put them in the htdocs folder. When I open the index file with a browser on that computer (not through apache, but more like a image) it open a table and some stuff exactly how it suppose to open. However when i start the service and then go type the host name (i'm inside LAN) I get the directory of the htdocs folder. When I click on index.php, it gives me the codes and scripts used to build that table that i saw when not opening the file through apache. I get this will all index.php files. Can anyone help me out? Link to comment https://forums.phpfreaks.com/topic/61940-apache-not-reading-php-index-file/ Share on other sites More sharing options...
apacheguy Posted July 26, 2007 Share Posted July 26, 2007 Add this to the httpd: <IfModule dir_module> DirectoryIndex index.php </IfModule> Link to comment https://forums.phpfreaks.com/topic/61940-apache-not-reading-php-index-file/#findComment-308452 Share on other sites More sharing options...
willshire Posted July 27, 2007 Author Share Posted July 27, 2007 now when i connect i get a white page with this text: \n"; print_r ($_SESSION); echo ""; phpinfo (32); /**/ if (!isset ($_SESSION ['id']) || !is_numeric ($_SESSION ['id']) || !isset ($level) || !isset ($_SESSION ['ip']) || ($_SESSION ['ip'] != $_SERVER ['REMOTE_ADDR'])) { if ($PHP_SELF != "$systemroot/login.php") { header ("Location: $systemroot/login.php"); $redirecting = true; } } else if (!isset ($_SESSION ['server']) && $serverneeded) { if (($level == 'admin') || ($level == 'tech')) { header ("Location: $systemroot/admin/servers.php"); $redirecting = true; } else { header ("Location: $systemroot/logout.php"); $redirecting = true; } } else if (($level != 'admin') && ($level != 'tech') && !strncasecmp ($PHP_SELF,"$systemroot/admin/", strlen ("$systemroot/admin/"))) { header ("Location: $systemroot/index.php"); $redirecting = true; } if ($redirecting) exit; ?> hostset) { unset ($_SESSION['sconfig']); $_SESSION['sconfig'] = new ServerConfig; $sconfig =& $_SESSION['sconfig']; $server = $_SESSION['server']; if (!isset ($server) || !is_numeric ($server)) $server = NULL; $result = mysql_query ("SELECT id, vdomain, vip, vport, ". " sip, sport, $decfunction(spass, '$enckey'), ". " faddr, fport, fuser, ". " $decfunction(fpass, '$enckey'), fpath ". " FROM servers ". (($server != NULL) ? "WHERE id = $server " : ""). "LIMIT 1"); if ($result && mysql_num_rows ($result)) { $res = mysql_fetch_row ($result); $_SESSION['server'] = $res[0]; $sconfig->setserverinfo ($res[1], $res[2], $res[3]); $sconfig->setstatusparams ($res[4], $res[5], $res[6]); $sconfig->sethost ($res[7], $res[8], $res[9], $res[10], $res[11]); } } $server = $_SESSION['server']; if ($sconfig->configfile == false) $connectstring = $sconfig->getconfig (); ?> m_cmdprog = "/home/eliterr/Work/ventrilo/ventrilo_status"; $sstat->m_cmdcode = 2; $sstat->m_cmdhost = $sconfig->statusip; $sstat->m_cmdport = $sconfig->statusport; $sstat->m_cmdpass = $sconfig->statuspass; unset ($sclients); if ($sstat->Request ()) { $sstaterror = $sstat->m_error; $sstat = false; } else { $sclients = count ($sstat->m_clientlist); unset ($sstaterror); } ?> numvalues = 0; if (is_array ($vals)) { $i = 0; reset ($vals); $val = current ($vals); while ($val != false) { $this->values [$i++] = $val; $val = next ($vals); } $this->numvalues = $i; } $this->counter = 0; } function cur () { if ($this->numvalues == 0) return; else return $this->values [($this->counter + $this->numvalues - 1) % $this->numvalues]; } function next () { if ($this->numvalues == 0) return; $cur = $this->counter; $this->counter = ($cur + 1) % $this->numvalues; return $this->values [$cur]; } } ?> Link to comment https://forums.phpfreaks.com/topic/61940-apache-not-reading-php-index-file/#findComment-308545 Share on other sites More sharing options...
apacheguy Posted July 27, 2007 Share Posted July 27, 2007 If you require additional help with the php coding, then I suggest you post it in another forum. It doesn't belong in the apache server forum. Link to comment https://forums.phpfreaks.com/topic/61940-apache-not-reading-php-index-file/#findComment-308934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.