install of shindig:error in wampserver - wampserver

I want install shindig in WampServer ,i uncomment always_populate_raw_post_data' to 'On' in php.ini but not work :
Your environment does not have always_populate_raw_post_data enabled which will interfere with Shindig. Please set 'always_populate_raw_post_data' to 'On' in php.ini

You have probably edited the wrong php.ini file, there are 2 ( at least )
If you want to edit the php.ini file that is used by Apache, then use the menus on the wampmanager icon that sits in the system tray, this will edit the correct file.
wampmanager -> PHP -> PHP.INI
If you want to use the PHP CLI (Command Line Interface) then edit the php.ini that lives in the \wamp\bin\php\phpx.y.z\php.ini
They both have different and unique uses.
ADDITIONAL INFO ON CURL
For curl to work you also need to uncomment these extensions :-
extension=php_curl
You also need these dll's libeay32.dll and ssleay32.dll which are in the phpx.y.z folder to be on your path. Avoid advice to copy these files to any \windows\?? folders.
It may be easier to just create a simple windows command file that sets the path up so your php folder is on the path.
This is what I use :-
Filename = phppath.cmd
echo off
PATH=%PATH%;C:\wamp\bin\php\php5.3.22
echo ---------------------------------------------------------------
php -v
echo ---------------------------------------------------------------
Change the php5.3.22 folder name to the version of PHP you are using.
Store this file in a folder that is already on your PATH and then you can run it from anywhere in any folder. Once it has been run PHP will be available to you by just running
phppath
php script.php
It should also be able to find libeay32.dll and ssleay32.dll because they are in the php folder which is now in a folder on your PATH.

Related

How to integrate Hybris Custom and Config folder to local installation?

I installed Hybris 1905 out of the box locally on my machine and I would like to include the custom code which our project stores on bitbucket.
To track the progress of the commits, I installed earlier Sourcetree and have integrated the repository. The repo is stored locally in directory
C:\git\projectname
How can I now get the folders custom and config into my local installation to be able to run always the latest code in my local machine? Thanks!
You can create a symlink or directory junction.
Assuming your custom config is stored in C:\git\projectname\config and your custom code is stored in C:\git\projectname\bin\custom
In hybrisHomeDirectory, open command prompt then type :
mklink /J config C:\git\projectname\config
this will create a directory junction that link your config to hybris installation folder.
In hybrisHomeDirectory/bin, open command prompt then type :
mklink /J custom C:\git\projectname\bin\custom
This will create a directory junction that link your custom code.
If you want to create a symlink instead of directory junction (requires admin), then open cmd as administrator and type mklink /D instead of mlink /J
Config folder
In order to refer a config folder(other than the default one) you can edit your hybris\bin\platform\setantenv.bat. For example please have a look at my setantenv.bat that I used in the past:
#echo off
set ANT_OPTS=-Xmx2g -Dfile.encoding=UTF-8 -Djdk.util.jar.enableMultiRelease=force
set ANT_HOME=%~dp0apache-ant
set PATH=%ANT_HOME%\bin;%PATH%
rem deleting CLASSPATH as a workaround for PLA-8702
set CLASSPATH=
Rem Custom zone start
set HYBRIS_RUNTIME_PROPERTIES=%~dp0local_custom.properties
chcp 65001
set HYBRIS_CONFIG_DIR=%~dp0..\..\..\gitrepo\config
echo -------CustomChanges--------
echo CustomChanges: configFolder: %HYBRIS_CONFIG_DIR%
echo CustomChanges: runTimeProperties: %HYBRIS_RUNTIME_PROPERTIES%
echo -------CustomChanges--------
Rem Custom zone end
echo ant home: %ANT_HOME%
echo ant opts: %ANT_OPTS%
ant -version
Between Rem Custom zone start and Rem Custom zone end there is the Custom section that, among other things, sets the path to the config folder.
In my case, hybris folder and gitrepo folder are right next to eachother(in the same parent folder) and that is why the following path(also mentioned above) works:
set HYBRIS_CONFIG_DIR=%~dp0..\..\..\gitrepo\config
Keeping these two folders next to each other makes it easier to use relatives paths in order to easily use resources from git Repo into Hybris.
Custom folder
In order for Hybris to take into consideration the custom extensions, their folder needs to be specified in the localextensions.xml as exemplified below:
<path autoload="true" dir="${HYBRIS_BIN_DIR}/../../gitRepo/extensions"/>
Again, above relative path works for me because hybris and gitrepo folders are next to each other.

Include non-electron folder as part of the NSIS installation

I've been trying to add additional functionality to the electron installer, where I copy some files that are packaged inside the installer, but I receive a non-descriptive error when I try to compile my electron project to create the installer i.e. I get:
* writing effective config
* packaging
* building
x [object Object]
Here is what my script looks like:
!macro customInstall
Rename "$APPDATA\myfolder\img" "$APPDATA\myfolder\img-old"
SetOutPath "$APPDATA\myfolder"
File /nonfatal /a /r "additional_files\*"
CreateShortcut "$SMSTARTUP\mylink.lnk" "$INSTDIR\mylink.exe"
!macroend
Basically everything works except the file copy part. When I remove that part the project builds and compiles into an installer with no problems.
I've also tried to use CopyFiles instead of SetOutPath and File and it works as expected when I place the additional_files folder into the same folder as the installation (dist folder), but I want the folder to be packaged inside the installer. However, I cannot get the additional_files to be packaged with the installation.
I believe it's a location issue, that is, that the NSIS script cannot locate the additional_files/ folder. I've tried modifying the package.json file by adding to the files section the additional_files/ folder and placing it in the root of the project.
I've even tried placing it in the build folder where my installer.nsh script resides, but with no luck.
File looks for files relative to the directory where the .nsi is by default. /NOCD can be used to prevent that but I'm not sure if electron uses that switch.
!cd can be used inside a script to change the directory but I'm not sure if that is going to help you much in this case unless you are willing to use a absolute path and in that case you could just use the absolute path with the File instruction instead.
If you only know where your .nsh file is I suppose you could try File /r "${__FILEDIR__}\additional_files\*"
if you are using electron-builder you have two options inside the settings
extraResources this will copy files into the $INST_DIR/resources folder in your app (this is where the app.asar file is too), and you can access via process.resourcesPath, ex:
extraResources: [
{ from: './dist/ThirdPartyNotices.txt', to: 'ThirdPartyNotices.txt' },
]
extraFiles this would do the same but place the files into the $INST_DIR root folder of your installation ex:
extraFiles: [
{ from: './distrib/mytool.exe', to: 'mytool.exe' },
],
to get the root folder you can use something like remote.app.getAppPath().replace('resources\\app.asar', '').replace('resources/app.asar', '');
all info on: https://www.electron.build/configuration/configuration#overridable-per-platform-options

