Board index   FAQ   Search  
Register  Login
Board index PHP PHP Installation

Newbie to add PHP extension

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

Newbie to add PHP extension

Postby kenson » Sat Nov 25, 2006 6:55 pm

Hi All,

I had read an article below to learn how to add mssql extension into my existing PHP module in my RHE4:

## www. devarticles. com/c/a/PHP/Executing-Microsoft-SQL-Server-Stored-Procedure-from-PHP-on-Linux

The step i done as below:

1. Installing FreeTDS v0.64 (Success)
2. gedit php_mssql.c
3. $ tar xvfz php-4.4.4.tar.gz
$ cd php-4.4.4
$ ./buildconf --force
$ ./configure --disable-all --with-mssql=/usr/local/freetds
$ make

Result Make:
Code: Select all
 
make: Warning: File `/home/kenson/php-4.4.4/ext/mssql/php_mssql.c' has modificat ion time 4e+03 s in the future

gcc -Iext/mssql/ -I/home/kenson/php-4.4.4/ext/mssql/ -DPHP_ATOM_INC -I/home/ken son/php-4.4.4/include -I/home/kenson/php-4.4.4/main -I/home/kenson/php-4.4.4 -I/ usr/local/freetds/include -I/home/kenson/php-4.4.4/TSRM -I/home/kenson/php-4.4.4 /Zend -g -O2 -c /home/kenson/php-4.4.4/ext/mssql/php_mssql.c -o ext/mssql/ph p_mssql.o && echo > ext/mssql/php_mssql.lo

/home/kenson/php-4.4.4/ext/mssql/php_mssql.c:2350:7: warning: no newline at end of file

gcc -Iext/standard/ -I/home/kenson/php-4.4.4/ext/standard/ -DPHP_ATOM_INC -I/ho me/kenson/php-4.4.4/include -I/home/kenson/php-4.4.4/main -I/home/kenson/php-4.4 .4 -I/usr/local/freetds/include -I/home/kenson/php-4.4.4/TSRM -I/home/kenson/php -4.4.4/Zend -g -O2 -c /home/kenson/php-4.4.4/ext/standard/info.c -o ext/stan dard/info.o && echo > ext/standard/info.lo

gcc -Imain/ -I/home/kenson/php-4.4.4/main/ -DPHP_ATOM_INC -I/home/kenson/php-4. 4.4/include -I/home/kenson/php-4.4.4/main -I/home/kenson/php-4.4.4 -I/usr/local/ freetds/include -I/home/kenson/php-4.4.4/TSRM -I/home/kenson/php-4.4.4/Zend - g -O2 -c main/internal_functions.c -o main/internal_functions.o && echo > main /internal_functions.lo

/bin/sh /home/kenson/php-4.4.4/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 -L/usr/local/freetds/lib -R /usr/local/freetds/lib ext/mssql/php_mssql.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex /regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_func tions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ex t/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/stand ard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/stan dard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ex t/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image .lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/l ink.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standar d/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pagei nfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard /scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext /standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/ve rsioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levens htein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/sta ndard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_f open_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_uns erializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1. lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main /snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_w rappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/ rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/merges ort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.l o main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output. lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend /zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/ zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_arra y.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zen d_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zen d/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/z end_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_strtod.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/getopt.l o main/internal_functions.lo -lcrypt -lcrypt -lsybdb -lresolv -lm -ldl -lnsl -lc rypt -lcrypt -o sapi/cgi/php

ext/mssql/php_mssql.o(.text+0x4537): In function `zif_mssql_bind':

/home/kenson/php-4.4.4/ext/mssql/php_mssql.c:2105: undefined reference to `tds_g et_size_by_type'

ext/standard/aggregation.o(.text+0x886): In function `aggregate':

/home/kenson/php-4.4.4/ext/standard/aggregation.c:94: undefined reference to `pc re_get_compiled_regex'

ext/standard/aggregation.o(.text+0x8e8):/home/kenson/php-4.4.4/ext/standard/aggr egation.c:224: undefined reference to `php_pcre_exec'

ext/standard/aggregation.o(.text+0xa5a):/home/kenson/php-4.4.4/ext/standard/aggr egation.c:117: undefined reference to `php_pcre_exec'

ext/standard/aggregation.o(.text+0xc55):/home/kenson/php-4.4.4/ext/standard/aggr egation.c:201: undefined reference to `pcre_get_compiled_regex'

main/SAPI.o(.text+0xdec): In function `sapi_header_op':

/home/kenson/php-4.4.4/main/SAPI.c:638: undefined reference to `php_pcre_replace '

main/SAPI.o(.text+0xf32):/home/kenson/php-4.4.4/main/SAPI.c:646: undefined refer ence to `php_pcre_replace'

collect2: ld returned 1 exit status

make: *** [sapi/cgi/php] Error 1


4. i didnt do Make Install because i do not want to effect my current PHP ver and i will load extensions dynamically using dl() and extension_loaded().

5. I counldnt found the .so file in php-4.4.4/modules but i get php_mssql.lo and php_mssql.o in php-4.4.4/ext/mssql/


Please advice me why i havnt success to get .so file.

Your help is greatly appreciate.
Thanks in advanced.
kenson
New php-forum User
New php-forum User
 
Posts: 6
Joined: Mon Jan 06, 2003 9:17 pm

Return to PHP Installation

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron