MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.5.5 - Stable > Installation Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old April 12th, 2004, 19:23   #41
essenz
 
Join Date: Apr 2004
Location: NZ
Posts: 3
essenz is on a distinguished road
Default

Hi

I've spent easter weekend doing this install.. and the procedure I followed is this:

unpacked into c:\apache\htdocs

CHMOD directories as per install instructions.

System is
Win xp pro
Apache 1.3.29
MySQL 4.15
PHP4.3.4

configuration file:
[code:1:f2287a93f3]$mosConfig_lang = 'english'; // Site language
$mosConfig_absolute_path = 'c:\apache\htdocs'; // No trailing slash
$mosConfig_live_site = 'http://192.168.0.2'; // No trailing slash
$mosConfig_sitename = 'Bizhhelp'; // Name of Mambo site
$mosConfig_shownoauth = '0'; // Display links & categories users don't have access to
$mosConfig_emailpass = '1'; // Send new registration passwords via e-mail
$mosConfig_offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
$mosConfig_UseBanner = '1'; // Use banners 0 = No, 1 = Yes
$mosConfig_lifetime = '900'; // Session time
$mosConfig_MetaDesc = 'Bizhhelp';
$mosConfig_MetaKeys = 'bizhhelp';
$mosConfig_debug = '0';
$mosConfig_locale = 'en_GB';
$mosConfig_offset = '0'; // Local time offset
$mosConfig_hideAuthor = '0';
$mosConfig_hideCreateDate = '0';
$mosConfig_hideModifyDate = '0';
$mosConfig_hidePdf = '0';
$mosConfig_hidePrint = '0';
$mosConfig_hideEmail = '0';
$mosConfig_enable_log_items = '0';
$mosConfig_enable_log_searches = '0';
$mosConfig_sef = '0';
$mosConfig_vote = '0';
$mosConfig_gzip = '0';
$mosConfig_multipage_toc = '0';
$mosConfig_allowUserRegistration = '1';
$mosConfig_error_reporting = -1;
$mosConfig_error_message = 'This site is temporarily unavailable.<br />Please contact your System Administrator.';
$mosConfig_link_titles = '1';
setlocale (LC_TIME, $mosConfig_locale); // Country locale[/code:1:f2287a93f3]

Copied Gayle's test.php script and ran it with these results:

Test Result Details
MySQL support in PHP Passed
MySQL login Passed
MySQL database selection Passed
Absolute path Passed
Live site Passed
Extra characters in configuration.php Passed
FTP client mangled filenames Passed

Now when I go to /administrator/index.php I get these errors:

