[mapguide-users] PhpApi problem
Trevor Wekel
trevor.wekel at autodesk.com
Wed Jul 26 17:29:01 EDT 2006
Hi Marcus,
"make clean" and "make" in Web/src/PhpApi should be enough to rebuild
the Web Extensions API for PHP. Check the timestamp on MgApi_wrap.cpp.
It should be generated by "make".
I suspect you should also be running into compilation problems if you've
swapped out 5.0.5 with 5.1.4. We applied some #ifndef statements to
php.h in PHP 5.0.5 to work around header dependencies between PHP and
ACE. I would be surprised if these dependencies had been resolved.
Here is a diff of the changes we made. If php.h is similar in 5.1.4,
you may be able to apply these changes to it.
*** \php-5.0.5\main\php.h Wed Jun 29 00:41:15 2005
--- php.h Thu Feb 23 04:25:52 2006
***************
*** 38,78 ****
--- 38,82 ----
#include "zend_API.h"
#undef sprintf
#define sprintf php_sprintf
/* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
#undef PHP_DEBUG
#define PHP_DEBUG ZEND_DEBUG
#ifdef PHP_WIN32
+ #ifndef PHPPROXYAPI_EXPORTS
#include "tsrm_win32.h"
#include "win95nt.h"
+ #endif
# ifdef PHP_EXPORTS
# define PHPAPI __declspec(dllexport)
# else
# define PHPAPI __declspec(dllimport)
# endif
#define PHP_DIR_SEPARATOR '\\'
#define PHP_EOL "\r\n"
#else
#define PHPAPI
#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#if defined(__MacOSX__)
#define PHP_EOL "\r"
#else
#define PHP_EOL "\n"
#endif
#endif
+ #ifndef PHPPROXYAPI_EXPORTS
#include "php_regex.h"
+ #endif
#if HAVE_ASSERT_H
#if PHP_DEBUG
#undef NDEBUG
#else
#ifndef NDEBUG
#define NDEBUG
#endif
#endif
#include <assert.h>
***************
*** 130,152 ****
--- 134,158 ----
#undef strlcat
#define strlcat php_strlcat
#endif
#ifndef HAVE_STRTOK_R
BEGIN_EXTERN_C()
char *strtok_r(char *s, const char *delim, char **last);
END_EXTERN_C()
#endif
+ #ifndef PHPPROXYAPI_EXPORTS
#ifndef HAVE_SOCKLEN_T
typedef unsigned int socklen_t;
#endif
+ #endif
#define CREATE_MUTEX(a, b)
#define SET_MUTEX(a)
#define FREE_MUTEX(a)
/*
* Then the ODBC support can use both iodbc and Solid,
* uncomment this.
* #define HAVE_ODBC (HAVE_IODBC|HAVE_SOLID)
*/
***************
*** 382,402 ****
--- 388,410 ----
#ifdef ZTS
#define VIRTUAL_DIR
#endif
#include "php_streams.h"
#include "php_memory_streams.h"
#include "fopen_wrappers.h"
/* Virtual current working directory support */
+ #ifndef PHPPROXYAPI_EXPORTS
#include "tsrm_virtual_cwd.h"
+ #endif /* resolse TSRM conflicts */
#include "zend_constants.h"
/* connection status states */
#define PHP_CONNECTION_NORMAL 0
#define PHP_CONNECTION_ABORTED 1
#define PHP_CONNECTION_TIMEOUT 2
#include "php_reentrancy.h"
-----Original Message-----
From: Marcus Spurkel [mailto:mspurkel at pacbell.net]
Sent: Tuesday, July 25, 2006 4:10 PM
To: users at mapguide.osgeo.org
Subject: Re: [mapguide-users] PhpApi problem
Too many to count. Many of the "'zend_xxx' was not declared in this
scope" variety. But I just realized something: all I did was swap out
Oem/php with 5.1.4, then "make clean" and "make" in Web/src/PhpApi. I
probably have to go back farther than that, don't I? Do I need to
re-make the entire project?
-Marcus
Traian Stanev wrote:
>I recently replaced Oem/php with 5.1.4 and it compiled fine for me. But
>I did that on Windows.
>What kinds of errors are you getting?
>
>Traian
>
>-----Original Message-----
>From: Marcus Spurkel [mailto:mspurkel at pacbell.net]
>Sent: Tuesday, July 25, 2006 2:44 PM
>To: users at mapguide.osgeo.org
>Subject: [mapguide-users] PhpApi problem
>
>I'm getting a "undefined symbol: empty_string in Unknown on line 0"
>error when I try to load libphp_MapGuideApi.so into PHP. It's probably
>because I'm trying to use PHP 5.1.4, which has some significant changes
>to the Zend code (among other things). I tried replacing Oem/php with
>the latest source version from php.net and then re-making PhpApi but
>that generated a ton of errors. Is there an easy way to get it to run
>with PHP 5.1.4, or will I need to back my version down to 5.0.5?
>
>-Marcus
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>For additional commands, e-mail: users-help at mapguide.osgeo.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>For additional commands, e-mail: users-help at mapguide.osgeo.org
>
>
>
>
More information about the Mapguide-users
mailing list