To be honest, I’m not a developer nor anything alike, I’ve set up personal sites before using wordpress and I love it. This is the first time I’m setting up a Woocommerce store (for myself as well) and the product are digital downloads.
This is where I’m stuck. In these Woo tutorial (https://docs.woocommerce.com/document/digital-downloadable-product-handling/) it is said that there are 3 methods to upload your files and the most secure one is the X-Accel-Redirect/X-Sendfile.
I’ve already checked with my hosting service (siteground) and they’ve told me it is supported and the have configured everything in they servers for me as a client being able to use it.
The thing I am not getting (and the question) is… When everything is set up (in this case the code the tutorial says and everything have been done) I just upload the files on the media section of my wordpress site and that’s it?? Or do I need to upload them somewhere else??
I’m very confused and I haven’t being able to find oriental information in internet.
Thanks in advance!!
]]>Running WordPress 5.42, Lightspeed on the 1 server & Nginx on the other. Proposed media server is Ubuntu 20.04, the shared hosting is CLOUDLINUX 7.8. PHP is 7.2.
I have a subdomain working on the external server, but WP doesn’t seem to like a media library there, ie, I cannot, for example, add a file to the media library as it never appears. My directories are set to have the owner as www-data, & 0755 permissions for directories & 0644 for files. I did go into the all options screen & set the upload url path to the subdomain on the external server.
Has anyone ever set anything like this up? Conversely, any other ideas as to how to offload these files in order to make my data center happy? BTW, I can successfully ssh/sftp to the subdomain to upload files, I just can’t add them via media library.
Any suggestions very much appreciated. Please stay well & safe.
]]>I need access or get all assets like images,css,js from another server (CDN) and also i want store all images for that server. Can anyone suggest to give me how can i do for that or any plugin require for that?
Thanx
]]>iam using the plugin php insert
the code i am using
$sql = "SELECT * FROM Medlemar Where Medl_nr= . $current_user->Medl_nr% .";
Medl_nr is a custom field in wp.users table i created
and with $current_user->Medl_nr is giving me the value if i run the code seperat.
but running the query then i am only getting 0 result.
soo it seem like the query can′t get the current_user data (that should be a number and in this case it is number 25)
soo am i doing something wrong or am i missing something
all the code i am using
[insert_php]
$servername = "db host";
$username = "user";
$password = "pass";
$dbname = "db_1";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT * FROM Medlemar Where Medl_nr= . $current_user->Medl_nr% .";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "Medl_nr: " . $row['Medl_nr']. " - Namn: " . $row["namn"]. " " . $row["efternamn"]. "<br>";;
}
} else {
echo "0 results";
}
$conn->close();
[/insert_php]
the wp db and the db1 i am trying to get data from is on diffrent servers.
]]>The main problam is that if I try to send request from external server to the .php file that uses native WordPress functions – the WP ignores this request and the script does not receive any request.
The solution which I found is the next:
I receive the data (from external server) by using .php file that saves this data in the .txt file. After that, I invoke .php file that use native WP functions and save data from this file to the Data Base. I understand that this is like a cheat the WP security.
But I need to know: is here a way to receive data from external server and directly save to the Data Base using native WP classes for working with Data Base, without using extra file like that .txt file.
Also, using native WP function with DataBase makes the work more safe.
I already used the “Plugin API/Action Reference/admin post (action)”. But it allows to receive data as logged site admin (like from my own admin page). I need to receive data from external server by the plugin without admin access, and I can take the risk on myself, but I want to use the native WP functions to receive that request and work with DataBase.
Is it possible?
]]>What’s the advantages of getting a second server to serve my images from?
Granted I still need to sort out the WP plugin and such, but even after I do that, will there be time savings by having pages load from two servers?
Thanks.
]]>regards
]]>I need to read a document (php) hosted in another server with a content like this:
<?
/*
line 1
line 2
*/
?>
I’ve tried with fopen() and fgets() unluckily. Any idea?
]]>i just want to know if someone knows how to play a video from any external server like mediafire,bayfiles etc…
or if there is any plugin that do this , what i want is to put a a link and when the visitor wants to watch the video choose the source of his preference.
i dont know if you know what i mean but is something like cuevana.tv , thats an online movie website
]]>