Problem with PHPServer and Electron Packager - php

I am fairly new to node & electron so please do be kind. But I have a project that runs a PHPServer in the background, this is written off this repo: https://github.com/aj-techsoul/ELECTRON-4-PHP and built with electron-packager. Previously I had no issues but recently I have a problem that if I run the packaged application from command line. I have no issues. But opening the app directly poses no issue.
I cant share all the code as its a closed source project. But I have included the files I think you will need to help. Let me know if you need anymore.
package.json: https://www.icloud.com/iclouddrive/0ffEtHLAu1FROYpnR6PREEueQ#package
Video of issue: https://www.icloud.com/iclouddrive/0da4k99bMu7FIg9Jvf_RVGmTw#Node_problem
Thanks
John

Related

Adding A Moodle Project to Source Control

I'm not a php nor moodle developer. I worked as a python developer for many years and now work as a devops eng.
One of my clients uses the moodle framework for their site with no source control. I've spoken with their lead developer and he insists there's no way to have a moodle repo without the entire directory structure in the repository, that is all the auth, admin, backup, badges, etc directories, since many files in those directories have been touched by their development team
I did a file count and it's over 50K files, which is insane for a code repo.
Has anyone managed to solve this problem for a moodle site before? Specifically a clean CI process using source control?
I have been through a similar process on several occasions. Your best bet is to clone a clean copy of Moodle from the github repo. Then look at the version.php file on the client site to identify the exact version they are using. Next checkout that same version in the clean copy (use gitk to search for that version number). Finally copy across the code from the client site and then the standard git commands should allow you to audit what has changed and commit it in sensible steps.
Once cleaned up, keep all the changes in a branch.

Google app engine Launcher (PHP) / Eclipse - Deleting all my files

Im developing (trying to) an app with google app engine for PHP. Im using Eclipse to edit the files and the google app engine launcher to run the project.
The thing is that everytime that i turn my computer offf, when i turn it back on and i check my project all my files have been deleted.
I've tried searching for this problem on google, trying to figure out if it was eclipse's or the launcher's fault, but i didnt get any clues.
As far as i have researched it would be extremely hard to be eclipse's fault.
Did any of you have this same problem? Any ideas of why is it happening and how to fix it?
Honestly, im getting kind of tired of the Google App Engine, when it comes to PHP. The Launcher is so slow, plus i'm having all these problems, the only reason why i'm not that mad this time it's because it had happened before, so i've put all my files on Git repository before turning my computer off the last time, but i don't want to have to do that everytime i turn my computer off.
thanks,
The solution:
It was acctually somethig with Eclipse.
First i've tried reinstalling everything (Eclipse, GAEL), but the same problem kept happening.
So after running out of options, i've tried deleting the .project and .buildpath from the project and import it again.
For now its working :)

How do I stop heroku from restarting a 3rd party script? (Vanilla Forums)

(Sorry, newbie here)
So I managed to push my local php web app to their servers, using the tutorial I've found on the net on how to push php projects. It worked perfectly fine.
Now, when I load my site. The script installation appears (Vanilla Forums) and so I did the proper installation and used the CLEARDB add-on to provide MYSQL database for the site.
The forum is only part of my whole website, the problem is.. every time I change something on my website, git commit it and pushing to heroku.. The app installation of vanilla forums reappears.
How could I stop git or heroku from changing the forum part to it's last commited state?
(Note that I have successfully installed the forum software but when I commit and push because of a small update to other part of my site, the forum software reinstall again)
For better understanding:
My site url: http://codeknack.herokuapp.com
The forum url: http://codeknack.herokuapp.com/forum
This is the structure of my whole website:
index.php
challenges/
meetups/
tutorials/
community/
forum/
where in the forum folder lies the vanilla forum php script and when I edit just part of the index.php of my website, vanilla forum shows the installation screen again.
(If I am too vague, please tell me what part you are confused at)
This will really help a lot, thank you!
That's why they invented the .gitignore file. You can specify files, directories, and wildcards to be ignored by git.

PHP Command Line running, zend framework set up problem

