KenG Posted July 14, 2017 Report Share Posted July 14, 2017 phpvms 5.5.2 on php 5.5: I am getting the following errors trying to run maintenance.php as a cronjob. Warning: Creating default object from empty value in /home/flyelite/public_html/admin/maintenance.php on line 26 Unauthorized access - Invalid Permissions. Return to Homepage Line 26 is: Auth::$userinfo->pilotid = 0; When I run maintenance.php while logged on from my admin user account, it runs without problems. When I ask my host provider about it, they say phpvms is not compatible with php 5.5 and to downgrade to php 5.3. However, this makes no difference yet frags my forums. Is there a way I can tell cron to log on as my admin account or another way to make maintenance.php compatible with php 5.5? Thank you, -Ken Quote Link to comment Share on other sites More sharing options...
t_bergman Posted July 15, 2017 Report Share Posted July 15, 2017 You would have to check with your hosting provider to see if they can have the cron job run as an administrator, too many variable to give you help on a forum as every host has a slightly different hosting platform. I'm very surprised your host knows what phpVMS is but that is a completely different story. Turn error logging on in phpVMS and take a look at phpVMSs log files, it may give you and us a better idea of whats stopping the cron job from running. Quote Link to comment Share on other sites More sharing options...
KenG Posted July 16, 2017 Author Report Share Posted July 16, 2017 (edited) Thank you, I looked at the error log and there is nothing regarding maintenance.php. All of my phpvms cron jobs are failing on trying to authenticate as user 0. Is there a simple test cronjob I can run that would not try to authenticate with phpvms? OK, I found a simple cronjob to test (checks if the website is up or down) and it worked fine. It seems phpvms that is throwing the errors, i.e. no user 0 and not my host. Could my .htaccess file be causing problems with cron? I can get back with my host. They are a VA based hosting so they generally understand phpvms, but I don't think they realize that simpilot's 5.5.2 is coded for php 5.6. Thank you, -Ken Edited July 16, 2017 by KenG Quote Link to comment Share on other sites More sharing options...
t_bergman Posted July 16, 2017 Report Share Posted July 16, 2017 4 hours ago, KenG said: Thank you, I looked at the error log and there is nothing regarding maintenance.php. All of my phpvms cron jobs are failing on trying to authenticate as user 0. Is there a simple test cronjob I can run that would not try to authenticate with phpvms? OK, I found a simple cronjob to test (checks if the website is up or down) and it worked fine. It seems phpvms that is throwing the errors, i.e. no user 0 and not my host. Could my .htaccess file be causing problems with cron? I can get back with my host. They are a VA based hosting so they generally understand phpvms, but I don't think they realize that simpilot's 5.5.2 is coded for php 5.6. Thank you, -Ken Ken, Can you run the maintenance.php file from a web browser? If you can't do this, try editing the permissions of the file through cpanel and see if it works that way. A cron job only needs read and execute access if I remember correctly. Quote Link to comment Share on other sites More sharing options...
KenG Posted July 17, 2017 Author Report Share Posted July 17, 2017 Thank you, Yes, I can run it from a web browser as long as I am logged in to the site. If I am not logged into the site it fails with an admin error. I changed the permissions to maintenance to 755 and I still get the same admin error. -Ken Quote Link to comment Share on other sites More sharing options...
t_bergman Posted July 17, 2017 Report Share Posted July 17, 2017 Ken, I'm still trying to wrap my head around this one, so far I've gotten rid of the critical error but I'm still working on the invalid permissions. I'll keep you updated. Best, Quote Link to comment Share on other sites More sharing options...
Ephendi Posted October 26, 2017 Report Share Posted October 26, 2017 any news? Quote Link to comment Share on other sites More sharing options...
KenG Posted October 27, 2017 Author Report Share Posted October 27, 2017 I have never been able to fix this. Every day I have to run the maintenance tasks manually. Quote Link to comment Share on other sites More sharing options...
William Posted June 6, 2020 Report Share Posted June 6, 2020 (edited) Interesting as I have the same exact error. Is it really that we can't come up with a solution or workaround? Always appreciate any input EDIT: Apparently we can't! Edited June 22, 2020 by William Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.