Program-O Server Error - php

Today I installed Program-O 2.6.8 on a colocation server with x86_64-redhat-linux-gnu, running Apache, PHP 5.3.3, MySQL 5.6.38, PDO and cURL are enabled.
After uploading some AIML files I tried the JSON interface and received an error:
"Something went wrong! Error = Internal Server Error"
I include the log entries and hope someone can tell me what is wrong.
Thanks
Program O has encountered an error. this may help:
Error # 1024
Message: Test error
File: /var/www/vhosts/xxxxxx/webspace/httpdocs/xxxxxx/programo/admin/validateAIML.php, line 21
Program O has encountered an error. this may help:
Error # 8
Message: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13)
File: /var/www/vhosts/xxxxxx/webspace/httpdocs/xxxxxx/programo/admin/index.php, line 53
[31-Jan-2018 19:39:47] PHP Parse error: syntax error, unexpected '[' in /var/www/vhosts/xxxxxx/webspace/httpdocs/xxxxxx/programo/chatbot/core/conversation/intialise_conversation.php on line 449

PHP 5.3 does not support short array notation, that was brought in in PHP 5.4
Which will cause this issue:
[31-Jan-2018 19:39:47] PHP Parse error: syntax error, unexpected '['
in
/var/www/vhosts/xxxxxx/webspace/httpdocs/xxxxxx/programo/chatbot/core/conversation/intialise_conversation.php
on line 449
TL;DR: It clearly states on the docs for system-requirements: https://github.com/Program-O/Program-O#system-requirements
Program O requires PHP version 5.3.0 or higher to function.
That means 5.4+ not 5.3.3.

Related

Laravel public folder shows 500 Internal Server Error

I have recently installed laravel through softaculous in CPanel. After the installation, when I tried to open the website, it shows 500 Internal Server Error. Actually, I am a beginner in Laravel. The following errors I got from error_log.
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) in /home/hugar/public_html/jityo.com/vendor/nesbot/carbon/src/Carbon/Translator.php on line 18
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Uncaught ErrorException: Declaration of Illuminate\Http\Response::setContent($content) should be compatible with Symfony\Component\HttpFoundation\Response::setContent(?string $content) in /home/hugar/public_html/jityo.com/vendor/laravel/framework/src/Illuminate/Http/Response.php:14
Every assistance will be appreciated!.
Check the server php version and the php version in composer.json file of laravel framework, if it's not a match then you have to change the server php version and it will work like a charm. this happened with me as well.
The php version(7.1) on the server was lesser than php version in composer.json(7.2).
The problem fixed by upgrading the php version(7.4) on the server.

Fatal error: Interface 'JsonSerializable' not found in Cakephp

I'am getting below error. Please assist me in resolving this.
Fatal error: Interface 'JsonSerializable' not found in /home/onliuzgx/xyz.com/vendor/cakephp/cakephp/src/Mailer/Email.php on line 51
First you check your PHP version Cakephp requires 5.6.0 or greater (including PHP 7.2).
If you have proper PHP versoin you check your php.info Settings, if JSON is Enabled.
It will resolve the issue

Parse error: syntax error, unexpected '?' in /vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233 - laravel

I have a subdomain folder running on php 7. Globally my php version is 5.6 actually. When i run my project, i get a 500 internal error. Checking my error_log, i see this error
Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() in /home/invoice/vendor/symfony/polyfill-mbstring/Mbstring.php on line 358
I tried to install this command composer require symfony/polyfill-icon in my subfolder (under the subdomain which is running on php 7) but then this is the result in the terminal
Warning: Ambiguous class resolution, "App\Http\Controllers\Auth\RegisterController" was found in both "/home/laravel/public_html/myproject/app/Http/Controllers/mNotify/Auth/RegisterController.php" and "/home/laravel/public_html/myproject/app/Http/Controllers/Auth/RegisterController.php", the first will be used.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Parse error: syntax error, unexpected '?' in /home/laravel/public_html/myproject/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233
When i look in the vendor file in my subfolder under the subdomain, the
Symfony\Polyfill\Mbstring\iconv is installed there but when i test from the terminal using php --ir iconv, it get Extension iconv is not present.
What is happening?
check if mod php < 7.0 has enabled to disabled it.
and enable mod php 7 or 7.1

What does "Europe/Berlin" represent in the XAMPP PHP log file?

What does the "Europe/Berline]" portion of the error code, located in the php_error_log files, represent?
The php_error_log file is located on XAMPP in the Windows directory: C:\xampp\php\logs.
Here are a few of the error codes:
[18-Apr-2015 04:56:38 **Europe/Berlin]** PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\xampp\htdocs\app\tests\index_test.php on line 10
[18-Apr-2015 04:57:14 **Europe/Berlin]** PHP Fatal error: Class 'some\directory\Config' not found in C:\xampp\htdocs\myapp\index.php on line 17
[18-Apr-2015 05:02:16 **Europe/Berlin]** PHP Parse error: syntax error, unexpected '#', expecting function (T_FUNCTION) in C:\xampp\htdocs\myapp2\src\index.php on line 36
The answer to this question is that this is the Time Zone. The time zone is set in the php.ini file and is recorded in error logs.

Plugin could not be activated because it triggered a fatal error. How to fix it

This plugin work fine on my localhost but when i want active this plugin on client site i see this error Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_FUNCTION in /home2/alchimi1/public_html/wp-content/plugins/wordpress-fieldmanager-master/fieldmanager.php on line 120
you can check this code here https://github.com/alleyinteractive/wordpress-fieldmanager/blob/master/fieldmanager.php
What i should to do ?
The problem is with PHP version, check your version.
In version 5.3.0 anonymous functions become available.
Source:
http://php.net/manual/en/functions.anonymous.php
Checking version:
Create an blank file in your server and append:
<?php phpinfo() ?>
Or use command line: php -i or php -v

Categories