Packaging PHP or TAR into Ruby? - php

Why I'm asking
Conditions
What I'm trying to do
What I've tried so far
Why I'm asking
The Seagate Personal Cloud (Network Attached Storage) I have can only install .rbw (Ruby on Windows) packages when installing 3rd party applications. Apparently, I can't access the cloud's root folder to just install a .tar from either Ubuntu or Windows (I can only access the drives that are shared), so I need to package into RBW.
Conditions
The Seagate Personal Cloud is hooked up to my router, and my computer accesses it over wi-fi. The NAS uses NAS OS. I have a Windows drive and an Ubuntu drive available to try whatever needs to be done. When I connect to it (over 192.168.2.x), I get a Web User Interface that logs in, and presents me with the NAS's applications/options/etc. There is no terminal available from the WebUI.
What I'm trying to do
ownCloud is available for download as a 3rd party application, from the WebUI's App Manager, or for download from Seagate's website as a .rbw file. However, the packaged .rbw file is v6, but ownCloud is up to v8 now, and ownCloud can't update from my NAS, because it can't get the permissions (and since I can't access the NAS root folders, I can't seem to chmod it's folders to allow anything to write to it).
What I've tried so far
I've tried accessing it from both Win/Ubu drives over the network - only accesses the shared folders.
And with WebDAV - only accesses the shared folders.
And S/FTP both - only shared folders.
And "SDrive" (a Windows program that comes with it) - only shared folders.
And I've tried "Take Ownership" with Windows, but doesn't do anything.
And just clicking the "Update" button from ownCloud - says it doesn't have write access.
So finally, I'm trying to find out how to package a .tar (<--mainly) or .php into Ruby (ownCloud can install with a PHP file). Plus, it would be nice to learn how to package .tar's into Ruby, so that I can just do the same thing with multiple other programs, and submit those .rbw's to each program's maintainers, so that they can provide it to others who need that extension for their NAS.
I'm a basic user, so I'm sorry and will clarify if something here didn't make much sense.

For the Seagate Personal Cloud the RBW files are created within Seagate's Virtual machine. See https://www.seagate.com/nasos/SDK/0.7/ for all kinds of information. Taking an old rbw file and changing a few files, will not work easily.
If your Seagate device is like mine where by default the ssh server is turned off and not listed as a service in the the Web menus, you can actually turn it on. Access your device as http://my.device.com/?appdev=1 where the ( my.device.com your device. It might be 192.168.1.??? if you just have an ip number ) Go to the services menu and disable sftp and then enable ssh. The root password is what you used for your admin account when you first set-up the device.
P.S. There is now a rbw file for Owncloud 9.0.2 in the Owncloud forums.

Related

SOS! How do I deploy multiple Laravel apps on a windows IIS server in a LAN

I am setting up an IIS server in readiness to host multiple PHP web apps. These will be used within our local network so no need internet access. I have read a lot of stuff on how to go about it but am getting lost even more. someone please help.
You can refer to this document for detailed steps about deploy php application on IIS.
Here are some main important points:
Install IIS in control pannel(windows) or server manager(windows server).
Configure php. Youcan download it from php official website or Web PI(more recommand). The version over php8 may not work on IIS.
Make the physical path of site points to root folder of application. It will auto generate web.config. Set the permission of root folder to avoid 500 error.
If you have multiples version of php, you can isntall php manager to configure them.

Access to files outside the Web Environment, soft link; looking for canonical alternative

I have a shared directory using samba on my ubuntu server at this path:
/home/user/share/
I use it to share some installation software on the intranet, mainly files: msi and exe (for windows end user)...
on the same server I have a web server in the root path like:
/var/www/html/
but I want to create a link in the OS that can provide an access for php to the shared folder (if I want to distribute the programs as a download on the intranet, since not everyone knows how to access a network disk) and create a web download of the installer (s):
ln -s /home/user/share/installer /var/www/html/sl-soft
I tried to use a soft link but I get a blank page when I try to navigate.
Does anyone have a canonical answer that by using php / apache / linux can fix this problem?

How to make "portable" web app with Apache, Php, and Mysql?

I want to run a web application on a Windows computer but because of some reasons, I don't want to install a web stack like Xampp on that machine.
The web app is placed in a folder and inside of it, there are Apache, PHP, the database like MySQL or PostgreSQL, and the web source. If we want to access it, there is just a shortcut in the Desktop, and when we click that, the browser is opened and point to an URL with a particular port like localhost:8888. And the web app is opened.
I just want to put that folder in an installer. And the installer just extracts it to system folder and create a shortcut on the desktop.
I ask this because I have ever seen stuff like this. It used PostgreSQL. Simply like what I've just explained above.
If you know how to make it works, you may want to help me. Your answers will be appreciated.
You have three way to provide your web application as a software application
you can create portable server in pen drive server start by your application present on desktop icon.
you can create installer using Microsoft Installer which install all the requirement in one go then point ini file to your source code folder. This will let desktop icon to start xammp and run your application.(only applicable for window)
write python script to install web server using CMD and Terminal. then python script point ini to your source folder . Generate shortcut for server start command and launch browser with url.
we already provide Lab application in pen drive based server

How can you create in Netbeans a new PHP project with source files located in local network?

I'm trying to create a new PHP project in a situation where our client gave us only remote desktop connection to to their files.
How does it work usually in Netbeans:
To put it simple when a project is created with external sources we can click in our project on the single file and upload and download it (via ftp).
I'd like to be able to do this also on remote files located in a server which can be reached by our local network but which hasn't ftp installed.
Extra details
Until now we have been able to work normally with this setup by using Dreamweaver which allows to set in the server options an address located in the local network.
I really would like to switch to Netbeans and being able to click on upload and download on the local files to sync with their server but I can't find a way to achieve this.
There seem to be no option when creating a new project that allows this kind of setup. Selecting remote website seem to allow only ftp synch.
On the other hand if i select "Local web site" i can select the files in the local network, but NB doesn't allow me to make a local copy of them.
note 1: the server we're accessing hasn't ftp installed.
note 2: the "copy files from sources folder to another location" isn't really an option for me since I'd like to keep separated my local copy from what's on the server (and this setup I think would just copy the files without giving me any control on them).
note 3: creating a project with existing sources seem to allow only to have remote files reachable via ftp.
It would be useful to have some versioning system (git, mercurial, svn...). Can you mount the network drive in Windows? (see here ). This would at least allow you to easily create project from existing sources (although working via network could be quite slow)
One hacky way I can think of is to:
mount the network drive as described above and map it to some letter, say Z
install local FTP server (e.g. FileZilla)
configure FileZilla FTP server to use the network drive as "ftp home" (aka the folder which FileZilla will use for saving files sent over FTP) - simply use Z:\ path to point to the mounted network drive mapped to letter Z
in NetBeans, create a new PHP project from remote server (where remote server is actually your local FileZilla server)
In theory, this should work.
Here is the fragment from NetBeans site:
To set up a NetBeans project for an existing web application:
Choose File > New Project (Ctrl-Shift-N on Windows/Cmd-Shift-N on OS X).
Choose Java Web > Web Application with Existing Sources. Click Next.
In the Name and Location page of the wizard, follow these steps:
In the Location field, enter the folder that contains the web application's source root folders and web page folders.
Type a project name.
(Optional) Change the location of the project folder.
(Optional) Select the Use Dedicated Folder for Storing Libraries checkbox and specify the location for the libraries folder. See Sharing Project Libraries in NetBeans IDE for more information on this option.
(Optional) Select the Set as Main Project checkbox. When you select this option, keyboard shortcuts for commands such as Clean and Build Main Project (Shift-F11) apply to this project.
Click Next to advance to the Server and Settings page of the wizard.
(Optional) Add the project to an existing enterprise application.
Select a server to which to deploy. If the server that you want does not appear, click Add to register the server in the IDE.
Set the source level to the Java version on which you want the application to run.
(Optional) Adjust the context path. By default, the context path is based on the project name.
Click Next to advance to the Existing Sources and Libraries page of the wizard.
Verify all of the fields on the page, such as the values for the Web Pages Folder and Source Package Folders.
Click Finish.

PHP shell_exec doesn't work in Windows Azure

We need to execute an .exe file in a remote Windows Azure Server.
We call it from PHP with shell_exec. The .exe should create new files in two different folders into the server and generate data entries in a data base and returns a string, but it doesn’t work.
We don’t have any problem executing it in our local server with windows 7 Enterprise and IIS 7. That’s why we thought it could be a permissions problem, and then we have created a .user.ini file with the following content:
safe_mode= off
safe_mode_exec_dir= off
Unfortunately it doesn’t work too.
Any suggestions?
Thanks in advance.
You are most probably working with Windows Azure Web Sites. This is a high-density shared hosting with tightened security. If you need things like shell_exec you shall move to Windows Azure Cloud Service (Web Role), where you have full control over the OS and web server / php settings.
Using Cloud Service you will be able to use shell_exec. However when you move to Cloud Service you have begin thinking of saving files in Azure Blob Storage, as the local storage for cloud service is:
Not persistent
not synchronized across role instances
If you want don't yet know what Role and Role Instance is, or are little confused, please go through this article.

Categories