Hello, in my php.ini file I have an include path already for PEAR that I need to keep, and I would like to put an include path to the ZEND framework library. Can I have to include paths, and if so how can I do it?

I am on windows vista, and this is a xampp installation.

    Use ; to separate paths in windows. Example:
    include_path = ".;c:\path\to\PEAR;c:\path\to\Zend"

      Hey I have this code in a php file to test to see if zend is working:

      <?php
      include 'Zend.php';
      Zend::loadClass('Zend_Controller_Front'); 
      ?>
      

      I am using eclipse as my editor, and I have the file placed in the folder for docs in my xampp folder.

      My php.ini file looks like this:
      ; Windows: "\path1;\path2"
      include_path = ".;C:\xampp\php\pear\;C:\Source_Code\ZendFramework-1.0.3\library\Zend"

      In eclipse I get an warning message saying that:
      Include filename: 'Zend.php' doesn't exist in project: C:/xampp/htdocs/xampp/Nuke

      I thought for the Zend framework all you have to do is include the path to where Zend is located on my computer?

        Have you done a phpinfo() to check that the include_path reflects your changes?

          How would I output phpinfo? I have this but I'm getting an empty page with nothing on it:

          <html>
          <head>
          <title>Contact Me</title>
          </head>
          <body>
          <?php
          
          // include 'Zend.php';
          // Zend::loadClass('Zend_Controller_Front');
          
          phpinfo();
          ?>
          
          </body>
          </html>
          
            1. Try getting rid of everything else - just do a phpinfo().

            2. Are you sure the file has a .php extension?

              OK the phpinfo() is working now, I had the same code as I showed not sure what made it work...

              But anyways, I found that there are actually two php.ini files with the xampp installation and now I am modifying the correct one according to phpinfo().

              The only thing listed in the include path is the pear link. I copied over the line of code I had in the other ini file to the correct one.

                I restarted Apache and now the other include path is showing up as well. When I uncomment the Zend part of my code out here is the error that I am getting:

                Warning: include(Zend.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\xampp\Nuke\ContactMe.php on line 14

                Warning: include() [function.include]: Failed opening 'Zend.php' for inclusion (include_path='.;C:\xampp\php\pear\;C:\Source_Code\ZendFramework-1.0.3\library\Zend\') in C:\xampp\htdocs\xampp\Nuke\ContactMe.php on line 14

                Fatal error: Class 'Zend' not found in C:\xampp\htdocs\xampp\Nuke\ContactMe.php on line 15

                  What is the absolute path to the Zend.php file on your system?

                    Write a Reply...