#warning#Call to undefined function 'print_r' when I copied my php file from one site to another in the same Zend

StackOverflow https://stackoverflow.com/questions/14562593

  •  05-03-2022
  •  | 
  •  

Question

enter image description here

  • I can't really understand what happened here. What I've done was to copy a php file to another project in the same Zend. It's a warning, not an error.

  • My computer is supposed to have only one php version, so it seems nothing to do with the php version.

  • the function is standard "print_r", so it seems nothing to do with the undefined function.

the code is very normal, like : print_r ( "image:" );

Was it helpful?

Solution

try this kb.zend.com/index.php?View=entry&EntryID=415 – @Rakesh Sharma

To workaround this problem the user needs to manually add relevant content into the '.buildpath' file.

  • Close the project (Project | Close Project).
  • Open the '.buildpath' file that resides in the project's root directory with a text editor. If the file does not exist, create it. Paste the correct contents into the '.buildpath' file:

.buildpath contents for a PHP Project

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
    <buildpathentry kind="src" path=""/>
    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>

.buildpath contents for a Zend Framework Project

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
    <buildpathentry kind="src" path=""/>
    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
    <buildpathentry kind="con" path="org.zend.php.framework.CONTAINER"/>
</buildpath>
  • Save the file.
  • Open your project (Project | Open Project).
  • Rebuild the project (Project | Clean).

After the build process finishes, you should see no warnings for standard PHP functions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top