No PHP Info In ACP

Support for IntegraMOD 141

Moderator: Integra Moderator

No PHP Info In ACP

PostAuthor: alumsprings » Wed Aug 01, 2007 10:20 am

Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Beginner
Board URL: http://www.alumspringsbaptistchurch.org

PHP Version: PHP Version 4.4.4
MySQL Version:


What was done before the problem appeared?



What was done to try to solve the problem?




De.scription and Message

When I go to ACP -> Tools -> PHP Info nothing comes up....It's blank....Another thing....How do you edit the php.ini file??
Last edited by alumsprings on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

alumsprings
Members
Members
 
Posts: 34
Likes: 0 post
Liked in: 0 post
Joined: Sat May 05, 2007 6:13 pm
Cash on hand: 0.00

Re: No PHP Info In ACP

PostAuthor: tmotley » Wed Aug 01, 2007 1:40 pm

is admin/admin_phpinfo.php correct?

Here's the full code from mine:

Code: Select all
<?php/***************************************************************************  *                              admin_phpinfo.php  *                            -------------------  *   begin                ]['PHP Info'] = $filename;     return;}  define('IN_PHPBB', 1);// Load default header$phpbb_root_path = '../';require($phpbb_root_path . 'extension.inc');require('pagestart.' . $phpEx);  //// Just a little playing around with PHP//// $board_config['version'] = '.0.9';  //  ;-)switch ($board_config['version']){     case '.0.6':         $version = '2.0.6';         break;     case '.0.7':         $version = '2.0.7';         break;     case '.0.8':         $version = '2.0.8';         break;     case '.0.9':         $version = '2.0.9';         break;}  // // Get the PHP Info//ob_start(); phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); $phpinfo = ob_get_contents(); ob_end_clean();  // Get used layout$layout = (preg_match('#bgcolor#i', $phpinfo)) ? 'old' : 'new';  // Here we play around a little with the PHP Info HTML to try and stylise// it along phpBB's lines ... hopefully without breaking anything. The idea// for this was nabbed from the PHP annotated manualpreg_match_all('#<body>]*>(.*)</body>#siU', $phpinfo, $output);  switch ($layout){     case 'old':         $output = preg_replace('#<table#', '<table class="bg"', $output[1][0]);         $output = preg_replace('# bgcolor="#(w){6}"#', '', $output);         $output = preg_replace('#(w),(w)#', '1, 2', $output);         $output = preg_replace('#border="0" cellpadding="3" cellspacing="1" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);         $output = preg_replace('#<tr><td>(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr><td><table><tr><td>2</td><td>1</td></tr></table></td></tr>', $output);         $output = preg_replace('#<tr><td><b>(.*?)</b>#', '<tr><td>1', $output);         $output = preg_replace('#<td>#', '<td>', $output);         $output = preg_replace('#<td>#', '<td>', $output);         $output = preg_replace('#valign="middle"#', '', $output);         $output = preg_replace('#<tr>#', '<tr>', $output);         $output = preg_replace('#<hr>#', '', $output);         $output = preg_replace('#<h1>#i', '<h1>', $output);         $output = preg_replace('#<h2>#i', '<h2>', $output);         break;     case 'new':         $output = preg_replace('#<table#', '<table class="bg" align="center"', $output[1][0]);         $output = preg_replace('#(w),(w)#', '1, 2', $output);         $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);         $output = preg_replace('#<tr><td>(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr><td><table><tr><td>2</td><td>1</td></tr></table></td></tr>', $output);         $output = preg_replace('#<td>#', '<td>', $output);         $output = preg_replace('#class="e"#', 'class="row1" nowrap="nowrap"', $output);         $output = preg_replace('#class="v"#', 'class="row2"', $output);         $output = preg_replace('# class="h"#', '', $output);         $output = preg_replace('#<hr>#', '', $output);         preg_match_all('#<div>(.*)</div>#siU', $output, $output);         $output = $output[1][0];         break;}    //// The Final output//echo '<h1>PHP Info</h1>';echo '<p>IntegraMOD '.$board_config['integramod_version'].' using phpBB 2' . $board_config['version'] . '</p>';echo $output;  include('./page_footer_admin.'.$phpEx);?>


I did just research a bit and found out that hosts can use safe mode to block access to certain functions... including phpinfo. I wonder if this could be related to your safe mode issue.
Last edited by tmotley on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
tmotley
IntegraMODerators
IntegraMODerators
 
Posts: 524
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:56 am
Cash on hand: 0.00
Location: Missouri, USA


Return to IntegraMOD 141

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot], Majestic-12 [Bot]