'WP_Debug does not work even wp-config and .htacess modified

i am trying to troubleshoot about my wordpress. When i migrate my wordpress to another domain or localhost, debugging works fine. Thats probably about some core files i’ve made changes or some plugin did. When i migrate website i don’t deactivate any plugins but debugging still works. Here is the command lists what i added to wp-config.php but did not get any response.

defined( 'WP_DEBUG' ) or defined( 'WP_DEBUG', TRUE );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true);
error_reporting(E_ALL);
ini_set('display_errors', 1);

writing these codes above “Happy blogging bla bla..” line. Tried to deactivate all plugins, did not work. Tried to call wp_debug_mode() by manual, website got down.

it also does not create a error-log file. it creates on migrated wordpress but not in original wordpress. definetly i should change something but can not find what.

What else i can try to fix it? I also added these ones to .htaccess file

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag  log_errors on
php_value error_log  /home/mywebsitedomainhide.com/PHP_errors.log

still not responding. i am out of solutions, anyone?



Solution 1:[1]

Imagine you have excel open, and you have numbers from 1 to 100 in a 10x10 grid.. A1 is 1, B1 is 2, A2 is 11 etc

Your assignment asks you to pick a cell, say B2. Is the sum of the values in row 1 greater than the sum of the values in column A? Yes-> put the value of B2 in a list. Repeat for another cell. Do all the cells

I started on B2 because it has a row above it and a column to the left of it so it doesn't need to handle that special case of "no row or column means means sum is 0"'that you get for any cell on row 1 or in column A


  • Make your life easy. Write two Methods:
    public int SumColumn(int whichCol)
      //if whichCol is -1 return 0

      //declare variable to hold the sum
      //loop over the grid from [row 0, col whichCol] to [row N, col whichCol], adding up into sum
      //return sum

    public int SumRow(int which)
      //copy paste and adapt code above to work across rows not down columns
  • Now check your grid
   //declare a list to hold the cells we find with SumRow>SumColumn 
   //for r in rows
     //for c in columns 
       //add current cell value to a textbox ("output the matrix")
       //if SumRow(r-1) > SumColumn(c-1) 
         //add to list

    //add the contents of the list to the TextBox too with another loop

Should take about 15 minutes to write this code, not weeks. The design process for code when you're unfamiliar with anything is like I have done here. Write comments in the language you think in; get the algorithm straight in your mind and written down before you start hacking out code and getting lost. The comments are your direction, your essay plan, the recipe book while everything in the kitchen is going crazy. You absolutely have to plan your programs just like when you speak a foreign language; first you imagine the sentence you want to say in your native language, then maybe you rearrange it to how the foreigners say it (word order), then you translate the words and conjugate, modify etc, then finally you speak it. Engaging in that translation process for English->C# is the same; you know one language but not the other

When you're done, leave the comments in so if you went wrong you can either see it and fix it or your supervisor can see where your thinking and your c# understanding diverged, give you points for the algorithm and know what to teach you to help with where it went wrong

Solution 2:[2]

I have solved the problem Image of matrix

namespace Matrix
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        int m; // columns
        int n; // rows

        int[,] MatrixArray; // array of matrix elements 

        private void Create_Click(object sender, EventArgs e)// By clicking, a matrix grid is created
        {
            GridMatrix.AllowUserToAddRows = true;

            m = int.Parse(Size_M.Text); // Enter the number of columns 
            n = int.Parse(Size_N.Text); // Enter the number of rows

            _Answer.Text = "Elements (answer):";

            GridMatrix.Columns.Clear();
            GridMatrix.Rows.Clear();

            MatrixArray = new int[n, m]; // Creating an empty array of dimension m x n


            for (int i = 0; i < m; i++)// Creating columns
            {
                GridMatrix.Columns.Add("", "");
            }
            for (int i = 0; i < n; i++)// Creating rows
            {
                GridMatrix.Rows.Add("", "");
            }

            GridMatrix.AllowUserToAddRows = false;
        }

        private void Answer_Click(object sender, EventArgs e)// When pressed, the answer appears
        {
         
            for(int i = 0; i < n; i++)// Transferring a matrix to an array
            {
                for(int j = 0; j < m; j++)
                {
                    MatrixArray[i, j] = int.Parse(GridMatrix[j, i].Value.ToString());
                }
            }

            int[] AnswerArray=new int[m*n];
            int Counter=0;

            for (int i = 0; i < n; i++) // The algorithm for finding elements
            {
                for (int j = 0; j < m; j++)
                {
                    int RowSumm = 0,ColumnSumm=0; // Sums of row and column elements

                    for (int b=0;b<j;b++)// Sum of rows
                    {
                        RowSumm += MatrixArray[i, b];
                    }
                    for(int b = 0; b < i; b++)// Sum of columns
                    {
                        ColumnSumm += MatrixArray[b, j];
                    }

                    if (RowSumm>ColumnSumm)
                    {
                        AnswerArray[Counter] = MatrixArray[i, j];
                        Counter++;
                    }
                }
            }

            _Answer.Text = "Elements (answer):";

            for (int i=0;i<Counter;i++)// Output of array elements in turn
            {
                _Answer.Text += ""+AnswerArray[i];

                if (i!=Counter-1)
                {
                    _Answer.Text += ", ";
                }
            }

        }

        private void M_Label_Click(object sender, EventArgs e)
        {

        }
        private void N_Label_Click(object sender, EventArgs e)
        {

        }

        private void Answ1_Click(object sender, EventArgs e)
        {

        }

        private void GridMatrix_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void SizeLabel_Click(object sender, EventArgs e)
        {

        }

        private void Size_M_TextChanged(object sender, EventArgs e)
        {

        }

        private void Size_N_TextChanged(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Caius Jard
Solution 2 cbr ngst