Errors in October CMS installation via cPanel - cpanel

I just installed October CMS on my hosting platform via cPanel's Softaculous utility. I do not believe installation method has anything to do with my errors but mentioning it just in case I am wrong.
October CMS Version: 1.0.458
Sever PHP Version: 7.3.3
After installing in the designated directory it is showing "HTTP 500" generic error so I checked the error log. Following error was being shown
"[28-Sep-2019 11:09:04 Etc/GMT] PHP Parse error: syntax error, unexpected '[', expecting ')' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 149"
There is absolutely no online resource which describes occurance of such an error and possible solution. So I opened the helper.php to look at line 149. The code on this line was,
$query = str_replace(['%', '?'], ['%%', '%s'], $query);
Now there is nothing seemingly wrong with this line but I thought may be the "str_replace" function is not able to understand the array arguments. So I removed the array arguments and wrote it two times like
$query = str_replace('%', '%%', $query);
$query = str_replace('?', '%s', $query);
Now the error on this line disappears but a new error appears on another line as follows
PHP Parse error: syntax error, unexpected '[' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 238
The code on this line is
function trans($id = null, $parameters = [], $domain = 'messages', $locale = null)
Now here I am not sure if removing brackets would make everything alright. Why should such strange errors appears? Can someone help?

Are you 100% sure the PHP version you're using is 7.3.3?
The short array syntax of using [ ... ] instead of array( ... ) was introduced in PHP 5.4 and the errors you are getting are the errors that will happen if you are using an older version of PHP. I'm not sure how cPanel Softaculous works, but perhaps somehow it set you up to use a different version of PHP then you expect.
I would try running phpinfo() to double check your PHP setup.

Related

DBT: How to fix Database Error Expecting Value?

