Answer the question
In order to leave comments, you need to log in
PHP not handling require?
[Wed Jun 22 13:13:41 2011] [error] [client 82.207.46.177] PHP Warning: require_once() [<a href="http://function.require-once">function.require-once</a>]: URL using bad/illegal format or missing URL in /data/domains/dev2.random.net.ua/public_html/classes/smarty/smarty.class.php on line 799<br/>
[Wed Jun 22 13:13:41 2011] [error] [client 82.207.46.177] PHP Warning: require_once(/data/domains/dev2.random.net.ua/public_html/classes/smarty/sysplugins/smarty_internal_template.php) [<a href="http://function.require-once">function.require-once</a>]: failed to open stream: operation failed in /data/domains/dev2.random.net.ua/public_html/classes/smarty/smarty.class.php on line 799<br/>
[Wed Jun 22 13:13:41 2011] [error] [client 82.207.46.177] PHP Fatal error: require_once() [<a href="http://function.require">function.require</a>]: Failed opening required '/data/domains/dev2.random.net.ua/public_html/classes/smarty/sysplugins/smarty_internal_template.php' (include_path='.:/opt/csw/php5/lib/php/') in /data/domains/dev2.random.net.ua/public_html/classes/smarty/smarty.class.php on line 799
function smartyAutoload($class)<br/>
{<br/>
$_class = strtolower($class);<br/>
if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') {<br/>
print SMARTY_SYSPLUGINS_DIR . $_class . '.php';<br/>
require_once(SMARTY_SYSPLUGINS_DIR . $_class . '.php');//Строка 799<br/>
}<br/>
}
/data/domains/dev2.random.net.ua/public_html/classes/smarty/sysplugins/smarty_internal_data.php<br/>
/data/domains/dev2.random.net.ua/public_html/classes/smarty/sysplugins/smarty_internal_template.php
Answer the question
In order to leave comments, you need to log in
In the smartyAutoload() function, replace require_once() with require(). You include a class inside a function, which means that all the code that is in the included file will be defined only inside this function.
The thought is that the absolute path SMARTY_SYSPLUGINS_DIR is incorrectly specified. Type the path for the current
__FILE__ file
- you can use it to clarify what is wrong.
/data/domains/dev2.random.net.ua/public_html/classes/smarty/sysplugins/smarty_internal_data.php
Here is an interesting version www.rsdn.ru/forum/web/2930077.flat.aspx
The point
is that there is not enough memory for PEAR, and strange glitches follow. Try a clean option - make a simple script where you just include PEAR, and then include another file.
Does a clean file of this kind
require_once('/data/domains/dev2.random.net.ua/public_html/classes/smarty/smarty.class.php');
work?
Check the read permissions in the parent directories, this may be the problem. And yes, apc.stat = 0 sometimes caches tightly.
If there is not much code, you can try to merge everything into one file and conduct a visual revision. Or just track where (after which command) it starts to fail.
There is such an elusive bug: http://bugs.php.net/bug.php?id=48837
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question