1
votes

Look the code

echo get_include_path().'<br/>';
echo set_include_path( '/home/testserver/public_html/development/library' );

i have two test.php files containing above code only. one on main server, and one on subdomain on main server it is running fine but on subdomain it is notrunning and giving error Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 351121536 bytes) in Unknown on line 0

and if i print memory taken using memory_get_usage(), then it is printing between 3-5 MB.

my php.ini setting are. memory_limit = 32M

what may be the reason, any idea ?

Please help !

1
At some time in your script it maybe use more memory than 32MB. Try to increase the memory limit and se if it works better. - blaff
are you sure that you executing right file? if you are using ZF then there is htaccess file i guess maybe that did something? - Vytautas
right now i am using simple test.php files, not related to zend. one file on main server and one file on subdomain. - Bhoopesh Pathak

1 Answers

0
votes

Changing the include path would not cause the system to try an allocate more than 133 Mb of memory which is a VERY large default allocation. That your system needs more than 350Mb implies there's something very unique about your system.

containing above code only ... if i print memory taken using memory_get_usage()

So the code you've shown is not the only code in the file?

Leaving that aside - read the error message. It ocurs at line 0 of unknown - so PHP hasn't even got as far as working out what script it needs to process - there's something very broken in your PHP config - is the PHP being invoked via CGI? mod_php? Fast CGI? Looks like it is trying to load the wrong extensions / parse something which is not CGI data.