Increase Aws EC2 Disk Space

For anyone that has this problem, here’s a link to the answer: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-size-increase/

Summary

  1. Run df -h to verify your root partition is full (100%)
  2. Run lsblk and then lsblk -f to get block device details
  3. sudo mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp
  4. sudo growpart /dev/DEVICE_ID PARTITION_NUMBER
  5. lsblk to verify partition has expanded
  6. sudo resize2fs /dev/DEVICE_IDPARTITION_NUMBER
  7. Run df -h to verify your resized disk
  8. sudo umount /tmp
Posted by softclue.net in Blog, 0 comments

Elementor mini cart widget appear empty without any content

Hello everyone!

Thank you for submitting your issue, and for the feedback! 🙏

We are aware of this issue and our team is already working on a fix. We are planning on releasing this fix together with Elementor Pro v3.14.0 next week.

Meanwhile, a workaround is to either Rollback your WooCommerce version to 7.7.2, or to use the following code snippet that can be added to your functions.php child theme file, or use the Code Snippets plugin:

 

add_action( 'wp_enqueue_scripts', 'custom_enqueue_wc_cart_fragments' ); 
function custom_enqueue_wc_cart_fragments() 
{ 
wp_enqueue_script( 'wc-cart-fragments' ); 
}
Posted by softclue.net in php, Wordpress with Woocommerce, 0 comments

PHP variable variables

I want to store courseworks marks of n courseworks into n variables, such as cw1 and cw2 etc. Using variable variables how can I come with cw1, cw2 etc.

How can I dynamically create variables?

Posted by Surya Infotech in php, 0 comments

Understanding PHP Functions

I am beginner in programmer, can anyone describe to me how php function work? I have searched any tutorial but I am still confusing..

Why this function doesn’t work?

<?php
$name = "Maria";
$gender = "Female";
$country = "Thailand";

function profile(){
   echo $name . "<br>";
   echo $gender . "<br>";
   echo $country . "<br>";
}
profile()
?>

Or like this:

<?php
function data(){
   $name = "Maria";
   $gender = "Female";
   $country = "Thailand";
}
function profile(){
   echo $name . "<br>";
   echo $gender . "<br>";
   echo $country . "<br>";
}
data();
profile()
?>
Posted by Surya Infotech in php, 0 comments

What kind of array does PHP use?

I can define an array in PHP like this:

$array = array();

In C++, we have two kinds of array.

  1. The first kind is a fixed size array, for example:
    int arr[4]; // 4 ints, hardcoded size
    
  2. The second kind is a dynamic sized array
    std::vector<int> v; // can grow and shrink at runtime
    

What kind of array does PHP use? Are both kinds of arrays in PHP? If so, can you give me examples?

Posted by Surya Infotech in php, 0 comments

Error handling in PHP

I’m familiar with some of the basics, but what I would like to know more about is when and why error handling (including throwing exceptions) should be used in PHP, especially on a live site or web app. Is it something that can be overused and if so, what does overuse look like? Are there cases where it shouldn’t be used? Also, what are some of the common security concerns in regard to error handling?

Posted by Surya Infotech in php, 0 comments

How do I get PHP errors to display?

I have checked my PHP ini file (php.ini) and display_errors is set and also error reporting is E_ALL. I have restarted my Apache webserver.

I have even put these lines at the top of my script, and it doesn’t even catch simple parse errors. For example, I declare variables with a "$" and I don’t close statements";". But all my scripts show a blank page on these errors, but I want to actually see the errors in my browser output.

error_reporting(E_ALL);
ini_set('display_errors', 1);
Posted by Surya Infotech in php, 0 comments