1

After migrating to PHP7.2 from PHP5.5 , my PHP scripts are not getting executed however phpinfo() is loading fine . I have installed php from source code .

I have enabled display_errors setting and it showing the following messages

[03-Oct-2018 16:32:12 UTC] PHP Warning:  Creating default object from empty value in config.php on line 163

[03-Oct-2018 16:32:12 UTC] PHP Notice:  Array to string conversion in get.php on line 25

[03-Oct-2018 16:32:12 UTC] PHP Notice: Undefined property: stdClass::$Array in get.php on line 25

But these are warnings and notices . Am I missing some configuration to make the code work ?

5
  • Did you update your Apache configuration? The Apache DLL for PHP changed names between PHP 5 and PHP 7. Commented Oct 3, 2018 at 16:25
  • 2
    Do you know that your scripts are 7.2 compatible? You might be using deprecated functionality. Commented Oct 3, 2018 at 16:27
  • What about the scripts are not working? Have you checked the server error logs? Commented Oct 3, 2018 at 16:31
  • Edited my questions with errors Commented Oct 3, 2018 at 16:38
  • Sounds like differences between versions. Track down the code where the errors are occuring and fix them. Commented Oct 3, 2018 at 16:41

1 Answer 1

1

On the first error in config.php file, you probably should instantiate a new stdClass() like the example below:

$var = new stdClass()

and then assign a value to its properties.

On the second error, you must have assigned the var as an array and then trying to echo that var

Without seeing the code I think its all the help I could give you

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.