Warning: main(c:\apache\htdocs.'/version.php): failed to open stream: No such file or directory in c:\apache\htdocs\classes\mambo.php on line 28

Warning: main(): Failed opening 'c:\apache\htdocs.'/version.php' for inclusion (include_path='.;c:\php4\pear') in c:\apache\htdocs\classes\mambo.php on line 28

Warning: main(c:\apache\htdocs.'/classes/database.php): failed to open stream: No such file or directory in c:\apache\htdocs\classes\mambo.php on line 30

Fatal error: main(): Failed opening required 'c:\apache\htdocs.'/classes/database.php' (include_path='.;c:\php4\pear') in c:\apache\htdocs\classes\mambo.php on line 30


Is it a problem with the $mosConfig_absolute_path = 'c:\apache\htdocs'; statement or what is causing this?

BTW this is running on a local network.. hence the 192.168.0.2 address.

tia

essenz
essenz is offline   Reply With Quote
Old April 12th, 2004, 21:23   #42
essenz
 
Join Date: Apr 2004
Location: NZ
Posts: 3
essenz is on a distinguished road
Default

Hi

I got this all working and I'm not sure what I did....

Anyway I'm at a admin login loop, I used the web based install programme and set the admin pass word, but it loops back to the login screen with a popup error saying "incorrect username, password or access level."

Now as I'm progressing this has got to be something simple that I overlooked in the ????

Any suggestions?

TIA

essenz
essenz is offline   Reply With Quote
Old April 12th, 2004, 23:48   #43
thesprinklerguys
 
thesprinklerguys's Avatar
 
Join Date: Oct 2003
Location: Michigan, USA
Posts: 533
thesprinklerguys is on a distinguished road
Default

Quote:
Originally Posted by essenz
Hi

I got this all working and I'm not sure what I did....

Anyway I'm at a admin login loop, I used the web based install programme and set the admin pass word, but it loops back to the login screen with a popup error saying "incorrect username, password or access level."

Now as I'm progressing this has got to be something simple that I overlooked in the ????

Any suggestions?

TIA

essenz
I am not 100% on this but I seem to remember Mambo having some difficulty with IP addresses being used as the $mosConfig_live_site.

If I may suggest you make a small change to your Apache httpd.conf.
Change [code:1:2b3d445258]ServerName 192.168.0.2[/code:1:2b3d445258]
To something like [code:1:2b3d445258]ServerName bizhhelp[/code:1:2b3d445258]
Save your changes and restart Apache.
Change your $mosConfig_live_site to $mosConfig_live_site = 'http://bizhhelp'
Now you should be able to reach your site by going to http://bizhhelp
__________________
Walter Wnuk
www.SmokyPond.com

Smoky Pond - Fish, Family and Fun!
thesprinklerguys is offline   Reply With Quote
Old April 13th, 2004, 01:12   #44
essenz
 
Join Date: Apr 2004
Location: NZ
Posts: 3
essenz is on a distinguished road
Default

to thesprinklerguys,

Since I posted the previous message and you posted yours, I've managed to get the "whole" thing to work, what was causing it was a faulty p/w, I read on the Administration forum somewhere about editing the mos_users -table and I pasted the md5 password from the mambo.sql file into the database using phpMyAdmin..

I noticed that when I was logged in I was getting a php error saying that the "include_path" syntax was wrong..

I knew it would be something simple...

This is getting better and better... but I must admit, this ain't for the faint of heart.. you do need to be prepared to perservere and you will be rewarded.

Thanks for all the help, directly and indirectly, which I'd like to add - all the problems seem to have been encounted before, so for anyone wishing to get answers to their particular install issues, scan this forum, I'm sure you'll find the answer.

essenz
essenz is offline   Reply With Quote
Old May 10th, 2004, 12:17   #45
debocracy
 
Join Date: May 2004
Location: San Francisco
Posts: 49
debocracy is on a distinguished road
Default

(Below is the code to an experimental fault finder. The idea is that you copy the code into a file, save it to your host in your Mambo root, then point your browser at the script and do as it suggests. )

When it says copy code into file, I understand that I must paste the code into notepad and save it, but what do I name the file? What file extension name do I use?

Is it something like help.php? ops:
debocracy is offline   Reply With Quote
Old May 10th, 2004, 12:22   #46
tonyskyday
 
tonyskyday's Avatar
 
Join Date: Dec 2003
Location: Charlottesville, VA USA
Posts: 2,836
tonyskyday is on a distinguished road
Default

Quote:
Originally Posted by debocracy
(Below is the code to an experimental fault finder. The idea is that you copy the code into a file, save it to your host in your Mambo root, then point your browser at the script and do as it suggests. )

When it says copy code into file, I understand that I must paste the code into notepad and save it, but what do I name the file? What file extension name do I use?

Is it something like help.php? ops:
Name it whatever you want, and give it the extension .php.



-Tony
__________________
Great Mambo Hosting -- http://www.buyhttp.com
My Site: http://www.tonyscida.com
tonyskyday is offline   Reply With Quote
Old May 20th, 2004, 21:03   #47
benrudolph
 
Join Date: May 2004
Posts: 1
benrudolph is on a distinguished road
Default

I was stumped until I ran this script. THANK YOU!!!
benrudolph is offline   Reply With Quote
Old May 21st, 2004, 10:19   #48
hwint
 
Join Date: May 2004
Location: Dublin, California, U.S.A.
Posts: 4
hwint is on a distinguished road
Default

Wow, that script really helped!! :P Thank you!!

However, first I had to get your "problem finder" script above to work!

The problem was I copied from Internet Explorer and paste into WordPad. This is a no no! The PHP system was not able to parse it correctly. So I copied and paste your script into my PHP editor (Crimson Edit), saved it to my web host, and it worked fine.

Your script found that my problem had to do with the text formatting of the file "configuration.php"

I had previously edited it using WordPad. Again, I cut and paste the text of "configuration.php" into Crimson Edit, saved, uploaded to my site, and it worked!

Thanks for the great script!
hwint is offline   Reply With Quote
Old May 30th, 2004, 06:48   #49
AjnabiZ
 
Join Date: May 2004
Posts: 33
AjnabiZ is on a distinguished road
Default

Thanks for the excellent script
AjnabiZ is offline   Reply With Quote
Old June 11th, 2004, 05:15   #50
dmnk
 
Join Date: Jun 2004
Posts: 1
dmnk is on a distinguished road
Default

heya,

I have a big problem...in the first post I see be script like this:

[code:1:7ec6dd1b71]<?php
require "./configuration.php";

// Database connectivity tests
if (!function_exists( 'mysql_connect' )) {
$mysql_support = 0;
}else{
$mysql_support = 1;
if (!(@$mysql = mysql_connect( $mosConfig_host, $mosConfig_user, $mosConfig_password ))) {
$mysql_login = 0;
}else{
$mysql_login = 1;
if (!mysql_select_db($mosConfig_db, $mysql)) {
$mysql_select = 0;
$mysql_select_errno = mysql_errno($mysql);
$result=mysql_query("SHOW DATABASES", $mysql);
$databases=mysql_num_rows($result);
for ($i=0;$i<$databases;$i++){
$mysql_databases[$i]=mysql_result($result,$i,0);
}
}else{
$mysql_select = 1;
}
}
}

but the real one have to look like:

<?php
require "./configuration.php";

// Database connectivity tests
if (!function_exists( 'mysql_connect' )) {
* $mysql_support = 0;
}else{
* $mysql_support = 1;
* if (!(@$mysql = mysql_connect( $mosConfig_host, $mosConfig_user, $mosConfig_password ))) {
* * $mysql_login = 0;
* }else{
* * $mysql_login = 1;
* * if (!mysql_select_db($mosConfig_db, $mysql)) {
* * * $mysql_select = 0;
* * * $mysql_select_errno = mysql_errno($mysql);
* * * $result=mysql_query("SHOW DATABASES", $mysql);
* * * $databases=mysql_num_rows($result);
* * * for ($i=0;$i<$databases;$i++){
* * * * $mysql_databases[$i]=mysql_result($result,$i,0);
* * * }
* * }else{
* * * $mysql_select = 1;
* * }
* }
}


does anybody have an ideea about how to view the full good script?
dmnk is offline   Reply With Quote
Old June 11th, 2004, 10:36   #51
RainMan
 
RainMan's Avatar
 
Join Date: May 2004
Posts: 6
RainMan is on a distinguished road
Default

Thnx Gayle,

Here's your code with a bit of color (just a little ). Sometimes a little color can make the difference...

Grtz,
RainMan

====== code ======

<?php require "./configuration.php";

// Automated fault finder v1.0
// author: Gayle
// date: February 25th, 2004, 09:26 PM
// minor edit: RainMan 11-06-04
// - added some layout

// Database connectivity tests
if (!function_exists( 'mysql_connect' )) {
$mysql_support = 0;
}else{
$mysql_support = 1;
if (!(@$mysql = mysql_connect( $mosConfig_host, $mosConfig_user, $mosConfig_password ))){
$mysql_login = 0;
}else{ $mysql_login = 1;
if (!mysql_select_db($mosConfig_db, $mysql)){
$mysql_select = 0;
$mysql_select_errno = mysql_errno($mysql);
$result=mysql_query("SHOW DATABASES", $mysql);
$databases=mysql_num_rows($result);
for ($i=0;$i<$databases;$i++){
$mysql_databases[$i]=mysql_result($result,$i,0);
}
}else{
$mysql_select = 1;
}
}
}

// Absolute path
$abpath = getcwd();
//if($mosConfig_absolute_path!=$abpath)
$config_abpath = 0;
// else
// $config_abpath = 1;

// Live site
$host = $_SERVER["HTTP_HOST"];
$path = pathinfo($_SERVER['PHP_SELF']);
$path = $path["dirname"];
if(strlen($path)==1)
$path = "";
$livesite = "http://".$host.$path;
if($mosConfig_live_site!=$livesite)
$config_livesite = 0;
else $config_livesite = 1;

// Spaces in configuration.php
$configfile = implode("", file("configuration.php"));
if(strlen($configfile)!=(strrpos($configfile, ">")+1))
$config_blank = 0;
else $config_blank = 1;

// FTP client filename mangling
if(!file_exists("administrator/js/ThemeOffice")){
if(!file_exists("administrator/js/themeoffice")){
$ftp_mangling = 0;
}else{
// No FTP mangling, still a potential problem though
$ftp_mangling = 1;
}
}else{
$ftp_mangling = 1;
}

// Output gathered data

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Automated fault finder v1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #CCCCCC;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: bold;
}

th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: bold;
}


