TYPO3 error configuring extension "sphinx" - configuration

I've installed latest sphinx version 2.3.1.
I have TYPO3 CMS 6.2.19.
Before sphinx can be used it must be configured. Now in sphinx configuration area I click on Sphinx 1.4.5. After some time I get following message:
Sphinx 1.4.5 has been downloaded.
Could not extract Sphinx 1.4.5:
Could not extract 3rd-party libraries for Sphinx:
Archive: /opt/lampp/htdocs/cms1/typo3temp/sphinx-contrib.zip
Inconsistency detected by ld.so: dl-open.c: 596: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
Could not find a compatible version of Pygments
I could debug this extension and found out it crashes at following command:
CommandUtility::exec("'/usr/bin/unzip' '/opt/lampp/htdocs/cms1/typo3temp/sphinx-contrib.zip' -d '/opt/lampp/htdocs/cms1/uploads/tx_sphinx/sphinx-contrib' 2>&1", $out, $returnValue);
If I execute it from a php-one-line script I get following message:
lchmod (file attributes) error: Function not implemented
Does anybody understand what is wrong with it???

OK. I've found a workaround myself: it were libraries. So I had to preload another versions.
All in all, the way is: in the file where unzip is called (Setup.php) in the function unarchive add LD_PRELOAD=/lib64/libgcc_s.so.1:/usr/lib64/libstdc++.so.6 before unzip command. Now it looks as follows:
$cmd = 'LD_PRELOAD=/lib64/libgcc_s.so.1:/usr/lib64/libstdc++.so.6 ' . $unzip . ' ' . escapeshellarg($archiveFileName) ...
And yes, it is not the best solution, but it worked for me.

Related

DAML Sand box error: Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required

Getting below error when I start sandbox. I think we need use jdk8 as per the DAML doc.
daml sandbox --scenario Main:setup .daml/dist/quickstart-0.0.1.dar
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
daml-helper: Received ExitFailure 2 when running
Raw command: java -jar "C:\Users\santh\AppData\Roaming\daml\sdk\0.13.21\sandbox/sandbox.jar" --scenario Main:setup .daml/dist/quickstart-0.0.1.dar
During my initial setup, I have faced the similar issue. It may be because of an existing Java installation in your machine.
You can try the below options to fix this issue.
Option 1:
1. Check if you have more than one version of JAVA in machine.
2. If yes, uninstall everything and do the clean installation. Make sure your Environment Path variable(s) are got set properly.
or
Option 2:
1) Download the latest JDK in Zip format "jdk-12.0.2_windows-x64_bin.zip"
2) Extract it manually in your local drive.
3) Manually update your Environment Path variables (ref. https://javatutorial.net/set-java-home-windows-10).
I hope it will help you to fix your problem.
Cheers,
Augustine

Winexe installation in Linux

I am trying to compile and build winexe. I have downloaded the samba source and ran the following command to compile the winexe.
./waf configure --samba-dir=../../samba --samba-inc-dirs=../../samba/ --samba-lib-dirs=../../samba/
I am getting the following error. Please suggest me to resolve the error.
[3326/3810] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/winexe/source/build/config.log)
execfile is deprecated,
edit the file "smb_static/wscript",
remove the line with execfile and use exec(open("wscript").read()) instead

How can I check if a Perl module (DBD::mysql) is properly installed?

I am using XAMPP on Mac OS X Yosemite, and I am trying to communicate with my MySQL database using Perl.
This requires two things: (1) DBI and (2) the mysql driver module, DBD::mysql.
I ran into a lot of trouble installing the DBD::mysql portion. However, after following some instructions online, it now looks like DBD::mysql is installed, but I am skeptical that it has correctly.
In Terminal, when I load up cpan and then type "install DBD::mysql", it responds, "DBD::mysql is up to date (4.032)".
From the looks of it, then, it is installed. However, I am worried that what I've installed is enough for it to say, "Hey, I am installed!", but not enough for it to actually be functional, which would be why I'm having errors show up when I try to connect to my database with Perl:
install_driver(mysql) failed: Can't load '/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
Reason: image not found at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194.
at (eval 6) line 3.
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn't installed where expected
at login.pl line 9.
Relevant Perl code snippet:
my $dbh = DBI->connect(
"dbi:mysql:dbname=TEST",
"root",
"",
{ RaiseError => 1 },
) or die $DBI::errstr;
I am trying to troubleshoot whether this is a problem with my installation of DBD::mysql, or if it is my Perl code.
How can I verify whether my installation of DBD::mysql is all good? Better yet, how can I stop getting this error?
Thank you.
You could wrap the connect() call into an eval block to catch this error, however you don't have many options left if it crashes, probably just to try and produce a more user-friendly error messsage and then die anyway.
As for why you are getting the error, try checking where libmysqlclient.18.dylib lives on your system. It seems like it was somewhere where it could be found during compilation of the DBD::mysql driver but not during your script's runtime. Assuming it hasn't been accidentially uninstalled, adding its directory to the DYLD_LIBRARY_PATH variable should work. I don't know what config to add the path to to make that addition permanent on OSX though.

Php and Smarty3 - filemtime() [function.filemtime]: stat failed for

I'm migrating my WebAPP from Smarty2 to Smarty3. Every step is easy except one. When i display a Smarty Template ( tpl ) an Exception is thrown.
This line
Source: /path_to_file/smarty/libs/sysplugins/smarty_resource.php (773)
(this is the source coude $compiled->timestamp = #filemtime($compiled->filepath); )
raise this Exception when the file doesn't exists
filemtime() [function.filemtime]: stat failed for /path_to_templates/smarty/templates_c/219dfe732aae7bd7c0edab091e3c53f3ce86b058.file.index.tpl.php
Folder permissions:
Smarty template folder Permission : 775
Smarty Cache folder permission: 775
Folder Owners:
both ftp_user:webserver_user
I'm trying to implement different solutions but it seems not possibile to solve this issue whitout changhing Php Error Reporting or disabling my Error Handler .
How can i solve this problem without hacks ?
What you should do is not to downgrade to 3.1.1 but rather try to upgrade to 3.1.19 version. Many bugs are removed all the time so maybe in this version you won't have it.
The other thing is that you can use muteExpectedErrors method to hide file system warnings from Smarty (documentation for this function is not very clear but it affects file system warnings what is explained in error_reporting documentation). You can read at error_reporting documentation page:
Smarty 3.1.2 introduced the muteExpectedErrors() function. Calling
Smarty::muteExpectedErrors(); after setting up custom error handling
will ensure that warnings and notices (deliberately) produced by
Smarty will not be passed to other custom error handlers. If your
error logs are filling up with warnings regarding filemtime() or
unlink() calls, please enable Smarty's error muting.
Check the filesystem permission on /path_to_templates/smarty/templates_c/219dfe732aae7bd7c0edab091e3c53f3ce86b058.file.index.tpl.php
PHP does not seam to have read/write permission on that file.
Also check the permission in the /path_to_templates/smarty/templates_c/ folder. Is the PHP allowed to read list and write in there as well?

Cmake linking to mysql & curl, LNK2019

Ok so I just started playing around with CMake. I'm trying to build a project which has dependencies on both MySQL and CURL. This is the directory structure:
./
./src
./cmake
CMakeLists.txt
It's really that simple, src only contains 9 Cpp files and a CMakeLists.txt.
When running CMake, everything works fine. I just get a bunch of linker errors due to MySQL and CURL not being effectively linked. What am I doing wrong ?
Root CMakeLists.txt:
PROJECT(IRCBot)
INCLUDE(CPack)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindCURL.cmake)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
FIND_PACKAGE(CURL)
IF(CURL_FOUND)
MESSAGE(STATUS "Curl libraries found at: ${CURL_LIBRARIES}")
MESSAGE(STATUS "Curl includes found at: ${CURL_INCLUDE_DIRS}")
else()
MESSAGE(SEND_ERROR "Could not find cURL on your system")
ENDIF(CURL_FOUND)
FIND_PACKAGE(MySQL)
IF(MYSQL_FOUND)
MESSAGE(STATUS "MySQL found at: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
ELSE(MYSQL_FOUND)
MESSAGE(SEND_ERROR "Couldn't find MySQL include files and/or library")
ENDIF(MYSQL_FOUND)
ADD_SUBDIRECTORY(src)
And ./src/CMakeLists.txt
FILE(GLOB_RECURSE IRCBot_files *.cpp *.h)
SET(IRCBot_src
${IRCBot_files}
)
INCLUDE_DIRECTORIES(
${CURL_INCLUDE_DIRS}
${MYSQL_INCLUDE_DIR}
)
LINK_DIRECTORIES(
${MYSQL_LIBRARIES}
${CURL_LIBRARIES}
)
ADD_EXECUTABLE(IRCBot ${IRCBot_src})
INSTALL(TARGETS IRCBot DESTINATION ${INSTALL_DIR}/bin)
You don't need LINK_DIRECTORIES() call in this case, since it tells compiler where to find libs.
Instead, use
TARGET_LINK_LIBRARIES(IRCBot
${MYSQL_LIBRARIES}
${CURL_LIBRARIES})
because ${MYSQL_LIBRARIES} contains absolute paths.