Codeigniter Migrations why does migration_path need to be writable? - mysql

Why does migration_path need to be writable? Shouldn't php just need to read the files? I looked at migration code in system folder and cannot find reason.
Here is the comment in application/config/migration.php
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';

Related

Azure DevOps SSRS Server Report Deployment

I've seen lots of questions about deploying SSRS reports via an Azure Pipeline, but I haven't found one that seems to address this.
When connecting to an SSRS instance via a Powershell task running the code
New-RsWebServiceProxy
We get Failed to establish proxy connection to Server Address : The term 'New-WebServiceProxy' is not recognized as a name of a cmdlet, function, script file, or executable program.
This is after registering ReportingServicesTools from the gallery
- task: PowerShell#2
inputs:
targetType: 'inline'
script: |
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module -Name ReportingServicesTools
Import-Module ReportingServicesTools -UseWindowsPowerShell
PowerShell Version on the Agent;
| Name | Value |
|---------------------|------------------|
|PSVersion | 7.2.8|
|PSEdition | Core|
|GitCommitId | 7.2.8|
|OS | Linux 5.15.0-1030-azure #37-Ubuntu SMP Mon Dec …|
|Platform | Unix|
|PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0…}|
|PSRemotingProtocolVersion | 2.3|
|SerializationVersion | 1.1.0.1|
|WSManStackVersion | 3.0|
The Repository seems to suggest that it won't be supported going foward.
https://github.com/microsoft/ReportingServicesTools/issues/239#issuecomment-595115438
Anyone know how to fix this?
Thanks,
Dan

Drupal 8 translatable configuration

I'm trying to setup a custom module that provide content from an API.The API url is configurable, but as it is different for each language I must be able to translate it. I setup my module configuration as described here (see the gist below) but when I try to access the translation form from /admin/config/regional/config-translation, i get "Access denied"
What am I doing wrong ?
https://gist.github.com/julien-maitan/ffd136bc104d3dbe2ee526367ffcb44c
First of all,
Does your custom permission configure crtib configurator is defined in a permissions.yml file ? And did you give this permission to your user ?
Where is your config/install settings file ? In your case your crtib_configurator.settings.yml ? Did you miss it ?
These files are not mandatory by default in Drupal 8, but are required once we want to make your configuration translatable.
I would suggest you this 2 articles:
Drupal 8 - How to translate the Config API
Drupal 8 multilingual tidbits 16: configuration translation development
Update - With Review of Google Drive Files
config folder should be placed in the root of your module not in src;
crtib_configurator.links.task.yml use a wrong route_name crtib_configurator.api_settings_translate, it should be crtib_configurator.api_settings.
Apply those 2 changes & clear your cache, you will then be able to use the translations form properly.
I think the main & initial error was the config folder location.
Directory structure:
.
+-- crtib_configurator
| +-- config
| | +-- install
| | | +-- crtib_configurator.api.yml
| | +-- schema
| | | +-- crtib_configurator.schema.yml
| +-- src
| | +-- Form
| | | +-- SettingsForm.php
| +-- crtib_configurator.config_translation.yml
| +-- crtib_configurator.info.yml
| +-- crtib_configurator.links.menu.yml
| +-- crtib_configurator.links.task.yml
| +-- crtib_configurator.permissions.yml
| +-- crtib_configurator.routing.yml
Content of crtib_configurator.links.task.yml:
crtib_configurator.api_settings:
route_name: crtib_configurator.api_settings
title: 'CRTIB configurator settings'
base_route: crtib_configurator.api_settings

Hippo cms and mysql on Glassfish

