Any of y'all use this @#gd12 package? Either I'm not understanding the installation instructions or the thing doesn't work at all. I can't even get the examples to run. If y'all want to take a gander at my problems, I'd be most obliged.

    What all did you do to ensure that the prerequisites were fulfilled and the installation instructions were followed? My test server already met the 3-4 requirements listed in the install document, so I simply extracted the "Classes" subfolder into a path that I added to PHP's include_path and the examples seemed to work as intended.

      yes, I followed the installation instructions. However, the only thing close to 'php_xml' is 'extension=php_xmlrpc.dll', which I activated. You lost me on the include path. But, I will persevere.

        timstring;11030191 wrote:

        However, the only thing close to 'php_xml' is 'extension=php_xmlrpc.dll', which I activated.

        No need for php_xmlrpc; php_xml is a built-in extension (at least on an official Windows build; I suppose a custom Windows or *nix build could have '--without-xml').

        timstring;11030191 wrote:

        You lost me on the include path. But, I will persevere.

        I just find it nicer to have this:

        require_once 'PHPExcel.php'

        rather than something like:

        require_once '/home/user/path/to/PHPExcel.php';
        // or even...
        require_once "$_SERVER[DOCUMENT_ROOT]/../classes/PHPExcel.php";
        // or any other variation

        It certainly doesn't seem like the package was written such that it requires it, though.

        What seems to be the problem(s) you're having? Do you have error_reporting set to E_ALL (or better) and display_errors and/or log_errors set to On? If so, what kind of error messages are you seeing?

          When I tried this inside the script:

          set_include_path('/Library/WebServer/Documents/Classes/');
          
          define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
          
          /** Include PHPExcel */
          require_once 'PHPExcel.php';
          

          It worked for a while. How would I shorten the path?

          Brad, since you have the package, do you get the following error:

           Fatal error: Uncaught exception 'PHPExcel_Writer_Exception' with message 'Could not close zip file /Library/WebServer/Documents/pHPExcel/Examples/03formulas.xlsx.' in /Library/WebServer/Documents/Classes/PHPExcel/Writer/Excel2007.php:348 Stack trace: #0 /Library/WebServer/Documents/pHPExcel/Examples/03formulas.php(113): PHPExcel_Writer_Excel2007->save('/Library/WebSer...') #1 {main} thrown in /Library/WebServer/Documents/Classes/PHPExcel/Writer/Excel2007.php on line 348

          Again, I'm getting this error on every script I try. Every instance of the variable '$objZip' inside works 'Excel2007.php'

          Many thanks as always.
          ts

            Does the user account being used to invoke PHP have permissions to read and write to '/Library/WebServer/Documents/pHPExcel/Examples/' ?

              I have had to fight with the computer about the permissions inside the 'Download' folder, which is the site's root. I seem to have won the battle. The permissions are set as (Me) - rw, System - rw, Wheel - rw, Everyone - r.

              I think the problem is: The resulting 'xlsx' file is put into the '/Users/tim/Downloads/' folder and the script is trying to close a file that is in the 'examples' folder. How would I put a second 'include' path? I tried this and it didn't work:

              set_include_path('/Library/WebServer/Documents/Classes/:/Users/tim/Downloads/');

              I've tried to put this line in my PHP.INI file:

              include_path = ".:/php/includes:/Library/WebServer/Documents/Classes"

                Another problem if you don't mind.

                Call up example '05featuredemo.php'. Line 37 says:

                include "05featuredemo.inc.php";

                PHP does as instructed until it gets to line 32 in '05featuredemo.inc.php' --

                require_once dirname(__FILE__) . '/Library/WebServer/Documents/Classes/PHPExcel.php';

                I have tried several path combinations, but I get the same error:

                Fatal error: require_once() [function.require]: Failed opening required '[U]/Library/[/U]WebServer/Documents/PHPExcel/Examples/[U]Library[/U]/WebServer/Documents/Classes/PHPExcel.php' (include_path='.:') in /Library/WebServer/Documents/PHPExcel/Examples/05featuredemo.inc.php on line 32

                I don't have an 'include_path' statement anywhere in these two scripts. Would the 'include' statement in '05featuredemo.inc.php' have anything to do with the problem? Is there a better way to call up '05featuredemo.inc.php'?

                I know I'm in a graduate level class while I'm still writing my English II term paper. I am exasperated. If the examples don't work as advertised, why in the world would I write my own code to use it.

                yibbidee yibbidee that's all folks

                  I use it and it worked as advertised. Great tool IMHO. Don't recall having include path issues ... it's all stored underneath the folder in which it's called; my UNIX background's broad enough I haven't much trouble with things like that anyway.

                    I am a rank beginner to the UNIX scene. Would any of this have to do with me on a Mac? If so, what adaptions would I have to make in PHP's scripts? Is there some magical PHP.INI file that would cure everything?

                      I guess it might ... seems that you've been discussing permissions and file paths a lot.

                      I don't know if there's any magic, though. My best "off the cuff" suggestions would be: find out what "user" is running your webserver according to the system (try "top" in the Terminal app), make sure that user either owns or is in a group that has full permissions on the folders in question, and try and do everything under the "web root", wherever that may be.

                      I've been rather "off" all week; besides, Brad's got twice the remote_problem $fu that I do even on a good day. I'll wish you much luck.

                        timstring;11030215 wrote:

                        Another problem if you don't mind.

                        Call up example '05featuredemo.php'. Line 37 says:

                        include "05featuredemo.inc.php";

                        PHP does as instructed until it gets to line 32 in '05featuredemo.inc.php' --

                        require_once dirname(__FILE__) . '/Library/WebServer/Documents/Classes/PHPExcel.php';

                        I have tried several path combinations, but I get the same error:

                        Fatal error: require_once() [function.require]: Failed opening required '[U]/Library/[/U]WebServer/Documents/PHPExcel/Examples/[U]Library[/U]/WebServer/Documents/Classes/PHPExcel.php' (include_path='.:') in /Library/WebServer/Documents/PHPExcel/Examples/05featuredemo.inc.php on line 32

                        I don't have an 'include_path' statement anywhere in these two scripts. Would the 'include' statement in '05featuredemo.inc.php' have anything to do with the problem? Is there a better way to call up '05featuredemo.inc.php'?

                        Something to remember, PHP not only needs to be able to find the file, but also to read it, so you have two things to determine: 1] is the file where PHP can see it? 2 ] is the file security set so PHP can read it?

                        Unfortunately, the "failed to open" message doesn't specify which problem is occurring. On my BSD systems, it's either:

                        PHP on FreeBSD wrote:
                        PHP Warning:  include(/usr/home/me/foo.php): failed to open stream: Permission denied in /usr/home/kadmin/foobar.php on line 3
                        PHP Warning:  include(foo.php): failed to open stream: No such file or directory in /usr/home/kadmin/foobar.php on line 3

                          I'm getting a warning that includes:

                           [function.require-once]: failed to open stream: No such file or directory in /Library/WebServer/Documents/PHPExcel/Examples/05featuredemo.inc.php on line 32
                          
                          //---- and ---
                          
                          Fatal error: require_once() [function.require]: Failed opening required '/Library/WebServer/Documents/PHPExcel/Examples/Classes/PHPExcel.php' (include_path='.:') in /Library/WebServer/Documents/PHPExcel/Examples/05featuredemo.inc.php on line 32
                          

                          The 64,000 question is: why is

                          /Library/WebServer/Documents/PHPExcel/Examples/

                          stuck to the front of the correct path on every script from the package that I've run. I can't find a reference to that path anywhere.

                            So, I took one of the example files and put it in the 'classes' folder with '05featuredemo.inc.php' and that worked. Now, my question is: if I have the paths:

                            localhost/phpexcel/examples/anyscript.php

                            and

                            localhost/classes/anotherscript.php

                            How do I tell the example script to look down two levels to find the classes folder? I know it has something to do with the dots, but I am lost as to the solution.

                            Now, I've got to find where the routine is putting the resulting Excel files. All of the sudden, I can't find them.

                            ty fer awl da hep

                              I said I'd persevere. I kept getting permission errors, so I made 'everyone' to read and write to the 'PHPExcel' & 'Classes' folders. I'm not particularly afraid because the containing folder has the proper permissions.

                              I still need help with the file & path structure

                              Thanks forever,
                              tim

                                Write a Reply...