Issues

ZF-7091: "scripts/load.sqlite.php" is missing "set_include_path"

Issue Type: Docs: Problem Created: 2009-06-22T19:40:51.000+0000 Last Updated: 2010-07-22T05:43:02.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)

Reporter: Chris G (swanpoint) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments: - bug_slq_load.jpg

Description

The code sample for "scripts/load.sqlite.php" requires:

<pre class="highlight">
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(dirname(__FILE__) . '/../library'),
    get_include_path(),
)));

... before the "require_once 'Zend/Application.php';" statement (line 20) in order to work (like "public/index.php" does)

http://framework.zend.com/docs/quickstart/…

thanks for all the hard work!

Comments

Posted by Ryan Schmidt (ryandesign) on 2009-08-16T21:54:16.000+0000

This issue has also been reported in the first part of issue #7401. The solution given there uses:

set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), )));

This seems a better solution than the one given in this ticket, as it makes use of the existing APPLICATION_PATH constant and doesn't compute its value a second time.

Posted by Matthew Weier O'Phinney (matthew) on 2009-08-25T05:04:56.000+0000

Fixed in ZF website sources; will release with 1.9.2 today

Posted by Soomy (soomy) on 2009-08-28T09:00:41.000+0000

A screenshot of the code

Posted by Soomy (soomy) on 2009-08-28T09:06:35.000+0000

It's not really working with 1.9.2 on Wamp/Windows :( ; see the error below :


DOS> C:\wamp\www\Zend\quickstart>php scripts/load.sqlite.php --withdata

Warning: require_once(Zend/Loader/Autoloader.php): failed to open stream: No such file or directory in C:\wamp\www\Zend\quickstart\scripts\load.sqlite.php on line 15

Fatal error: require_once(): Failed opening required 'Zend/Loader/Autoloader.php ' (include_path='C:\wamp\www\Zend\quickstart\application/../library;.;C:\php5\pear') in C:\wamp\www\Zend\quickstart\scripts\load.sqlite.php on line 15

The include_path in the php.ini is correct ( include_path = ".;c:\wamp\www\Zend\library" ) . Is it really fixed ?

Posted by neo lafarga (kurapikats) on 2009-10-01T19:24:57.000+0000

up to now, this is still a problem im using Zend Framework Version: 1.9.3PL1 with php5.3.0 i also included the library path to php.ini's include_path

tried it on wampserver and xampp. :(

but it still generate error: -> Warning: require_once(Zend/Loader/Autoloader.php): failed...

Posted by mani (leecretive) on 2010-07-22T05:43:01.000+0000

Hi

I have download latest version of Zend Framework 1.10.6 and try to configure but getting error as below:

C:\xampp\htdocs\quickstart>php scripts/load.sqlite.php --withdata

Warning: require_once(zend/Loader/Autoloader.php): failed to open stream: No suc h file or directory in C:\xampp\htdocs\quickstart\scripts\load.sqlite.php on lin e 13

Fatal error: require_once(): Failed opening required 'zend/Loader/Autoloader.php ' (include_path='C:\xampp\htdocs\quickstart\application/../library;ô.') in C:\xa mpp\htdocs\quickstart\scripts\load.sqlite.php on line 13

The include_path in the php.ini is (include_path = ".;C:\xampp\htdocs\zend\library\;C:\xampp\php\PEAR")

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts