Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Zend Fatal error: require_once() [function.require]:


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 8 - Last Post: Jun 20, 2014 9:57 PM Last Post By: Leif Kåre Lende
Carlini Dante

Posts: 4
Registered: 5/15/13
Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2013 6:05 AM
Hello,

I use Zend Authentication with DB and session_start();

If I run on local server with HTML5 Builder it's OK.

When I use the remote Hosting server I have this error:

Warning: require_once(Zend/Session/Abstract.php) [function.require-once]: failed to open stream: No such file or directory in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Session/Abstract.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Can you help me?

Thanks, Stefano
Paulo Roberto S...

Posts: 3
Registered: 12/28/12
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2013 7:44 AM   in response to: Carlini Dante in response to: Carlini Dante
Hello.

I see what happens, i created a blank page with a ZendAuth inside it and i saw that some path's when deploying are incorrect.

I corrected the path's and created a zip containing the files that i modified inside their folders.

You just have to deploy your project, then, extract my zip inside the RPCL folder of your deployed project, windows will prompt for overwrite existing files and folders, click yes to all.

Here you are the fix.

http://sdrv.ms/1dNz50F

If you have any question ask me.

See ya
Carlini Dante

Posts: 4
Registered: 5/15/13
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2013 9:38 AM   in response to: Paulo Roberto S... in response to: Paulo Roberto S...
Paulo Roberto Silva Rosa wrote:
Hello.

I see what happens, i created a blank page with a ZendAuth inside it and i saw that some path's when deploying are incorrect.

I corrected the path's and created a zip containing the files that i modified inside their folders.

You just have to deploy your project, then, extract my zip inside the RPCL folder of your deployed project, windows will prompt for overwrite existing files and folders, click yes to all.

Here you are the fix.

http://sdrv.ms/1dNz50F

If you have any question ask me.

See ya

Thanks, but

I have deploy, overwrite and transfer the files, but I have the same error.

Warning: require_once(Zend/Session/Abstract.php) [function.require-once]: failed to open stream: No such file or directory in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Session/Abstract.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Probably there are other problems with paths.
Paulo Roberto S...

Posts: 3
Registered: 12/28/12
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2013 11:07 AM   in response to: Carlini Dante in response to: Carlini Dante
You can't have the same problem because i have sure that this is the problem, i fixed it here the same way that i told you.

You are doing something wrong, or i misspelled some folders. But the error is the path.

Listen, look the Zend folder that have inside the zip.
You will see that you have 3 files into folders:

-> Session.php that are on the library folder.
-> Session.php that are on the Storage folder.
-> Namespace.php that are on the Session folder.

Ok, then, deploy your project. Open the rpcl folder of your Deployed project. Search the same files at the same places, see if you can find them, if yes, open them and compare with mine files, you will see that the path's are different.

Mine files have the correct path, so change your files to the correct path. Then, if you run again your page you CANNOT have the same error, its impossible.

If you Impossibly got the same error, then your page are not getting the correct Zend, then you will need to find where is the Zend that your page are using and change the path's to mine path's. Then everything need to work.

Good luck.
See ya
Carlini Dante

Posts: 4
Registered: 5/15/13
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2013 2:06 AM   in response to: Paulo Roberto S... in response to: Paulo Roberto S...
Paulo Roberto Silva Rosa wrote:
You can't have the same problem because i have sure that this is the problem, i fixed it here the same way that i told you.

You are doing something wrong, or i misspelled some folders. But the error is the path.

Listen, look the Zend folder that have inside the zip.
You will see that you have 3 files into folders:

-> Session.php that are on the library folder.
-> Session.php that are on the Storage folder.
-> Namespace.php that are on the Session folder.

Ok, then, deploy your project. Open the rpcl folder of your Deployed project. Search the same files at the same places, see if you can find them, if yes, open them and compare with mine files, you will see that the path's are different.

Mine files have the correct path, so change your files to the correct path. Then, if you run again your page you CANNOT have the same error, its impossible.

If you Impossibly got the same error, then your page are not getting the correct Zend, then you will need to find where is the Zend that your page are using and change the path's to mine path's. Then everything need to work.

Good luck.
See ya

