Unless you made a mistake while copying your modified line, a reverse slash is missing. The line should read:
" alt=\"We can not open $pathname\">");
i.e. the double quote before > must be escaped; otherwise the string is closed before >, > is considered a comparison operator and a new string opens with ); and terminates somewhere in subsequent lines.
All that results in a Perl syntax error, which you could confirm by displaying the web-server error log.
André
Last edit: Andre-Littoz 2016-04-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, modifying a live Perl script, i.e. one the web server has already interpreted and the browser already seen, is not that easy because it may reside in one cache or another.
Force the web server to recompile the modified script. The simplest way is to restart the server. For Apache, command is apachectl restart or apache2ctl restart depending on distribution. You may also use (Linux commands):
systemctl restart apache.service # for Apache
systemctl restart lighttpd.service # for lighttpd
Empty your browser cache so that the browser does not use a stale page. The procedure depends on the browser. For Firefox, menu Edit->Preferences, then Advanced tab and click the appropriate button.
After these steps, reload the page.
A symptom for out-of-balance behaviour (for browser+server) can be found in the browser error log: an error like page xxx did not send HTTP headers is an indication of a stale script.
Does that help?
Last edit: Andre-Littoz 2016-04-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I have LXR install at $lxr_root
and LXR libraries are located at $lxr_root/lib/LXR
For example:
In $lxr_root/lib/LXR/Markup.pm , we have this condition when LXR trying to open a graphic file;
*
Now if I wanna change the message , to "We can not open $pathname".
I modified Markup.pm code like:
" alt=\"We can not open $pathname">");*
and F5 the page, but it not work.
Could you please guide me how to make changes in $lxr_root/lib/LXR/$lib.pm to take affect.
Thank you so much.
Alex
Hi,
Unless you made a mistake while copying your modified line, a reverse slash is missing. The line should read:
i.e. the double quote before > must be escaped; otherwise the string is closed before >, > is considered a comparison operator and a new string opens with ); and terminates somewhere in subsequent lines.
All that results in a Perl syntax error, which you could confirm by displaying the web-server error log.
André
Last edit: Andre-Littoz 2016-04-05
Hi
The original sentence is look like this:
. " alt=\"No access to $pathname or browser cannot display this format\">");
Even if I just add a word in the middle , just like:
. " alt=\"No access or permission to $pathname or browser cannot display this format\">");
It still not work.
Thank you.
Alex
Well, modifying a live Perl script, i.e. one the web server has already interpreted and the browser already seen, is not that easy because it may reside in one cache or another.
Force the web server to recompile the modified script. The simplest way is to restart the server. For Apache, command is
apachectl restart
orapache2ctl restart
depending on distribution. You may also use (Linux commands):Empty your browser cache so that the browser does not use a stale page. The procedure depends on the browser. For Firefox, menu
Edit
->Preferences
, thenAdvanced
tab and click the appropriate button.After these steps, reload the page.
A symptom for out-of-balance behaviour (for browser+server) can be found in the browser error log: an error like page xxx did not send HTTP headers is an indication of a stale script.
Does that help?
Last edit: Andre-Littoz 2016-04-05
Hi.
It worked.
Thank you for your help.
Alex