Magento on Windows

magento

If you ever tried to get magento to work on a windows environment you know how painful it is. Just writing this to keep a note as i am sure i will forget the steps soon

Opensource version available on github

https://github.com/magento/magento2/

Composer is required, get dependencies with

composer install

PHP Extensions:

extension=bz2
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
extension=intl
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
extension=pdo_mysql
extension=pdo_sqlite
extension=soap
extension=sockets
extension=xsl

Default database required as name “magento2” create that first

Command prompt into htdocs\<magento_root>\bin there should be a file named “magento”, assuming php.exe is globally accessible the commands are executable from here.

First need to disable ElasticSearch

php.exe magento module:disable Magento_Elasticsearch6
php.exe magento module:disable Magento_Elasticsearch7
php.exe magento module:disable Magento_Elasticsearch

htdocs\<magento_root>\lib\internal\Magento\Framework\Image\Adapter\GD2.php

Replace the function validateURLScheme with this, old code is there under /**/

private function validateURLScheme(string $filename) : bool
{ 
    $allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
    $url = parse_url($filename);
    if ($url && isset($url['scheme']) && !in_array($url['scheme'], 
    $allowed_schemes) && !file_exists($filename)) {
        return false;
    }
    return true;

/*$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
    $url = parse_url($filename);
    if ($url && isset($url['scheme']) && !in_array($url['scheme'], 
     $allowed_schemes)) {
        return false;
    }
    return true;*/
}

htdocs\<magento_root>\lib\internal\Magento\Framework\View\Element\Template\File\Validator.php

replace isPathInDirectories function with. (old code in comment)

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    $realPath = $this->fileDriver->getRealPath($path);
    foreach ($directories as $directory) {
        $realDirectory = $this->fileDriver->getRealPath($directory);
        if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
           return true;
        }
        /*if (0 === strpos($realPath, $directory)) {
            return true;
        }*/
    }
    return false;
}

finally possible to run setup. Command prompt into htdocs\<magento_root>\bin

php.exe magento setup:install

to create first admin user

php.exe magento admin:user:create

How to get custom domain names instead of localhost with xampp on windows

It is quite simple to turn your development urls like http://localhost/ibikri/ into http://ibikri.tes/ or http://ibikri.com/

It makes for a clean url when we are developing. And also allows you to work with actual urls instead of localhost or 127.0.0.1. This is quite handy for some situations.

Capture

Now before you begin, you should know what we are about to do

I am going to change windows hosts file to redirect that domain to localhost. So basically when you hit ibikri.com it would redirect you to localhost .This leads to a simple problem- “what happens if i wanna visit the actual ibikri.com?

This is why it is recommended to not use actual tlds on virtual hosts. Say instead of using ibikri.com you can use ibikri.localhost or ibikri.test or ibikri.vcom. It is upto you just try to avoid the tlds “*.dev  and *.foo” these tlds will not work with google chrome or firefox

I would recommend you see a this list of suggested domain extensions .

Step 1: Find and edit your hosts file. In windows it is located at

C:\Windows\System32\drivers\etc

Go to the bottom of the file and add this line

127.0.0.1 yourdomain.test

Here replace “yourdomain” with your sites domain duh!

Now in your apache folder find the httpd-vhosts.conf file for xampp it is located inside

xampp\apache\conf\extra\httpd-vhosts.conf

You should find a couple of tags in this file that is commented with ##. I recommend you copy 1 of those and uncomment it. And then replace the values. It would look something like this

This example is assuming your project is inside “yourfolder” inside xampp/htdocs. If it is inside htdocs directly just remove the /yourfolder

<VirtualHost yourdomain.test> 
    ServerAdmin webmaster@yourdomain.test 
    DocumentRoot "/xampp/htdocs/yourfolder"
    ServerName yourdomain.test 
    ServerAlias yourdomain.test 
    <Directory "C:/xampp/htdocs/yourfolder"> 
        Require local 
    </Directory> 
</VirtualHost>    

ok the reason why i recommend you copy one of your existing commented VirtualHost tag and edit it instead of copying this is the directory structure and syntax may be a little different in your version of apache.

 

We are done. Now just restart your apache server and you will be able to visit your local development server at localhost/yourfolder by typing

http://yourdomain.test/

in your browser.

Hope this helps someone. I learned how to do this from stackoverflow. If you want you could check this out, and this and maybe show them some gratitude by voting their answers :).

 

 

Blade Of Darkness , Blade of Light MOD Temple of Ianna

 

The view of Ianna’s temple with the Blade of Light MOD. I apologize for the choppy frame rate. This is my first game recording. I do not have a powerful PC either.

Blade of Light is a HD texture and gameplay modification for the classic 2001 hack n slash game Severence : Blade of Darkness.