I have a big problem with the addition of a mysql database to Glassfish. I did all the steps located here http://www.onehippo.org/library/deployment/configuring/configuring-hippo-7-for-mysql.html .
When I use
$ mvn clean install
$ mvn -P cargo.run
It's looks fine, because in my workspace.xml I have :
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="url" value="java:comp/env/jdbc/repositoryDS"/>
<param name="driver" value="javax.naming.InitialContext"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="schema" value="mysql"/>
</FileSystem>
next I use
$ mvn clean install
$ mvn -P dist
and deploy created cms.war and site.war to glassfish server (Previously, I copied all the libraries and everything works. Inspired by https://blogs.oracle.com/geertjan/entry/hippo_tip_deploying_hippo_to ). All of project works fine.
The problem is the database. In new workspace.xml in glassfish (/opt/glassfish4/glassfish/domains/domain1/applications/cms/WEB-INF/storage/workspaces/default/workspace.xml) I have:
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager">
<param name="url" value="jdbc:h2:file:${wsp.home}/db"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="minBlobSize" value="4194304"/>
</PersistenceManager>
and server created db.h2.db file in storage/workspace/default, but I need a base in mysql. What can I do wrong?
Additional question. How to check what is in the database? In mysql hippo created something like this:
+--------------------+
| Tables_in_hippo |
+--------------------+
| DATASTORE |
| DEFAULT_BINVAL |
| DEFAULT_BUNDLE |
| DEFAULT_FSENTRY |
| DEFAULT_NAMES |
| DEFAULT_REFS |
| REPOSITORY_FSENTRY |
| VERSION_BINVAL |
| VERSION_BUNDLE |
| VERSION_FSENTRY |
| VERSION_NAMES |
| VERSION_REFS |
+--------------------+
There are no tables like "Book" "Author" "Shop". But in server Hippo have all this data which I can edit.
Thanks for reading.
Your MySQL configuration seems to be fine. You have to keep in mind that the most important thing is that all the configuration needs to be correct in the repository.xml file. The workspace.xml is generated/extracted out of the repository.xml file once the repository gets initialized for the first time. So if you've deployed Hippo before having the correct settings for MySQL, you might have an old workspace.xml in your directory, which results in the H2 db being used.
The first article you link to contains a section called "Make the repository use this configuration file". This is very important if you want to use your own configuration and not the built-in configuration which leverages the H2 database. If you do not provide this system property the build in configuration will be used.
Additional question. How to check what is in the database? There are
no tables like "Book" "Author" "Shop". But in server Hippo have all
this data which I can edit.
Persistence in Jackrabbit is a bit complicated, it makes sense to read the configuration overview documentation and persistence manager documentation first. The persistence of content and data is handled by an internal Jackrabbit component that handles the persistent storage of content nodes and properties. Property values are also stored in the persistence manager, with the exception of large binary values (usually stored inside the datastore).

How to show file names in File Transfer?

PHPStorm has a nice File Transfer log:
[24.07.2014 12:36] Upload to server.net
[24.07.2014 12:36] Upload to server.net completed in less than a minute:
1 file transferred (36,4 Kb/s)
Anyway I could make it show the name of the file it transferred?
Settings/Preferences on Mac | Build, Execution, Deployment | Deployment | Options
Change Operations logging level to a more detailed one (Details).
Select File | Settings for Windows or select File | Default Settings for set option for all projects.

google clouddatastore adams.py demo not working in GCE instance

when running demo from google-cloud-datastore-1beta2-rev1-2.1.1/
adams.py <project-id>
ERROR:root:Error while doing datastore operation
ERROR:root:RPCError: beginTransaction Unauthorized.
ERROR:root:HTTPError: 403 Forbidden
I ensured the GCE instance has service account enabled (permissions below)
Cloud datastore API is enable in cloud console for the project
google cloud datastore is correctly installed in the GCE
As I am inside a GCE instance I dont need the private key file
Permissions
User info Enabled
Compute Read Write
Storage Full
Task queue Enabled
BigQuery Enabled
Cloud SQL Enabled
What am I missing? Please help
Adding an answer so it's easier for others to find:
Make sure that your GCE instance is running with the datastore scope enabled.
Run the command gcutil getinstance <my-instance>. You should get something like this:
+-----------------+-------------------------------------------------------------+
| name | <my-instance> |
| .... | |
| service-account | |
| scopes | [u'https://www.googleapis.com/auth/datastore', |
| | u'https://www.googleapis.com/auth/userinfo.email'] |
+-----------------+-------------------------------------------------------------+
Importantly, make sure that you see the datastore scope in the list.
When you create your instance, make sure to enable the correct scope:
gcutil --project <PROJECT_ID> addinstance <INSTANCE_NAME> --service_account_scopes=\
https://www.googleapis.com/auth/userinfo.email,\
https://www.googleapis.com/auth/datastore