LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   clicking on links in thunderbird e-mails, firefox can't handle php scripts (/questions/linux-software-2/clicking-on-links-in-thunderbird-e-mails-firefox-cant-handle-php-scripts-608243/)

mbvpixies78 12-20-2007 07:22 PM

clicking on links in thunderbird e-mails, firefox can't handle php scripts
 
When I click on links (particularly those for verifying my account's e-mail address, php scripts) it tries to open them in firefox but asks what application I want to use to open them, even though they're just web addresses to php scripts. How do I enable this for Mandriva thunderbird/firefox?

j-ray 12-21-2007 02:27 AM

the web server has to execute php scripts that usually send html coded data to the browser. Browsers themselves cannot execute php files. So you have to configure the server accordingly...

mbvpixies78 12-21-2007 03:12 PM

That's not enough information for someone at my level.

It sounds like you're saying the web servers are misconfigured, but that can't be the case for all of them and besides, it all worked fine in Windows. Do you instead mean that there's supposed to be a server set up on my computer in order to surf the net? This is news to me; how do I do this?

j-ray 12-22-2007 04:27 PM

you dont need a server to surf somewhere. but the most common way to run php scripts is to run them on a http server, i. e. apache with modular support for php.

but it seems i didnt get you right. if you are surfing the web you encounter misbehaviours of your browser firefox, that does not display php-based websites as expected but offers you to download and save them instead? So maybe it helps to change the preferences of firefox->content->look for php extensions or default values...

on what servers did this happen? strange...

mbvpixies78 12-22-2007 11:10 PM

Actually, it happened when I tried to click the e-mail link that said you'd replied to this thread. It happens with any link that's inside an e-mail in Thunderbird. Links work ok from inside Firefox (such as hotmail or webmail), but not at all in Thunderbird. If I click in Thunderbird, I get stuck in a loop of a pop-up asking what program to use (it at first wants to show me the source code), and if I click Firefox, it keeps asking what program to use.

louieb 12-23-2007 07:19 AM

Somewhere there is a place to specify preferred applications for browsing and email. In Ubuntu and Gnome its under System>Preferences>... Make sure thats set to Firefox.

Also on my Laptop for some odd reason a link in an email will only work if Firefox is already started.

mbvpixies78 12-23-2007 03:37 PM

I went into my Mandriva preferences and associated php files with Firefox, made Firefox my default browser and Thunderbird my default e-mail client and then a curious thing happened-- when I clicked on a link to linuxquestions.org's thread for this discussion, 'Untitled' windows endlessly opened in Firefox and wouldn't stop, like an endless loop. Firefox is set to restore previous sessions upon opening and the next time I opened it, the following errors were posted by the Firebug plug-in:

[Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: file:///usr/lib/firefox-2.0.0.11/components/nsSessionStore.js :: sss_saveState :: line 1749" data: no]
[Break on this error] oState.session = { state: ((this._loadState == STATE_RUNNING) ? STATE_RUNNIN...




This is the code to which the above error refers:



/**
* save state to disk
* @param aUpdateAll
* Bool update all windows
*/
saveState: function sss_saveState(aUpdateAll) {
// if crash recovery is disabled, only save session resuming information
if (!this._resume_from_crash && this._loadState == STATE_RUNNING)
return;

this._dirty = aUpdateAll;
var oState = this._getCurrentState();
oState.session = { state: ((this._loadState == STATE_RUNNING) ? STATE_RUNNING_STR : STATE_STOPPED_STR) };
this._writeFile(this._sessionFile, oState.toSource());
this._lastSaveTime = Date.now();
},

/**


I'm not sure if this is related or not.

FraGGod 12-23-2007 08:57 PM

Quote:

Originally Posted by mbvpixies78 (Post 2999946)
[Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: file:///usr/lib/firefox-2.0.0.11/components/nsSessionStore.js :: sss_saveState :: line 1749" data: no]
[Break on this error] oState.session = { state: ((this._loadState == STATE_RUNNING) ? STATE_RUNNIN...

Sounds like a JavaScript error in one of session handling plugins like tabmix, try turning it (and sessions) off, prehaps that'll help against opening windows.

As for downloading pages - look at the headers given to you by server (unfold first item under "Net" tab in Firebug) and look for "Content-Type" header. If it says "text/html" then the bug is in your browser which tries to download correctly-marked text for no reason. Prehaps thunderbird invokes it with some wrong command-line parameters?
I'd also recommend temporarily moving firefox' settings (in your home folder, inside ".mozilla") and trying the same sequence of actions. If the bug persists with clean firefox there's probably no point trying to fix it thru firefox' settings or by disabling extensions.

mbvpixies78 12-24-2007 04:44 PM

Quote:

Originally Posted by FraGGod (Post 3000135)
Sounds like a JavaScript error in one of session handling plugins like tabmix, try turning it (and sessions) off, prehaps that'll help against opening windows.

As for downloading pages - look at the headers given to you by server (unfold first item under "Net" tab in Firebug) and look for "Content-Type" header. If it says "text/html" then the bug is in your browser which tries to download correctly-marked text for no reason. Prehaps thunderbird invokes it with some wrong command-line parameters?
I'd also recommend temporarily moving firefox' settings (in your home folder, inside ".mozilla") and trying the same sequence of actions. If the bug persists with clean firefox there's probably no point trying to fix it thru firefox' settings or by disabling extensions.

Ok, here's something interesting:

the link to linuxquestions.org:

http://www.linuxquestions.org/questi...d.php?t=608243

results in an endless loop of opening tabs in Firefox if I click it in Thunderbird

however, the following link works fine when clicked in Thunderbird:

http://view.revolutionhealth-newsletter.com/?j=[series of letters and numbers]=[another series of letters and numbers]s=[a third series of letters and numbers]

but that's not all-- it looks like it's not even trying to go on the net to find this page because the address bar contains "file:///var/tmp/kdecache-[my username]/krun/27739.0.", a local file.


This time there were no errors reported relating to the endless window pop-ups (it stops if I close and re-open Firefox) but there was an error related to another link I tried (it said that w.focus was an empty variable)

here's the code it gave when I clicked on it...

Code:


//var showExitSurvey=true;
var w=null;
var TimetoPopup=60000;

window.onload=function(evt){
 
    var clockStart;
    var EnterPcomCK=get_cookie("EnterPcom");
 
    if (EnterPcomCK==""){
                //alert("Session cookie empty");
        var enter_pcom=new Date();
                clockStart=enter_pcom.getTime();
        SetCookie('EnterPcom', clockStart);
        //alert("Set Cookie with clockStart"+clockStart+" start timer");
        setTimeout("show_survey()",TimetoPopup);
                }
    else{
        var myTime = new Date();
                var timeNow = myTime.getTime(); 
                var timeDiff = timeNow - EnterPcomCK;

                if (timeDiff>TimetoPopup){
                        show_survey();
                }else{
                    //alert("start timer with bal" + ((TimetoPopup-timeDiff)/1000));
                        setTimeout("show_survey()",TimetoPopup-timeDiff);
                       
                }
               
           
        }
       
}

function show_survey(){
        //reset timer when popclosed
        var enter_pcom=new Date();
        clockStart=enter_pcom.getTime();
        SetCookie('EnterPcom', clockStart);       
       
        var loc=window.location.toString();
          var channelAry = new Array();
        channelAry=loc.split('/');
        //alert(channelAry[3]);
        channel=channelAry[3];
       
        var donesvy=get_cookie("DoneSurvey");
        if (donesvy!='Y')
        {
               
                var winl = (screen.width-369)/2;
                var wint = (screen.height-345)/2;
     
                //var w_prop='left='+winl+',top='+wint+',width=369,height=400,location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no';
               
                if (window.showModalDialog) {
                        //alert("IE open");
                        //window.showModalDialog('/includes/PopupSurvey/exit_survey.asp?channel='+channel,'popup survey','dialogWidth:345px;dialogHeight:350px;location:no;center:yes;help:no;status:no;scroll:no;');
                        w=window.open('/includes/PopupSurvey/site_survey.asp?channel='+channel,'_blank','left='+winl+',top='+wint+',height=350,width=345,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
                        w.focus();
                       
                } else {
                        w=window.open('/includes/PopupSurvey/site_survey.asp?channel='+channel,'_blank','left='+winl+',top='+wint+',height=300,width=345,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
                        w.focus();
                }
               
               
        }else{
                                //no pop up exit
        }
}



function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = "/";
//var path = (argc > 3) ? argv[3] : null;
//var domain = "";//(argc > 4) ? argv[4] : null;
//var secure = (argc > 5) ? argv[5] : false;
//alert (path);
//alert (domain);
//alert (expires);
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path));// +
//((domain == null) ? "" : ("; domain=" + domain)) ;
//((secure == true) ? "; secure" : "");
}


I tried a link from yahoo360 alerts and it said You are trying to open a binary file, would you like to save it? when all it is is a link that's supposed to take me to a new message in my account.

mbvpixies78 12-30-2007 09:57 PM

I downloaded PHP from php.net-- where do I install it?

digen 12-31-2007 01:39 AM

You do not have to have PHP installed in your machine to view PHP scripts which reside on a server. PHP is a server side scripting language and gets parsed in the server with the output sent to the browser.

Search for prefs.js file in the thunderbird directory ( should be /home/username/.mozilla/moziall-thunderbird )

What does the following setting have ?

Quote:

user_pref("network.protocol-handler.app.http", "/path/to/firefox");

mbvpixies78 01-02-2008 09:44 AM

Search for prefs.js file in the thunderbird directory ( should be /home/username/.mozilla/moziall-thunderbird )

What does the following setting have ?[/QUOTE]

I searched for prefs.js and of the many entries that came up, one was located at home/username/.thunderbird/zoj2mmv8.default/ and it didn't have an http entry, only an https:

Code:

user_pref("network.protocol-handler.app.https", "/usr/bin/xdg-open");
Am I supposed to add an http entry?

another located at user/lib/thinderbird*/defaults/profile comprises only commenting that says not to edit it


All times are GMT -5. The time now is 08:35 AM.