Nicoleta Malancea
Nicoleta Malancea

Reputation: 39

How to correctly add the ZendFramework to the php.ini file?

The ZendFramework is uploaded in C:\phpincludes\ZendFramework

I added the ZendFramework library to the php.ini file:

Windows: "\path1;\path2"
include_path = ".;c:\phpincludes\ZendFramework\library"

and then I am calling these functions at the top of my index.php:

<?php
require_once('Zend/Mail.php'); 
require_once('Transport/Smtp.php'); 
?>

I get an error saying require_once(Zend/Mail.php): failed to open stream.

Upvotes: 1

Views: 1499

Answers (2)

Biswajit Maji
Biswajit Maji

Reputation: 889

Also check if ".;c:\phpincludes\ZendFramework\library" directory has correct access permission.

Upvotes: 1

mkdevoogd
mkdevoogd

Reputation: 136

Your include path appears to be correct. Are your sure you have edited the correct php.ini file and have your restarted your webserver / apache service (otherwise the changes aren't applied)?

You can check your include path in PHP to make sure it is loaded correctly using:

echo get_include_path();

Upvotes: 1

Related Questions