2

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:" );

anna
  • 662
  • 5
  • 28
  • Always provide the full error message and also show the related code. The PHP error message contains the location of the error, take a look at the code there. If it is complicate to describe, you can improve with a screenshot for example. – hakre Jan 28 '13 at 13:00
  • Please mention the complete error message along with the code. –  Jan 28 '13 at 13:01
  • try this http://kb.zend.com/index.php?View=entry&EntryID=415 – Rakesh Sharma Jan 28 '13 at 13:02
  • @hakre It's a warning, not an error. And I have added a picture. check it, please. – anna Jan 28 '13 at 13:13
  • This really is nothing to do with PHP and is a Zend IDE problem. print_r will work. – EM-Creations Jan 28 '13 at 13:15
  • Does the code actually run? It looks like the IDE complaining about it rather than PHP itself. So I guess there's a problem with the IDE's config. (But anyway, why use `print_r` when you've got the Zend debugging tools available?) – SDC Jan 28 '13 at 13:18
  • @RakeshSharma That's the key. Yes, I used the guide you gave and dismissed my warnings of built-in functions. Really grateful! Would you mind starting a new Answer as my answer? – anna Jan 28 '13 at 13:27
  • @SDC As I mentioned above, it does have a problem with project's config. – anna Jan 28 '13 at 13:29
  • @EM-Creations .....I lost my .buildpath file. – anna Jan 28 '13 at 13:30
  • @anna, you can post an answer aswell. – Shoe Jan 28 '13 at 14:42
  • @Jeffrey Ok, I have posted. – anna Jan 29 '13 at 02:53
  • glad to know it's being useful for you, and your full answer will help more people on stack – Rakesh Sharma Jan 29 '13 at 04:42
  • @RakeshSharma You're cool~~~ – anna Jan 29 '13 at 09:37

1 Answers1

3

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.

anna
  • 662
  • 5
  • 28