I need Wget for my Laravel v5.2 & PhP v7 practice and I am stack since couple hours as I coudn't find any way to install Wget on Windows10 any help would be appreciated.
While this question is not strictly Laravel oriented, this question may get asked again.
There are a number of ways to install wget on Windows. The Chocolatey package manager has a build available for install:
https://chocolatey.org/packages/Wget
To install Chocolatey, follow their installation instructions:
https://chocolatey.org/install
There's also a number of other good tools for Windows Laravel dev available through Chocolatey, such as Redis (great for cache and queue work)
https://chocolatey.org/packages/redis
Take a look through the packages available to customise your Windows Laravel environment.
Related
The default theme is kinda boring, but I prefer Debian because is stable and have the most useful apps and software for me. Also, I like XFCE because of performance and stability, so I am not changing to other WM.
So I tried to Install some themes and icons from pling and succeded when they provide a zip or tarball, but some of the themes don't have that and just provide an OCS install
OCS
Ubuntu-Install
I did not found a way to install OCS in Debian, just Ubunutu and other, is there a way to install it?
I found the exact answer for your question here.
I have tested it in a Debian 9 box myself and everything seems to be working.
Post by user rolf:
I installed a few themes from gnome-look.org
The site uses a special URL scheme. The URL handler comes in a package
named ocs-url. Here are the instructions for installing the URL
handler on linux-apps.com.
However, the installation method described on this site has an issue:
it marks the dependencies as manually installed.
Therefore I recommend the following method instead.
My method will ensure that, when you uninstall ocs-url, its
dependencies will be automatically uninstalled as well.
First download the ocs-url Debian package, then (filename and
directory name might differ):
cd ~/Downloads
sudo dpkg -i ocs-url_3.1.0-0ubuntu1_amd64.deb
sudo apt-get install --fix-broken
Once this is done, all you have to do is click on install links on
gnome-look.org and them click "OK" and the themes will be installed in
~/.themes.
Restart the Tweaks tool and your new themes should be available.
Tested on Debian.
I am trying to use composer with my WampServer.
My path for all the files is C:\wamp64\www, but when I run composer it will install the vendor file and other stuff somewhere else.
I don't even know where and I can't change the path of where is my project.
I tried everything already and it still dose not seem to install the vendor file in my project folder.
Although it is an old post, it maybe useful as far as Wampserver exists, so the easiest fix is this:
Go to the "bin/php" folder inside you wampserver, usually at C:\wampXX\bin\php, and look for the php version used in your wampserver. You can navigate to http://localhost to find that, or click in the Wampserver icon on Windows taskbar (If yours doesn't have the version number aside, click on PHP -> Version and you'll see the checked one):
In the "bin/php" folder open the corresponding folder to your PHP
version, in my case "7.0.33" and copy this path:
Go to Windows Environment Variables, and in System Variables add that PHP's folder path you copied to Path variable (You can search on Google how to change a Path variable on your Windows version).
P.S.: In case you switch PHP version it won't work anymore, and you'll have to do that again. But now, changing for the correct PHP version folder.
After doing that, go to composer site download the windows installer.
CD into your projects root directory and run (which must contain a composer.json file):
composer install
That's it. Maybe a lot of work, but at the end it's all quite simple.
I don't use this hack any more. I think there are better tools to solve this problem, such as Laragon, LocalWP (if you develop Wordpress plugins/themes) or Devilbox (you need to install Docker to use Devilbox).
I don't know if the poster will read and vote this answer. I had this problem and solved it, and I want to share my research with other people.
TL; DR
In Windows 10, you can have Composer without producing an error in Wampserver if you install it on the Windows Subsystem for Linux (WSL) environment.
Install PHP on WSL
Then install Composer on WSL
The problem
In Windows, Composer requires to set the system variable PATH to work properly during the installation; it doesn't matter if it is installed globally using the Windows Installer or locally, following this procedure
However, inserting the executable PHP file location in PATH causes an error in Wampserver, the ERROR C:/wamp64 or PHP in path. You can see the error message if you left-click on the Wampserver icon in the notifications area of the task bar.
Although Wampserver may work as usual, it could eventually fail according to the answer to this question on the official Wampserver forum:
Wampserver does not create paths in PATH system environment variable.
Wampserver does not use PATH system environment variable.
Some content - paths to PHP or mysql versions - of the PATH system environment variable can create Wampserver malfunctions because PHP configuration files (php.ini) or MySQL (my.ini) are searched first in the paths indicated by the contents of the PATH environment variables before being searched in the Apache, PHP or MySQL folders.
That is why, with version 3.1.3, the content of the PATH environment variable is checked and you are notified if there is a problem.
If your Wamperserver installation suffers already of this error, then
follow the advice from the Wampserver forum,
back up the content of your www folder,
uninstall Wampserver,
reinstall Wampserver.
If you have Windows 10 and followed the previous steps, then you are ready to implement the solution I propose.
The solution
The only solution I found in my research was explained in this tutorial by Jeff Geerling. My answer follows this tutorial in a somewhat loose way.
My starting point
These were the settings of my PC when I began this procedure:
Windows 10 Home Edition 64-bit
WampServer Version 3.1.3 64bit, reinstalled and with no errors
Windows Subsystem for Linux (WSL) Ubuntu installed
Visual Studio Code as text editor, with WSL bash as default integrated terminal
Although Visual Studio with the WSL integrated terminal is not strictly necessary, I had it set because I intended to install and use Composer with it.
1 - Install PHP on WSL
To work correctly, Composer needs PHP but WSL does not come installed with it. So it is necessary to install PHP in this enviroment. According to this answer in AskUbuntu.com, the easiest way to install PHP on WSL is adding Ondřej Surý's PPA. In the Visual Studio Code WSL integrated terminal, type:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Test that PHP was installed correctly typing php --version. If PHP was installed correctly, the terminal will return a message like:
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
2 - Install Composer on WSL
There are two ways to do it:
The easier one: just type on the integrated terminal sudo apt-get install composer and that will be it.
The second one, and a better approach in my opinion: go to the Composer download page and get the installation code:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Warning: Do NOT copy/paste the code provided in this tutorial to install Composer. According to the Composer download page, the installation code
will change with every version of the installer.
The best practice here is to get the installation code directly from the download page.
I think this method is a better approach because, with the given code, it is possible to verify the SHA384 of the file and make sure it has not been tampered with.
If you installed Composer through the installation code from the developer website, in order to put that file into the global path on WSL, move the composer.phar file into the /user/bin/local folder with the bash command:
sudo mv composer.phar /user/bin/local/composer
If you installed Composer with the first command, this last step won't be necessary.
To check that the software was installed correctly, type composer on the integrated terminal. You should view a list of composer calling options and available commands.
Keep in mind that, to use Composer, you will need to type the commands in the WSL terminal.
Just run composer on your project folder.
Say your project path is on C:\wamp64\www\project0. So, just run composer install inside project0 folder. Composer will create vendor folder inside this project0 folder. This folder contain some folders of installed libraries.
Composer also generate a file composer.lock. This file contain information of installed libraries.
Then, when you want to use the libraries, please add this code inside your php file.
require_once "vendor/autoload.php";
This will call autoloader, so you don't need to use require_once anymore to load PHP Classess. Just call the Class using use keyword.
use Library0/Class0;
use Library1/Class1;
use Library2/Class2;
I used a different approach. I admit that it is dirty, and every time I switch PHP versions, I need to remember to update what I did, but well... it works :)
Go to C:\ProgramData\ComposerSetup\bin. There is a file there: composer.bat. This is executed every time you enter a composer install or a composer update command. Edit it with a notepad or any other text editor. You should see something like this:
#ECHO OFF
php "%~dp0composer.phar" %*
What we want to do is to give a direct path to php.exe, so let's comment out the current command and write our own:
#ECHO OFF
REM php "%~dp0composer.phar" %*
C:\wamp64\bin\php\php5.6.40\php.exe "%~dp0composer.phar" %*
Now everything works. But once you switch to another PHP version in Wampserver, you should update this file too.
By the way: a similar change can be done to make PHP sniffer or PHPUnit work too. Their bat files are in C:\Users\[your windows user]\AppData\Roaming\Composer\vendor\bin folder.
That answer is pretty bad. I have figured it out already on my own. I had to use cd commned in commend lines to get in this folder.
So after CMD i would type cd C:\wamp64\www\project0 thats proper answer to my problem.
I am trying to get to grips with node.js, this looked like a fun tut http://net.tutsplus.com/tutorials/javascript-ajax/how-to-scrape-web-pages-with-node-js-and-jquery/ but I have only got the native windows version of node.js and I can't find a way to install any packages.
I have also looked at installing the binaries using chocalatey, but my version of vista doesn't have access to powershell. However, I do have a machine running windows 7 that I can switch to. If it isn't possible to install packages on windows version, I will switch to that machine and work through chocalatey.
Assuming you have the node.exe for Windows, npm has experimental support for windows. You can try working through the README.
Otherwise you can manually install packages on Windows. You will need to manually look at the package.json files for dependencies if you are going with option 2.
I have never tried it, but Scott Hanselman also has a post about getting node running on Windows.
Personally I have found its easier to just run a Linux VM since Windows support is kinda spotty right now.
The short answer is if you have git properly installed, you can open a cmd window, navigate to the directory containing node.exe, and run this:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
git clone --recursive git://github.com/isaacs/npm.git
cd npm
node cli.js install npm -gf
The more complete answer is that I posted a guide on how to install Node on Windows here. It also describes installing npm to manage packages. Let me know if it works for you.
I've been searching everywhere, but can't seem to find a solution. Is it possible to install Socket.io on Node.js on Windows 7?
If not, is there some sort of alternative, or do you know of any future Windows support?
Usually the Node.js package manager is used, however I can't find a way of installing that on Windows. http://npmjs.org/
I'm currently using Node.exe (not running it through Cygwin).
This is how I'd imagine it would be installed on Windows, if NPM worked:
npm install socket.io
Node Package Manager now works on Windows 7
Simply install Node.js and type npm install socket.io into the Windows console and look in C:\Users\[insert username]\node_modules.
I am confirming that npm install socket.io works perfectly with Node.js 0.6.10 on Windows 7 (remember to run cmd as Administrator).
For anyone who is having trouble getting Node.js and socket.io working on Windows...
There is the nodejs-win project on Google Code.
http://code.google.com/p/nodejs-win/downloads/detail?name=node_setup_0.5.6.7.exe&can=2&q=
And here is a video that shows the basics of using it.
Node.JS & Socket.IO Chat System in Windows
Now that Node.js version 0.6.0 is available, and it seems pretty stable so far, I'm going to suggest using it if you're planning on developing on Windows.
http://nodejs.org/download/
Either use a Linux box or git clone the socket.io repository and require it from a local path.
You will have to copy the entire socket.io library into, for example, lib/socket.io/
Then var io = require("./lib/socket.io/index.js
npm runs on Node.js. If you are having problems running npm, then you should also be having problems with Node.js. Assuming you are running Node.js through Cygwin, then you should be able to run
node npm install socket.io
(Which is the same as npm install socket.io)
Also.
Npm is just the Node.js package manager. There is nothing that it provides that you can't get from the repositories themselves. It is just, for obvious reasons, a lot easier to use npm.
If you want the socket.io included, then just create a node_modules directory inside of your /lib directory or wherever your project is, and then clone the socket.io to it.
https://github.com/LearnBoost/socket.io
Edit
The OP indicated that he is using node.exe. There is no way currently as of 1st September 2011 to use npm with node.exe. It is currently on the node.exe roadmap and will hopefully be completed soon, but not as of today.
(Check the mailing list if you want to be updated).
Since the 0.6.6 version (as far as I remember) Node.js has a normal version for Windows, and after installing it a npm.exe file appears in the install directory, not sure how exactly I was running it, maybe something like node npm install socket.io.
Or maybe npm install socket.io. If none of these works, try to execute npm by typing full path to it (unless you have added a system variable for the path). For the record - I have successfully installed sokcet.io on Windows 7 via npm :)
Until NPM is built for Windows you'll need to download the packages manually and create the node_modules folder structure in the node.exe folder. Follow this post.
For me, downloading the modules directly from GitHub and putting them in the "node_modules" directory works. AFAIK that's what npm does. It works both if you put it in your user directory, or in the same directory as node.exe.
Too bad there's no Windows port for npm, since there's almost no porting needed to be done, and that node comes as a stand-alone executable instead of an installer, like Python.
I faced the same problem and edited the Socket.IO library to work on windows. Details of the same you can find here.
I had the same problem with Node.js v10.22 on Windows 7 - this worked for me:
npm install socket.io#0.8.4
Create a file called package.json in your project directory with the following.
{
"name": "project name",
"description": "project description,
"version": "0.0.1",
"dependencies": {
"express": "2.4.6",
"socket.io": "version"
}
}
Then run the npm install
Can anyone please provide me the direct to download the Ab.exe Apache benchmark utility?
On Ubuntu, I can install ab without installing all of Apache via the apache2-utils package. So:
sudo apt-get install apache2-utils
Just download Apache (www.apache.org). It comes with it (in ApacheX.X/bin)
...Guessing (from one of your other questions) that you're using a Mac... there appear to be instructions here:
http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/
(if not, I can probably help with a Windows installation, but in general, Google is your friend!)
A list of mirrors for the windows binaries can be found here.
There are some basic instructions here:
http://www.ricocheting.com/how-to-install-on-windows/apache
...basically, install it, and the ab.exe will be in the 'bin' subdirectory of the installation
TMB nailed it with the link to XAMMP in the following question : How to install apache bench on windows 7?
For Windows Users there is no direct binary download.
One has do install the Apache server via the msi setup package, grab ab.exe from the Program Files/Apachge Group/bin folder and uninstall Apache again.
link to the msi package I used was once here:
http://mirror2.klaus-uwe.me/apache//httpd/binaries/win32/httpd-2.0.65-win32-x86-no_ssl.msi
but this is 404 as of today.
http://mirror2.klaus-uwe.me/apache//httpd/binaries/win32/
might help.
Download the Apache MSI-package (https://httpd.apache.org/download.cgi -> Binaries for the version you want -> win32 directory -> httpd-...-win32-x86-no_ssl.msi), open this .msi file with 7-Zip, find ab.exe, select it, and copy it to wherever you want.
I've just done that with http://.../httpd/binaries/win32/httpd-2.2.25-win32-x86-no_ssl.msi, and it works for me.
CentOS and Fedora users can find Apache Benchmark in package httpd-tools.
Example:
# CentOS
sudo yum install httpd-tools
# Fedora
sudo dnf install httpd-tools
Use installed Apache Benchmark binary as ab.
Get the .msi from archive site:
http://archive.apache.org/dist/httpd/binaries/win32/
once installed, go to your Windows explorer to the installation path like:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\ab.exe