/* PASSED */

h2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: bold;
color: green;
}

/* FAILED */

h3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: bold;
color: red;
}
-->
</style>

<body>
<h1>Automated fault finder v1.0</h1>
<hr />
<p>The script
MUST be in your Mambo root and you must have a configuration.php file. It's
kind of hard to diagnose problems without one.<br />
If you are having troubles with the automated installer then create your configuration.php by hand before running
the script.</p>
<p>Current faults it can diagnose are:</p>
<p>
*Incorrect live site<br />
*Incorrect absolute path<br />
*No PHP support for MySQL<br />
*Invalid MySQL username/host/password<br />
*Incorrect database name (suggests valid names)<br />
*Incorrect MySQL user privileges<br />
*Extra whitespace characters after ?&amp;gt; in configuration.php<br />
*Filenames mangled to lower case by FTP client
<br />
<br />
In all cases the script will advise you on what further action to take in an attempt to resolve the issue.</p>
<hr />
<br />

<table border="1">
<tr>
<th>Test</th>
<th>Result</th>
<th>Details</th>
</tr>
<tr>
<td>MySQL support in PHP</td>
<td>
<?php if($mysql_support==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_support==0) echo "If you are on a hosted webserver then please contact your host.<br/>" ."If you are hosting yourself on Windows then I suggest trying miniserver" ."as your PHP/MySQL/Apache solution. Download from " ."<a href=\"http://miniserver.sourceforge.net\">http://miniserver.sourceforge.net</a>.</br>" ."If you are self hosting on *nix then either recompile PHP with MySQL support or check" ."your distro docs on how to add it in using the provided packages.";?>
</td>
</tr>
<tr>
<td>MySQL login</td>
<td>
<?php if($mysql_login==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_login==0) echo "Access was refused.<br/>Check your database username/password in configuration.php.<br/>" ."Check that the user exists on your MySQL database and has the correct password." ."Check that the hostname is correct and not being blocked by a firewall.";?>
</td>
</tr>
<tr>
<td>MySQL database selection</td>
<td>
<?php if($mysql_select==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_select==0){ if($mysql_select_errno==1049){ echo "The database $mosConfig_db does not exist. Current valid databases " ."are listed below</br></br>"; foreach($mysql_databases as $row){ echo "$row<br/>"; } echo "<br/>If none of these is the database you wanted and you are " ."certain the database exists then make sure you have granted the correct " ."permissions to your user.<br/>" ."If the database does not exist then you must first create it."; } if($mysql_select_errno==1044){ echo "User $mosConfig_user does not appear to have the correct permissions granted " ."on database $mosConfig_db.<br/>Grant the user the appropriate privileges."; } }?>
</td>
</tr>
<tr>
<td>Absolute path</td>
<td>
<?php if($config_abpath==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_abpath==0) echo "Your absolute path appears to be wrong in configuration.php. Please " ."change it to the following.<br/></br>\$mosConfig_absolute_path = '$abpath';";?>
</td>
</tr>
<tr>
<td>Live site</td>
<td>
<?php if($config_livesite==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_livesite==0) echo "Your live site appears to be wrong in configuration.php. Please " ."change it to the following.<br/></br>\$mosConfig_live_site = '$livesite';";?>
</td>
</tr>
<tr>
<td>Extra characters in configuration.php</td>
<td>
<?php if($config_blank==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_blank==0) echo "Your configuration.php seems to have characters after the final closing >.<br/>" ."This is not allowed and will cause errors with session handling. Remove everything</br> " ."after the final >.</br>" ."Do not use the cpanel text editor, it hasd a known bug that inserts blank lines at " ."the end of the file.";?>
</td>
</tr>
<tr>
<td>FTP client mangled filenames</td>
<td>
<?php if($ftp_mangling==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($ftp_mangling==0) echo "Files that should be contain upper case characters appear to be all in lower case.<br/>" ."Please ensure your FTP client is not set to convert all filenames to lower case and reupload Mambo.";?>
</td>
</tr>
</table>

<p>made by <a href="http://forum.mamboserver.com/member.php?userid=385">Gayle</a>, February 25th, 2004, 09:26 PM</p>
</body>
</html>

====== end code =====
RainMan is offline   Reply With Quote
Old June 16th, 2004, 19:20   #52
terry73
 
Join Date: Jun 2004
Posts: 2
terry73 is on a distinguished road
Default

Hello, great script, maybe someone could help me troubleshoot mine. I am attempting to install mambo on a windows 2000 machine, with apache/mysql/php bundled in EasyPHP. On trying the faultfinder this is the error I get:

Your absolute path appears to be wrong in configuration.php. Please change it to the following.
$mosConfig_absolute_path = 'c:\program files\easyphp1-7\www\koreanschool';

Copying the above line to my configuration file doesn't resolve the error.

Any help would be highly appreciated^^:
My configuration file is as follows:
<?php
// $Id: configuration.php-dist,v 1.26 2004/02/05 14:35:32 saka_car Exp $
/**
* Example configuration.php
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.26 $
**/
// -------------------------------------------------------------------------
// If you are installing Mambo manually i.e. not using the web installer
// then rename this file to configuration.php e.g.
//
// UNIX -> mv configuration.php-dist configuration.php
// Windows -> rename configuration.php-dist configuration.php
//
// Now edit this file and configure the parameters for your site and
// database.
// -------------------------------------------------------------------------
// Database configuration section
// -------------------------------------------------------------------------
//
$mosConfig_offline = '0';
$mosConfig_host = 'localhost'; // This is normally set to localhost
$mosConfig_user = 'root'; // MySQL username
$mosConfig_password = ''; // MySQL password
$mosConfig_db = 'koreanschool'; // MySQL database name
$mosConfig_dbprefix = 'mos_'; // Do not change unless you need to!
//
// -------------------------------------------------------------------------
// Site specific configuration
// -------------------------------------------------------------------------
//
$mosConfig_lang = 'english'; // Site language

$mosConfig_absolute_path = 'c:\program files\easyphp1-7\www\koreanschool';
// $mosConfig_absolute_path = '/path/to/mambo/install'; // No trailing slash

$mosConfig_live_site = 'http://localhost/koreanschool';
// $mosConfig_live_site = 'http://your_mambo_site.com'; // No trailing slash

$mosConfig_sitename = 'Mambo Open Source'; // Name of Mambo site
$mosConfig_shownoauth = '1'; // Display links & categories users don't have access to
$mosConfig_emailpass = '1'; // Send new registration passwords via e-mail
$mosConfig_offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
$mosConfig_UseBanner = '1'; // Use banners 0 = No, 1 = Yes
$mosConfig_lifetime = '900'; // Session time
$mosConfig_MetaDesc = 'Mambo Open Source - the dynamic portal engine and content management system';
$mosConfig_MetaKeys = 'mambo, mambo open source, Mambo, Mambo Open Source';
$mosConfig_debug = '0';
$mosConfig_locale = 'en_GB';
$mosConfig_offset = '0'; // Local time offset
$mosConfig_hideAuthor = '0';
$mosConfig_hideCreateDate = '0';
$mosConfig_hideModifyDate = '0';
$mosConfig_hidePdf = '0';
$mosConfig_hidePrint = '0';
$mosConfig_hideEmail = '0';
$mosConfig_enable_log_items = '0';
$mosConfig_enable_log_searches = '0';
$mosConfig_sef = '0';
$mosConfig_vote = '0';
$mosConfig_gzip = '0';
$mosConfig_multipage_toc = '0';
$mosConfig_allowUserRegistration = '1';
$mosConfig_error_reporting = -1;
$mosConfig_error_message = 'This site is temporarily unavailable.<br />Please contact your System Administrator.';
$mosConfig_link_titles = '0';
setlocale (LC_TIME, $mosConfig_locale); // Country locale
?>

Last edited by terry73 : June 16th, 2004 at 19:26.
terry73 is offline   Reply With Quote
Old June 16th, 2004, 20:54   #53
terry73
 
Join Date: Jun 2004
Posts: 2
terry73 is on a distinguished road
Default

No idea what happened, I watched a DVD and came back, it's working now. Excellent, but a little disconcerting.
terry73 is offline   Reply With Quote
Old June 17th, 2004, 18:11   #54
Gayle
 
Gayle's Avatar
 
Join Date: Oct 2003
Posts: 1,560
Gayle is on a distinguished road
Default

Quote:
Originally Posted by RainMan
Thnx Gayle,

Here's your code with a bit of color (just a little ). Sometimes a little color can make the difference...
Weeeeh...shiny things
__________________
If this sig is blue you're moving too fast!

If you have any trouble sounding condescending, find a Unix user to show you how it's done.
Gayle is offline   Reply With Quote
Old August 28th, 2004, 23:44   #55
Gaoshan
 
Join Date: Aug 2004
Posts: 16
Gaoshan is on a distinguished road
Default Changes to Rainman's version...

A few changes needed to be made to Rainman's version of Gayle's code to get working properly under 4.5.1. Cut and paste, save it into your root as whatever.php
Here it is:

<?php require "./configuration.php";

// Automated fault finder v1.0
// author: Gayle
// date: February 25th, 2004, 09:26 PM
// minor edit: RainMan 11-06-04
// - added some layout

// Database connectivity tests
if (!function_exists( 'mysql_connect' )) {
$mysql_support = 0;
}else{
$mysql_support = 1;
if (!(@$mysql = mysql_connect( $mosConfig_host, $mosConfig_user, $mosConfig_password ))){
$mysql_login = 0;
}else{ $mysql_login = 1;
if (!mysql_select_db($mosConfig_db, $mysql)){
$mysql_select = 0;
$mysql_select_errno = mysql_errno($mysql);
$result=mysql_query("SHOW DATABASES", $mysql);
$databases=mysql_num_rows($result);
for ($i=0;$i<$databases;$i++){
$mysql_databases[$i]=mysql_result($result,$i,0);
}
}else{
$mysql_select = 1;
}
}
}

// Absolute path
$abpath = getcwd();
if($mosConfig_absolute_path!=$abpath)
$config_abpath = 0;
else $config_abpath = 1;

// Live site
$host = $_SERVER["HTTP_HOST"];
$path = pathinfo($_SERVER['PHP_SELF']);
$path = $path["dirname"];
if(strlen($path)==1)
$path = "";
$livesite = "http://".$host.$path;
if($mosConfig_live_site!=$livesite)
$config_livesite = 0;
else $config_livesite = 1;

// Spaces in configuration.php
$configfile = implode("", file("configuration.php"));
if(strlen($configfile)!=(strrpos($configfile, ">")+1))
$config_blank = 0;
else $config_blank = 1;

// FTP client filename mangling
if(!file_exists("administrator/includes/js/ThemeOffice")){
if(!file_exists("administrator/includes/js/themeoffice")){
$ftp_mangling = 0;
}else{
// No FTP mangling, still a potential problem though
$ftp_mangling = 1;
}
}else{
$ftp_mangling = 1;
}

// Output gathered data

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Automated fault finder v1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #CCCCCC;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: bold;
}

