Previous Thread
Next Thread
Print Thread
Hop To
#129416 06/27/2006 10:24 PM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
I am getting this when cron runs the subscriptions.php file:

Code
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 1: ?php: No such file or directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 2: /aquota.group: Permission denied
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 20: anon_ftp/: is a directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 22: //: is a directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 23: syntax error near unexpected token `'/var/www/vhosts/site/httpdocs/forum/includes/main.inc.php''
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 23: ` require ('/var/www/vhosts/site/httpdocs/forum/includes/main.inc.php');'

Running threads 6.5.4 on apache 2.0.54, php 5.0.4 and mysql 4.1.14

Any idea what gives?


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
looks strange. Maybe a binary upload and not ASCII ? Whitspaces in the first line ? In Line 23 you have in front ` ' and at end ' '

/edit: can it be that your server is running on Windows? I found some hints that this can occurs when you have not the propper rights for this directory. With Google I found this. http://moodle.org/mod/forum/discuss.php?d=39549

Last edited by Zarzal; 06/28/2006 3:54 AM.

my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
Thank you zarzal <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

It's not a windows server, it's Linux 2.6.8-022stab056.1-enterprise. I took a subscriptions file I know that works on another site and I still get the same issue:

Code

/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 1: ?: No such file or directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 2: /aquota.group: Permission denied
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 20: psa/: is a directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 22: //: is a directory
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 23: syntax error near unexpected token `"/var/www/vhosts/site/httpdocs/forum/includes/main.inc.php"'
/var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php: line 23: `    require ("/var/www/vhosts/site/httpdocs/forum/includes/main.inc.php");'


I'm not sure what the problem might be, I'm guessing it's server-related.


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
Yes, seems to be the server itself. What happen ich you try to put another php script in this directory and execute it? phpinfo for example. Is this executed or not ?

If not you can try to delete the whole cron subdirectory and recreate it. Can you check the server error log?


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
A couple dumb questions...
1. How are you accessing the file (through cron, the exact line).
2. What user is executing the crontask? (root, "allena", etc)
3. Is the user who is executing the crontask the same user who owns the site?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
The file will execute if I run it from the browser (tho it times out, it still sends me email).

I have two cron tasks set to run it, one with root, one with the site's admin user acct. Both return the same errors.

right now, the cron task is:

15 * * * * /var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php

I set it in the plesk control panel, so I really don't know what the exact language is, but basically at the 15th minute of every hour it's supposed to run (at the 45th minute the other instance runs all with the same error messages emailed to me).

I may contact the web hosts or I just may upgrade them to v7.


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
Allen, again, what happen if you put a phpinfo file in this directory? Can you call it from there without errors or give it errors too?

create a file called info.php and put the following in it:
<?
phpinfo();
?>

Upload it to the /cron/php directory and try to execute it with the browser.


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
Sorry, forgot to say the phpinfo works fine, and reports the same path as I have entered into plesk to link to the subscriptions.php file.


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
This is very strange. If your web hoster can find anything it would be nice to hear what it was for reference.


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Allen, login to SSH as root and run:
php /var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php

and see if it works (just drop that into the command line and hit enter).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
I get this error (btw, wouldn't let me log in as root, I used the admin account instead):

PHP Warning: PHP Startup: Unable to load dynamic library /usr/lib/php/modules/pgsql.so' - libps.so.4: cannot open shared object file: No such file or directory in Unknown on line 0

I'll report to hosts.


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
ok, running it as root gave me the above error, plus:

PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of create_form_check(). If you would like to enable call-time pass-by-reference to true in your INI file. However, future versions may not support this any longer. in /var/www/vhosts/site//httpdocs/forum/ubbt.inc.php on line 1912

So maybe it is a bug in threads?


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
a bug that may have been fixed in 6.5.5 :smash:


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
hmm, 6.5.5 fixed the second error, but root acct still returns the previous error. Hopefully an issue the hosts can figure out <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
One of the web hosts tech support guys posted the possible fix. I noticed that paths to all cron scripts started at /usr/bin/blah/blah but the paths to the forum and phpinfo etc started with var/stuff.

It seems there's a hidden part of the paths that has to be added for cron use:

/usr/bin/php/

had to be added before the /var/www stuff. I'll know shortly if the file works, but it sounds logical <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
I'm an eejit <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />

Now that I read his remarks, he said

" You need to add /usr/bin/php to the cron. Otherwise the server will not know what to use to run the script.

The cron should look like this.

15 * * * * /usr/bin/php /var/www/vhosts/site/httpdocs/forum/cron/php/subscriptions.php"

I'll know shortly <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
odd, my "php" line should do the exact thing as his /usr/bin/php lol...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
yes, odd. It works tho, and only took 3.5 months for me to fix it <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


- Allen
- ThreadsDev | PraiseCafe

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
1 members (Ruben), 476 guests, and 111 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)