Webmaster Forum

Advertise Here   Sell Your Website   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 12-15-2003, 04:40 PM   #1 (permalink)
v7n Mentor
 
Pretend's Avatar
 
Join Date: 10-13-03
Location: Ft. Lewis, WA
Posts: 3,264
iTrader: 0 / 0%
Pretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest order
Send a message via AIM to Pretend Send a message via Skype™ to Pretend
User Script error

Ok, whenever I run the installer.php file with this it says the following...

Quote:
Warning: fopen(c2b425455f486d8fd7cb689f1399c4d1.php): failed to open stream: Permission denied in /home/theilles/public_html/membershiptest/installer.php on line 157

Warning: fputs(): supplied argument is not a valid stream resource in /home/theilles/public_html/membershiptest/installer.php on line 164

Warning: fclose(): supplied argument is not a valid stream resource in /home/theilles/public_html/membershiptest/installer.php on line 165
So can somebody please see if they see anything wrong with the installer.php file please? Thanks to those that do, here it is.

[code:1:d7e946cb70]
<?php

/////////////////////////////////////////////////////////////////////////////////////
// what is: PSYWERX PUMA (Protection & User MAnagement)
// who did: PSYWERX PHP TEAM
// version: 1.0.RC1
// build: 151103.1820.RC1.00.07.01
/////////////////////////////////////////////////////////////////////////////////////

// PUMA version
$curver = "1.0.RC1";