Im trying to learn how to set up a Zend framework web application from scratch. Ive been using Magento and I understand how powerful Zend is, but im over my head it seems like.
So I bought a book, developing web applications with Zend 1.8 by Keith Pope, and I cant even follow past the first chapter. The thing that is confusing the hell out of me is the whole command line deal.
Here is a passage from the book --
Once we have downloaded the Zend Framework release package, we need to do some basic installation before we can start creating our application. First, create a new directory within your web server's document root, from which the application will be served. The examples in this chapter use the directory name of helloZend. Next, copy the library and bin directories from the release package into the newly created directory. The library directory contains all of the Zend Frameworks
source files, and the bin directory contains the command line interface for the
Zend Framework. The Zend Framework is now installed and ready for use!
Creating the project structure
We are now ready to start creating the directory structure for our project. In order to do this, we are going to use the command line interface provided by the Zend Framework. This interface uses the Zend_Tool component that provides a whole host of commands that makes it very easy to get up and running with the Zend Framework in just a few minutes.
In order to create the project structure, open up your command line and change into the hellozend directory, and then run the following command:
For Windows users:
bin\zf.bat create project
For Linux and Mac users:
bin/zf.sh create project
Ok so Ive done all that. But up above in first part he says upload it to your web server, did that already. But then "open up your command line", how exactly do I do this? The only command line I understand I can access is Terminal, do I do something with Terminal or??? (Im on a mac) - I tried navigating straight to bin/zf.sh on my webserver and it brought up a what do you want to open this link with, I chose terminal and nothing happened.
Can someone clarify this for me? I realize this may be a stupid question, but I have zero experience working with non live servers and what not....
I've been a ZF developer for several years, but was working on a pre- 1.5 version up until very recently (not by choice) I found it easiest to build a local version on my machine via ZendServer CE, then once all was running and stable, port it over to my dev server. Because I have full root permissions locally, I didn't run into any issues of naming/permissions as I walked through the initial tutorial of new features and initial setup.
Also, don't miss Akrabat's tutorial on getting started the ZF. It's very well written and in some cases easier to understand than the quickstart: http://akrabat.com/wp-content/uploads/Getting-Started-with-Zend-Framework.pdf
I don't say this to developers often, but you are in over your head if you don't yet understand how to open and use a command-line shell. Your question is not stupid -- everyone has to get started somewhere. But Stack Overflow is a place for specific questions about programming, like "I tried X and it didn't do what I expected, how should I code it instead?"
All I can suggest to you is to start studying. I believe that it's counter-productive to try learning new tools at the same time as trying to get a project done. So spend some time just learning the Terminal interface and how to run things in that environment.
Google for "Mac Terminal tutorial" and a bunch of useful articles and YouTube videos come up. Start there.
I also recommend "Mac OS X: The Missing Manual".
Re your comment: Okay, I think I'm seeing the source of your confusion. What the excerpt is not saying is that you need to open a shell on the host where you're developing your ZF app. What I do is to develop the project on my local host (my Macbook) so I can have quick access for moving files around and so on. This means I run an instance of Apache running on my Mac.
Then at intervals, when the app is running and done with respect to a given milestone of functionality, I upload the whole set of files I developed to my production server.
Tell me if I'm getting warmer. I really can't tell what you know and what you don't know because of the way you've asked your question.
anyone who needs the basic understanding of connecting to a webserver via terminal or command line via ssh should read the following:
http://www.elated.com/articles/ssh-and-basic-commands/
Although, the information there didn't work with my particular webhost. I had to format the connect command like this:
ssh user#host -p 1234
Where 1234 is the servers port number, which you will need to get from your webhost if you dont know it.
To run that script, navigate to directory where you've uploaded it (you open terminal, connect to your server via ssh if you're doing this remotely).
After that execute it like this:
./zf create project your_project_name
It should create new dir named "your_project_name" and in it many other sub-directories for your application.
Also, I'd recommend that you go for http://framework.zend.com/manual/en/learning.quickstart.html instead that book - Quick Start really is great.

How to manage eclipse project on remote computer; ssh, ftp?

Usually I'm creating project work space on my localhost (win). As soon as my code is tested I'm committing it into repository.
But some days ago I've faced a little difficulty. My customer want me to write code right on his server because he have some handmade binaries working only on his machine (solaris). I really don't know what to do. I've tried Eclipse plugin for connecting to remote servers, but I'm still unable to create remote project.
Any ideas?
PS: Sorry for my English :)
Thank you.
You don't really need a plugin to accomplish your goal. The following tutorial is aimed at Zend Studio, but I believe the information is generic enough that you can use it with just Eclipse: http://kb.zend.com/index.php?View=entry&EntryID=414

Categories