Thanks, I have sent you a private message.
Paulo Roberto S...

Posts: 3
Registered: 12/28/12
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 20, 2013 3:37 AM   in response to: Carlini Dante in response to: Carlini Dante
Have you solved your problem ?

Please, tell me if you find the solution, im intrigued about your issue, i would like to see the solution when you get it :)

See ya.
Carlini Dante

Posts: 4
Registered: 5/15/13
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 19, 2013 9:11 AM   in response to: Paulo Roberto S... in response to: Paulo Roberto S...
Paulo Roberto Silva Rosa wrote:
Have you solved your problem ?

Please, tell me if you find the solution, im intrigued about your issue, i would like to see the solution when you get it :)

See ya.

Hello.

I haven't solve the question.

I decided to follow your suggestion:

"Why dont you use a BasicAuthentication instead of a ZendAuthentication ?"

Thanks
Martin Rhinow

Posts: 1
Registered: 8/7/09
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 28, 2014 11:25 PM   in response to: Carlini Dante in response to: Carlini Dante
I have the same problem and used the ZIP to replace deployed Zend files but there is still this error. In my case:

Strict Standards: Declaration of CustomTable::dumpHiddenKeyFields() should be compatible with Component::dumpHiddenKeyFields($force = false) in /volume1/web/qsef2neu/rpcl/dbtables.inc.php on line 0
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in /volume1/web/qsef2neu/rpcl/Zend/framework/library/Zend/Session.php on line 28
Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.') in /volume1/web/qsef2neu/rpcl/Zend/framework/library/Zend/Session.php on line 28
Leif Kåre Lende

Posts: 2
Registered: 11/13/99
Re: Zend Fatal error: require_once() [function.require]:  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2014 1:30 PM   in response to: Carlini Dante in response to: Carlini Dante
Carlini Dante wrote:
Hello,

I use Zend Authentication with DB and session_start();

If I run on local server with HTML5 Builder it's OK.

When I use the remote Hosting server I have this error:

Warning: require_once(Zend/Session/Abstract.php) [function.require-once]: failed to open stream: No such file or directory in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Session/Abstract.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/oehbxfhw/public_html/rpcl/Zend/framework/library/Zend/Session.php on line 28

Can you help me?

Thanks, Stefano

Hello Stefano
When I was working to solve the same problem for my own application, I discovered that the Zend library is pretty messy in the way it links to other files. For example: Zend/Session.php located in the directory Zend/Framework/Library/Zend is linked to from a file located in the same directory as follows: require_once(Zend/Session.php) instead of the natural would be require_once(Session.php). For some php versions on Linux machines, this will lead to such errors that you have got. The solution is to set up php include libraries so that the correct files are found. Some other people have given you some suggestions, but they do not capture the exact error you get. If we assume that your Zend library is located in the directories /www/rpcl/Zend/, then you need to supplement the value of include_path in php.ini, as follows:
include_path = ".:../:/www:/www/rpcl/Zend/framework/library:/www/rpcl:/www/rpcl/PEAR"
When you do so, the entire Zend library is working fine in the original edition without having to change any of the files.

The most important part is actually getting the ../ as one of the include directories. On some servers it is also important to separate the directories with : instead of ; .

Another deficiency with Html5 builder is that it not always copies all necessary files from the Zend framework, when you deploy. I have found it advisable to copy the entire Zend directory from C:\Program Files (x86)\Embarcadero\HTML5 Builder\5.0\rpcl over to the /www/rpcl directory on the hosting Web server.

By the way, if your hosting server is a shared host, you may not have access to php.ini. But hopefully you have the possibility to put a .user.ini file into your /www directory. Then you can put the include_path directive into that file. The file may have another name, but you can figure out the name by looking up user_ini.filename in php.ini. Use phpinfo() to find it in the 'Local value' section of the output from phpinfo().

Leif K

Edited by: Leif Kåre Lende on Jun 20, 2014 1:32 PM

Edited by: Leif Kåre Lende on Jun 20, 2014 1:39 PM

Edited by: Leif Kåre Lende on Jun 20, 2014 9:50 PM

Edited by: Leif Kåre Lende on Jun 20, 2014 9:56 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02