th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: bold;
}


/* PASSED */

h2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: bold;
color: green;
}

/* FAILED */

h3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: bold;
color: red;
}
-->
</style>

<body>
<h1>Automated fault finder v1.0</h1>
<hr />
<p>The script
MUST be in your Mambo root and you must have a configuration.php file. It's
kind of hard to diagnose problems without one.<br />
If you are having troubles with the automated installer then create your configuration.php by hand before running
the script.</p>
<p>Current faults it can diagnose are:</p>
<p>
*Incorrect live site<br />
*Incorrect absolute path<br />
*No PHP support for MySQL<br />
*Invalid MySQL username/host/password<br />
*Incorrect database name (suggests valid names)<br />
*Incorrect MySQL user privileges<br />
*Extra whitespace characters after ?&amp;gt; in configuration.php<br />
*Filenames mangled to lower case by FTP client
<br />
<br />
In all cases the script will advise you on what further action to take in an attempt to resolve the issue.</p>
<hr />
<br />

<table border="1">
<tr>
<th>Test</th>
<th>Result</th>
<th>Details</th>
</tr>
<tr>
<td>MySQL support in PHP</td>
<td>
<?php if($mysql_support==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_support==0) echo "If you are on a hosted webserver then please contact your host.<br/>" ."If you are hosting yourself on Windows then I suggest trying miniserver" ."as your PHP/MySQL/Apache solution. Download from " ."<a href=\"http://miniserver.sourceforge.net\">http://miniserver.sourceforge.net</a>.</br>" ."If you are self hosting on *nix then either recompile PHP with MySQL support or check" ."your distro docs on how to add it in using the provided packages.";?>
</td>
</tr>
<tr>
<td>MySQL login</td>
<td>
<?php if($mysql_login==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_login==0) echo "Access was refused.<br/>Check your database username/password in configuration.php.<br/>" ."Check that the user exists on your MySQL database and has the correct password." ."Check that the hostname is correct and not being blocked by a firewall.";?>
</td>
</tr>
<tr>
<td>MySQL database selection</td>
<td>
<?php if($mysql_select==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($mysql_select==0){ if($mysql_select_errno==1049){ echo "The database $mosConfig_db does not exist. Current valid databases " ."are listed below</br></br>"; foreach($mysql_databases as $row){ echo "$row<br/>"; } echo "<br/>If none of these is the database you wanted and you are " ."certain the database exists then make sure you have granted the correct " ."permissions to your user.<br/>" ."If the database does not exist then you must first create it."; } if($mysql_select_errno==1044){ echo "User $mosConfig_user does not appear to have the correct permissions granted " ."on database $mosConfig_db.<br/>Grant the user the appropriate privileges."; } }?>
</td>
</tr>
<tr>
<td>Absolute path</td>
<td>
<?php if($config_abpath==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_abpath==0) echo "Your absolute path appears to be wrong in configuration.php. Please " ."change it to the following.<br/></br>\$mosConfig_absolute_path = '$abpath';";?>
</td>
</tr>
<tr>
<td>Live site</td>
<td>
<?php if($config_livesite==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_livesite==0) echo "Your live site appears to be wrong in configuration.php. Please " ."change it to the following.<br/></br>\$mosConfig_live_site = '$livesite';";?>
</td>
</tr>
<tr>
<td>Extra characters in configuration.php</td>
<td>
<?php if($config_blank==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($config_blank==0) echo "Your configuration.php seems to have characters after the final closing >.<br/>" ."This is not allowed and will cause errors with session handling. Remove everything</br> " ."after the final >.</br>" ."Do not use the cpanel text editor, it hasd a known bug that inserts blank lines at " ."the end of the file.";?>
</td>
</tr>
<tr>
<td>FTP client mangled filenames</td>
<td>
<?php if($ftp_mangling==0)echo "<h3>Failed</h3>"; else echo "<h2>Passed</h2>";?>
</td>
<td>
<?php if($ftp_mangling==0) echo "Files that should be contain upper case characters appear to be all in lower case.<br/>" ."Please ensure your FTP client is not set to convert all filenames to lower case and reupload Mambo.";?>
</td>
</tr>
</table>

<p>made by <a href="http://forum.mamboserver.com/member.php?userid=385">Gayle</a>, February 25th, 2004, 09:26 PM</p>
</body>
</html>
Gaoshan is offline   Reply With Quote
Old July 21st, 2007, 05:00   #56
mambo_no5
 
Join Date: Jul 2005
Posts: 122
mambo_no5 is on a distinguished road
Default

My site has been running fine for 3 years, but suddenly I can't load any modules, templates etc. getting the install error 'Installation file not found:'

I copied the site to wamp (DB and files), and everything locally works fine, so I gues something up on the server.

I ran this code and it told me that my absolute path in my configuration.php file was wrong.

It told me it should be:

$mosConfig_absolute_path = '/home/dirnamechanged/public_html';

I checked my config file and the path is the same as the code has suggested it should be, exactly the same.

I then ran this:

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

and it also told me that the path was the same as I have in my config file.

So:
Path the fault finder code suggests I change to is already in configuration.php file.

Has anyone got any ideas on where next I can look to diagnose my problem?
mambo_no5 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
automated posting sideout1010 General Questions 4 September 24th, 2004 07:12
Media Finder The Loon Sites using Mambo 4 July 18th, 2004 17:00
Automated install error - bitbucket Installation Questions 4 April 11th, 2004 20:16
Trying to run the automated "/installation/index.php gothicreader Installation Questions 1 March 24th, 2004 22:47
Blank page on install & results of Gayle's Fault finding mattrad Installation Questions 7 March 12th, 2004 02:48


All times are GMT -7. The time now is 07:47.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.