Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have 2 Linux boxes with same version installed. The first one is used to host a apache/linux based web site and the second one is used to host user supplied files.
The webserver box can access the file server box using an internal IP address. When user tries to upload a file using my php web site, I need to save this file in a specific folder in the file server box.
One option I found until now is to use PHP's FTP functions. Are there any other/better options to access folders/files that reside on a file server box from the web server box?
Thanks for any help!
- Jaideep
Configuring an NFS server on the file server, and mounting the exported directory on your web server, will make programming easier for you, because you can access the directory just as if it was local.
In an environment where you don't have professional system administration, i'd recommend against the NFS version however, because NFS needs some planning regarding synchronized user ids, and it doesn't always recover gracefully from a crash (although it should, in theory). From that point of view, FTP might be your best option.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 months ago.
Improve this question
recently I deployed my web application in host (hostinger.com), I have some edits I have to make. How can I use the code editor (PhpStorm) to make edit in the website ?
the project made using laravel framework
I'll not recommend, but in other-hand to gave you an answer, you should :
View->Tool Window->Remote Host
Create a new connection, base on connection type FTP, SFTP, FTPS, Etc..
Set host info and try to connect.
As you can see this option don't need any type of SSH access, and when you've got connected to host, you can see list of files at right side of IDE, and you can :
Browse
Modify them
And of-course change your files in local environment and put/upload or drag them into specified location.
You will need SSH access to your remote files
In phpstorm:
File >> Remote Deployment...
Though it is generally better practice to make your changes locally, rebuild and redeploy to the host.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have made a webpage using .html and I would now like to change it to .php so I can connect it to a database. I have changed the file extension to .php but now it just opens the actual code in the browser as opposed to opening the website. I have googled it but all I can find is stuff about installing .php on a server, when I am just trying to open the file on my device. I am using Microsoft Edge if that matters. What do I do?
First of all, what you have to understand is php is a server side language whereas html is a client side language. As you might already know, html can be directly interpreted by browser but for php, the case is different. You need to have a server installed.
Moving on to your question How to change html to php!!, it's simple, just change the extension of the file.
To run the file, use local server. There are many options you can choose from. Personally I find Xampp easy to setup for beginner. It's my personal opinion though.
To sum up, to change html from php, install a localhost or local server to your computer, migrate your files to server's run directory. You can find plenty of tutorials on setting up localhost.
If you want to run a PHP file after changing its extension. You need to install xammp or lamp server. In the localhost server, you can view your PHP pages on any browser.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need help with making a webpage from several files and I am not sure how to go about it. I'm not sure how to follow these instructions can someone help me out.
Install:
Copy contents of folder "upload_to_server" to your server.
Open "includes/config.php" and edit $cfg['db_server'], $cfg['db_username'], $cfg['db_password'], $cfg['db_database'] to be your database details, and $cfg['site_url'] to be the URL to the site with a trailing slash e.g. "http://www.example.com/" or "http://www .example.com/example/" (if it has been uploaded to a sub folder named "example".
Import database.sql into your database
![Here is a picture of the files for the site][1]
[1]: http://i.stack.imgur.com/7eHOb.pn g
You need to install a local web stack first. WAMP or XAMPP for Windows, LAMP for Linux, or MAMP for Mac
You are then going to have to locate your web folder, which is usually called www, htdocs, or public_html. This is where your files need to go.
You can import databases from PhpMyAdmin, which should come bundled with your web stack.
Then you use http://localhost/whatever-folder-you-added to access it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to develop a webpage where anyone can upload a file. I want to do this because I want to make a webpage where my friends can upload a file, if they think that that file will help others (eg: a free tutorial pdf on Unix).
To develop and test this webpage what is needed ? As far as I think now:
Webserver ? I tried installing apache2 but had some issues
mysql-server ? I installed mysql-server ,but have issues with creating user for db
php
What else would I need ? (Assuming 'download' functionality will be added later, NOT NOW)
I am developing this in Ubuntu 12.04
Thanks
You don't need MySQL for the problem as described. All that would be required is a web server with a working PHP install. You can see the PHP documentation for how to handle the file uploads.
once you have installed and configured wamp/lamp.
platform(window, linux) doesnt matter a web application is not platform dependent. wamp/lamp will install mysql(database server), and apache(web server). thirdly determine you web scripting language(php, jsp, asp ect).if php, your php scripts must be executed by the web server ie you have to place them under c:\wamp\www\sitefolder\
How to: http://www.w3schools.com/php/php_file_upload.asp
you can test if on your local machine
then with Apache running, type in your browser www.localhost\sitefolder\yourscipt.php.
assuming you have an active domain and hosting account you may need to consider the
::::
-determine the upload size limit, location, and file type on the php
-you may require/though not a must client side scriptiing jquery- ajax for asynchronous requests.
-security will be of concern, you dont want some harmful data scripts on your site.
verify upload limit with your hosing provider..
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am accessing my remote server directory(/var/www) using the tool WINSCP. When I need to update a PHP file on the remote server, I work on a copy on my laptop (Windows 7), then I upload that copy to the corresponding directory at the remote server (by clicking right click on the file on the laptop directory, then I chose upload from the menu, then from the prompt I chose move and replace).
My question, during the transfer process, assume there is a user is using the system and he made a process was not done yet (let us say a process in mysql was working) and suddenly the PHP file is replaced with another one during the process. Will this make problem for my application? Is it healthy? Will it stop or a corruption will happen to database?
Shall I kick out all users before replacing PHP files at remote server? (that would be so hard option).
PHP read the whole script before running it, so replacing the file will have no effect on this, you can keep doing it like that.
If you have multiple PHP files and you are changing the API between them (add parameters to functions in your lib, for instance), you could run into trouble.
Same is if you use a database and you have to update your table definition.
As long as only a single PHP file changes, you are completely safe.