function rpath(){
$path = dirname(__FILE__);
return str_replace("\", "/", $path)."/";
}

$fpath = rpath();

// Config file
require("config.php");
// Functions file
require_once("functions.php");

error_reporting(E_ALL ^ E_NOTICE);
global $_GET;

if(!isset($_GET["id"])){ $id = "";}else{$id = $_GET["id"];}

if($id == changelang){

$filename = "config.php";
$fh = fopen($filename,'w');

$lang = $HTTP_POST_VARS["lang"];

$fpath = rpath($HTTP_SERVER_VARS['SCRIPT_FILENAME']);

$write = <<<html
<?php

// Site name
\$sitename = "";

// Site address
\$siteadr = "";

// Main email
\$sitemail = "";

//Path
\$fpath = "";

// Access logger file
\$logger = "logger.php";

// User list file
\$userlist = "userlist.php";

// Email list file
\$banemail = "banemail.php";

// IP list file
\$banip = "banip.php";

// ID Protector vars
\$protlist = "protlist.php";

// Loggers
\$iplog = \$_SERVER['REMOTE_ADDR'];
\$agnlog = \$_SERVER['HTTP_USER_AGENT'];

// Time Zone
\$tzone = "+0";

// Time format
\$clk = "d M Y H:i";

// Select language
\$lang = "$lang";
include(\$fpath."./language/\$lang");

//IP ban mode
\$banmode = "1";

//User activation
\$activate = "1";

//Use cookies instead of sessions
\$cookies = "1";

//Avatar settings
\$awt = "100";
\$aht = "100";

//Users per page (memberlist.php)
\$upp = "25";

// PM - Messages per page
\$pmpp = "15";

// PM - Subject max lenght
\$pmsl = "25";

// PM - Message max lenght
\$pmml = "1000";

// PM allow...
\$smilies = "1";
\$bbcode = "1";

// PM max storage...
\$ibxstr = "30";
\$sbxstr= "20";

// PM flood protection
\$pmflood = "20";

?>
html;

fputs($fh, $write);
fclose($fh);

$title = $lang_inst0;
$happening = $lang_inst18;
$content = ("$lang_inst18<META HTTP-EQUIV=Refresh CONTENT="2; URL=installer.php">");

}

elseif($id == install){

$NewUsrn = $HTTP_POST_VARS["NewUsrn"];
$NewPass = $HTTP_POST_VARS["NewPass"];
$PassChk = $HTTP_POST_VARS["PassChk"];
$sitename = $HTTP_POST_VARS["sitename"];
$siteadr = $HTTP_POST_VARS["siteadr"];
$sitemail = $HTTP_POST_VARS["sitemail"];

// Checks if all fields are filled out
if($NewUsrn != null
and $NewPass != null
and $PassChk != null
and $sitename != null
and $siteadr != null
and $sitemail != null){

// Checks if paswords match
if($NewPass == $PassChk){

if($NewUsrn != $NewPass){

if(valid_email($sitemail)){

$NewUsrn = md5($NewUsrn);
$filename = "$NewUsrn.php";
$fh = fopen($filename,'w');

$Ranker = "3";
$NewPass = md5($NewPass);
$NewUsrn = $HTTP_POST_VARS["NewUsrn"];
$write = ("<?php die("$lang_glob6");?>{|}$NewUsrn{|}$NewPass{|}$Ran ker");

fputs($fh, $write);
fclose($fh);

// Resets the logger
$filename = $logger;
$fh = fopen($filename,'w');
$clk = timezone();
$write =("<?php die("$lang_glob6");?><html><head><title>PSYWERX PUMA $lang_proc4 $curver</title><meta http-equiv="Content-Type" content="text/html; charset=$lang_charset"><link REL="stylesheet" HREF="./style/puma.css" TYPE="text/css"></head><body><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="black" ><tr><td width="100%" valign="top" bgcolor="silver" align="center"><b>PSYWERX PUMA $lang_proc6</b><br><font size="1">$lang_proc5: $clk</font></td><tr></table><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="black" ><tr><td width="10%" bgcolor="#FFFFFF" align="center"><b>$lang_logger0</b></td><td width="20%" bgcolor="#FFFFFF" align="center"><b>$lang_logger1</b></td><td width="10%" bgcolor="#FFFFFF" align="center"><b>$lang_logger2</b></td><td width="45%" valign="top" bgcolor="#FFFFFF" align="center"><b>$lang_logger3</b></td><td width="15%" bgcolor="#FFFFFF" align="center"><b>$lang_logger4</b></td></tr></table><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="black" ><!----><!----></table></body></html>");

fputs($fh, $write);
fclose($fh);

// Config setup
$filename = "config.php";
$fh = fopen($filename,'w');

$fpath = rpath();

$write = <<<html
<?php

// Site name
\$sitename = "$sitename";

// Site address
\$siteadr = "$siteadr";

// Main email
\$sitemail = "$sitemail";

// Access logger file
\$logger = "logger.php";

// User list file
\$userlist = "userlist.php";

// Email ban file
\$banemail = "banemail.php";

// IP ban file
\$banip = "banip.php";

// Email list file
\$emaillist = "emaillist.php";

// Mailing list file
\$mailinglist = "mailinglist.php";

// ID Protector vars
\$protlist = "protlist.php";

// Loggers
\$iplog = \$_SERVER['REMOTE_ADDR'];
\$agnlog = \$_SERVER['HTTP_USER_AGENT'];

// Time Zone
\$tzone = "+0";

// Time format
\$clk = "d M Y H:i";

// Select language
\$lang = "$lang";
include(\$fpath."./language/\$lang");

//IP ban mode
\$banmode = "1";

//User activation
\$activate = "1";

//Use cookies instead of sessions
\$cookies = "1";

//Avatar settings
\$awt = "100";
\$aht = "100";

//Users per page (memberlist.php)
\$upp = "25";

// PM - Messages per page
\$pmpp = "15";

// PM - Subject max lenght
\$pmsl = "25";

// PM - Message max lenght
\$pmml = "1000";

// PM allow...
\$smilies = "1";
\$bbcode = "1";

// PM max storage...
\$ibxstr = "30";
\$sbxstr= "20";

// PM flood protection
\$pmflood = "20";

?>
html;

fputs($fh, $write);
fclose($fh);

$title = $lang_inst0;
$happening = $lang_inst6;
// LOCATION: installer.php?id=install
$content = <<<html

<b>$lang_inst6</b><br><br>
$lang_glob13 <a href="admin.php">$lang_glob14</a> $lang_glob15. $lang_inst10 (installer.php) $lang_inst11.
<br><br>
<table width="250" bgcolor="red" height="25" border="0" cellpadding="5" cellspacing="1" >
<tr>
<td width="250" bgcolor="#FFFFFF" align="center" >
<b><font color="red">$lang_glob5! $lang_inst12 installer.php $lang_inst13, $lang_inst14!
<br>$lang_inst15!</b></font>

html;

}else{
// If email iz invalid
$title = $lang_inst0;
$happening = $lang_glob8;
$content = $lang_glob8.("<META HTTP-EQUIV=Refresh CONTENT="2; URL=installer.php">");
}
}else{
// If username and password are same
$title = $lang_inst0;
$happening = $lang_glob9;
$content = $lang_glob9.("<META HTTP-EQUIV=Refresh CONTENT="2; URL=installer.php">");
}
}else{
// If passwords don't match
$title = $lang_inst0;
$happening = $lang_glob7;
$content = $lang_glob7.("<META HTTP-EQUIV=Refresh CONTENT="2; URL=installer.php">");
}
}else{
// If all fields aren't filled out
$title = $lang_inst0;
$happening = $lang_glob10;
$content = $lang_glob10.("<META HTTP-EQUIV=Refresh CONTENT="2; URL=installer.php">");
}
}else{

$title = $lang_inst0;
$happening = $lang_inst1;
$content = <<<html

<b>$lang_inst1</b>

<br><br>

<table width="250" height="25" border="0" cellpadding="0" cellspacing="1" >
<tr>
<td width="50%" height="25" valign="top" >
$lang_inst19:
</td>
<td width="50%" valign="top" >
<form action="installer.php?id=changelang" method="POST">
<select name="lang">
html;

/*
if($lang == "lang_english.php"){
$content .= <<<html
<option name="lang" value="lang_english.php">English</option>
<option name="lang" value="lang_slovenian.php">Slovenian</option>
html;
}
elseif($lang == "lang_slovenian.php"){
$content .= <<<html
<option name="lang" value="lang_slovenian.php">Slovenian</option>
<option name="lang" value="lang_english.php">English</option>
html;
}
*/

$content .= <<<html
<option name="lang" value="lang_english.php">English</option>
<option name="lang" value="lang_slovenian.php">Slovenian</option>
html;

$content .= <<<html
</select><br>
<input class="buttons" type="submit" value="Apply change!">
</form>
<tr>
<td width="50%" height="25" valign="middle">
<b>$lang_inst16</b>
</td>
<td width="50%" valign="middle">

</td>
</tr>
</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_glob0:
</td>
<td width="50%" valign="top" >
<form action="installer.php?id=install" method="POST">
<input class="fields" type="text" size="15" name="NewUsrn">
</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_glob1:
</td>
<td width="50%" valign="top" >
<input class="fields" type="password" size="15" name="NewPass">
</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_glob2:
</td>
<td width="50%" valign="top" >
<input class="fields" type="password" size="15" name="PassChk">
</td>
</tr>
<tr>
<td width="50%" height="25" valign="middle">
<b>$lang_inst20</b>
</td>
<td width="50%" valign="middle">

</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_inst21:
</td>
<td width="50%" valign="top" >
<input class="fields" type="text" size="15" name="sitename">
</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_inst17:
</td>
<td width="50%" valign="top" >
<input class="fields" type="text" size="15" name="siteadr">
</td>
</tr>
<tr>
<td width="50%" height="25" valign="top" >
$lang_inst22:
</td>
<td width="50%" valign="top" >
<input class="fields" type="text" size="15" name="sitemail">
</td>
</tr>
</table><br>
<input class="buttons" type="submit" value="$lang_inst23">
<input class="buttons" type="reset" value="$lang_glob4"><br><br>
</form>
<table width="250" bgcolor="red" height="25" border="0" cellpadding="5" cellspacing="1" >
<tr>
<td width="250" bgcolor="#FFFFFF" align="center" >
<b><font color="red">$lang_glob5! $lang_glob11<br>$lang_glob12! </font></b>

html;

}

// LOCATION: installer.php
$content = <<<html

<html>
<head>

<title>PSYWERX PUMA $title $curver - $happening</title>
<meta http-equiv="Content-Type" content="text/html; charset=$lang_charset" >
<link REL="stylesheet" HREF="./style/puma.css" TYPE="text/css">
</head>
<body>

<table width="100%" height="500" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="100%" align="center" valign="middle">

<table width="250" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" >
<tr>
<td width="250" bgcolor="#FFFFFF" >
<img src="./style/puma_logo.jpg"><br><br>
<table width="250" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" >
<tr>
<td width="250" bgcolor="#FFFFFF" >
<font size="2"><b>PSYWERX PUMA $lang_inst0</b></font><br>
<!--<b><font size="1">$curver</font></b>-->
</td>
</tr>
</table><br>

$content

</td>
</tr>
</table>
<center>
<font size="1">Powered by PUMA $curver &copy; 2003 <a href="http://php.psywerx.net">PSYWERX PHP</a>
</center>
</td>
</tr>
</table>

</td>
</tr>
</table>

</body>
</html>
html;

echo $content;

?>
[/code:1:d7e946cb70]
__________________
My posts were too dang barren, so this got thrown in to take up a little bit of space.
Pretend is offline  
Add Post to del.icio.us
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-15-2003, 04:57 PM   #2 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,902
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
i really dont think its necessary to md5 a username....
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Old 12-15-2003, 05:09 PM   #3 (permalink)
v7n Mentor
 
Pretend's Avatar
 
Join Date: 10-13-03
Location: Ft. Lewis, WA
Posts: 3,264
iTrader: 0 / 0%
Pretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest orderPretend is a web professional of the highest order
Send a message via AIM to Pretend Send a message via Skype™ to Pretend
hey now, don't ask me, it's a script. i'm not smart enough to write all that. lol
__________________
My posts were too dang barren, so this got thrown in to take up a little bit of space.
Pretend is offline  
Add Post to del.icio.us
Old 12-15-2003, 05:11 PM   #4 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,902
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
i think that the md5 is causing the length to be over what your websites server allows as a filename length.. filename length on some computers cant be over 32 characters..
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Old 01-18-2004, 02:24 PM   #5 (permalink)
Inactive
 
Join Date: 01-18-04
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

PSYGNOSER is liked by many
Itz actually cuz u havent read the install instructionz! U must CHMOD all filez and folderz to 777!
PSYGNOSER is offline  
Add Post to del.icio.us
Old 01-18-2004, 03:11 PM   #6 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,902
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
z = s.
cuz = because
u = you
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Old 01-18-2004, 03:25 PM   #7 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,816
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
ALLCAPS = shouting
PSYGNOSER = rude
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Old 01-18-2004, 05:10 PM   #8 (permalink)
Inactive
 
Join Date: 01-18-04
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

PSYGNOSER is liked by many
Oh r we smart do u even know why i wrote CHMOD in uppercase? Certainly not cuz im supposedly rude cuz im not... and i mean look at me... supporting the script here even tho we do have our own support phorum... and furthermore ur all making phun of me...
PSYGNOSER is offline  
Add Post to del.icio.us
Old 01-18-2004, 05:14 PM   #9 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
I think they were referring to your username being in all CAPS. Also, not many people in this forum use u and cuz instead of you and because.
Jazzee is offline  
Add Post to del.icio.us
Old 01-18-2004, 05:30 PM   #10 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,902
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
The thing that was annoying to me was the z.. but why not help you out with the others too
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Old 01-18-2004, 05:48 PM   #11 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,816
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
yes i was talking about the username, well it's not really *that* rude. But overal *is* immiture and repugnant, to use replace letters of the common language, why not just type it all in 1337 5P34K if it would make you feel 'cooler'.

Basically that's playground speak.

Maybe I was far to quick to judge, but you exude immatureness.

We are happy to help, use proper english and stop shouting your name out when you meet people, and you'll have taken the first step toward sophistication!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Old 01-18-2004, 07:52 PM   #12 (permalink)
Inactive
 
Join Date: 10-12-03
Location: Cranberry Township
Posts: 275
iTrader: 0 / 0%
niceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really nice
Send a message via ICQ to niceguyeddie
Looks like the question has been answered. No need to further the conversation.
niceguyeddie is offline  
Add Post to del.icio.us
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with PHP Script Error dhudiburg Coding Forum 3 01-29-2007 03:06 AM
User creating forum script City Aggregation Coding Forum 4 11-21-2006 03:00 PM
script error? sim Coding Forum 3 06-29-2005 06:51 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:28 PM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.