Web site update issue

If I try to update the NEWS section of my website, I get this message:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

Any ideas?

 

David Reed/Historic Airline Group

Are you updating the module or just adding new news?

If updating the module, compare the old and new files to see what changed and if you really do need to update.

Did your host just upgrade your Apache, PHP or MySQL? I had my host upgrade PHP from 7.2.18 to a newer version and got the same error in phpVMS 7. They said it was the program and not them. Turns out the issue was a misconfigured PHP install - once they updated it again the issue was resolved. Folks using the same PHP version on a different host/server did not have the issue using the same program as me.

Just changing the news. Not making any changes to the module.

Still cannot make changes, no matter how small, to my News section. I can make changes on the other various pages, but the front page news section cannot be changed.

 

 

Does the error_log show any errors? I think you should have an error_log in the root of phpVMS and in the admin directory.

Are you still getting the Internal Server Error? And if so, only with the news module?

What version of phpVMS? Have you compared your installed news module with the news module of a default phpVMS download?

 

On 10/20/2019 at 2:43 PM, reed0427 said:

If I try to update the NEWS section of my website, I get this message:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

Any ideas?

 

David Reed/Historic Airline Group

Can I see your .htaccess?

sometimes this file throw this issue in web hostings.

Try to delete .htaccess (that you have uploaded with phpvms installation), maybe your web hosting provider bring any configuration of this file include.

You mean this?

<?php
/**
 * phpVMS - Virtual Airline Administration Software
 * Copyright (c) 2008 Nabeel Shahzad
 * For more information, visit www.phpvms.net
 *    Forums: http://www.phpvms.net/forum
 *    Documentation: http://www.phpvms.net/docs
 *
 * phpVMS is licenced under the following license:
 *   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
 *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.phpvms.net
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 */

class News extends CodonModule
{
    public function index()
    {
        $this->ShowNewsFront(5);
    }
    
    // This function gets called directly in the template
    public function ShowNewsFront($count=5)
    {
        $sql='SELECT id, subject, body, postedby, UNIX_TIMESTAMP(postdate) AS postdate
                FROM ’ . TABLE_PREFIX .'news
                ORDER BY postdate DESC
                LIMIT '.$count;
        
        $res = DB::get_results($sql);
        
        if(!$res)
            return;
            
        foreach($res as $row)
        {
            //TODO: change the date format to a setting in panel
            $this->set(‘subject’, $row->subject);
            $this->set(‘body’, $row->body);
            $this->set(‘postedby’, $row->postedby);
            $this->set(‘postdate’, date(DATE_FORMAT, $row->postdate));
        
            $this->show(‘news_newsitem.tpl’);
        }
    }
}

Are you using phpVMS version 2.1.x or 5.5.2 (Simpilot version)?

There are several files to compare… 

  • /core/modules/news/news.php
  • /core/templates/news_newsitem.tpl - may end in .php instead of .tpl - this one may be in your active skin folder, which will take precedence over the one in /core/templates/
  • /admin/modules/SiteCMS/SiteCMS.php
  • /admin/templates/news_additem.php - may end in .tpl instead of .php
  • /admin/templates/news_list.php - may end in .tpl instead of .php
  • /core/common/SiteData.class.php
  • /core/common/LogData.class.php

Compare the above files on your site to the ones in a default install (or non-edited files from a download of your version of phpVMS).

Don’t change the file names or extensions - just compare to default. Let us know what you find out.

 

We’re on version 2.1

ill check those things next time I get home, but a web site guru I am not by any stretch of the imagination!

I’m trying to look through your log files but don’t see anything

I’ve enabled the display_errors = On in your config, can you try it now to see if an error comes up?

Still getting the same error message

The internal server error?

Is there anything in the error_log file in the root of your phpvms install or in /admin?

this is from the error log in the public_html/admin folder:

[24-Oct-2019 01:48:53 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/historic/public_html/admin/modules/PIREPAdmin/PIREPAdmin.php on line 130
[24-Oct-2019 01:48:59 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/historic/public_html/admin/modules/PIREPAdmin/PIREPAdmin.php on line 130

 

Of course, those are just from  recent

I’ll PM you