Blade of Darkness is my all time favorite hack and slash game. I havent played this in a while. The game is very interesting fighting system. Which is at the same time hard and effective once you know it. Unlike most hack and slash games where you just smash the attack keys you have to follow a certain move and attack combination to deal a great deal of damage. Poking around the enemy is no good. Where as putting some combo enhances your attack A LOT.
This time i wanted to try with a new MOD. Blade of Light MOD (works with GOG version too)

watch the official video (much better quality than mine)-

http://www.moddb.com/mods/blade-of-light

Enhanced gameplay where lighting plays a part in the strategy. Use the light bearing blades to slice your way into the heart of the Darkness. For any fan of BOD this MOD is a must to try. It does not tamper with the combo system which makes it comfortably familiar.

The contrast of light and dark is just great. The dark dungeons and tunnels are just more scary and difficult to cross, since you see nothing. And its impossible to look at an archer who is standing in front of the sun, the light blinds you.

An already difficult game is just much more difficult with this MOD. You can turn off the blooming effect anytime if you are having trouble crossing a particular section

Hardware Shop BD

When you are a robotics / hobby project enthusiast like me the electronics are just 1 part of the problem. We still have a lot of trouble collecting all the hardware and body parts. Specially for someone lazy like me. I hate to roam around markets to find a specific item. And the situation just gets worse for hardware. For example specific bolts/gears/rails and other raw materials for crafting the robot chassis.

Site like techshop are doing a great service to students and robot DIYers but I still wish for a hardware and raw material shop completely web based and offering wide range of items with easy to find interface. At least a service to start Laser cutting / 3d printing on request would be a good start. Although a fresh company (makerlab) is offering to print your models in 3d recently but the price is still high I would love to try them if ever have the opportunity

Price (Standard PLA Filament Types) :
=> Superfine (0.1mm layer resolution) = BDT 30/- per gram
=> Fine (0.15mm layer resolution) = BDT 27.5/- per gram
=> Average (0.2mm layer resolution) = BDT 25/- per gram
=> Low (0.25mm layer resolution) = BDT 22.5/- per gram
=> Fast (0.3mm layer resolution) = BDT 20/- per gram

If someone can estimate a cost of total items printed of a Reprap that would be useful. I havent found one on the net. I would prefer RepRap morgan since it has fewer vitamins.

 

I found some plastic board made by partex on ABC stationary New Market. They look pretty easy to handle. I will post further in future about my progress with these boards once I start working on a prototype.

 

I found this piece of information on facebook.  I asked a question there and got reply- wanted to share in case fellow Bangladeshi hobbyits are interested.

Q: “Can anyone here help me out, I am trying to find the best source in Dhaka for robot chasis. Not ready made chasis kits. I want to make the chasis myself so I need supplier of Acrylic sheet and Laser CNC cutter services. Any idea where I should start looking?”

I also found a CNC service provider with home deliver here-

http://www.clickbd.com/bangladesh/1468010-mdf-jali-board-cnc-service.html

An initiative

rezwanislam's Blog

I am thinking about taking this 3D printer movement to next level. I believe we may innovate and invent a lot more, when we can start building our own prototype at low cost.  But need some honest feedback(s). Here are my thought(s)/initiative(s),

1) I have already started printing out another set of printed parts for a reprap.

2) I will replicate those using metal die casting (Aluminium/brass).

3) I would like to provide kits to educational institutes only for material cost + labor only. I don’t want to gain any profit for this.

4) I would like to train key personnel at educational institutes on building and operating reprap.

PLEASE  broadcast this post to key personnel / educational institutes and feel free to leave comment with suggestion and contact info.

View original post

The Human Factor

220px-Yukihiro_Matsumoto_EuRuKo_2011

Computers don’t mind if I must make effort to communicate with them or if it is easy to communicate with them. They don’t care if I put the numbers of instruction byte sequences in a file and feed it to them to run, or if a very high level language generated the instructions. The computers don’t care. We humans care about the effort we pay. Often people, especially computer engineers, focus on the machines. They think, “By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something.” They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves. – Yukihiro Matsumoto

কিছু দরকারী প্লাগিন (মেনু)

ভার্টিকাল মেগা মেনু- (like- ebay.com)

http://www.designchemical.com/lab/jquery-vertical-mega-menu-plugin/examples/

হরাইজন্টাল মেগা মেনু (সাধারনত এডমিন পানেল এ লাগে)

http://www.menucool.com/drop-down-menu

http://www.menucool.com/horizontal/tab-menu

 

এমন মেনু নেট এ ওনেক অছে কিন্তু সকল ব্রাঊজার সাপর্ট করে এমন খুজে পাওযা কঠিন