I was running into troubles today while running Airflow and airflow-dbt-python. I tried to debug a bit using the logs and the error shown in the logs was this one:
[2022-12-27, 13:53:53 CET] {functions.py:226} ERROR - [0m12:53:53.642186 [error] [MainThread]: Encountered an error:
Database Error
Expecting value: line 2 column 5 (char 5)
Quite a weird one.
Possibly check your credentials file that allows DBT to run queries on your DB (in our case we run DBT with BigQuery), in our case the credentials file was empty. We even tried to run DBT directly in the worker instead of running it through airflow, giving as a result exactly the same error. Unfortunately this error is not really explicit.

TCL issues -10007 error when using oo:class, 1 case and solution

This is both a (maybe) bug report, and a question and answers. You have TCL 8.6, on LINUX RHEL6 64 bits, and you see this cryptic message:
-10007
while executing
"oo::class create DlgClass {
method addInstDevBasedProc {} {
foreach inst_name [ my getInstsForPmExecute ] {
puts "Inst:$inst_name}"
..."
(file "moma.tcl" line 1)
What happened?
Well, it is all about a missing left brace in the puts "Inst:$inst_name}", right after the $ sign.This of course does not mean that other type of mistakes cannot yield the same error code. Unfortunately, I have issues with logging in to the news-group of TCL, and report the message, but wanted to spread the word.I suggest that TCK have a more meaningful error message for this, in future releases.

XSL::Apache FOP java server connection

Got a project with Apache FOP, have to make a server based application which will use Apache FOP and pick XML+XSLT files, convert it to XSL:FO and then output an PDF file.
Everything works fine until it comes to XSL:FO=>PDF, Im getting a error in my console which tells me:
"could not connect to java server at line 15"
I'm a newbie programmer, and this might be a simple task to complete but I just can't figure it out how to run this bloody java server ... so my code might be working. Any help would be great. (FYI Im working on Windows)
Here is the Perl Code:
use XML::LibXSLT;
use XML::LibXML;
use XML::ApacheFOP;
my $parser = XML::LibXML->new();
my $xslt = XML::LibXSLT->new();
my $source = $parser->parse_file('books.xml');
my $style_doc = $parser->parse_file('books.xsl');
my $stylesheet = $xslt->parse_stylesheet($style_doc);
my $results = $stylesheet->transform($source);
my $Fop = XML::ApacheFOP->new();
$Fop->fop( xml => "books.xml", xsl => "books.xsl", outfile => "temp.pdf" )
or die "cannot create pdf: " . $Fop->errstr;
Would be glad to get some help.
Cheers.
You need to run JavaServer by this command
/path/to/java -classpath \
/path/to/JavaServer.jar\
:/usr/local/xml-fop/build/fop-0.20.5-RFC3066-patched.jar\
:/usr/local/xml-fop/lib/avalon-framework-cvs-20020806.jar\
:/usr/local/xml-fop/lib/batik.jar\
:/usr/local/xml-fop/lib/xalan-2.4.1.jar\
:/usr/local/xml-fop/lib/xercesImpl-2.2.1.jar \
com.zzo.javaserver.JavaServer
This works for me but with fop 0.20 with fop-0.20.5-RFC3066-patched.jar

opensplice dds Hello Word Example

I am posting here after asking the question at the openslice dds forum, and not receiving any reply.I am trying to use opensplice dds on a ubuntu machine. I am not sure if it serves as a proof of proper installation, but I have pasted my release.com file below. Now, I was able to run the ping pong example just fine. But when I ran the executable sac_helloworld_pub ( HelloWorld example in the C programming language), I got the following error
vishal#expmach:~/HDE/x86.linux2.6/examples/dcps/HelloWorld/c/standalone$ ./sac_helloworld_pub
Error in DDS_DomainParticipantFactory_create_participant: Creation failed: invalid handle
I did some searching, and it looks like I need to be running the ospl start command from the terminal. But when I do so, I get a No command ospl found message. Below is the release.comfile's contents
echo "<<< OpenSplice HDE Release V6.3.130716OSS For x86.linux2.6, Date 2013-07-30 >>>"
if [ "${SPLICE_ORB:=}" = "" ]
then
SPLICE_ORB=DDS_OpenFusion_1_6_1
export SPLICE_ORB
fi
if [ "${SPLICE_JDK:=}" = "" ]
then
SPLICE_JDK=jdk
export SPLICE_JDK
fi
OSPL_HOME="/home/vishal/HDE/x86.linux2.6"
OSPL_TARGET=x86.linux2.6
PATH=$OSPL_HOME/bin:$PATH
LD_LIBRARY_PATH=$OSPL_HOME/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
CPATH=$OSPL_HOME/include:$OSPL_HOME/include/sys:${CPATH:=}
OSPL_URI=file://$OSPL_HOME/etc/config/ospl.xml
OSPL_TMPL_PATH=$OSPL_HOME/etc/idlpp
. $OSPL_HOME/etc/java/defs.$SPLICE_JDK
export OSPL_HOME OSPL_TARGET PATH LD_LIBRARY_PATH CPATH OSPL_TMPL_PATH OSPL_URI
$#
release.com (END)
Sorry for the holidays-driven lack of 'reactivity' on the OpenSplice forum .. I've answered your question there though ..
Here's that same answer for completeness:
*For the 6.3 community-edition, the deployment-model changed from shared-memory (v5.x) to the so-called single-process standalone deployment mode where the middleware is simply linked (as libraries) with the application so you don't need to start any daemons first (as was the case for the federated 'shared-memory' mode that was the default in V5).
So its OK that you get the error when trying to call 'ospl' as thats not used anymore so isn't in the distribution.
Now to your issue, your release.com looks OK to me, but perhaps you didn't actually 'source' it in your environment i.e. calling it with a '.' in front of it:
promtp> . release.com
you can verify that by doing an 'echo $OSPL_HOME' in your shell and see if it actually shows the value of the env. variable as set by the release.com.
Hope that helps,
-Hans*

Unexpected error while loading data

I am getting an "Unexpected" error. I tried a few times, and I still could not load the data. Is there any other way to load data?
gs://log_data/r_mini_raw_20120510.txt.gzto567402616005:myv.may10c
Errors:
Unexpected. Please try again.
Job ID: job_4bde60f1c13743ddabd3be2de9d6b511
Start Time: 1:48pm, 12 May 2012
End Time: 1:51pm, 12 May 2012
Destination Table: 567402616005:myvserv.may10c
Source URI: gs://log_data/r_mini_raw_20120510.txt.gz
Delimiter: ^
Max Bad Records: 30000
Schema:
zoneid: STRING
creativeid: STRING
ip: STRING
update:
I am using the file that can be found here:
http://saraswaticlasses.net/bad.csv.zip
bq load -F '^' --max_bad_record=30000 mycompany.abc bad.csv id:STRING,ceid:STRING,ip:STRING,cb:STRING,country:STRING,telco_name:STRING,date_time:STRING,secondary:STRING,mn:STRING,sf:STRING,uuid:STRING,ua:STRING,brand:STRING,model:STRING,os:STRING,osversion:STRING,sh:STRING,sw:STRING,proxy:STRING,ah:STRING,callback:STRING
I am getting an error "BigQuery error in load operation: Unexpected. Please try again."
The same file works from Ubuntu while it does not work from CentOS 5.4 (Final)
Does the OS encoding need to be checked?
The file you uploaded has an unterminated quote. Can you delete that line and try again? I've filed an internal bigquery bug to be able to handle this case more gracefully.
$grep '"' bad.csv
3000^0^1.202.218.8^2f1f1491^CN^others^2012-05-02 20:35:00^^^^^"Mozilla/5.0^generic web browser^^^^^^^^
When I run a load from my workstation (Ubuntu), I get a warning about the line in question. Note that if you were using a larger file, you would not see this warning, instead you'd just get a failure.
$bq show --format=prettyjson -j job_e1d8636e225a4d5f81becf84019e7484
...
"status": {
"errors": [
{
"location": "Line:29057 / Field:12",
"message": "Missing close double quote (\") character: field starts with: <Mozilla/>",
"reason": "invalid"
}
]
My suspicion is that you have rows or fields in your input data that exceed the 64 KB limit. Perhaps re-check the formatting of your data, check that it is gzipped properly, and if all else fails, try importing uncompressed data. (One possibility is that the entire compressed file is being interpreted as a single row/field that exceeds the aforementioned limit.)
To answer your original question, there are a few other ways to import data: you could upload directly from your local machine using the command-line tool or the web UI, or you could use the raw API. However, all of these mechanisms (including the Google Storage import that you used) funnel through the same CSV parser, so it's possible that they'll all fail in the same way.