Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: bros on May 12, 2008, 02:49:50 PM

Title: Whenever I install a package, I get an error.
Post by: bros on May 12, 2008, 02:49:50 PM
It isn't an error that doesn't allow it to be installed, but it does clog up the error log:

2: fread(): supplied argument is not a valid stream resource
File: /home/xxxx/public_html/boards/Sources/Subs-Package.php
Line: 2719 

2: feof(): supplied argument is not a valid stream resource
File: /home/xxxxx/public_html/boards/Sources/Subs-Package.php
Line: 2718 
Title: Re: Whenever I install a package, I get an error.
Post by: karlbenson on May 14, 2008, 11:32:51 PM
Check the chmod permissions of the Packages folder. Make sure its 777
Check those of the folder inside it called temp. Make sure thats set to 777 aswell.

Is open_basedir in effect?
is safe mode enabled?
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 15, 2008, 06:54:35 AM
Quote from: karlbenson on May 14, 2008, 11:32:51 PM
Check the chmod permissions of the Packages folder. Make sure its 777
Check those of the folder inside it called temp. Make sure thats set to 777 aswell.

Is open_basedir in effect?
is safe mode enabled?

Packages = 777
/Packages/temp = 777

open_basedir, duno what that is, so it probably isn't

Safe mode = no
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 22, 2008, 09:56:35 PM
Bump
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 25, 2008, 11:50:07 AM
Bump
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 26, 2008, 08:25:22 PM
bump
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 27, 2008, 09:47:06 PM
Bump
Title: Re: Whenever I install a package, I get an error.
Post by: metallica48423 on May 27, 2008, 10:29:28 PM
can you provide a phpinfo.php? (What is phpinfo.php? (http://www.simplemachines.org/community/index.php?topic=18250.0))

do the webserver's error logs provide any more information regarding this?

the error itself says that its unable to find, and thus, unable to read the file in question -- what code is on those lines of that file?
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 29, 2008, 04:18:31 PM
http://www.thecastlehall.com/phpinfo.php
Title: Re: Whenever I install a package, I get an error.
Post by: metallica48423 on May 29, 2008, 05:02:10 PM
ok... open basedir isn't on.  safe mode is off

is anything being put into the /temp folder?

my best idea is that its not being allowed to extract the mod into the directory and thus when it tries to read the files from the folder its not there, thus the invalid stream resource
Title: Re: Whenever I install a package, I get an error.
Post by: bros on May 31, 2008, 05:12:59 PM
Quote from: metallica48423 on May 29, 2008, 05:02:10 PM
ok... open basedir isn't on.  safe mode is off

is anything being put into the /temp folder?

my best idea is that its not being allowed to extract the mod into the directory and thus when it tries to read the files from the folder its not there, thus the invalid stream resource

It's set to 777
Title: Re: Whenever I install a package, I get an error.
Post by: metallica48423 on June 01, 2008, 03:50:24 AM
hmm, is there anything in the directory?
Title: Re: Whenever I install a package, I get an error.
Post by: SlammedDime on June 01, 2008, 05:07:04 AM
Lets take a different approach.  CHMOD the Packages/backups directory to 777.  If it still doesn't work, go to Packages > Options and uncheck Create Backups.... and then try.

The error is occuring in the backup function (creates a backup of your files before installing the mod).  so we're not even getting to installing yet.
Title: Re: Whenever I install a package, I get an error.
Post by: bros on June 01, 2008, 06:51:21 PM
Quote from: metallica48423 on June 01, 2008, 03:50:24 AM
hmm, is there anything in the directory?

The only thing in /temp is ad_mod_v2-3-1_SMF_vbeta3Public

I unchecked the make backup thing. Let's see what happens.

And it installed/uninstalled without error.

There is only one error left on my boards:
8: Undefined offset: 36
File: /home/xxxxx/public_html/boards/Sources/Subs-Boards.php
Line: 931
Title: Re: Whenever I install a package, I get an error.
Post by: metallica48423 on June 01, 2008, 09:52:17 PM
what is on line 931 of Sources/Subs-Boards.php?
Title: Re: Whenever I install a package, I get an error.
Post by: bros on June 02, 2008, 05:08:01 PM
Quote from: metallica48423 on June 01, 2008, 09:52:17 PM
what is on line 931 of Sources/Subs-Boards.php?

logAction('delete_board', array('boardname' => $boards[$id_board]['name']), 'admin');
Title: Re: Whenever I install a package, I get an error.
Post by: Oldiesmann on June 07, 2008, 09:02:41 PM
That's a bug that has been fixed in Beta 4. SMF is reordering existing boards before logging anything, and this causes $boards to be reloaded, so by the time it gets around to the actual logging, there isn't any data for that board in $boards.

To fix it:

Sources/Subs-Boards.php

Find
reorderBoards();

// Let's do some serious logging.
foreach ($boards_to_remove as $id_board)
logAction('delete_board', array('boardname' => $boards[$id_board]['name']), 'admin');


Replace
// Let's do some serious logging.
foreach ($boards_to_remove as $id_board)
logAction('delete_board', array('boardname' => $boards[$id_board]['name']), 'admin');

reorderBoards();