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
GETOPT(3)								 1								 GETOPT(3)

getopt - Gets options from the command line argument list

SYNOPSIS
array getopt (string $options, [array $longopts]) DESCRIPTION
Parses options passed to the script. PARAMETERS
o $options - Each character in this string will be used as option characters and matched against options passed to the script starting with a single hyphen ( -). For example, an option string "x" recognizes an option -x. Only a-z, A-Z and 0-9 are allowed. o $longopts - An array of options. Each element in this array will be used as option strings and matched against options passed to the script starting with two hyphens ( --). For example, an longopts element "opt" recognizes an option --opt. The $options parameter may contain the following elements: oIndividual characters (do not accept values) oCharacters followed by a colon (parameter requires value) oCharacters followed by two colons (optional value) Option values are the first argument after the string. If a value is required, it does not matter whether the value has leading white space or not. See note. Note Optional values do not accept " " (space) as a separator. Note The format for the $options and $longopts is almost the same, the only difference is that $longopts takes an array of options (where each element is the option) whereas $options takes a string (where each character is the option). RETURN VALUES
This function will return an array of option / argument pairs or FALSE on failure. Note The parsing of options will end at the first non-option found, anything that follows is discarded. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | Added support for "=" as argument/value separa- | | | tor. | | | | | 5.3.0 | | | | | | | Added support for optional values (specified | | | with "::"). | | | | | 5.3.0 | | | | | | | Parameter $longopts is available on all systems. | | | | | 5.3.0 | | | | | | | This function is no longer system dependent, and | | | now works on Windows, too. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 getopt(3) example: The basics <?php // Script example.php $options = getopt("f:hp:"); var_dump($options); ?> shell> php example.php -fvalue -h The above example will output: array(2) { ["f"]=> string(5) "value" ["h"]=> bool(false) } Example #2 getopt(3) example: Introducing long options <?php // Script example.php $shortopts = ""; $shortopts .= "f:"; // Required value $shortopts .= "v::"; // Optional value $shortopts .= "abc"; // These options do not accept values $longopts = array( "required:", // Required value "optional::", // Optional value "option", // No value "opt", // No value ); $options = getopt($shortopts, $longopts); var_dump($options); ?> shell> php example.php -f "value for f" -v -a --required value --optional="optional value" --option The above example will output: array(6) { ["f"]=> string(11) "value for f" ["v"]=> bool(false) ["a"]=> bool(false) ["required"]=> string(5) "value" ["optional"]=> string(14) "optional value" ["option"]=> bool(false) } Example #3 getopt(3) example: Passing multiple options as one <?php // Script example.php $options = getopt("abc"); var_dump($options); ?> shell> php example.php -aaac The above example will output: array(2) { ["a"]=> array(3) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) } ["c"]=> bool(false) } SEE ALSO
$argv. PHP Documentation Group GETOPT(3)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy