I'm trying to deploy 'limesurvey' application into the PCF & I get the following error.
php pdo driver library none found
Below are the pre-requisites that should be met for installation.
• mbstring (Multibyte String Functions) extension library
•PDO database driver for MySQL (pdo_mysql or pdo_mysqli) or Postgres (pdo_pgsql) or MSSQL (pdo_sqlsrv for Windows and pdo_dblib for Linux)
•Also we assume in general that all PHP default libraries are enabled (like hash, session, etc.).
Is there any workaround for this ? Because, few sites says to modify the php.ini file, which I don't have access to. If the suggestion is to have my own buildpack, is there any link that I can refer to do that please.
Appreciate any help :)
Assuming the limesurvey application is using php-buildpack, you can tell the buildpack to load the mbstring and pdo_* modules by creating an options.json file in the .bp-config subfolder, if it doesn't already exist, adding a PHP_EXTENSIONS key, and including the name or names of the modules/extensions that are required in the value.
Something like this:
$ cat .bp-options/options.json
{
"PHP_VERSION": "{PHP_56_LATEST}",
"PHP_MODULES": ["cli"],
"PHP_EXTENSIONS": ["mysqli", "pdo_mysql", "mbstring"],
"ADDITIONAL_PREPROCESS_CMDS": [""]
}
Even though the php-buildpack calls mbstring and pdo_mysql 'modules' you want to list them in the PHP_EXTENSIONS key, not the PHP_MODULES key.
Related
I am struggling to find out how to install spatialite for geodjango on windows but I don't know what I am doing wrong. I follow the instructions as per the django page https://docs.djangoproject.com/en/4.0/ref/contrib/gis/install/spatialite/ but the tutorial doesn't say what to do after getting the binarys of spatialite
I have tried to put them everywhere but every time I get the same error:
Exception Value:
Unable to load the SpatiaLite library extension as specified in your SPATIALITE_LIBRARY_PATH setting
I tried to put the mod_spatialite.dll file everywhere and try to set to SPATIALITE_LIBRARY_PATH but it seems I can't get the solution
Any suggestions would be appriciated
Thanks
Extracting the binary into Python installation folder eg: C:\Users\huy\AppData\Local\Programs\Python\Python39.
Then add SPATIALITE_LIBRARY_PATH = "mod_spatialite". This works for me.
I've compiled an application written using the Qt (5.15.2, C++) framework on a MacBook Pro (2019) and I have a certificate provided by my boss to authenticate the app. This is what I'm running to certify the app:
macdeployqt appName.app -codesign="Developer ID Application: company" -dmg -always-overwrite
This function call is not certifying the application and it is throwing error which from my research online doesn't seem to be well documented.
First, I get the non-fatal error:
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: string table not at the end of the file (can't be processed) in file: ...
Where ... is the path of a .dylib included in the appName.app bundle. This error is iterated for all .dylib files in the app bundle. I have checked and the files are present in the directories. Why is this happening? I can view the files because they are binaries so I have no idea what they're doing inside.
Macdeployqt then continues and reports:
ERROR: "error: The specified item could not be found in the keychain.\n"
I'm thinking that I might be specifying the wrong name for the certificate (I'm not an app developer at all and the company is joking themselves if they think I know that I'm doing!)?
I have two questions.
Why am I getting string table errors in dylib files?
Why am I getting codesign errors? If I'm getting the codesign developer id name wrong, what part of the certificate information in key chain am I looking at?
I have been trying to connect with a MySql database using Wt::Dbo::backend::MySQL latest version Wt-3.3.5 but I keep getting the error:
"MySQL error performing query: 'SET storage_engine=INNODB;': Unknown system variable 'storage_engine'"
MySql is running on windows 7, with latest version MySql Server 5.7.10.
I have tried to execute:
SET storage_engine=INNODB;
in the MySql command line and of course get the same Unknown system variable 'storage_engine'". The command that does work is:
SET default_storage_engine=INNODB;
Does this means Wt::Dbo::backend::MySQL does not support this version of MySql? I could not find anything on their documentation nor the internet.
Thanks,
I have found in the following links that indeed the variable "storage_engine" has been renamed to "default_storage_engine", which has caused some software to start getting issues with recent versions of MySql.
https://dba.stackexchange.com/questions/101908/migrate-jira-to-mysql-unknown-system-variable-storage-engine
https://confluence.atlassian.com/display/CONFKB/Confluence+fails+to+start+with+error+'Unknown+system+variable+'storage_engine''+using+MySQL+5.7.x
There are to possible solutions:
1) Change Wt::Dbo source by modifying the file "MySQL.C" around line 980 in function :
void MySQL::init()
{
executeSql("SET sql_mode='ANSI_QUOTES,REAL_AS_FLOAT'");
executeSql("SET storage_engine=INNODB;");
executeSql("SET NAMES 'utf8';");
}
By first somehow testing first which MySql version the server has and then SET the "default_storage_engine" variable instead "storage_engine". And then recompile the full Wt::Dbo library.
OR
2) Go back to the most recent version of MySql in which the variable "storage_engine" has not yet been renamed.
I opted for solution 2 and uninstalled MySql 5.7 and installed MySql 5.4 and now everything works just fine.
Hope this helps somebody out there... cheers!
I'm using Gramps 3.3.1 under Ubuntu 12.04 and trying to in Django Export/Import. The install is okay, but when I look at the installed addons, it says that it failed, with reason: "No module named web.settings".
I cann't for the life of me figure out how to fix this. I'm assuming that it's this line in the python script:
import web.settings as default_settings
Anyone have any ideas? I'm trying to get this data out and into a MySQL database, but I can't seem to.
Thanks!
When you run into an error where Python tells you "No module named blah" it really means it can't find "blah".
I would check your pythonpath and the filesystem permissions on the stuff in your path.
Edit
Your issue seems to be a known issue: http://www.gramps-project.org/bugs/view.php?id=5464
It's caused by not running Gramps from source, near as I can tell. It doesn't look like a Python Path issue, so much as the Gramps Django devs making assumptions where your Django settings would be (but I could be wrong).
As for Python Path, there's plenty of resources describing how to. The simplest way to check your Python path is to run echo $PYTHONPATH in a terminal. If you don't see it there, Python might not find it.
I have a custom django filefield that makes use of sox, a commandline audiotool. This works pretty well as long as i use the django development server. But as soon as i switch to the production server, using apache2 and mod_wsgi, mod_wsgi catches every output to stdout. This makes it impossible to use the commandline tool to evaluate the file, for example use it to check if the uploaded file really is an audio file like this:
filetype=subprocess.Popen([sox,'--i','-t','%s'%self.path], shell=False,\
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(filetype,error)=filetype.communicate()
if error:
raise EnvironmentError((1,'AudioFile error while determining audioformat: %s'%error))
Is there a way to workaround for this?
edit
the error i get is "missing filename". I am using mod_wsgi 2.5, standard with ubuntu 8.04.
edit2
What exactly happens, when i call subprocess.Popen from within django in mod_wsgi? Shouldn't subprocess stdin/stdout be independent from django stdin/stdout? In that case mod_wsgi should not affect programms called via subprocess. Is it possible to use a commandlinetool like that from mod_wsgi?
Add debug to your program to log to stderr the value of 'self.path' to ensure it is actually set to something. The message 'missing filename' suggest it may be empty. Also be aware that when running on Apache/mod_wsgi you must use absolute path names to files because the current working directory will not be the project directory like with the Django development server. Finally, Apache runs as a special user, so it needs to have appropriate read and/or write access to the directories you need it to access/write to. The path and access issues are documented in:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues
BTW, for stdout issues, you really should upgrade to mod_wsgi 3.3. Read:
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html