tags:

views:

643

answers:

4

I run

php test_code.php

I get

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/gd.so' - /usr/lib/php5/20060613+lfs/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mcrypt.so' - /usr/lib/php5/20060613+lfs/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
-- I get the right output after these strange Warnings --

The files do not exist in the warnings.

How can you get no warnings in running PHP in Ubuntu's terminal?

+2  A: 

Either:

A) Install missing libraries
OR
B) Remove gd and mcrypt modules from your php.ini
OR
C) Remove error reporting, which is really bad idea.

Andrejs Cainikovs
+1  A: 

Set the error_reporting ini value to 0, which means no error notices:

php -d error_reporting=0 test_code.php

Although, you should probably try and fix those errors.

Kazar
+2  A: 

A quick search at Ubuntu Packages shows these are in the php5-gd and php5-mcrypt.


sudo apt-get install php5-gd php5-mcrypt
David
+1  A: 

PHP-GD and PHP-MCrypt are installed correctly?

<?php
phpinfo();
?>

are there?

If not:

# apt-get install php5-gd php5-mcrypt
inakiabt