hosting – Fatal error: Out of memory in WordPress running on AWS EC2?

I launch an instance (EC2): Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type
all the options are default (free tier), PHP 7.3.21 (cli) (built: Aug 21 2020 23:21:45) ( NTS )
and mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper

In installed WordPress 5.5.1 and run it online for testing.

I configured as bellow :
sudo vim /etc/php.ini (php.ini file)

memory_limit = 1024M

I added two lines in wp-config.php

define('FS_METHOD','direct');
define('WP_MEMORY_LIMIT', '1024M');

Using .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index.php$ - (L)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php (L)
</IfModule>
# END WordPress

<IfModule mod_php7.c>
php_value memory_limit 1024M
</IfModule>

But sometimes I still get the error messages like:

Fatal error: Out of memory (allocated 28311552) (tried to allocate
65536 bytes) in Unknown on line 0

or

Fatal error: Out of memory (allocated 24117248) (tried to allocate
143360 bytes) in file…

Does anyone know how to fix this issue? Please help?
In php.ini file I see
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
before line
memory_limit = 1024M
Is that mean even I set memory_limit = 1024M the memory limit still is 128MB on EC2?

php – Is it bad to let a file be downloaded using its direct path on WordPress?

I have a scenario that I want to let people that visit my WordPress website download some PDFs. These PDFs go to my website as products of the Woocommerce plugin, so they are stored on the folder uploads/woocommerce_uploads.
At the moment, I don’t want people to go through all the process of buying a free product. If the user is already logged in, and has the necessary privileges, I show a custom download button, which points directly to the PDF’s path in the uploads folder. Something like this:

http://nameofmysite.com/wp-content/uploads/woocommerce_uploads/2020/09/pdfname.pdf

Does this direct link to a PDF files as a way to let people download them open any vulnerability or harm in any way my WordPress website?

Read Manga WordPress based with manga update tool

Why are you selling this site?
I’m just developer for making money.

How is it monetized?
you can use adsense or other ad network such as propellerads, adsterra or others.

Does this site come with any social media accounts?
no

SEMrush

How much time does this site take to run?
the website is using laravel script to update mangas.
with one click you can add new manga with all chapters.
using gdrive unlimited as manga image storage.

no need to upload manga manually, winner will be given manga update tool.
I will only show manga update tool I used to serious bidder who already bid in this auction.

What challenges are there with running this site?
the current website is running in VPS centos 7.
php 7.3
RAM 1 GB, HD 25 GB by Digitalocean.

the manga update tool is not automatic.
you need to insert manga URL resources and choose which manga chapter you want to add.
support some major manga website as resources.

 

Buying – WordPress theme developer

Need a WP developer that can create fully responsive designs.

Must have initiative and be able to convert a PSD(Or adobe XD) to a responsive theme.
SEMrush

Sites will be done primarily in elementor ( We’re open to suggestions for other easy to use platforms though)

We’re looking at $200-250 per site ( Maybe more if done well ).

We do not pay upfront unless via escrow service (But you are free to work on your own servers and just show us the front end).

A big plus if you have basic knowledge of laravel ( Editing blade files ) since we also have clients that require sites done in laravel.

 

Custom PHP / WordPress Developer with 15+ yrs experience

Hi All,
SEMrush

I have been a long time member here in DP since 2007 serving clients across globe.

[​IMG]

As a Professional Freelancer with over 15+ yrs of experience I do offer following services:

CUSTOM PHP/MySQL Services:
# Complete Website Design & Development
# Bug Fixing & Maintenance
# Fine tuning & Performance Optimisation for speed
# Takeover someone’s Website code & do provide maintenance / upgradation service

WORDPRESS SERVICES:
# Complete WordPress site Design & Development
# Theme Development & Customisation
# Plugin Development & Customisation
# Website Maintenance & Bug Fixing
# Website Audit Report
# WordPress Website Customisations

Checkout my portfolio linked in my signature to know more about my skill-sets / experience / projects & client references.

[​IMG]

If you are interested with my services , I would be happy to help you on long-term.

Looking forward to hear from you fellow DP members.

Thanks & wish you all the best.

 

office 365 – Web form on WordPress (CF7 plugin) to Microsoft List (O365 / sharepoint)

General how-to question I haven’t been able to find an example of – please let me know if this is the right forum for this.

I have a WordPress website with plugin Contact Form 7 for users to submit questions. Natively, the contact form 7 only emails submissions, but there is an additional plug-in I can use to record those submissions to a table in the MySQL database used by WordPress.

What I’d like to do is record a new item in O365 / Microsoft List when someone submits a form. I kind of assume this will involve using Flow / PowerAutomate to pick up the form submission and create a list item out of it, but I’m not sure how I can trigger the flow, or retrieve the submitted data.

