PHP 4 errors

From KeegansWiki
Revision as of 14:21, 14 October 2009 by Keegan (talk | contribs) (Created page with '==PHP 4.3.5 Compile error== ===Error=== <pre> In file included from /usr/local/src/php-4.3.5/ext/xslt/sablot.c:36: /usr/local/src/php-4.3.5/include/php_sab_info.h:2: erro…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PHP 4.3.5 Compile error

Error

    In file included from /usr/local/src/php-4.3.5/ext/xslt/sablot.c:36:
    /usr/local/src/php-4.3.5/include/php_sab_info.h:2: error: syntax error before ':' token
    /usr/local/src/php-4.3.5/include/php_sab_info.h:3: error: missing terminating " character
    In file included from /usr/include/fcntl.h:23,
    from /usr/local/src/php-4.3.5/ext/xslt/sablot.c:44:
    /usr/include/sys/fcntl.h:184: error: syntax error before '}' token
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c: In function `zm_info_xslt':
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:201: error: missing terminating " character
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:201: error: syntax error before ')' token
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c: In function `zif_xslt_backend_info':
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:797: error: missing terminating " character
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:797: error: syntax error before ')' token
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:797: error: missing terminating " character
    /usr/local/src/php-4.3.5/ext/xslt/sablot.c:797: error: too few arguments to function `strlen'
    make: *** [ext/xslt/sablot.lo] Error 1

Mitigation

Not sure exactly what the deal with this was. I looked at the file that had the syntax error (/usr/local/src/php-4.3.5/include/php_sab_info.h), and noticed it was on 3 separate lines, like this:

    #define SAB_INFO "Cflags: -g -O2
    Libs: -L/usr/local/lib -liconv -lexpat
    Prefix: /usr/local"

All i did was edit that file so that everything was on one line. Compiled just fine after that. Not sure if it affected anything by not having the line breaks or now.

PHP 4.4.8 and Mssql / FreeTDS issue

Error

    As seen in the apache error log:
    ...
    PHP Warning: Function registration failed - duplicate name - mssql_data_seek in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - mssql_field_seek in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - mssql_result in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - mssql_min_error_severity in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - mssql_min_message_severity in Unknown on line 0
    PHP Warning: mssql: Unable to register functions, unable to load in Unknown on line 0

Mitigation

I was compiling php with both mssql support and sybase -- this caused some kind of conflict. Disabling sybase in my configure flags fixed the issue.


PHP 4x / FreeTDS error

Error

   When compiling php 4.4.8:
   checking for MSSQL support via FreeTDS... yes
   configure: error: Directory /usr/local/ is not a FreeTDS installation directory

Mitigation

I couldn't find much on google to start with (cause i didn't read the php manual linke below...doh). I looked in the ./configure script in the php source, and searched for FreeTDS. I was able to locate the error message, and see what conditions had to be met for it to occur.

I compiled fteetds from source, and it appears to not have copied all the correct files over after installation. To get php to compile, i had to copy <freetds src>/include/tds.h to /usr/local/include, and also copy <freetds src>/src/tds/.libs/libtds.a to /usr/local/lib. My prefix for FreeTDS was /usr/local, so you might have to copy to a different directory depending on that.

See more info [1] and [2]