Search the Community
Showing results for tags 'php cli'.
Hello, I'm new on this forum. I'm an amateur and intermediate web developer. English is not my mother tongue, so I apologize for all the mistakes I'll make in my messages! I've been reading chapter 12, 'PHP's Command-Line Interface' and have had no problem reproducing the different scripts. But now I'm trying to apply what I've learnt to other PHP scripts, and I've run into a fatal error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 70517676 bytes) in some_file.php on line 7 Line 7 is the following: $clean_file = str_replace('some_string', '', $file); I first tested my script on a small html file, so I know the script in itself works. The html file I'm now using is quite big (70 Mo)… and there's worse to come (300 Mo)! Should i modify the configuration file called php-config in /usr/bin in order to avoid this fatal error? If so, how can I change it? I tried to open it in my text editor, but it appears as a Unix executable file. Or is this one of the cases where I should change the php.ini behavior with the -d option? If so, what change should I make? With thanks for your help, Emilie