RES: [UMN_MAPSERVER-USERS] [PHP MapScript] Problem with ms_newShapefileObj and path with special characters

Julien-Samuel Lacroix jlacroix at DMSOLUTIONS.CA
Fri Jun 17 07:48:30 PDT 2005


It worked fine for me. Here what I did. Note that I also escaped the 
':'. I used 4.6 on RedHat 9.

$ cd /home/test/
$ mkdir Hiro´s_Test/
$ cd Hiro´s_Test/
$ mkdir Teste\(blablabla\:\)_\)
$ cd Teste\(blablabla\:\)_\)/
$ ls
$ pwd
/home/test/Hiro´s_Test/Teste(blablabla:)_)

### Here I ran the following script
###   dl("php_mapscript.so");
### 
ms_newShapefileObj("/home/test/Hiro´s_Test/Teste(blablabla:)_)/datatesteShapeFile",MS_SHP_POLYGON);
###   exit;

$ ls
datatesteShapeFile.shp  datatesteShapeFile.shx

Julien

On 06/17/2005 10:36 AM, Murilo Lacerda Yoshida wrote:
>   Sorry, I forgot to put the quotes on the example .. 
>   You tested the cration with this name
> ("Hiro´s_TestTeste(blablabla:)_)datatesteShapeFile"), right?
>   Please try with this name ("testeShapeFile") in the path
> ("/home/test/Hiro´s_Test/Teste(blablabla:)_)/data"). You'll have to
> escape the parenthesis to create the path.
>   The problem I had wasn't on the shapefile name, was in the path to it.
>   Thanks,
>      Murilo
> 
> -----Mensagem original-----
> De: Julien-Samuel Lacroix [mailto:jlacroix at dmsolutions.ca] 
> Enviada em: sexta-feira, 17 de junho de 2005 10:53
> Para: Murilo Lacerda Yoshida
> Cc: MAPSERVER-USERS at lists.umn.edu
> Assunto: Re: [UMN_MAPSERVER-USERS] [PHP MapScript] Problem with
> ms_newShapefileObj and path with special characters
> 
> Hi,
> 
> I tried to create a shapefile and it work in PHP MapScript and it
> worked.
> 
> ms_newShapefileObj("/home/test/Hiro´s_TestTeste(blablabla:)_)datatesteS
> hapeFile",MS_SHP_POLYGON);
> 
> Note that I added the opening and closing quotes and that this path 
> (/home/test/) is an existing path where the webserver as the right to
> write.
> 
> Julien
> 
> 
> On 06/16/2005 07:18 PM, Murilo Lacerda Yoshida wrote:
> 
>>  Hi all,
>>  I tried to create a shapefile using a path with special characters
> 
> in
> 
>>a linux system, all escaped by backslashes (\).
>>  The problem is that the ms_newShapefileObj function doesn't appear
> 
> to
> 
>>work with this kind of path ... I tried to create a regular file using
>>the same path and the same name as the failed shapefile in a terminal,
>>and it worked fine.
>>  Is it a bug? Did somebody had this problem?
>>  Example:
>>
> 
> ms_newShapefileObj(/teste/mapas/btg/Hiro´s_Test/Teste\(blablabla:\)_\)/d
> 
>>ata/testeShapeFile,MS_SHP_POLYGON);
>>
>>  Thanks in advance,
>>     Murilo
>>
>>
> 
> 

-- 
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the MapServer-users mailing list