Previous Thread
Next Thread
Print Thread
Hop To
Subscriptions php problem #129794 08/21/2006 5:11 PM
Joined: Aug 2006
Posts: 7
marks Offline OP
stranger
OP Offline
stranger
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

Re: Subscriptions php problem #129795 08/21/2006 8:42 PM
Joined: Dec 2003
Posts: 1,796
AllenAyres Offline
Pooh-Bah
Offline
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
Re: Subscriptions php problem #129796 08/22/2006 4:10 PM
Joined: Aug 2006
Posts: 7
marks Offline OP
stranger
OP Offline
stranger
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

Re: Subscriptions php problem #129797 08/22/2006 4:46 PM
Joined: Dec 2003
Posts: 1,796
AllenAyres Offline
Pooh-Bah
Offline
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
Re: Subscriptions php problem #129798 08/22/2006 4:52 PM
Joined: Dec 2003
Posts: 1,796
AllenAyres Offline
Pooh-Bah
Offline
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
Re: Subscriptions php problem #129799 08/28/2006 3:34 PM
Joined: Aug 2006
Posts: 7
marks Offline OP
stranger
OP Offline
stranger
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

Re: Subscriptions php problem #129800 09/17/2006 9:36 AM
Joined: Apr 2005
Posts: 6
FredR Offline
stranger
Offline
stranger
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

Re: Subscriptions php problem #129801 09/19/2006 8:21 AM
Joined: Apr 2005
Posts: 6
FredR Offline
stranger
Offline
stranger
Joined: Apr 2005
Posts: 6

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

Fred

Re: Subscriptions php problem #129802 09/19/2006 10:17 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
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.

Re: Subscriptions php problem #129803 09/19/2006 10:22 AM
Joined: Apr 2005
Posts: 6
FredR Offline
stranger
Offline
stranger
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

Re: Subscriptions php problem #129804 09/19/2006 10:18 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
It might as it would lessen the load of new posts to be mailed out the more often it's run.

Re: Subscriptions php problem #129805 09/29/2006 2:17 PM
Joined: Sep 2006
Posts: 13
astro Offline
stranger
Offline
stranger
Joined: Sep 2006
Posts: 13
how do I run the CRON thing from my browswer?


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Mobile app?
by Baldeagle - 12/06/2019 9:32 PM
How do you change Text Line spacing?
by jorb - 11/23/2019 12:14 AM
What happened to FAQ or Forum Help
by Ruben - 11/20/2019 11:58 AM
Search feature encountering an Error message
by jorb - 11/20/2019 12:06 AM
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
Who's Online Now
1 registered members (JAISP), 61 guests, and 416 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)