Posts

Showing posts from February, 2017

uploading image file using php in ubuntu or linux not working

PHP script might be prevented form uploading file because of permissions : Ubuntu/Linux Am having this php script that should upload image save it as upload.html <!DOCTYPE html><html> <head> <title>UPLOAD</title> </head> <body> <form method="post" action="upload.php" enctype="multipart/form-data"> <pre> Select File<input type="file" name="file"> <input type="submit" name="btn" value="UPLOAD"> </pre> </form> </body> </html> save as upload.php <?php $file_name=$_FILES["file"]["name"]; $temp_name=$_FILES["file"]["tmp_name"]; if(move_uploaded_file($temp_name,"/var/www/".$file_name)) echo "File Uploaded"; else echo "file can't be uploaded"; ?> now when you will try to upload image i

How to start xampp GUI

You can use the command below if you use 32 system : sudo /opt/lampp/manager-linux.run if you use 64 system : sudo /opt/lampp/manager-linux-x64.run

How to install LAMP server in ubuntu through tasksel

Image
open terminal type sudo apt-get install tasksel after install finish type sudo tasksel in terminal then go down and come to LAMP then press space then enter after finishing you need to change the file permission of the folder go to computer/var/www/html you can do this by typing sudo nautilus and then go to filesystem root/var/www/html then right click and select properties then go to second tab and select owner your username and access create and delete all the components like apache php and mysql will be installed through tasksel at once.