|
|||
|
Can this database error be sorted via the php.ini settings?
when i used the require-once function: Code:
Warning: require_once(library/ccccc.php) [function.require-once]: failed to open stream: No such file or directory in /home/****/public_html/include/rrrrr.php on line 2 Fatal error: require_once() [function.require]: Failed opening required 'library/ccccc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/****/public_html/include/rrrrr.php on line 2 Code:
Warning: include(library/ccccc.php) [function.include]: failed to open stream: No such file or directory in /home/****/public_html/include/rrrrr.php on line 2 Warning: include(library/ccccc.php) [function.include]: failed to open stream: No such file or directory in /home/****/public_html/include/rrrrr.php on line 2 As from the blue text the path '.:/usr/lib/php:/usr/local/lib/php' is already set in php.ini. So thats fine. 'allow_url_fopen = On' should also be set The files are already in the required folders. What i've actually did was copy the same shopping cart for the trade side to an extra one for the retail side with little changes. I've a feeling that if it works fine for the trade side then the php.ini is already set fine so that means i'll have to do it all from scratch. i think. Big job. Now i hate this error. I am using this to debug: PHP Code:
Is there another way for me to sort this. Is there a shorter debug that will pinpoint the problem? |
|
|||
|
Thanks for trying to help. After working on this for a few hours i have tried all:
require_once() require() include() All these codes have displayed the errors but for the include() which displayed the errors and info i was looking to display without the errors. However, for this reason i used the include(), turned display errors off, and rewrote a little if statement code to allow an email sent. This seemed to be the easy way out as everything has run smoothly without a little problem. We all know that the include() bypasses the error and executes the rest of the code. We also know that its not the best solution as the error is still there, hiding away from our view. I will go back to this error and try and sort it once i'm not too busy....as i've a pile of work to do. From your post note you mentioned: Quote:
|
|
||||
|
The required_once() statement replaces itself with the specified file, much like the C preprocessor's #include works, and in that respect is similar to the required() statement. The main difference is that in an inclusion chain, the use of required_once() will assure that the code is added to your script only once, and avoid clashes with variable values or function names that can happen.
It is advised that you always put the complete URL in the require_once() perimeter ("http://www.yoursite.com/examplepage.php" and not just "examplepage.php") because URLs build on eachother based on their current location. If you put the entire URL in the perimeters, then the code will know exactly where to look for what code to carry over. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|