php – WordPress mysql deos does not work with php7

I have a vps with these specifications:
CPU Model: Intel (R) Xeon (R) CPU E5-2630 v4 @ 2.20GHz
CPU details: 4 cores (2200 MHz)
Distribution name: CentOS Linux version 7.6.1810 (Core)
RAM memory: 8 GB

I'm running the Centos web panel on it, I have two WordPress websites, one (which has the problem, I think) has more than 30,000 posts, and the other has 6000 posts.

when I run the server in php5.6 everything goes fine, but the CPU load is high, and when I update it to php7, the CPU load became lower and nice for about 8 hours and suddenly a Query Run and the CPU load became 100% and my websites fall.
I don't know why, I tried many solutions but nothing happened. Can someone help me please!!

The query:
My active add-ons:
Topic: Editor Version 7.6.0

  • I am using the same theme and add-ons on both websites, but only the one with 30,000 posts is causing the problem.

javascript – Enter html dynamic table data with php to mysql Is it possible with Ajax?

I really don't know if this has been resolved … however, I ask the question again because I have not been able to solve it.
I have this table that accumulates as I want to add data. As you can see as I want to enter data in the input and the select and I add it, rows are formed.

var names=document.getElementsByName('datosinternos()');

function RemoveRow(){
  var table = document.getElementById("tble1");
  var rowCount = table.rows.length;
  if(rowCount <= 1)
    alert('No se puede eliminar el encabezado');
    table.deleteRow(rowCount -1);

function InsertRow()
var TableRow="";
    for(key=0; key < names.length; key++) {
        var combo = document.getElementsByName('datosinternos()')(1); 
        var selected = (key==1)? combo.options(combo.selectedIndex).text : names(key).value; 
        TableRow = TableRow.substring(0,TableRow.length-5) + "" + selected + "" + TableRow.substring(TableRow.length-5);
var TrElement = document.createElement("tr");
    TrElement.innerHTML = TableRow;



The query of all this is how can I send the table with the data finally added via php to mysql?
I have read that the only way to send pivot tables is through creating arrays and then inserting it into mysql. Any option to do it with ajax?

php: how to show only posts of specific categories per user role without add-on? restrict all other cats

I am using a basic post to add posts. There are 5 categories (cat_A, cat_B, cat_C, cat_D, cat_E). and I have 2 custom user_role for registered visitors which is & # 39; viewer_a & # 39; and & # 39; viewer_b & # 39 ;. I need to show only the selected category post only for specific user roles.

means that users under & # 39; viewer_a & # 39; You can only see cat_A posts and under user_role & # 39; viewer_B & # 39; They can only see cat_B posts. strictly restic other publications.

How can I do that without complement? Sorry for my bad English 🙂

Get PHP data to JavaScript to set the position of each post on the home page

I have created a type of personalized publication called a project for my WordPress theme, which works well. Each project has several custom fields, including a set of x and y values ​​that indicate where the project should be displayed on the main page (see the code style section below: I know it doesn't work but I'm showing what I want) to achieve in pseudocode) .

I could show the value x as Y , as defined in the advanced WordPress custom field documentation. However, how do I get the value x and y from PHP to JavaScript, so you can use them to set the left Y top Div value indicating where they should be on the cover?

Given that there are many projects and I get different sets of xs and ys in a loop, I am thinking of writing all the values ​​of x and y in an external json file and then reloading them with JavaScript. Is this a feasible option, taking into account the structure of WordPress? Or is there a better option to get these pairs of x and y values ​​from PHP to JavaScript? I know that AJAX is always an option, but I wonder if there is a simpler way, since I can almost get these exact value pairs in DOM already …


    $projects = new WP_Query($args);



I am your web developer in PHP, Codeigniter, database, WordPress for $ 120

I am your web developer in PHP, Codeigniter, database, WordPress

Welcome to my concert!

I will create a personalized and responsive website design for your specific business needs, which are of the highest quality at affordable prices. using html / css / javascript / bootstrap / php / mysql.

I am having excellent skills with

  • PHP and MYSQL
  • HTML and CSS
  • Ear

Why choose me?

  • Highly qualified and passionate seller.
  • Provide 100% professional and quality work.
  • Money back guarantee
  • Unlimited revisions
  • Support and maintenance

Concert Services:

  • Website fully responsive.
  • custom web design
  • Script writing and integration
  • Add new functionality.
  • Website customization and modification
  • Correct errors / errors / problems.
  • And much more ++.

you can see these things here

  • html css
  • javascript
  • ear
  • php developers
  • build website
  • mysql

Note: Before buying my concert, contact me to make sure I am free to work. It will be better for me and you too.


php: runtime security to execute shell commands

I have to run my .c program with gcc, but I want to prevent another code not related to this concept from executing at the same time.

  1. Is there any way to make this function totally private so others cannot access?
  2. How to disinfect it?
  3. Is it safe to use pointers for or in this function? let's say $ executable

php – How to identify the location of WordPress Query

There is a problem in my WordPress panel that the filter button in the media attachment threw an SQL error every time with the query.
In that query I found Y statement and parenthesis that is repeated.
I need to change the query. But I can't locate the query that corresponds to the filter button. Can anyone give information on how to change it? I checked the attachment filter, button name. But the correct one is not found. I don't know about the queries that are set for the panel elements.

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta AS sq1 ON ( wp_posts.ID = sq1.post_id AND sq1.meta_key = '_wp_attached_file' ) WHERE 1=1 AND YEAR(wp_posts.post_date)=2019 AND MONTH(wp_posts.post_date)=06 AND ((())) AND (wp_posts.post_mime_type LIKE 'image/%') AND wp_posts.post_type = 'attachment' AND ((wp_posts.post_status = 'inherit' OR wp_posts.post_status = 'private')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 20

This is the query launched by sending the filter button.

Error shown.

WordPress database error: (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))) AND (wp_posts.post_mime_type LIKE 'image/%') AND wp_posts.post_type = 'att' at line 1)

