Author Topic: Error after install.  (Read 4519 times)

0 Members and 2 Guests are viewing this topic.

Offline Zug

  • Newbie
  • *
  • Posts: 35
  • Karma: +12/-0
    • View Profile
    • http://www.teensinporn.biz
Re: Error after install.
« Reply #15 on: February 28, 2014, 08:59:30 AM »
Ya ... I am getting this error as well. I dont see any extra .htaccess files. But I do see these files:
/data/trade_stats/.Empty_Directory.txt
/data/sessions/.Empty_Directory.txt

Those look out of place. I have not added any trades. I just installed it and see that error:
Code: [Select]
A fatal error has occurred: unpack(): Type L: not enough input, need 4, have 0 in /var/www/site.com/tx/lib/stats.php on 186 

Any help please?
« Last Edit: March 01, 2014, 07:11:15 AM by Zug »

Offline Zug

  • Newbie
  • *
  • Posts: 35
  • Karma: +12/-0
    • View Profile
    • http://www.teensinporn.biz
Re: Error after install.
« Reply #16 on: March 01, 2014, 06:59:00 AM »
Yeah, they are there to enhance some security concerns - but they dont really do a lot without the prescence of the ORDER directive.
Google 'Apache ORDER, DENY, ALLOW directives' for more info.

http://httpd.apache.org/docs/2.2/howto/access.html

Quote
Access control by host

If you wish to restrict access to portions of your site based on the host address of your visitors, this is most easily done using mod_authz_host.

The Allow and Deny directives let you allow and deny access based on the host name, or host address, of the machine requesting a document. The Order directive goes hand-in-hand with these two, and tells Apache in which order to apply the filters.

The usage of these directives is:

Allow from address

where address is an IP address (or a partial IP address) or a fully qualified domain name (or a partial domain name); you may provide multiple addresses or domain names, if desired.

For example, if you have someone spamming your message board, and you want to keep them out, you could do the following:

Deny from 10.252.46.165

Visitors coming from that address will not be able to see the content covered by this directive. If, instead, you have a machine name, rather than an IP address, you can use that.

Deny from host.example.com

And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

Deny from 192.168.205
Deny from phishers.example.com moreidiots.example
Deny from ke

Using Order will let you be sure that you are actually restricting things to the group that you want to let in, by combining a Deny and an Allow directive:

Order deny,allow
Deny from all
Allow from dev.example.com

Listing just the Allow directive would not do what you want, because it will let folks from that host in, in addition to letting everyone in. What you want is to let only those folks in.

Offline Zug

  • Newbie
  • *
  • Posts: 35
  • Karma: +12/-0
    • View Profile
    • http://www.teensinporn.biz
Re: Error after install.
« Reply #17 on: March 01, 2014, 07:10:11 AM »
error:
Code: [Select]
A fatal error has occurred: unpack(): Type L: not enough input, need 4, have 0 in /var/www/site.com/tx/lib/stats.php on 186 

This is the /tx/lib/.htaccess ( as installed from github 2 days ago)

Code: [Select]
deny from all


This is the area of /tx/lib/stats.php on line 186:

Code: [Select]

    foreach( $trades as $trade )
    {
        $domain = $trade['domain'];
        $file = $directory . '/' . $domain;

        $rt24 = array_fill(1, STATS_PER_RECORD, 0);
        $fp = fopen($file, 'r');
        for( $i = 0; $i < HOURS_PER_DAY; $i++ )
        {
*LINE 186>>>            $r = unpack('L' . STATS_PER_RECORD, fread($fp, RECORD_SIZE_STATS));
            foreach( $r as $j => $k )
            {
                $rt24[$j] += $k;
            }
        }

        $rt60 = array_fill(1, STATS_PER_RECORD, 0);
        fseek($fp, $minute_offset, SEEK_CUR);
        for( $i = 0; $i < MINUTES_PER_HOUR; $i++ )
        {
            //$minute++;
            $r = unpack('L' . STATS_PER_RECORD, fread($fp, RECORD_SIZE_STATS));
            foreach( $r as $j => $k )
            {
                $rt60[$j] += $k;
            }

            // Wrap around midnight with a seek
            if( ftell($fp) == $end_of_file )
            {
                fseek($fp, HOURS_PER_DAY * RECORD_SIZE_STATS, SEEK_SET);
            }
        }

        fclose($fp);
« Last Edit: March 03, 2014, 09:09:20 AM by Zug »

Offline Huge

  • Newbie
  • *
  • Posts: 13
  • Karma: +7/-0
    • View Profile
Re: Error after install.
« Reply #18 on: March 25, 2014, 05:17:32 PM »
delete the .htaccess file in /tx/data/trades/.htaccess and then hit reload and the error goes away  8)

Offline Grafrat

  • New Users
  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Error after install.
« Reply #19 on: June 21, 2014, 02:36:29 AM »
So is there a reliable solution to this problem?

Offline morf

  • New Users
  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error after install.
« Reply #20 on: October 04, 2016, 01:41:42 PM »
I have no .htaccess files in the directory but still get the error.

Any solution?

Offline The Dawg

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Error after install.
« Reply #21 on: July 07, 2017, 10:40:10 AM »
delete the .htaccess file in /tx/data/trades/.htaccess and then hit reload and the error goes away  8)
This is the correct answer.

The file is now called ".Empty_Directory.txt" - Delete that from /tx/data/trades/

Unofficial JMB Support Forums

Re: Error after install.
« Reply #21 on: July 07, 2017, 10:40:10 AM »


Tags: unpack 
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
2849 Views
Last post September 24, 2012, 11:00:12 PM
by Chad
4 Replies
1337 Views
Last post January 15, 2013, 02:42:16 PM
by panther555
0 Replies
730 Views
Last post August 05, 2013, 07:04:44 PM
by Chad
0 Replies
755 Views
Last post April 13, 2014, 03:56:32 PM
by thorshammer
0 Replies
718 Views
Last post October 16, 2014, 05:28:09 PM
by swingermoney

anything