[UMN_MAPSERVER-USERS] phpmapscript code problem
Skweda O'Bomsawin
sobomsawin at KASSINI.COM
Wed Sep 8 07:44:03 PDT 2004
Alberto,
Don't forget that you have to install PHP as CGI and not as a module for
Apache in order to use PHPMapscript. I did not used the document you
mentioned to install PHP on my server. Instead, I recommend you the
installation instructions from Mapserver Wiki which are very straight
forward and works very well
(http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RedHat9AndMapserver40b).
These instructions are for Linux, but the essence is there:
# download and install php
#
sudo cp sapi/cgi/php /var/www/cgi-bin/php433 ##Copy php to your
cgi-bin/php433##
# edit your php.ini:
# add this information:
# extension_dir = "your_php_extensions_directory"
## Don't forget to copy your php_mapscript.dll to you PHP extensions
directory
# add to httpd.conf
# For PHP scripts as CGI-BIN
#
AddType application/x-httpd-php-cgi .php .php4 .phtml
Action application/x-httpd-php-cgi /cgi-bin/php433
#Now create your php test file and check the output
Since I never tried it before on Windows, I cannot certify you the good
behavior of your server... Maybe someone else can provide more
information...
Please keep in touch...
Skweda O'Bomsawin
-----Message d'origine-----
De : Alberto Cavalli [mailto:alberto.cavalli at sintranet.it]
Envoyé : 8 septembre 2004 09:37
À : Skweda O'Bomsawin
Objet : R: [UMN_MAPSERVER-USERS] phpmapscript code problem
I think that my problem is with my httpd.conf from apache or in my php.ini,
in fact, if itry to execute this line php file:
<HTML>
<BODY>
<?php
dl("php_mapscript.dll");
phpinfo();
?>
</BODY>
</HTML>
I receive this error on the top of the page:
Warning: dl(): Not supported in multithreaded Web servers - use extension
statements in your php.ini .......
I've read this document about the installation
(http://mapserver.gis.umn.edu/doc/phpmapscript-install-howto.html) and it is
all ok
what's wrong?
Do you have any suggestion
thanks
alberto
-----Messaggio originale-----
Da: Skweda O'Bomsawin [mailto:sobomsawin at kassini.com]
Inviato: mercoledì 8 settembre 2004 15.38
A: 'Alberto Cavalli'; MAPSERVER-USERS at LISTS.UMN.EDU
Oggetto: RE : [UMN_MAPSERVER-USERS] phpmapscript code problem
Is your server correctly installed to serve PHP? Can you send your map file
so we can diagnose more accurately your problem?
Skweda O'Bomsawin
-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Alberto Cavalli
Envoyé : 8 septembre 2004 03:28
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] phpmapscript code problem
Hi dear, I'm new with phpmapscript,
I've read the documentations about phpmapscript and I tried to make my
simple code to see my map in a web like as describe in this document (php
mapscript 40 by example how to at this link
http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html) but I
can't display anything else than an error message like this:
draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); ?> >
this is the code in my phtml file:
<?php
dl('php_mapscript.so');
$map_path="c:/ms4w/Apache/htdocs/apps/maplab_2.1/tutorial/";
$map = ms_newMapObj($map_path."tutorial.map");
$image=$map->draw();
$image_url=$image->saveWebImage(MS_PNG,1,1,0);
?>
<HTML>
<HEAD>
<TITLE>Example 1: Displaying a map</TITLE>
</HEAD>
<BODY>
<IMG SRC=<?php echo $image_url; ?> >
</BODY>
</HTML>
What's wrong
Can someone help me
regards
alberto
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 2004-09-03
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 2004-09-03
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 2004-09-03
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 2004-09-03
More information about the MapServer-users
mailing list