Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-01-2005, 04:33 PM opening file errors
HitRaj47's Avatar
Extreme Talker

Posts: 177
Location: GA
Trades: 0
look at the error in the footer of my site: http://pcgf.peterng.co.uk

I have no idea why its doing this. It was working fine a few days ago. But also, the host apparently recently moved servers, so I think that might have something to do with it

though I'm not sure.

also the news system, which is powered by cutenews, you can't post comments. it's not database based (lol), it stores the news and comments in files.

any help with this? the host doesnt have a clue atm, but a support ticket has been opened
HitRaj47 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-01-2005, 05:33 PM
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Without seeing the script, sounds like error #1 is related to permissions and #2 join() is passing an argument which is foobarred by error #1. Can't say much more without seeing code.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 07-02-2005, 08:57 AM
HitRaj47's Avatar
Extreme Talker

Posts: 177
Location: GA
Trades: 0
the code is:

<?php include ("includes/ads/banner468.php");?>

and in banner468.php:

PHP Code:
<?php
#######################################################################
#                            Randex 1.21                              #
#            By Thomas Tsoi <admin@tecaweb.com> 2001-05-12            #
#          Copyright 2001 (c) Teca Web. All rights reserved.          #
#######################################################################
#                                                                     #
# Teca Web:                                                           #
#   http://www.tecaweb.com/                                           #
# Teca Scripts:                                                       #
#   http://www.teca-scripts.com/                                      #
# Support:                                                            #
#   http://www.teca-scripts.com/forum/                                #
#                                                                     #
# ################################################################### #
#                                                                     #
#        You can distribute this script and use it freely as          #
#          long as this header is not edited in the script.           #
#                                                                     #
#######################################################################

############ This is the only thing required
# chmod 644
$rand_file "http://pcgf.peterng.co.uk/includes/ads/banner468.txt";

############ Advanced Options ; Ignore the following if you are not interested
# chmod 666
$rand_data "data.txt";
# chmod 666
$rand_ip   "iplog.txt";
# number of ip to store in iplog.txt
$number_ip 20;
########################################################
#
# That's it, setup ends.
#
########################################################

if (is_writeable($rand_data) && is_writeable($rand_ip) && $number_ip 0) {
    
$advanced 1;
    }

$codes split("\[\%\%BREAK\%\%\]"join(""file($rand_file)));
srand((double) microtime()*1000000);
$index rand(0count($codes)-1);

/* ALL THIS IS IGNORED - NOT NEEDED

if (($advanced) && count($codes) > 0) {
    ##################
    # Check IP
    $lines = file($rand_ip);

    for ($i=0;$i<count($lines);$i++) {
        $line = $lines[$i];
        list($ip, $id) = split("\|\|", chop($line));
        
        if ($ip == getenv("REMOTE_ADDR")) {
            $lastid = $id;
            do {
                $index = rand(0, count($codes)-1);
                }
            while ($index == $lastid);
            }
        }

    $fh = fopen($rand_ip, "w");
    fwrite($fh, getenv("REMOTE_ADDR")."||$index\n");
    $count = 1;
    for ($i=0;$i<count($lines);$i++) {
        $line = $lines[$i];
        list($ip, $id) = split("\|\|", $line);
        if ($ip != getenv("REMOTE_ADDR") && $count<$number_ip) {
            fwrite($fh, $line);
            $count++;
            }
        }
    fclose($fh);

    ##################
    # Count hits
    unset($line);
    $lines = file($rand_data);

    $flag = 0;
    $fh = fopen($rand_data, "w");
    for ($i=0;$i<count($lines);$i++) {
        $line = $lines[$i];
        if (ereg("^html$index\|", $line)) {
            list ($filename, $hits) = split("\|", chop($line));
            $hits++;
            fwrite($fh, "html$index|$hits\n");
            $flag = 1;
            }
        else {
            fwrite($fh, $line);
            }
        }
    if ($flag == 0) {
        fwrite($fh, "html$index|1\n");
        }
    fclose($fh);
    }
END OF IGNORED CODE */
print $codes[$index];
?>
HitRaj47 is offline
Reply With Quote
View Public Profile
 
Old 07-02-2005, 09:07 AM
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
download banner468.txt to your local comp, delete it off the server, then upload it again. Be sure the permissions are set according to the script. banner468.txt is CHMOD 644, writable by owner.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.

Last edited by metho; 07-02-2005 at 09:09 AM..
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 07-02-2005, 05:30 PM
HitRaj47's Avatar
Extreme Talker

Posts: 177
Location: GA
Trades: 0
i've done that, still the errors exist...
HitRaj47 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to opening file errors
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21254 seconds with 12 queries