Showing posts with label php_mapscript. Show all posts
Showing posts with label php_mapscript. Show all posts

Monday, July 30, 2012

mapserver php: php_mapscript.so unable to load dynamic library

was able to experience this in two different scenarios

1.) got:
Warning: dl() [function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_mapscript.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_mapscript.so: cannot open shared object file: No such file or directory


Fatal error: Call to undefined function ms_newMapObj()

make sure mapserv is compiled with --with-php=/usr/local/include/php

create directory /usr/local/lib/php/extensions/no-debug-non-zts-20060613
copy mapserver-5.0.3/mapscript/php3/php_mapscript.so to the directory above

to test, create a php test file then browse
<HTML>
<BODY>
<?php
  if (PHP_OS == "WINNT" || PHP_OS == "WIN32")
  {
    dl("php_mapscript.dll");
  }
  else
  {
    dl("php_mapscript.so");
  }
  phpinfo();
?>
</BODY>
</HTML>


2.) got:
Warning: dl() [function.dl]: Unable to load dynamic library './php_mapscript.so' - ./php_mapscript.so: cannot open shared object file: No such file or directory


Fatal error: Call to undefined function ms_newMapObj()

check your php.ini and make sure you point the extension_dir parameter to where your mapscript is located.
i have mine in apache's modules directory
extension_dir = "/usr/local/apache2/modules/"

Tuesday, October 11, 2011

php: curl install

reconfigure your php with:
./configure \
 --with-gd \
 --enable-dbase \
 --enable-module=so \
 --with-png-dir=/usr/lib \
 --enable-so \
 --with-pgsql=/usr/local/pgsql/bin/ \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --with-config-file-path=/usr/local/apache2/php \
 --with-zlib-dir \
 --with-pear \
 --enable-soap\


# following are added in the config to enable curl
 --with-curl \
 --with-curl-config=/usr/bin/curl-config \
 --with-openssl


# add in /usr/local/lib/php.ini
 extension=php_curl.so

# restart apache web server

# to test, create a php file with the ff content

<?php echo phpinfo(); ?>

CURL:
<?php
 echo '<pre>';
 var_dump(curl_version());
 echo '</pre>';
?>

Wednesday, August 03, 2011

mapserver: unable to load dynamic library php_mapscript.so

got:
Warning: dl() [function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_mapscript.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_mapscript.so: cannot open shared object file: No such file or directory in /usr/local/apache2/htdocs/app/getcode.php on line 12

Fatal error: Call to undefined function ms_newMapObj() in /usr/local/apache2/htdocs/app/getcode.php on line 14

to fix:
make sure mapserver is compiled with --with-php=/usr/local/include/php
create directory /usr/local/lib/php/extensions/no-debug-non-zts-20060613
copy mapserver-5.0.3/mapscript/php3/php_mapscript.so to the directory above

to test:
create a php test file and browse
<html>
<body>
<?php
  if (PHP_OS == "WINNT" || PHP_OS == "WIN32")
  {
    dl("php_mapscript.dll");
  }
  else
  {
    dl("php_mapscript.so");
  }
  phpinfo();
?>
</body>
</html>

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...