[PHP] auto_globals_jit breaks $_SERVER var
I have the following in my php.ini: register_globals = Off register_long_arrays = Off register_argc_argv = Off auto_globals_jit = On The following PHP code prints nothing: ?php $webroot = $_SERVER['DOCUMENT_ROOT']; $server = $_SERVER[HOST]; $file = $_SERVER[SCRIPT_FILENAME]; $transport = $_SERVER[REQUEST_TRANSPORT]; $port = $_SERVER[SERVER_PORT]; print $webroot; print $server; print $transport; ? The rest of the php.ini is like php.ini-recommended that comes with the source. Any idea what might be the problem? Thanks, Yoav.
[PHP] Fails to enable dynamic library support
In my phpinfo() I get (under standard): Dynamic Library support not available I can't seem to get PHP to be configured to allow dynamic libraries. My php.ini is: enable_dl=1 extension_dir=/usr/local/lib/php/extensions/no-debug-zts-20050922/ extension=logmanager.so And myconfigure line is: './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' '--prefix=/usr/local' '--enable-releasemode' '--enable-xml' '--cache-file=config.cache' '--enable-libxml' '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' '--enable-memory-limit' '--disable-safe-mode' '--enable-sockets' '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' '--enable-inline-optimization' '--without-pear' '--disable-all' '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' '--disable-bcmath' '--disable-debug' '--disable-calendar' '--disable-ftp' '--with-zlib' '--with-exec-dir=/usr/local/appweb' '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' '--without-aolserver' '--without-apache' '--without-continuity' '--without-pi3web' '--enable-mbstring' '--disable-mbregex' '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' '--disable-rpath' '--with-snmp=/home/artzi/work/down/temp/target/usr/local' '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' '--enable-cgi' '--enable-cli' I can't seem to understand where I go wrong. Obviously something is wrong, but what? Thanks, Yoav.
[PHP] Custom static extension compilation
After trying to compile my custom extension as a dynamic extension, I decided to try to compile it as a static one. I found out that I have to copy the directory with the sources and the config.m4 to the ext directory under the source dir and call ./buildconf --force to rebuild the configure script. However, doing that built the configure script in a way that doesn't even compile. My configure command is: './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' '--prefix=/usr/local' '--disable-all' '--enable-static' '--disable-shared' '--enable-memory-limit' '--disable-safe-mode' '--disable-rpath' '--disable-ipv6' '--disable-wddx' '--disable-bcmath' '--disable-debug' '--disable-calendar' '--disable-ftp' '--without-aolserver' '--without-apache' '--without-continuity' '--without-pi3web' '--enable-releasemode' '--enable-xml' '--cache-file=config.cache' '--enable-libxml' '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' '--enable-sockets' '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' '--without-pear' '--with-zlib' '--with-exec-dir=/usr/local/appweb' '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' '--enable-mbstring' '--disable-mbregex' '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' '--with-snmp=/home/artzi/work/down/temp/target/usr/local' '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' '--enable-cgi' '--enable-cli' '--enable-inline-optimization' Before the buildconf, the configure passed fine, but afterwards I got an error from the PCNTL extension that the system doesn't support fork(). It happened both when cross compiling and when compiling normally. Any idea what is the right way to add an extension as static so it will compile right? Thanks, Yoav.
[PHP] PHP halts after calling non-existing socket
After calling a non existing socket PHP halts and doesn't return. It happens when we do it through our web server (AppWeb) or through the command line. The problem is with socket_recvfrom. (see code below) Is this a known bug? a mistake I make in accessing sockets? installation error on my side? Thanks. Code: ?php unlink (/tmp/local_domain); $addr = /tmp/main_adaptor_sock; $socket = socket_create(AF_UNIX, SOCK_DGRAM, 0); if (!$socket) echo problem in creating socket; if (!socket_bind($socket, /tmp/local_domain)) echo problem in binding socket; $buffer = Update; socket_sendto($socket, $buffer, strlen($buffer), 0, $addr); socket_recvfrom($socket, $buffer, 100, 0, $from); echo message recv $buffer \n; ?