- Create a new user
- Log in as the new user (you will need to wait a little)
- Go to store
- Install an app
- Sign out
- Log in as your regular user
- Copy folder starting with WinStore_xxxxxxxx from the new user profile located in C:\Users\<New User>\AppData\Local\Packages to corresponding location in your profile directory.
- Check if the store is working
- Reinstall all your store applications
- Delete the new user (optional)
Thursday, April 17, 2014
Repair Windows Store
If after cleanup you accidentally deleted Windows store files from your profile directory - the store will not work anymore. Here is how I repaired mine:
Thursday, January 16, 2014
How to enable APC caching for Doctrine Zend 2 module
array(
'connection' => array(
// connection configuration
),
'configuration' => array(
'orm_default' => array(
'generate_proxies' => false,
'metadata_cache' => 'apc',
'query_cache' => 'apc',
'result_cache' => 'apc',
),
),
)
);
You can see list of other types of supported caches in the doctrine module source.
How to generate doctrine entities from database
Following command is executed from /home/projects/zend-skeleton/vendor/bin folder:
./doctrine-module orm:convert-mapping --from-database annotation --namespace="Application\Entity\\"
/home/projects/zendskeleton/module/Application/src
Note: In the latest version of doctrine module you can also run it from project root directory like this:
php public/index.php orm:convert-mapping --from-database annotation --namespace="Application\Entity\\"
/home/projects/zendskeleton/module/Application/src
Generated entities will be in folder /home/projects/zendskeleton/module/Application/src/Application/Entity/ and will have namespace Application\Entity.
If you have enum types in the database you have to add following lines to application configuration:
'doctrine_type_mappings' => array(
'enum' => 'string'
);
so it looks like this:
array(
'connection' => array(
'orm_default' => array(
'driverClass'=>'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'dbname' => 'xxxx',
'user' => 'xxxx',
'password' => 'xxxx'
),
'doctrine_type_mappings' => array(
'enum' => 'string'
)
),
)
)
);
Saturday, November 2, 2013
How to setup Phalcon framework under Windows 8 for PHP 5.5 and Netbeans
Compiling PHP extension
- Download and install Microsoft Visual Studio Express 2012. Microsoft removed it from downloads - for the moment you can find it at Softpedia .
- Create the folder C:\php-sdk
- Unpack the binary-tools archive (php-sdk-binary-tools-20110915.zip) into this directory, there should be one sub-directory called bin and one called script
- Open VS2012 x86 Native Tools Command Prompt (it's available from the start menu group)
- Execute the following commands:
cd c:\php-sdk\ bin\phpsdk_setvars.bat bin\phpsdk_buildtree.bat php - Create C:\php-sdk\php\vc11 directory and copy content from vc9 one
- Extract PHP source code for Windows (you can download it from http://windows.php.net/downloads/releases/) in C:\php-sdk\php\vc11\x86
- Download libraries required to build PHP and extract them in C:\php-sdk\php\vc11\x86\deps
- Create directory C:\php-sdk\php\vc11\x86\php\ext\phalcon
- Download Phalcon source from Github
- Copy files from Phalcon source build\32bits directory in C:\php-sdk\php\vc11\x86\php\ext\phalcon
- Run following commands:
cd C:\php-sdk\php\vc11\x86\php buildconf configure --disable-all --enable-cli --enable-phalcon=shared nmake - The php_phalcon.dll after the compilation is located in C:\php-sdk\php\vc11\x86\Release_TS\
Enable Phalcon extension
In php.ini add following:
extension=php_phalcon.dll
Configure code completion for Netbeans
- Download Phalcon Developer Tools . How to setup them is described in documentation
- In ide directory there is gen-stubs.php script. You have to point 'CPHALCON_DIR' to where your extracted phalcon source is, then run:
This will create ide subdirectory in which you will find directory with your Phalcon version as name. In latter there is Phalcon subdirectory - copy it in your Netbeans php\phpstubs\phpruntime directory. Now you will have code completion for Phalcon.php ide/gen-stubs.php
Monday, October 21, 2013
Codeception: Phantomjs setup for WebDriver when using self-signed SSL certificate
When using phantomjs as browser for acceptance tests with WebDriver in Codeception - if the targeted site is using self-signed SSL certificate tests will fail. To avoid that - phantomjs must be started with --ignore-ssl-errors=true command line option. Here is an example acceptance.suite.yml configuration:
# Codeception Test Suite Configuration
# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
class_name: WebGuy
modules:
enabled: [WebDriver, WebHelper]
config:
WebDriver:
url: 'https://example.com/'
browser: phantomjs
capabilities:
phantomjs.cli.args: ['--ignore-ssl-errors=true']
Another alternative is to use method from Ghostdriver documentation - Register GhostDriver with a Selenium Grid hub
Thursday, July 18, 2013
First post. Setting up syntax highlighting.
I am using highlightjs. Go to Design->Template->Edit HTML. Add following snippet to the end of head section:
<head>
...
<link href='http://yandex.st/highlightjs/8.0/styles/sunburst.min.css' rel='stylesheet'/>
<script src='http://yandex.st/highlightjs/8.0/highlight.min.js'/>
<script type='text/javascript'>
hljs.configure({tabReplace: ' '});
hljs.initHighlightingOnLoad();
</script>
</head>
The result:
<?php
echo 'Hello world!';
Subscribe to:
Posts (Atom)