Sponsored Content
Top Forums UNIX for Advanced & Expert Users Compile error for PHP with msql Post 302167321 by brizrobbo on Thursday 14th of February 2008 05:17:11 AM
Old 02-14-2008
Compile error for PHP with msql

Hi Folks,

I am trying to phpize miniSQL with PHP 5.2.4 on Solaris (SPARC) using GCC 3.4.6.

- Unpacked the PHP source to /softwareArchive/php-5.2.4.
- Navigated to /softwareArchive/php-5.2.4/ext/msql.
- Ran #phpize, then #./configure --with-msql, which worked fine.
However when I make, i get the following error:

Code:
/bin/bash /softwareArchive/php-5.2.4/ext/msql/libtool --mode=compile gcc  -I. -I/softwareArchive/php-5.2.4/ext/msql -DPHP_ATOM_INC -I/softwareArchive/php-5.2.4/ext/msql/include -I/softwareArchive/php-5.2.4/ext/msql/main -I/softwareArchive/php-5.2.4/ext/msql -I/opt/coolstack/php5/include/php -I/opt/coolstack/php5/include/php/main -I/opt/coolstack/php5/include/php/TSRM -I/opt/coolstack/php5/include/php/Zend -I/opt/coolstack/php5/include/php/ext -I/opt/coolstack/php5/include/php/ext/date/lib -I/usr/local/Hughes/include  -DHAVE_CONFIG_H  -g -O2   -c /softwareArchive/php-5.2.4/ext/msql/php_msql.c -o php_msql.lo
 gcc -I. -I/softwareArchive/php-5.2.4/ext/msql -DPHP_ATOM_INC -I/softwareArchive/php-5.2.4/ext/msql/include -I/softwareArchive/php-5.2.4/ext/msql/main -I/softwareArchive/php-5.2.4/ext/msql -I/opt/coolstack/php5/include/php -I/opt/coolstack/php5/include/php/main -I/opt/coolstack/php5/include/php/TSRM -I/opt/coolstack/php5/include/php/Zend -I/opt/coolstack/php5/include/php/ext -I/opt/coolstack/php5/include/php/ext/date/lib -I/usr/local/Hughes/include -DHAVE_CONFIG_H -g -O2 -c /softwareArchive/php-5.2.4/ext/msql/php_msql.c  -fPIC -DPIC -o .libs/php_msql.o
/softwareArchive/php-5.2.4/ext/msql/php_msql.c: In function `zif_msql_fetch_field':
/softwareArchive/php-5.2.4/ext/msql/php_msql.c:1107: error: `PRI_KEY_FLAG' undeclared (first use in this function)
/softwareArchive/php-5.2.4/ext/msql/php_msql.c:1107: error: (Each undeclared identifier is reported only once
/softwareArchive/php-5.2.4/ext/msql/php_msql.c:1107: error: for each function it appears in.)
/softwareArchive/php-5.2.4/ext/msql/php_msql.c: In function `php_msql_field_info':
/softwareArchive/php-5.2.4/ext/msql/php_msql.c:1198: error: `PRI_KEY_FLAG' undeclared (first use in this function)

The "undeclared identifier" errors seem to indicate that PRI_KEY_FLAG hasn't been declared in any header file. And I can't find a declaration in the source. I suspect that I'm missing a library which configure didn't pick up! But I'm stabbing in the dark a bit. Any help would be appreciated.

Cheers.
 

10 More Discussions You Might Find Interesting

1. Solaris

Errors trying to compile PHP for use with MySQL on Solaris 10

have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build: ./configure --prefix=/usr/local/php5 \... (2 Replies)
Discussion started by: sunsysadm2003
2 Replies

2. Solaris

PHP 5.3 compile on Solaris 10 : make distclean :: fatal error

I'm trying to install PHP 5.3 on Solaris 10 . I'm using etc/apache2 and installed mysql 5.1.39. When I tried to compile PHP 5.3, with the following configure text, ./configure --with-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir=/usr/local \... (21 Replies)
Discussion started by: ppa108
21 Replies

3. AIX

Compile PHP in AIX: Loading issues

Finally I was able to compile PHP on AIX. When I try to load from Apache, I get the below error. /install/usr/local/apache2/bin:>apachectl -f /install/usr/local/apache2/conf/httpd.conf -k stop httpd: Syntax error on line 53 of /install/usr/local/apache2/conf/httpd.conf: Cannot load... (0 Replies)
Discussion started by: KarthikKannan
0 Replies

4. Solaris

Compile php with curl on solaris 10 question

I have curl compiled into /usr/local. I needed to install another version into /usr/local/curl-7.19.5 and compile php using that directory. I believe I had done that but an ldd run against php shows it is using /usr/local/lib. I have my configure script below showing how it was built and php -i... (1 Reply)
Discussion started by: csgonan
1 Replies

5. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

6. AIX

Compile PHP on AIX 5.2 Error

Hello, I am trying to compile PHP 5.3.5 on AIX 5.2 with Apache 2.2.17 and Mysql 3.23.58 Apache und Mysql are working fine but if i try to compile PHP i get this error: with make: sapi/apache2handler/php_functions.lo main/internal_functions.lo -lmysqlclient -lfreetype -lX11 -lXpm -lpng -lz... (2 Replies)
Discussion started by: dtiger
2 Replies

7. Solaris

Compile PHP 5.3.6 with MySql on Sun Blade 1500 Solaris 10

Hello, I'm trying to compile PHP 5.3.6 with Apache2 and MySql 5.5.12. I hit a problem that I can't seem to resolve by myself and I could not find a solution on the web. It looks like Apache and MySql installed ok, I can start/stop them with no problem. When I try to compile PHP the... (4 Replies)
Discussion started by: pn8830
4 Replies

8. Shell Programming and Scripting

MSQL insert record

Hi All, I have created a script to capture process run by the user & put into to mysql DB. But some how i am anot able to insert output of ps aux as below sting in mysql db. ######################################... (2 Replies)
Discussion started by: ajaincv
2 Replies

9. Red Hat

I want to install/compile php with mysql.

I have removed php-5.1.6-27.el5 from our system. Because I installed it without mysql before. How can I install php together with mysql. # rpm -qa | grep mysql* libdbi-dbd-mysql-0.8.1a-1.2.2 mysql-5.0.77-4.el5_4.2 mysql-server-5.0.77-4.el5_4.2 mysql-connector-odbc-3.51.26r1127-1.el5 ##... (5 Replies)
Discussion started by: getrue
5 Replies

10. Solaris

Compile PHP as an Apache module on Solaris

Hi, I need to install php 5.5.30 as an apache (2.4.17) module on Solaris 10. Please any help is wellcome. Some aditional info: /usr/sfw/bin/gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs bash-3.2# g++ -v Reading specs from... (0 Replies)
Discussion started by: lbslbs
0 Replies
DL(3)									 1								     DL(3)

dl - Loads a PHP extension at runtime

SYNOPSIS
bool dl (string $library) DESCRIPTION
Loads the PHP extension given by the parameter $library. Use extension_loaded(3) to test whether a given extension is already available or not. This works on both built-in extensions and dynami- cally loaded ones (either through php.ini or dl(3)). Warning This function has been removed from some SAPIs in PHP 5.3. PARAMETERS
o $library - This parameter is only the filename of the extension to load which also depends on your platform. For example, the sockets extension (if compiled as a shared module, not the default!) would be called sockets.so on Unix platforms whereas it is called php_sockets.dll on the Windows platform. The directory where the extension is loaded from depends on your platform: Windows - If not explicitly set in the php.ini, the extension is loaded from C:php4extensions (PHP 4) or C:php5 (PHP 5) by default. Unix - If not explicitly set in the php.ini, the default extension directory depends on o whether PHP has been built with --enable-debug or not o whether PHP has been built with (experimental) ZTS (Zend Thread Safety) support or not o the current internal ZEND_MODULE_API_NO (Zend internal module API number, which is basically the date on which a major module API change hap- pened, e.g. 20010901) Taking into account the above, the directory then defaults to <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or- not>-ZEND_MODULE_API_NO, e.g. /usr/local/php/lib/php/extensions/debug-non-zts-20010901 or /usr/local/php/lib/php/extensions/no- debug-zts-20010901. RETURN VALUES
Returns TRUE on success or FALSE on failure. If the functionality of loading modules is not available or has been disabled (either by set- ting enable_dl off or by enabling safe mode in php.ini) an E_ERROR is emitted and execution is stopped. If dl(3) fails because the speci- fied library couldn't be loaded, in addition to FALSE an E_WARNING message is emitted. EXAMPLES
Example #1 dl(3) examples <?php // Example loading an extension based on OS if (!extension_loaded('sqlite')) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { dl('php_sqlite.dll'); } else { dl('sqlite.so'); } } // Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0 if (!extension_loaded('sqlite')) { $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : ''; dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX); } ?> CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | dl(3) is now disabled in some SAPIs due to sta- | | | bility issues. The only SAPIs that allow dl(3) | | | are CLI and Embed. Use the Extension Loading | | | Directives instead. | | | | +--------+---------------------------------------------------+ NOTES
Note dl(3) is not supported when PHP is built with ZTS support. Use the Extension Loading Directives instead. Note dl(3) is case sensitive on Unix platforms. Note This function is disabled when PHP is running in safe mode. SEE ALSO
Extension Loading Directives, extension_loaded(3). PHP Documentation Group DL(3)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy