Mr Macro
29-05-2007, 09:55 AM
This mod is just to save you the job of CHMOD'ing 'sql.php' and 'config.php'
Step 1: Setting up the mod(); function.
Ok first off open up your 'functions.php' file in the includes folder.
Then add this code:
function mod(){
chmod('includes/config.php', '0777');
chmod('includes/sql.php', '0777');
}After this:
<?php
include("config.php");But before this:
function clean($string) {
$string = htmlspecialchars($string);
$string = stripslashes($string);
$string = mysql_escape_string($string);
$string = htmlentities($string);
$string = str_replace("\"", "", $string); // Don't ask why after I did stripslashes() [:
$string = str_replace(">", "", $string);
$string = str_replace("<", "", $string);
return $string;
}
Step 2: Applying the mod function
Open up 'installer.php'
Find:
case '1':
## FIRST STAGE
echo("<strong>Welcome to the POWERpanel installation!</strong><br />You are currently at Stage 1 of the installation<br /><br />In stage 1 you will have to provide the installer with your mySQL Settings so that it. can install your database. Please fill in the following forms<br /><br />");
After that, add in:
mod();Above:
## Forms
echo('<form action="?stage=2" method="post">');
A simple tiny little mod for those who don't no how to CHMOD.This mod also makes the installation more automatic.
Step 1: Setting up the mod(); function.
Ok first off open up your 'functions.php' file in the includes folder.
Then add this code:
function mod(){
chmod('includes/config.php', '0777');
chmod('includes/sql.php', '0777');
}After this:
<?php
include("config.php");But before this:
function clean($string) {
$string = htmlspecialchars($string);
$string = stripslashes($string);
$string = mysql_escape_string($string);
$string = htmlentities($string);
$string = str_replace("\"", "", $string); // Don't ask why after I did stripslashes() [:
$string = str_replace(">", "", $string);
$string = str_replace("<", "", $string);
return $string;
}
Step 2: Applying the mod function
Open up 'installer.php'
Find:
case '1':
## FIRST STAGE
echo("<strong>Welcome to the POWERpanel installation!</strong><br />You are currently at Stage 1 of the installation<br /><br />In stage 1 you will have to provide the installer with your mySQL Settings so that it. can install your database. Please fill in the following forms<br /><br />");
After that, add in:
mod();Above:
## Forms
echo('<form action="?stage=2" method="post">');
A simple tiny little mod for those who don't no how to CHMOD.This mod also makes the installation more automatic.