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 2 days ago.
Improve this question
so recently i discovered amazon web services and decided that this is my future. What i have done i exported all media to my pc and uploaded to amazon s3 storage made bucket public and now i need to change all urls on my wordpress that it would read from amazon.
So what i need to know how is that possible, i know that via sql update is one way to go also you can write small php code to do it and there is also couple of plugins that actually transfers your media to amazon s3 but those ones was outdated.
So i have now media like this:
mydomain.com/wp-content/uploads/2015/03/myphoto.jpg
Wat i need is change path to:
amazondomainandbucket.com/wp-content/uploads/2015/03/myphoto.jpg
I have amazon subdomian, i alrerady uploaded all my uplodas folder in it i have couple ways to go which i wrote above but just looking for good advice maybe there existing some plugin which is able to do that? Im using newest wordpress version 4.1.1 (i believe its this)
Thank you.
You should run string replace befor uploading the database.
dump the database
open the file in notepadd++ (or similar)
replace all urls and save
import the database
Related
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 2 years ago.
Improve this question
We have one .net application in which there is facility to upload images in given storage location. our application is completely windows based. and what it does is it stores images on given path for example "E:\Images".
On the other hand We are using using PHP application (using smarty framework) to display all our uploaded data. In this case everything working fine except images as the storage location is not within the PHP application directory.
I know with the help of symbolic link we can access the images from another disk. It is also working. But if we change the storage location later on then there will be a problem.
I also know that using base64 way we can access images. But it is taking too much time to load If I have a 30 images for one single record.
Can you please suggest a good way how can I access the images? Or how we can improve our symbolic link way?
PHP can access any area of the disk ifallowed. You may need to configure open_basedir to allow such access.
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 5 years ago.
Improve this question
I am developing a blog using Laravel 5.6 and PostgreSQL.
I have made a fully functional blog and have successfully deployed it in Heroku in Free tier.
Initially I have made a photo upload system in which user file uploads are stored in public/storage and filename is stored in a table field in posts table.
But in heroku we can't do this due to their ephemeral filesystem.
Now I neither know how to use or would be able to afford amazon s3 solution.
Don't want to store images in database directly either. Because soon I will be making a complete social networking type app for fun in my college.
As a student what I can think of is to directly upload the image in a MY google drive account public folder instead of file system.
And then retrieve that also.
I googled for a solution, but I didn't find what I am wanting. I have no experience working with APIs before.
Really need your help.
Regards.
You need a Laravel drive connector in order to do this. Best bet is to search on GitHub for "Laravel Google Drive" as there are several and without more information it's difficult to recommend one over another. Another option is to use AWS S3. You get 5GB for free for your first year and it's dirt cheap after that - and there is lots of documentation and support for S3 (see https://laravel.com/docs/5.6/filesystem).
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 7 years ago.
Improve this question
I want to simply upload a video (MP4) to a folder on the website using PHP and be able to retrieve it. I searched several websites and questions on stackoverflow and all of them have not worked for me.
Without any code examples, it is kinda hard to answer, but here is something you can use as a starting point.
http://www.w3schools.com/php/php_file_upload.asp
Once you can get the file to upload to your PHP script (in temp storage on the server), you can then use PHP functions to move the file to a folder, or insert it into a database.
Be aware, the example is simple, and not super secure. You will want to enforce limiting mime types and file sizes to start.
If you get some code written and have issues, I would suggest updating your question so we can help.
You may run into a few issues with uploading.
Server permissions
File Size Limits
Folder permissions to put the file.
Note: The example I gave you is for images, but just look through it because obviously you can't use
getimagesize()
on a video.
You should be able to use this instead:http://php.net/manual/en/function.filesize.php
I would first focus on getting a basic, secure uploader working. From there you can do specific video stuff.
Good luck.
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 7 years ago.
Improve this question
Ok. So I have a website where I use a form to record information on the user and store it in a MySQL database. After you submit the form, it opens a page where there is a video and audio recorder setup. (At the top of this file, in the php, it also handles the form input.) So I have this part all done and it is working perfectly. The only problem is that the video/audio recorder saves two files which are named after the user who submitted the form, a .webm with video, and a .wav with the audio. What I want to do is make a script that combines the two into one .mp4 or .avi. The plugin I used for the recording is Here. I just want some advice on where to start. I am also fine with using some kind of plugin or something, because it is a private project.
PHP can't be used to do audio/video files conversions. To achieve what you want you have to use FFmpeg which is a command-line tool that runs on Linux and Windows.
If you don't have a least a VPS or dedicated hosting, there is no chance that your shared hosting provides this library.
With a small search on the internet I've found that: https://github.com/PHP-FFMpeg/PHP-FFMpeg
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 years ago.
Improve this question
I have a website I want to be able to do the same kind of core update that WordPress can do.
How do I safely make it possible to update the core of my website? Which preventive measures do I take?
When PHP scripts are able to update themselves it sounds like a great security threat to me!
If you really want, you can look at the source of /wordpress/wp-admin/includes/class-wp-upgrader.php which is doing all the heavy lifting in the new background updates. Major releases (3.7 to 3.8, or 3.x to 4.x) require user input. It's just small patches that are coming in automatically.
Your WordPress installation pings the WP servers for available updates.
Your WP downloads archive from their server to yours, and unpacks the archive to a working directory.
Your WP deletes the package archive.
Your WP moves the new files from the working directory to their destination.
Your WP clears the working directory.
Your WP calls filters and hooks 'upgrader_process_complete' which may initiate some new code to execute in order to complete the patches.
Unless a hacker is able to trick WordPress into connecting to a non-WP server for update information or packages, you're getting approved file patches direct from WordPress servers api.wordpress.org.