Previous Thread
Next Thread
Print Thread
Hop To
#129794 08/21/2006 6:11 PM
Joined: Aug 2006
Posts: 7
M
stranger
stranger
M Offline
Joined: Aug 2006
Posts: 7
Hi all,
I've got everything working perfectly (6.5.5) except for subscriptions. When I run the subscriptions.php from the browser or a shell on my Unix box, I get this:

Warning: main(/usr/local/apache/htdocs/isiboard/ubbthreads/main.inc.php) [function.main]: failed to open stream: No such file or directory in /usr/local/apache/htdocs/isiboard/ubbthreads/cron/php/subscriptions.php on line 23

Fatal error: main() [function.require]: Failed opening required '/usr/local/apache/htdocs/isiboard/ubbthreads/main.inc.php' (include_path='.:/usr/local/php/lib/php') in /usr/local/apache/htdocs/isiboard/ubbthreads/cron/php/subscriptions.php on line 23

Looked to me like it might be a directory permissions problem and I've double-checked everything I could find in other posts, my php install is fine, other php apps on the same server work fine so my paths/permissions appear to be correct as far as php libraries are concerned.

w3tvars.pm:

$config{'cgiurl'} = 'http://mb.infostructures.com/ubbthreads';
$config{'path'} = '/usr/local/apache/htdocs/isiboard/ubbthreads';
$config{'dbserver'} = 'localhost';

Anybody have a direction to point me in I'd greatly appreciate it.

Mark

Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
hmm, I thought that bug was fixed :smash:

Change line #23 of the subscriptions file to:

require ("../../includes/main.inc.php");

That should clear up the issues <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe
Joined: Aug 2006
Posts: 7
M
stranger
stranger
M Offline
Joined: Aug 2006
Posts: 7
Here's what my subscriptions.php reads now:

// Require the library
require ("/usr/local/apache/htdocs/isiboard/ubbthreads/main.inc.php");
require ("$thispath/languages/{$myprefs['language']}/subscriptions.php");

Should I still change it as you suggested?

Mark

Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
yes, you can see on that first line the path is wrong, main.inc.php was moved to the include folders <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

change:

require ("/usr/local/apache/htdocs/isiboard/ubbthreads/main.inc.php");


to:

require ("../../includes/main.inc.php");

hmm.. I see now that path yu have is mostly your path, you'll at least need to include the /includes directory in it.


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
hmmm, to remove any other issues, just change that second line to:

require ("$thispath/languages/english/subscriptions.php");

or whatever language you are using... I believe 6.5.3+ moved to calling language files using

languages/{$_SESSION['myprefs']['language']}/

but for these purposes, you only really need the path to your language install, not the user's preferences. Since you are editing you can adjust that one too <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe
Joined: Aug 2006
Posts: 7
M
stranger
stranger
M Offline
Joined: Aug 2006
Posts: 7
I just hard coded all the paths instead of using variables. Even though the variables are setup correctly, something must be missing (I prolly fat-fingered something) it works great just typing out the full paths.

Thanks for all your help.

Mark

#129800 09/17/2006 10:36 AM
Joined: Apr 2005
Posts: 6
F
stranger
stranger
F Offline
Joined: Apr 2005
Posts: 6
Hello all. I see the below entry in my logs daily. The S_Board is always 'chef'. The S_Last varies from day to day. In addition, I notice a temporary increase on the server load by a factor of about 1.0. I have 1420 subscriptions of which 75 are for 'chef'.


[ERROR][Fri, Sep 15 2006 20:17:39 -0700] [/home/chefto/ubbthreads/cron/php/subscriptions.php] [] Script: - Line:
UPDATE w3t_Subscribe
SET S_Last = 468203
WHERE S_Board = 'chef'
- Lost connection to MySQL server during query

I hear no complaints from the subscribers but I'm just wondering about these error logs... Running V6.5.1.1

Fred

Joined: Apr 2005
Posts: 6
F
stranger
stranger
F Offline
Joined: Apr 2005
Posts: 6

Just bumping this up for Rick in the hope I get an answer :-)

Fred

#129802 09/19/2006 11:17 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Basically it looks like the query is taking so long it's actually losing it's MySQL connection. The server load going up kind of goes along with it. Unfortunately there's not a real solution for this. How often do you have the cronjob running?

We've totally gone away from this model for version 7 because that was one of the downsides of the old method, is if you're board was decent sized the subscriptions scripts were very inefficient.

#129803 09/19/2006 11:22 AM
Joined: Apr 2005
Posts: 6
F
stranger
stranger
F Offline
Joined: Apr 2005
Posts: 6
I run it once a day. Would it help to run it a couple of time?

Thanks for the answer.

Fred

#129804 09/19/2006 11:18 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
It might as it would lessen the load of new posts to be mailed out the more often it's run.

Joined: Sep 2006
Posts: 13
A
stranger
stranger
A Offline
Joined: Sep 2006
Posts: 13
how do I run the CRON thing from my browswer?


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)