One option that crossed my mind was to just use an email trigger, so that when an email arrives, the contents of the email are used, but the additional step of sending email, then parsing email contents seemed like would be unnecessary complication, and more opportunity for failure. Is there a way to trigger flow and retrieve data directly from the WordPress database table?

I’m open to other Form options, but would prefer to use the one I’m already using, as there are other factors to form selection, as well as the fact that I have many websites to do this on, and would need to make a lot of changes if I switch away from CF7.

Thanks for any ideas and input.

functions – WordPress Admin CPT custom action to add_action securley

I write this PHP code in my functions.php but i was wondering if this the correct way to do it (best way and security)
Is this securley?
What about use of wp_nonce_url in the link? (is $_GET request safer with wp_nonce?)

First i create a custom link in edit.php of the CPT “reservaties” with admin ajax to call add_action for do some stuff

function add_new_reservaties_column($columns) {
    $columns('goedkeuren') = 'Bevestigen';
    $columns('annuleren') = 'Annuleren';
    return $columns;
}
add_filter('manage_reservaties_posts_columns', 'add_new_reservaties_column');

function add_new_reservaties_admin_column_show_value( $column, $post_id ) {
    
if ('goedkeuren' == $column) {
         
   printf( '<a class="button" href="'.wp_nonce_url(admin_url( 'admin-ajax.php?action=accepteer_reservatie&post_id='.$post_id ),'reservatie').'">Reservatie bevestigen</a>');

}
if ('annuleren' == $column){
         
           printf( '<a class="button" href="'.wp_nonce_url(admin_url( 'admin-ajax.php?action=annuleer_reservatie&post_id='.$post_id ),'reservatie').'">Reservatie annuleren</a>');

}
}
add_filter('manage_reservaties_posts_custom_column', 'add_new_reservaties_admin_column_show_value', 10, 2);

do some stuff after clicking on custom link

add_action( 'wp_ajax_accepteer_reservatie', 'accepteer_reservatie' );
add_action( 'wp_ajax_annuleer_reservatie', 'accepteer_reservatie' );

function accepteer_reservatie() {
    if ( isset ( $_GET('action') ) && !empty($_GET('action')) && !empty($_GET('post_id'))){
        $post_id = $_GET('post_id');
        
        // get ACF field values from post
        $email = get_field( 'e-mail', $post_id );
        $naam = get_field( 'naam', $post_id );
        $datum_reservatie = get_field( 'datum_reservatie', $post_id );
        $uur_reservatie = get_field( 'uur_reservatie', $post_id );
        $telefoon = get_field( 'telefoon', $post_id );
        $aantal_personen = get_field( 'aantal_personen', $post_id );
        $bericht__opmerking = get_field( 'bericht__opmerking', $post_id );
        $lunch_of_diner = get_field( 'lunch_of_diner', $post_id );
        
        
        // convert special HTML variables and mapping with ACF field values
        if($_GET('action') == 'accepteer_reservatie'){
            $tekst_email = get_field('reservatie_goedgekeurd', 'option'); 
            $subject = get_field('reservatie_goedgekeurd_onderwerp', 'option'); 
        }
        if($_GET('action') == 'annuleer_reservatie'){
            $tekst_email = get_field('reservatie_geannuleerd', 'option'); 
            $subject = get_field('reservatie_geannuleerd_onderwerp', 'option'); 
        }
        
        
        $tekst_email = str_replace('(NAAM)', $naam, $tekst_email);
        $tekst_email = str_replace('(DATUM_RESERVATIE)', $datum_reservatie, $tekst_email);
        $tekst_email = str_replace('(UUR_RESERVATIE)', $uur_reservatie, $tekst_email);
        $tekst_email = str_replace('(TELEFOON)', $telefoon, $tekst_email);
        $tekst_email = str_replace('(AANTAL_PERSONEN)', $aantal_personen, $tekst_email);
        $tekst_email = str_replace('(BERICHT)', $bericht__opmerking, $tekst_email);
        $tekst_email = str_replace('(EMAIL)', $email, $tekst_email);
        $tekst_email = str_replace('(LUNCH_DINER)', $lunch_of_diner, $tekst_email);
        
        // send e-mail to client if accept

            $headers = "From: Bistro De Bolle <info@bistrodebolle.be>";
            $send_mail = wp_mail($email,$subject,$tekst_email,$headers);
        
        //if mail is send show message
        if($send_mail)
        {
            wp_redirect(admin_url('edit.php?post_type=reservaties&notice=success'));
        }
        else{
            wp_redirect(admin_url('edit.php?post_type=reservaties&notice=fail'));
        }
        
    
    }
    
    wp_die(); // this is required to terminate immediately and return a proper response
    
    exit();
}

Thanks for your advice!