Re: Compile PHP with MySQLi (With MySQL on a remote server)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/2011 06:57 PM, Nick Khamis wrote:
> Hello Nilesh,
> 
> Thank you so much for your response. I have been stuck on this for two
> days. As mentioned earlier
> we compiled PHP with the "--with-mysqli" directive however there is no
> mysql/i.o to be found anywhere
> on the system. And thus we are recieving the "fatal call to undefined
> function mysql_connect()" error.
> As for the mysql native library, I am guessing it's no longer included
> in the php tree for copyright reasons?
> 
> Thanks in Advance,
> 
> Nick.
> 
> On Thu, Oct 13, 2011 at 9:13 AM, Nilesh Govindarajan
> <contact@xxxxxxxxxxxx <mailto:contact@xxxxxxxxxxxx>> wrote:
> 
>     On 10/13/2011 05:59 PM, Nick Khamis wrote:
>     > Hello Everyone,
>     >
>     > I am trying to compile php from source using the following config:
>     >
>     > ./configure --prefix=/usr/local/php
>     > --with-apxs2=/usr/local/
>     > apache/bin/apxs
>     > --with-config-file-path=/usr/local/php
>     > --with-mcrypt=/usr/local/bin/mcrypt --with-mysqli
>     > --with-gettext=./ext/gettext --with-pear
>     > --with-libxml-dir=/usr/include/libxml2 --with-zlib --with-gd
>     > --enable-pcntl
>     >
>     > Note the mysqli without pointing to /usr/local/mysql/bin/mysql_config.
>     > The problem is MySQL is not installed on the machine, it is actually
>     > installed on another server.
>     >
>     > MySQLi Suport:
>     >
>     > mysqli
>     > MysqlI Support  enabled
>     > Client API library version      5.1.49
>     > Active Persistent Links         0
>     > Inactive Persistent Links       0
>     > Active Links    0
>     > Client API header version       5.1.49
>     > MYSQLI_SOCKET   /var/run/mysqld/mysqld.sock
>     >
>     > Directive       Local Value     Master Value
>     > mysqli.allow_local_infile       On      On
>     > mysqli.allow_persistent On      On
>     > mysqli.default_host     no value        no value
>     > mysqli.default_port     3306    3306
>     > mysqli.default_pw       no value        no value
>     > mysqli.default_socket   no value        no value
>     > mysqli.default_user     no value        no value
>     > mysqli.max_links        Unlimited       Unlimited
>     > mysqli.max_persistent   Unlimited       Unlimited
>     > mysqli.reconnect        Off     Off
>     >
>     > The machine I compiled PHP on does not have mysqli.so, and so I am
>     > recieving the "fatal call to undefined function mysql_connect()"
>     > error. Can someone tell me how to compile php from source with mysql
>     > support, but actually mysql is installed on a different server?
>     >
>     > Can I download a precompile mysqli anywhere? The PHP version is 5.1.49
>     > as noted earlier.
>     >
>     > Thanks in Advance,
>     >
>     > Nick
>     >
> 
>     You don't need the mysql server to compile mysql{,i} modules, the client
>     library is enough.
>     Any special reason for not using mysqlnd, which will compile without
>     needing the mysql client library? Or I guess it's not there in php 5.1
> 
>     --
>     Nilesh Govindarajan
>     http://nileshgr.com
> 
>     --
>     PHP General Mailing List (http://www.php.net/)
>     To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

MySQLND is included in the PHP tree, MySQLND has no copyright issues. I
use that on all my servers, I use php 5.3 though. Don't know if 5.1 has it.

-- 
Nilesh Govindarajan
http://nileshgr.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux