SmartyCompilerException error during testlink installation - testlink

i followed step by step the installation of testink with wamp server.
everything was fine except the last step, when i open the link:
http://localhost/testlink-1.9.14/login.php
i got this:
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "C:\wamp\www\testlink-1.9.14\gui\templates\login.tpl" on line 23 "{if $tlCfg->demoMode}{$labels.demo_usage}{/if}" unknown tag "private_print_expression"' in C:\wamp\www\testlink-1.9.14\third_party\smarty3\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 665
( ! ) SmartyCompilerException: Syntax Error in template "C:\wamp\www\testlink-1.9.14\gui\templates\login.tpl" on line 23 "{if $tlCfg->demoMode}{$labels.demo_usage}{/if}" unknown tag "private_print_expression" in C:\wamp\www\testlink-1.9.14\third_party\smarty3\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 665
Call Stack
# Time Memory Function Location
1 0.0006 303984 {main}( ) ..\login.php:0
2 0.1015 8857432 renderLoginScreen( ) ..\login.php:75
3 0.1034 8972560 Smarty_Internal_TemplateBase->display( ) ..\login.php:230
4 0.1034 8976768 Smarty_Internal_TemplateBase->fetch( ) ..\smarty_internal_templatebase.php:374
5 0.1047 9006248 Smarty_Internal_Template->compileTemplateSource( ) ..\smarty_internal_templatebase.php:155
Can you help me please, thank you

I suggest to change the persmission of the gui and third_party folder
chmod -R 777 gui/
chmod -R 777 third_party/

Related

awslogs-agent-setup.py not working on Ubuntu 17.10 (artful)

