Hello,
I wrote a little script to change the setting in my /usr/local/etc/php.ini file
When I try to run it, Iget the following error:
Could someone please help me out?
I wrote a little script to change the setting in my /usr/local/etc/php.ini file
Code:
#!/bin/sh
#
INIFILE="/usr/local/etc/php.ini"
perl -p -i -e '
s/.*memory_limit.*/memory_limit = 32M/;
s/.*upload_max_filesize.*/upload_max_filesize = 3M/;
s/.*post_max_size.*/post_max_size = 2M/;
s/.*cgi.fix_pathinfo.*/cgi.fix_pathinfo = 0/;
s/.*disable_functions.*/disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority/;
s/.*expose_php.*/expose_php = Off/;
s/.*max_execution_time.*/max_execution_time = 30/;
s/.*max_input_time.*/max_input_time = 60/;
s/.*display_errors.*/display_errors = Off/;
s/.*file_uploads.*/file_uploads = On/;
s/.*upload_max_filesize.*/upload_max_filesize = 2M/;
s/.*allow_url_include.*/allow_url_include = Off/;
s/.*;date.timezone.*/date.timezone = Europe/London/;
' "$INIFILE"
Code:
Unknown regexp modifier "/L" at -e line 14, at end of line
Unknown regexp modifier "/n" at -e line 14, at end of line
Unknown regexp modifier "/n" at -e line 14, at end of line
syntax error at -e line 14, near "/;"
Execution of -e aborted due to compilation errors.
Could someone please help me out?