WAMP: Fatal error: Call to undefined function mb_detect_encoding() .... When going to localhost/phpmyadmin

I have enabled the mbstring extension by removing the ';':
extension=php_mbstring.dll
I am using the correct php.ini file, checked by using phpinfo().
Extension dir specified in php.ini: extension_dir = "c:/wamp/bin/php/php5.5.12/ext/"
Indeed, when I go there, I find 'php_mbstring.dll'
I've restarted wamp multiple times.
What else can be wrong here?
UPDATE:
seems, my whole wamp installation is fd up with respect to mysql:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I do have mysql installed and everything though...module is also enabled etc.
This sounds like you have a rouge php.ini file somewhere and it is loading the wrong one.
There are actually 2 php.ini files in WAMPServer as in most PHP/Apache installations.
One is called \wamp\bin\php\{phpversion}\php.ini and this is only used by the PHP CLI
The other is called \wamp\bin\php\{phpversion}\phpForApache.ini and is used when you are running PHP through Apache.
If you use the wampmanager menus you will edit the one used by Apache/PHP i.e.
wampmanager => PHP -> php.ini
However if you have actually edited the correct php.ini then it is likely you have a rouge version of php.ini somewhere on your system.
Run the phpinfo() link again from the wampmanager homepage and check this parameter which is shown on the first section of the output.
Loaded Configuration File
It should be pointing to \wamp\bin\php\php5.5.12\phpForApache.ini in your case.
If its pointing somewhere else then you probably tried to install PHP and Apache manually before finding WAMPServer and that has left a php.ini file somewhere where Apache is finding it.
Here is the PHP Manual page that defines the search path order used by Apache when looking for a php.ini file. This may help you find and remove any rouge versions of php.ini
Install the gd library also.
check this link http://www.php.net/manual/en/mbstring.installation.php
or
There's a much easier way than recompiling PHP. Just yum install the required mbstring library:
Example: How to install PHP mbstring on CentOS 6.2
yum --enablerepo=remi install php-mbstring
Oh, and don't forget to restart apache afterward.

How do I name the .bowerrc file?

This MEAN-stack tutorial describes using Bower to install AngularJS in your public folder. One of the steps describes creating a file called ".bowerrc" in your test-app folder. However, Windows won't let you create a file without a name. How do I accomplish this on a Windows system?
on the command line (make sure to cd into your working directory), issue this command:
touch .bowerrc
This will also work for other files common to webdev like .htaccess and .gitignore
Note: If you haven't installed git bash for windows, you may not have support for the touch command. In that case (as mentioned in one of the comments here), the easiest way to accomplish this is via the cli with:
echo "" > .bowerrc
To create a file that starts with a "." in Windows, you just need to add a trailing ".".
So, simply name your file ".bowerrc." instead of ".bowerrc".
See https://superuser.com/questions/64471/create-rename-a-file-folder-that-begins-with-a-dot-in-windows for more information and more detailed solution if this doesn't work for you.
Another way to accomplish this is through Notepad++.
Create the file in Notepad++
Set the encoding to "Encoding in ANSI" (click "Encoding" in the menu bar)
Save the file as .bowerrc (change the "Save as type:" to . which is one list item up from *.txt)
Simply rename the file you created:
C:\project> ren bowerrc .bowerrc

PHP.ini overriding/not allowing set_ini or set_include_path directives

I'm not exactly sure why this is happening. I'm running MAMP on my local machine. And I decided to install PEAR locally. So I edited the PHP.ini file and uncommented the include_path directive. Now for some reason none of my ini_set or set_include path directives work:
// trying to different methods
ini_set( 'include_path', ini_get( 'include_path' ) . PATH_SEPARATOR . BASE_PATH . "Zend/library/" );
set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH . "Zend/library/" );
Here's my php.ini directive:
include_path = ".:/Applications/MAMP/bin/php5/lib/php:/usr/local/PEAR"
If I comment that out then my code works. Any thoughts?
I had a similar problem using WAMP on my PC at work. I can't be certain if it is the same, but looking at the MAMP download page, it might well be.
I edited the php.ini files but the changes weren't taking effect. After a little bit of tinkering, I found out that when the services start, they don't use the ini files in their expected locations. Modifying the php.ini file made no effect. However, when I clicked the WAMP system icon, and chose the Modify PHP.ini option, it opened a new php.ini file in notepad - which I was able to Save but surprisingly not Save As. This leads me to understand that the ini files for WAMP, and quite likely MAMP are dynamically created on the fly and not using the files that are stored physically in the folder structure.

Resources