Steps to develop a website to upload files [closed] - php

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..

Related

How to change a webpage from .html to .php [closed]

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.

Is there any way to run PHP on Android [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I've tried to open my PHP script in the built in Android browser, but I only see my code, as text, and the PHP doesn't run. Why is that ?
How can I run PHP on my Android device ? Is there a way to set up PHP and a web server on an Android device ?
Okay, this is a bit of a personal recommendation, but I've had success with the free Palapa Web Server (edit: doesn't seem to be on the playstore anymore, but here's the creator's website in case it helps you find it), which is essentially a web / mysql server which runs on Android, which will run your PHP scripts, and it will also work offline.
To use it, install the app, and copy your PHP / HTML files onto your phone. By default, the app uses /sdcard/pws/www/, so if you put your files there, it should pick them up. Then, launch the app, click "Start server", and go to http://127.0.0.1:8080 with your web browser on your android device, and it should work.
Note that setting up PHPMyAdmin (if you need that for managing databases) can be a bit tricky, as you will need to download the extra packages for it.
Let me know if it works for you. (Note: I'm not affiliated with this app, I'm just a mostly satisfied user.)

Deployment of php jqm mobile application on tablet/mobile [closed]

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 tried using phonegap , but the php scripts do not work?
Any other alternatives as to how the php jqm applications are deployed on tablet for testing?
PHP is meant to run on Proper Computer/Server as its a Server Side Language. So you need additional Software as the Browser does not have the ability to Interpret the PHP Language by Itself.
However its not a dead end if you wish to run PHP and JQM on a Device by itself.
On Android you can try KSWEB: server + PHP + MySQL Software which turns the device into a web server and includes PHP
Out of interest i just tested this software and it works. If you have an Android device download and install the software. The web server starts automatically. Transfer your whole folder (jqm+php scripts you have) in the htdocs folder on the phone, open a browser and type (localhost:8080/the-name-of-the-folder) and your jqm + php scripts will run ok.
https://play.google.com/store/apps/details?id=ru.kslabs.ksweb&hl=en
Alternatively Check Ubuntu touch, http://www.ubuntu.com/phone i think you can install anything on that like a LAMP server which includes PHP. Its a good choice because stuff like that is free. except for the device.

Can PHP pages be run locally? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can PHP pages be run locally?
I am trying several demos on creating a contact form, at the moment I am trying this one:
http://www.html-form-guide.com/contact-form/php-email-contact-form.html
I have downloaded the source files and put my own email address in, but when I click submit I get directed to the PHP page. The form's action attribute is set to that PHP page, so I was wondering if it is because PHP is not able to run locally? If I want the form to submit and send to my email would I need to put the downloaded source pages online to make them work?
This is not the only tutorial I've used where this happens.
Sorry if this is a silly question - newbie web developer :).
Thanks.
PHP, in this context, is a server side language. It must be run by a webserver.
The webserver can be installed and run locally.
PHP needs to be executed server-side, which means you will need to set up a local webserver.
The best way to go would be taking a look at WAMP or MAMP or LAMP, depending on your operating system.
You need to be running a PHP server locally, and have the file "hosted" by the server (in the same folder, but usually /var/www/). There are a verity of free programs for this. I like WAMP ( http://sourceforge.net/projects/wampserver/)
You should simple install WAMP server. If you use Windows I recommend this one: http://www.easyphp.org/
When you install it you should copy php file to projects directory and then you can run in your browser http://localhost/projects/ to see your file and to execute it

Upload/retrieve files from a linux based file server using PHP [closed]

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.

Categories