Jump to content

apache not reading php index file


willshire

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.