[Geoprisma-users] Tutorial Problems

Stephen Woodbridge woodbri at swoodbridge.com
Thu Nov 26 00:25:42 EST 2009


Alexandre,

In the tutorial you have:

> Choose an existing sample to build from
> 
> The easiest way to start your project is to look among the existing
> samples and choose one that fits your needs. If it’s your first time
> playing around with GeoPrisma, think small and easy !
> 
> Simply copy the files from a single example and place them in your
> project directory. If you used the above structure, copy the files to
> the locations :
> 
> 1. common.php –> config 
> 2. proxy.php –> htdocs
> 3. template.xslt –> htdocs/xslt
> 4. index.php –> htdocs
> 5. sample.xml –> config
> 6. sample.php (you don’t need this file)
> 
> Finally, also copy this file (from the root samples directory).
> 
> 7. config.php –> config
> 
> To know more about these files, see Architecture and Concepts .

Also I think you have a typo on number 5. it should be:
5. config.xml -> config


Basically this structure is not going to work because the paths are not 
the same as samples dir.

index.php require_once 'common.php';
which needs to be in the same directory but it locates at 
../config/common.php
which in turn does:
   $strCurrentDir = dirname(__FILE__);
   require "$strCurrentDir/../config.php";

So I moved config.php up one dir and my directory structure looks like:

woodbri at mappy:/u/geoprisma/projects/myproj$ ls -R
.:
config  config.php  htdocs

./config:
common.php  config.xml

./htdocs:
css  img  index.php  js  proxy.php  xslt

./htdocs/css:

./htdocs/img:

./htdocs/js:

./htdocs/xslt:

and then changed the require in index.php to be:
    require_once '../config/common.php';

and now I get:

Warning: require_once(com/borealis/Autoload.php) 
[function.require-once]: failed to open stream: No such file or 
directory in /u/geoprisma/projects/myproj/config/common.php on line 15

Fatal error: require_once() [function.require]: Failed opening required 
'com/borealis/Autoload.php' 
(include_path='.:/u/geoprisma/projects/myproj/../lib/geoprisma-r728/src/server/core:/u/geoprisma/projects/myproj/../lib/php-borealis-foundation-0.3.1.28') 
in /u/geoprisma/projects/myproj/config/common.php on line 15

So this probably means that there are some other assumptions about where 
the project directory is located or the need to copy other GP 
directories into the project directory.

Just so you know, I created my project directory as:
/u/geoprisma/projects/myproj/
and then create a directory
/u/www/html/project/
and ln -s /u/geoprisma/projects/myproj /u/www/html/project/myproj
and /u/www/html/gp is a symlink to geoprisma-r728

A little confusing, but I tend to use lots of symlinks.

-Steve


More information about the Geoprisma-users mailing list