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.
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.
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.
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.
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));
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.
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