Maintenance.php causing Cordon Critical Error.

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

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. 

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

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. 

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

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,

any news? 

I have never been able to fix this. Every day I have to run the maintenance tasks manually.

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!