PDA

View Full Version : [PP] Un-Official CHMOD mod



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.

Drompo
29-05-2007, 10:04 AM
Is it just my comp or do the spoilers not work

Mr Macro
29-05-2007, 10:05 AM
Mine did at first, their not working now :S

Drompo
29-05-2007, 10:05 AM
They don't work on other Posts either.
The Spoiler MOD has broken

Oni
29-05-2007, 10:06 AM
Yeh, i noticed that. They werent working on my layout thread so I just took it out of spoilers.

Stitch
29-05-2007, 10:06 AM
I think the forum has been upgraded to 3.6.7 and that might be why.

Mr Macro
29-05-2007, 10:07 AM
I'll just whack it out of spoilers, 1 mo.

Want to hide these adverts? Register an account for free!