Pass two variables concatenated into a Json object of a POST Curl in PHP

I am sending this json request in the Curl POST with PHP.

Here is POST json:

"Payment" => (
    "Type" => "Vendor",
    "Amount" => 100,
    "CreditCard" => (
    "CardNumber" =>  "$card",
    "ExpirationDate" =>   "$dataexp"     


The default value to receive in the ExpirationDate API is: 20/2021 XX / XXXX.

Within "ExperationDate" => "", I want to concatenate the two variables ($ month and $ year) with the / (slash). $ month + / + $ year or so in a single variable.
When I send the content of the Expiration Date it must be 12/20 XX / XXXX.

They come from other variables in the script. $ Month and $ year.

Return this pattern by sending ExperationData to the API in the publication.

I tried something like:

"ExperationDate" => "'.$mes.'/'.$ano.'"

"ExperationDate" => "$mes/$ano.'"

"ExperationDate" => "$mes./.$ano.'"

In none of the 3 possibilities did I obtain it. $ Month and $ year were not concatenated with /. Therefore, the default value, for example, 10/2021 was not passed correctly in the POST object in json ExperationDate => ""

I have an error in ExperationDate in api, the error is exactly at the point of two more variables / concatenated in ExperationDate.

Could someone help me make this pattern that I showed?
Would it be possible to pass two variables and concatenated within a json object of the publication?

Best regards
Thank you

php – Error with due date

I have a script in which calculates the days to expire a product, it works well with dates of up to 15 days, but if the product expires in December 2019 or next year, I do not count the days well.

diff($fechaFinal)->d;   #Días totales entre las fechas dadas
$diffDays = $fechaFinal->diff($fechaHoy)->d;       #Días que faltan para que termine
$pastDays = $fechaInicio->diff($fechaHoy)->d;      #Días ya transcurridos
$msgInfo = $fechaFinal <= $fechaHoy ? "Finished": "$diffDays days left.";

echo $msgInfo;

// resultado:             15 days left
// resultado correcto:    102 days left


Windows application – SQL Master ASA PHP Generator Professional | NulledTeam UnderGround

SQL Master Oracle PHP Generator Professional Edition Multilingual | 28.27 Mb

Oracle PHP Generator is a powerful tool to generate a complete set of PHP for Oracle tables, views and queries selected to continue working with these objects through the web.

Support for upgradeable SQL queries;
Detailed master presentations;
Event-based content management;
Customer side data validation;
Custom paging (screen partitioning);
Data export to PDF, XML, CVS, Excel and Word;
Support for database server user authentication, encrypted and based on tables;
Record level security;
Color schemes;
Multi-language support;
many other more useful things
Pentium PC or higher;
Windows NT4 / 2000 / XP / Vista / Windows 7 / Windows 8 / Windows 10;
512 MB of RAM (1 GB recommended);
25 MB of free hard disk space;
SVGA compatible video adapter;
Internet Explorer 9 or higher (to display the Preview page correctly);
Microsoft .NET Framework 4.0 or higher (to compile styles);
Oracle client software