This works fine on ubuntu 16.04, but not on 17.10
+ curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 56093 100 56093 0 0 56093 0 0:00:01 --:--:-- 0:00:01 98929
+ chmod +x ./awslogs-agent-setup.py
+ ./awslogs-agent-setup.py -n -c /etc/awslogs/awslogs.conf -r us-west-2
Step 1 of 5: Installing pip ...^[[0mlibyaml-dev does not exist in system ^[[0m^[[92mDONE^[[0m
Step 2 of 5: Downloading the latest CloudWatch Logs agent bits ... ^[[0mTraceback (most recent call last):
File "./awslogs-agent-setup.py", line 1317, in <module>
main()
File "./awslogs-agent-setup.py", line 1313, in main
setup.setup_artifacts()
File "./awslogs-agent-setup.py", line 858, in setup_artifacts
self.install_awslogs_cli()
File "./awslogs-agent-setup.py", line 570, in install_awslogs_cli
subprocess.call([AWSCLI_CMD, 'configure', 'set', 'plugins.cwlogs', 'cwlogs'], env=DEFAULT_ENV)
File "/usr/lib/python2.7/subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I noticed that earlier on in the process, in the AWS boilerplate it failed to install libyaml-dev but not sure if that's the only problem.
Always find the answer right after I post it...
Here's my modified CF template command:
050_install_awslogs:
command: !Sub
"/bin/bash -x\n
exec >>/var/log/cf_050_install_awslogs.log 2>&1 \n
echo 050_install_awslogs...\n
set -xe\n
# Get the CloudWatch Logs agent\n
mkdir /opt/awslogs\n
cd /opt/awslogs\n
# Needed for python3 in 17.10\n
apt-get install -y libyaml-dev python-dev \n
pip3 install awscli-cwlogs\n
# avoid it complaining about not having /var/awslogs/bin/aws binary\n
if [ ! -d /var/awslogs/bin ] ; then\n
mkdir -p /var/awslogs/bin\n
ln -s /usr/local/bin/aws /var/awslogs/bin/aws\n
fi\n
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O\n
chmod +x ./awslogs-agent-setup.py\n
# Hack for python 3.6 & old awslogs-agent-setup.py\n
sed -i 's/3,6/3,7/' awslogs-agent-setup.py\n
./awslogs-agent-setup.py -n -c /etc/awslogs/awslogs.conf -r ${AWS::Region}\n
echo 050_install_awslogs end\n
"
Not entirely sure about the need for the dir creation but I expect this is a temporary case that will get resolved soon as one still needs to fudge the python 3.6 compatibility check.
it may be installable using python 2.7 as well, but that felt like going backwards at this point as the my rationale for 17.10 was python 3.6.
Credit for the yaml package and dir creation idea to https://forums.aws.amazon.com/thread.jspa?threadID=265977 but I prefer to avoid easy_install.
I had similar issue on Ubuntu 18.04.
Instruction from AWS for standalone install worked for my case.
To download and run it standalone, use the following commands and follow the prompts:
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/AgentDependencies.tar.gz -O
tar xvf AgentDependencies.tar.gz -C /tmp/
sudo python ./awslogs-agent-setup.py --region us-east-1 --dependency-path /tmp/AgentDependencies

Target pattern content no %. stop at line 207 in Qt Linux

I am getting this error while creating a project in QT. How can i solve it?
This is my line where i am getting error
../Error\ in\ \
Util.asciify(build-untitled2-Desktop_Qt_5_4_2_GCC_64bit-Debug):\
TypeError:\ Result\ of\ expression\ 'Util.asciify'\ [undefined]\ is\
not\ a\ function./Makefile: ../untitled2/untitled2.pro
../Qt5.4.2/5.4/gcc_64/mkspecs/linux-g++/qmake.conf
../Qt5.4.2/5.4/gcc_64/mkspecs/features/spec_pre.prf \

Apollo GraphQL iOS

I add this run script on my swift3 project
APOLLO_FRAMEWORK_PATH="$(eval find $FRAMEWORK_SEARCH_PATHS -name "Apollo.framework" -maxdepth 1)"
if [ -z "$APOLLO_FRAMEWORK_PATH" ]; then
echo "error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
exit 1
cd "${SRCROOT}/${TARGET_NAME}"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh generate '/*.graphql' --schema schema.json --output API.swift
When I build I get this error:
find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/appName: No such file or directory
find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/Carthage/Build/iOS: No such file or directory
++ exec apollo-codegen generate '/*.graphql' --schema schema.json --output API.swift
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
with the following versions
- Apollo (0.8.0):
- Apollo/Core (= 0.8.0)
- Apollo/Core (0.8.0)
I had to change
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh
to:
$APOLLO_FRAMEWORK_PATH/Resources/check-and-run-apollo-codegen.sh

panic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied

I'm following this guide
https://github.com/ITPeople-Blockchain/auction
after the make native command, I execute the next command ./orderer but I received the following error:
panic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied
shell log:
2017-07-06 14:50:11.556 CEST [orderer/main] main -> INFO 001 Starting orderer:
Version: 1.0.0-rc2-snapshot-a0afe19a
Go version: go1.8.3
OS/Arch: linux/amd64
panic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied
goroutine 1 [running]:
github.com/hyperledger/fabric/common/ledger/util/leveldbhelper.(*DB).Open(0xc42034b480)
/home/user/work/src/github.com/hyperledger/fabric/common/ledger/util/leveldbhelper/leveldb_helper.go:84 +0x315
github.com/hyperledger/fabric/common/ledger/util/leveldbhelper.NewProvider(0xc4203583c0, 0xc4203583c0)
/home/user/work/src/github.com/hyperledger/fabric/common/ledger/util/leveldbhelper/leveldb_provider.go:40 +0x11b
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.NewProvider(0xc420355da0, 0xc420355dc0, 0xc4203583a0, 0xc420167c50)
/home/user/work/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/fs_blockstore_provider.go:34 +0x85
github.com/hyperledger/fabric/orderer/ledger/file.New(0xc4201ee480, 0x23, 0x2, 0x2)
/home/user/work/src/github.com/hyperledger/fabric/orderer/ledger/file/factory.go:75 +0xf7
main.createLedgerFactory(0xc4201c06c0, 0x870ad0, 0xc4200ec8c0, 0xc42033e6c0, 0x0)
/home/user/work/src/github.com/hyperledger/fabric/orderer/util.go:42 +0x2c3
main.initializeMultiChainManager(0xc4201c06c0, 0x11a18a0, 0x11f2e40, 0xc4201d45d0, 0x1)
/home/user/work/src/github.com/hyperledger/fabric/orderer/main.go:207 +0x43
main.main()
/home/user/work/src/github.com/hyperledger/fabric/orderer/main.go:75 +0x37f
try:
sudo mkdir -p /var/hyperledger/production
sudo chown -R $(whoami):$(whoami) /var/hyperledger
You could change the fileSystemPath in core.yaml from "/var/hyperledger/production" to a place that does not need a sudo permission. Such as "/tmp/hyperledger/production"

Setting the application icon for OSX in Qt Creator

Followed the directions here for OSX: http://doc.qt.io/qt-5/appicon.html
stating that all I need to do is add ICON = myapp.icns to my project file.
I used one of the ICNS files I stole from Qt itself (in other words, it should work, its not a conversion problem) and when build after running qmake I get the error
make: *** No rule to make target '1.22/MyProject.icns', needed by 'myapp.app/Contents/Resources/MyProject.icns'
I regularly use make but have little experience with Qt so I have no idea what it's trying to tell me here (I don't even know where these file paths are coming from).
The .icns file has been added to the resources .qrc and is in the base directory of the project.
Any help is much appreciated. Thanks!
EDIT:
Ok, the space in the file path was preventing the build. It now compiles and runs but still does not have a dock icon.
Here is the output of the grep command, as requested by Simon Warta:
_Qt_5_1_1_clang_64bit-Debug/Makefile | grep -C 3 icns
443
444 :
445 #$(DEL_FILE)
446 #sed -e "s,#SHORT_VERSION#,1.22,g" -e "s,#TYPEINFO#,????,g" -e "s,#ICON#,myapp.icns,g" -e "s,#EXECUTABLE#,myapp,g" -e "s,#TYPEINFO#,????,g" ../myapp1.22/myapp.plist >
447 myapp.app/Contents/Resources/myapp.icns: ../myapp1.22/myapp.icns
448 #test -d myapp.app/Contents/Resources/ || mkdir -p myapp.app/Contents/Resources/
--
448 #test -d myapp.app/Contents/Resources/ || mkdir -p myapp.app/Contents/Resources/
449 #$(DEL_FILE) myapp.app/Contents/Resources/myapp.icns
450 #$(COPY_FILE) ../myapp1.22/myapp.icns myapp.app/Contents/Resources/myapp.icns
451 dist:
452 #test -d .tmp/myapp1.22 || mkdir -p .tmp/myapp1.22
[[All my source files]]
477 compiler_rcc_clean:
478 -$(DEL_FILE) qrc_myapp.cpp
479 qrc_myapp.cpp: ../myapp1.22/myapp.qrc \
480 ../myapp1.22/myapp.icns \
481 ../myapp1.22/images/splashmyapp2.png \
482 ../myapp1.22/images/splashmyapp1.png \
483 ../myapp1.22/images/About.png \
--
--
481 ../myapp1.22/images/splashmyapp2.png \
482 ../myapp1.22/images/splashmyapp1.png \
483 ../myapp1.22/images/About.png
486 /Users/EngMac/Qt5.1.1/5.1.1/clang_64/bin/rcc -name myapp ../myapp1.22/myapp.qrc -o qrc_myapp.cpp
From myapp.pro:
ICON = myapp.icns
QMAKE_INFO_PLIST = myapp.plist
QMAKE_INFO_PLIST must be called Info.plist. It might be placed in a custom sub-directory of your choice but the filename is fixed. That is because the OS X system will look for a file with that exact filename.
Further debugging tips (orderd by importance):
Post a current error message
Update the Makefile parts cat -n [...]_Qt_5_1_1_clang_64bit-Debug/Makefile | grep -C 4 icns
Search your source code for other places of QMAKE_INFO_PLIST: Call git grep QMAKE_INFO_PLIST in the root of your repository
Post the content of your Info.plist
Post the content of your .pro file
I had to add to Project.pro:
ICON = Project.icns
QMAKE_INFO_PLIST = Info.plist
# Qt doesn't copy over the .icns file ?!
RESOURCE_FILES.files = $$ICON
RESOURCE_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += RESOURCE_FILES
and in Info.plist:
<key>CFBundleIconFile</key>
<string>ContentCanvas</string>
It seems that Qt doesn't set the project up to copy the .icns file into the bundle (at least with Qt 5.9), so having it in the .plist file is useless. The last three lines in the .pro file copy it manually.