Tarun Chawla
Tarun Chawla

Reputation: 538

Configuring PHP for MySQL after installing Apache & PHP from source in Ubuntu

I have already installed Apache 2.4.4 & PHP 5.4 from source in my Ubuntu 10.04 machine. I also installed MySQL 5.6 from source and SQL commands are running from shell.

When I use an SQL function to connect to database, it throws a fatal error that this function is not defined.

I know I can configure PHP for MySQL by providing the directory of MySQL while installing PHP, but now I have already installed & configured Apache & PHP and they are working, so please tell me how to configure PHP for MySQL support.

Thanks.

Upvotes: 0

Views: 354

Answers (1)

kuldeep.kamboj
kuldeep.kamboj

Reputation: 2606

Recompile php with --with-mysql OR --with-mysqli directive. This way you can add required extensions to php. See php-mysql OR php-mysqli

Upvotes: 0

Related Questions