Jump to content


Photo

Can anybody help me?


  • Please log in to reply
2 replies to this topic

#1 shaunbaird

shaunbaird
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 31 August 2006 - 08:05 AM

Hi, I bought a paid to click script, only to find theres no user guide and the programmers contact email no longer exists.  The site I purchased form hasn't got back to me.
I've managed to ftp upload and install the site myself, but there seems to be a bug.

Members can submit paid links, and paid banners.

The links seems to work ok, but the banners module is producing an error when I try to upload a banner from my own computer, I get the following error message on the website:

Warning: copy(/home/wwwsmon/public_html //images/banners/mentor~someinfo4u-banner-simple.gif): failed to open stream: No such file or directory in /home/wwwsmon/public_html/link_acco_ban2.php on line 55

and the following error message in the middle of the screen:


Internal Server Error: Could not upload file.
/home/wwwsmon/public_html //images/banners/mentor~someinfo4u-banner-simple.gif



I have also pasted below the contents of the file called link_acco_ban2.php where the error message is reported above:

If anybody wishes to help me - I would be grateful.

Thanks
Shaun Baird
www.somemoney4u.info


<?
include('includes/data_conn.php');
session_start();

$get_general = mysql_query("SElECT * FROM main");
$grow = mysql_fetch_array($get_general);
$g_genid = $grow[genid];
$g_title = $grow[title];
$g_baseurl = $grow[baseurl];
$g_rooturl = $grow[rooturl];
$g_aemail = $grow[adminemail];
$g_pemail = $grow[paypalemail];
$g_lcharge = $grow[linkcharge];
$g_bcharge = $grow[bannercharge];
$g_withdraw = $grow[withdraw];
$g_bold = $grow[bold];
$g_italic = $grow[italic];
$g_referral = $grow[referral];

if ($HTTP_SESSION_VARS[aduser])
{
if ($newtitle && $url && $banner)
{
if ($banner == "none")
{
include('includes/header.php');
echo "<div class=\"contex\">Error: No File Uploaded.</div>";
include('includes/footer.php');
exit;
}
if ($banner_size == 0)
{
include('includes/header.php');
echo "<div class=\"contex\">Error: File size is 0 bytes</div>";
include('includes/footer.php');
exit;
}
if (!is_uploaded_file($banner))
{
include('includes/header.php');
echo "<div class=\"contex\">Error: Possible file upload attack.</div>";
include('includes/footer.php');
exit;
}
$good_file = substr($banner_name, -4);
if ($good_file != ".gif" && $good_file != ".jpg")
{
include('includes/header.php');
echo "<div class=\"contex\">Error: You must upload a GIF or a JPEG for a banner.</div>";
include('includes/footer.php');
exit;
}
$mod_file = "$aduser~$banner_name";
$upfile = "$g_rooturl/images/banners/".$mod_file;
if (!copy($banner, $upfile))
{
include('includes/header.php');
echo "<div class=\"contex\">Internal Server Error: Could not upload file.</div>";
echo $upfile;
include('includes/footer.php');
exit;
}
$check_url = substr($url, 0, 7);
if ($check_url == 'http://')
{
$url = strrev($url);
$url = substr($url, 0, -7);
$url = strrev($url);
}
$date = date("n/j/Y");
if ($insert_bannerdb = mysql_query("INSERT INTO n_ban (banid, username, title, banname, date, status, addr) VALUES (NULL, '$aduser', '$newtitle', '$mod_file', '$date', 'inactive', '$url')"))
{
$ban_id = mysql_insert_id();
if ($HTTP_SESSION_VARS[ban_id])
{
session_unregister("ban_id");
}
$ban_id = mysql_insert_id();
session_register("ban_id");
include('includes/header.php');
echo "<div class=\"contex\"><div class=\"heatexblu\">You're Not Done Yet!</div>Your banner will not be added until you pay a fee of $g_bcharge via PayPal.<br /><br />You may do so by clicking the button below.<br /><br />";
}
else
{
include('includes/header.php');
echo "aduser: $aduser, newtitle: $newtitle, date: $date, mod_file: $mod_file";
echo "<div class=\"contex\"><div class=\"heatexblu\">Error!</div>An unknown error occurred while processing your request.<br /><br />If the problem persists, please <a href=\"contact.php\" class=\"acon\">contact</a> the system administrator.<br /><br />";
}
}
else
{
include('includes/header.php');
echo "<div class=\"contex\"><div class=\"heatexblu\">Error!</div>You did not provide a value for all of the fields.<br /><br />Please click back in your browser and try again.<br /><br />";
}
}
?>

</div>

<form action="https://www.paypal.c...cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<? echo "$g_pemail"; ?>">
<input type="hidden" name="item_name" value="Add New Banner">
<input type="hidden" name="amount" value="<? echo "$g_bcharge"; ?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="<? echo "$g_baseurl"; ?>link_acco_ban3.php">
<input type="hidden" name="cancel_return" value="<? echo "$g_baseurl"; ?>link_acco_canc.php">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.c...lick-but23.gif" border="0" name="submit" alt="Make Payment!">
</form>

<? include('includes/footer.php'); ?>




#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 31 August 2006 - 10:41 AM

The only think I can see that might be an issue is this line....

  $upfile = "$g_rooturl/images/banners/".$mod_file;

you see in the error message you get '//images'... the '//' may be the issue.

change the line above to

  $upfile = $g_rooturl . "images/banners/" . $mod_file;

see if that helps.

follow me on twitter @PHPsycho

#3 shaunbaird

shaunbaird
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 31 August 2006 - 10:54 AM

Hi, it didn't work.

Would you be intersted in taking a look throuhg my site code/possible doing some upgrades etc in the future ?

if so I would need to know your abilities etc.

I can make payment, although it wouldn't be much yet.

Thanks

Shaun Baird




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users