Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

PHP MapScript installation error

General Tech Bugs & Fixes
Max. 2000 characters
Replies

usr_profile.png
Karlie Kloss

User

( 6 months ago )

 

I'm trying to install MapServer version 7.0.6. I also want php MapScript so I'm doing it by compiling from source. I've installed two versions of PHP (5.6 and 7) on my system (Linux Mint 18.1) but I've downgraded to 5.6 since as far as I'm concerned version 7 is still in development. So everything worked well until I got this error:

[ 82%] Building C object 
mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o
In file included from 
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,
              from 
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
/usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:267:1: 
error: unknown type name ‘zend_object_value’
zend_object_value mapscript_object_new(zend_object *zobj,
 ^
In file included from 
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:0:
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:461:8: error: 
unknown type name ‘zend_object_value’
extern zend_object_value mapscript_object_new(zend_object *zobj, 
zend_class_entry *ce,
    ^
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:463:8: error: 
unknown type name ‘zend_object_value’
 extern zend_object_value mapscript_object_new_ex(zend_object *zobj, 
zend_class_entry *ce,
    ^
/usr/local/src/mapserver/mapscript/php/mapscript_error.c: In function 
‘mapscript_throw_exception’:
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:53:10: 
warning: return from incompatible pointer type [-Wincompatible-
pointer-types]
return zend_throw_exception(mapscript_ce_mapscriptexception, message, 
0 TSRMLS_CC);
       ^
/usr/local/src/mapserver/mapscript/php/mapscript_error.c: In function 
‘zm_startup_mapscript_error’:
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:114:37: 
error: too many arguments to function 
‘zend_register_internal_class_ex’
 mapscript_ce_mapscriptexception = 
 zend_register_internal_class_ex(&ce, 
 zend_exception_get_default(TSRMLS_C), "Exception" TSRMLS_CC);
                                 ^
 In file included from /usr/include/php/20160303/main/php.h:40:0,
             from 
 /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,
             from 
 /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
 /usr/include/php/20160303/Zend/zend_API.h:292:28: note: declared here
  ZEND_API zend_class_entry 
  *zend_register_internal_class_ex(zend_class_entry *class_entry, 
  zend_class_entry *parent_ce);
                          ^
 mapscript/php/CMakeFiles/php_mapscript.dir/build.make:62: recipe for 
 target 
'mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o' 
 failed
 make[2]: *** 
 [mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o] 
 Error 1
 CMakeFiles/Makefile2:547: recipe for target 
 'mapscript/php/CMakeFiles/php_mapscript.dir/all' failed
 make[1]: *** [mapscript/php/CMakeFiles/php_mapscript.dir/all] Error 2
 Makefile:127: recipe for target 'all' failed
 make: *** [all] Error 2

I've also installed php5.6-dev on my system.

Is there any fix for this?

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif