Asked by duncanb7
at 2024-05-20 04:57:25
Point:500 Replies:10 POST_ID:828507USER_ID:11059
Topic:
PHP Scripting Language;;Linux
Dear Expert,
I get one simple php script test and program on my Linux shell command line
like myuser@mydomain/public_html/php myprogram.php , and I got the fatal error
out of memory (allocated 8388608)(tried to allocated 71 byte) in /home/mydomain/public_html/myprogram.php
But interesting that is if I run it in IE browser, it works succesfully
Running it in IE, it will echo memory usage=8,588,338 when $c<50,000, so i means it run succesfully at http://mydomain.com/myprogram.php
Runing it in IE ,it will echo memory usage=41,000,000 when $c<200,000, so it means it run sucessfully at http://mydomain.com/myprogram.php
Running it in Linux command line, it won't echo memory usage, and it stdout the
Fatal error:out of memory (allocated 8388608)(tried to allocated 71 byte) in /home/mydomain/public_html/myprogram.php
on line 4.
so it won't run correctly.
If it can run in IE for the same script, it means the probelm is not issue at memory_limt setting in php system and the script shoud cost less than
41Meg when $c<50,000. And running it in IE , it is no issue for 41Meg memory when $c <200,000
I talked to my share-server company support, they replied and confirmed and I checked my php memory limit is 128Meg already
The issue they reply that might be PHP version is not set correctly in my script, myprogram.php if running it at command line shell.
Do you agree that ?
How can I set correct PHP version in php script ? I think that issue is not related to memory_limit setting and PHP version
setting, it might relate to they might limit my php script running at command line, but no limit when run it in IE broswer
I go to check it in Cpanel for php configurate, memory_limt is 128Meg already and
I go to check it in phpinfo() in Linux php script, it also report 128meg already and
I go to check ,htaccess file, php_value memory_limit 128M is also set already
So the issue is related to what ? memory allocation issue at command line or others ?
Please advise
Duncan
I get one simple php script test and program on my Linux shell command line
like myuser@mydomain/public_html/php myprogram.php , and I got the fatal error
out of memory (allocated 8388608)(tried to allocated 71 byte) in /home/mydomain/public_html/myprogram.php
But interesting that is if I run it in IE browser, it works succesfully
Running it in IE, it will echo memory usage=8,588,338 when $c<50,000, so i means it run succesfully at http://mydomain.com/myprogram.php
Runing it in IE ,it will echo memory usage=41,000,000 when $c<200,000, so it means it run sucessfully at http://mydomain.com/myprogram.php
Running it in Linux command line, it won't echo memory usage, and it stdout the
Fatal error:out of memory (allocated 8388608)(tried to allocated 71 byte) in /home/mydomain/public_html/myprogram.php
on line 4.
so it won't run correctly.
If it can run in IE for the same script, it means the probelm is not issue at memory_limt setting in php system and the script shoud cost less than
41Meg when $c<50,000. And running it in IE , it is no issue for 41Meg memory when $c <200,000
I talked to my share-server company support, they replied and confirmed and I checked my php memory limit is 128Meg already
The issue they reply that might be PHP version is not set correctly in my script, myprogram.php if running it at command line shell.
Do you agree that ?
How can I set correct PHP version in php script ? I think that issue is not related to memory_limit setting and PHP version
setting, it might relate to they might limit my php script running at command line, but no limit when run it in IE broswer
I go to check it in Cpanel for php configurate, memory_limt is 128Meg already and
I go to check it in phpinfo() in Linux php script, it also report 128meg already and
I go to check ,htaccess file, php_value memory_limit 128M is also set already
So the issue is related to what ? memory allocation issue at command line or others ?
Please advise
Duncan