I need to create a stand alone local window app using web front-end code and PHP.
Noticing that good old TideSDK is completely dead I tried searching around and the only viable option seems to be NW.js and his extension "baconface php-webkit" (https://github.com/baconface/php-webkit). Fact is, I cant even manage to start!
1- I download NW.js for windows and extract the files in a new desktop folder
2- I open a node.js console and execute these commands (https://www.npmjs.com/package/express)
3- I paste php-webkit files into the folder overwriting package.json
4- try to exec NW.exe and just get the message that Express is not present
any help?
Reverse your step 2, and 3. Copy the files into that folder then from there just run a npm install to get all needed dependencies.
I followed your steps except reversing, and it worked for me! Hope this helps.
Related
At work we took back our existing store running on Magento 2 from an external development agency. I need to get the project running in local development (with docker).
I familiarized myself with a vanilla project from the official docs and managed to get it running by downloading the vanilla template with composer, granting the proper permissions on files and folder and running the magento setup:install command.
My question is how do one goes when kick starting from an existing (production running) project?
Do I need to run setup:install again? If I do, why?
What do I need to import from production to ensure any content or configuration created via the admin is also running on my local setup? Should I import the complete Database from production?
I know our setup is using more than just php and mysql, but env.php seems to be listing only db configuration and admin url. Where can I get the complete service configuration informations about what our setup uses?
Anything else I am missing to get started with an existing project for local development?
As someone who is running Magento 2 on a local environment myself, hopefully I can shed some light on this.
If you have a direct copy of the live site, you do not need to run setup:install again.
Ensure you have a copy of the entire Magento 2 site (you can technically ignore the vendor folder, as you can run composer install and it will redownload those files, but that's up to you). Also get a copy of the entire database. Magento 2 is notorious for copying the same data to multiple tables so something could break if you don't have everything.
What do you mean by "service configurations" If you are referring to Magento 2 extensions, that data is saved in the database, not the env.php file. env.php is only for server side configurations, such as the DB information, Caching, and things of that nature. On mine, I use Redis for site Cache, so that would be included in that file as well, as an example.
When you first unpack the site to your local environment, run composer update in the directory. This will ensure you have all the proper files installed. If you are going to run a local dev environment, set the mode to development with the following command: bin/magento deploy:mode:set developer. This will allow you to make changes and to view those changes by just refreshing the page, rather than flushing cache all the time.
All queries are replied correctly by Eric. I am also not sure about "service configurations" you have mentioned here. If this is about third-party extensions/services you can check config.php file for this.
I have install Laravel in my pc using composer.
I used gitbash and started xampp control server
First I've changed my directory.
Then I've ran a command composer create-project laravel/laravel project_1. After the command had run, it installed laravel and all necessary file and key was successfully set.
Then I again changed my directory to project_1
Then I ran another command php artisan serve. After running this command Laravel development server started and 127.0.0.1:8000 this ip has genrated.
I copied the id and paste it in my browser url bar.(I copied and pasted it without using keyboard. I only used mouse)
but when I provided the ip the project_1 starting page did not open.
The page was loading and it is still loading.
what can I do? Please help
logs folder
Here is my contribution, I cannot say what is the cause but I have a solution for it; because I have such as a challenge.
run
php -S 127.0.0.1:8000 -t public
Note that the 8000 is your port, and this could be any 4-digit number.
I hope this helps
Every thing you did seems right to me in terms of Laravel requirements, so lets check some other possible issues:
make sure that your internet connection isn't configured to use
proxy, if so make sure you excluded your local address.
if you are using Internet security suite software, make sure it doesn't block your requests, this vary from software to another but you might test this by deactivating the software for a while until you try.
now that's what I have in mind, I hope it help.
First, stop the php artisan serve
After changing directory go to inside your project folder, you can run php artisan serve. Then a localhost URL will be generated for you where you can see your project in the browser
If you have PHP installed locally and you would like to use PHP's built-in development server will start a development server at http://localhost:8000
Please try to install Laragon and forget about Xampp for now. This is really cool tool and you'll start much quicker. I did try to resolve few issues with Xampp myself and always wasted a lot of time. You can google tutorials later for it as well. Plenty of info out there.
As well it comes with in house installer for Laravel ;) and more :).
Make sure that you are not coping the url from Git Bash through command, it will stop running the project
Make sure that you are not using antivirus specially avast antivirus.
I know this has been asked before, but I couldn't get the answer I needed.
Currently I'm developing an website using PHP and was using Notepad++ before, and it all worked well because I'm developing with a co-worker so we both keep on changing different files on the FTP.
Switched to NetBeans. All went ok, pulled the entire website via FTP to my local computer and everytime I edited a file and saved it uploaded to the FTP. But, there is a problem. If my colleague updates a file, it doesn't update on my local folder. So, I thought: "Let's try versioning".
Created a team on bitbucket, created a repository. All went ok.
But now, I'm in a struggle to get everything up and running on both NetBeans (mine and colleague's) so that my colleague is editing a file on his NetBeans and constantly saving so that it gets saved on FTP and only when he stops working on that file push it to BitBucket so that I can pull after.
Suggestions?
About setting up your work environment :
In order to set up your bitbucket repository and local clone, go read this link (official doc).
You will need to repeat the cloning part once for each PC (e.g : once on yours, once on your colleague's).
Read the account management part to see how you can tag your actions with your account, and your colleague's action with his own account.
Start using your git workflow ; when you are tired of always typing your password to upload modifications to your bitbucket account, take the time to read the ssh keys setup part - read carefully, you will need to execute the procedure once for you and once for your colleague.
Using your local git repository with Netbeans is pretty straightforward :
From netbeans, run the File > New Project ... command (default: Ctrl+Shift+N),
Select PHP application with Existing Sources and click Next >,
For the Sources Folder: line, select your local git directory,
Fill the remaining fields, and if you want the last Run configuration screen, then click Finish.
After the project is created in netbeans, you can modify the Run configuration part by right clicking on the project's icon, selecting the Properties menu entry, and going to the Run configuration item.
About solving your workflow "problem" :
Your current FTP workflow can lead you to blindly squash your colleague's modifications (when uploading), or have your colleague's modification blindly squash your own local modifications (when downloading). This is bad, and you will generally notice it only after the bad stuff happened - too late.
Correctly using version control allows you to be warned when this could potentially happen, and to keep an almost infinite undo stack on the modifications of the project's files. The cost, however, is that both of you will have to add several actions in your day to day workflow - some choices can not be made automatically.
You may find it cumbersome in the beginning, but it really pays off, and quite quickly - we're talking big bucks here. So use it and learn.
On top of using Ctrl+S to save your modifications on disk, you and your colleague will need to integrate 3 extra commands in your daily work :
Save your work to your local repository (git add / git commit)
Download the latest modifications shared by your colleague (git pull)
Upload your work to the central repository (git push)
You can access these commands :
from a terminal,
from a GUI frontend : you can try TortoiseGit for windows, or gitk for linux,
from Netbeans :
in the contextual menu of the files/folders in the project tree (right click on the item, there is a "Git" entry),
using the Team > Git > ... menu
Since you provided a git tag, I'll describe what's to do for Git.
set up a remote bare repo on a server that you both could access (BitBucket in your case):
http://git-scm.com/book/en/Git-on-the-Server-Getting-Git-on-a-Server
you both clone that remote repo to your local machines:
http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository
each of you works in her part of the application. When one is done, publish the work to the server:
http://git-scm.com/book/en/Git-Basics-Working-with-Remotes#Pushing-to-Your-Remotes
By now, the remote server holds the version that was just pushed. What's missing is the deployment of the website. This has been discussed here:
Using GIT to deploy website
Doing so, you will decouple your work from that of your colleague since you're not changing files over FTP all the time. You work in your part, your partner works on her part. The work is getting merged and then a new version of the website gets published.
You can create git or Mercurial repositories in Atlassian Bitbucket (http://bitbucket.org). If your team is new to version control, i advise you no forks in your first project.
The easy solution ins to use Atlassian SourceTree (http://www.sourcetreeapp.com/) to control your code since there is a bug in netbeans. See NetBeans + Git on BitBucket
You need to create a new repository in bitbucket. I assume you already configure the ssh2 keys. Using Git you need:
git clone --bare --shared php_project php_project.git
git commit
Using Mercurial you need:
hg init
hg commit
Good luck / boa sorte
Pedro
I have a php application, I want to install it on another PC so they can use it but i want an automatic way that will install XAMP & copy my application files to that PC without me doing all these is there any installer I can use?
I need it to install XAMP automatically
Need it to copy files from installer & paste in the xamp folder.
Create a desktop icon so they can launch & start using it.
It will open browser, will run the apache in the background. and execute the php
anything to resolve?
Popular CMSs like Wordpress do installation just by copying the files and launching the SQL scripts for the database - create database and fill test data if needed. Which is fine.
The real question is how do you install XAMPP in the first place. Because for that it's not enough just to copy files. And even if you do manage to install XAMPP, you have to automatically start the Apache and MySQL. Don't say that it's impossible, but I think you should look for an easier way and deal with that another PC owners.
I have been able to connect a local repository to a private Github repo (using the Github for Windows GUI), which should then automatically deploy to a development server. Everything is running smoothly until I make an attempt at the following:
<?php `git pull -f`;
Source: http://net.tutsplus.com/tutorials/other/the-perfect-workflow-with-git-github-and-ssh
Once I commit then sync/push through Github for Windows, this script is supposed to call the Linux command 'git pull -f'. I have used a SSH key without a passphrase in an effort to make it easier but to no avail. However, if I were to execute the command via command-line, everything works perfectly.
File & folder permissions are set to 777 throughout the root directory (including the /.git folder), which is what I thought was the reason for not being able to see updates when viewing the website I am developing.
If anyone has had a similar experience with this I would be grateful for a solution.
Note: I have searched high and low on SO and elsewhere on the web for a potential fix to this but any resources will be met with open arms.
Thanks,