No PHP PDO MySQL support

Hello there,

I installed FreeBSD 8.2 that I want to use as a Nagios server. So, I installed AMP and Nagios and everything seems to be working fine. I wanted to add the lilac frontend configurator and even that went well.

However, when I go to http://myhost/lilac/install.php, the lilac configurator dependency checks page comes up with a few dependencies that need to be resolved before lilac works properly. I managed to resolve most of them except PHP PDO MySQL Extension, CLI Process Control Support and CLI PDO MySQL Support.

Does anybody know how to install those?

By the way, I installed PHP Version 5.2.17.

Thank you in advance,
 
Hello SirDice,

I did that and I got
Code:
host# make install clean
===>  php5-mysql-5.4.5 cannot install: doesn't work with PHP version : 52 (Doesn't support PHP 4 52).
*** Error code 1

Stop in /usr/ports/databases/php5-mysql.
Is there a way to correct that?

Thank you,
 
About the end of life thing, I can try to do the same on FreeBSD 9, but I'm sure I'll get more errors on my configurator dependencies check.
 
All versions of FreeBSD use the same ports tree. Besides, PHP 5.2 would still be deprecated. Changing the OS version doesn't change that fact.

Install lang/php53 or lang/php5.
 
Hello SirDice,

Do I have to uninstall the currently installed version of PHP before I install php5 or php53?
How do I uninstall a package properly? I'm relatively new to Non-Windows OSs and I'm not familiar with the process of uninstalling packages or applications on FreeBSD.

Thanks again,
 
You really want PHP-5.45. If you have portupgrade installed, you can upgrade your current version by doing:
Code:
portupgrade php5
portupgrade php5-extensions

I like to make backups of any related config. files first.
Once that's done, you will also want to do:

Code:
cd usr/ports/databases/php5-pdo_mysql
make install distclean

If you don't have portupgrade, do this before the others:

Code:
cd /usr/ports/ports-mgmt/portupgrade
make install distclean

Hope this helps!
 
Hi ph0enix,

When I do portupgrade php5, I get command not found.
I did cd /usr/ports/ports-mgmt/portupgrade and make install distclean but what did it give me?

Thank you,
 
Using portupgrade won't help you because the latest version of lang/php52 is still php 5.2 and you really shouldn't be using that (don't ask why then it's still in ports, that discussion can be found with some more searching).

perform [cmd=]pkg_delete -xi php52[/cmd] and then install either databases/php53-pdo_mysql or databases/php5-pdo_mysql (version 5.4). It will pull the right php version in automatically.

Unless you know for a fact that lilac supports 5.4, go for 5.3.
 
Hi Oh,

I installed php53 then did what you suggested, selecting databases/php53-pdo_mysql and it installed successfully this time.

But now, my php test page doesn't work. :(

I have test.php in the /usr/local/www/apache22/data/ directory and the string
Code:
<? phpinfo(); ?>
in it.

When I open a browser and got to http://myhosy/test.php I get a blank page.

What could have happened?

Ohhhh, this is so frustrating!!!!!!!!!!
 
You can check the file error_log for any errors.
You can check the source of the page in your browser and if it turns out the code is there unparsed, short open tags are likely disabled.

So you have to write:
Code:
<?php phpinfo(); ?>
 
Hi Oh,

when I look at the source of the web page, I see the code.
What is short open tags and how do I enable it?

Thank you,
 
If you can see the code it means PHP isn't enabled on Apache.

Make sure you have made these changes:
Code:
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

***************************************************************
 
Back
Top