LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-20-2007, 07:22 PM   #1
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Rep: Reputation: 15
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?
 
Old 12-21-2007, 02:27 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,419

Rep: Reputation: 99
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...
 
Old 12-21-2007, 03:12 PM   #3
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
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?
 
Old 12-22-2007, 04:27 PM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,419

Rep: Reputation: 99
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...
 
Old 12-22-2007, 11:10 PM   #5
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
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.
 
Old 12-23-2007, 07:19 AM   #6
louieb
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu 8.04
Posts: 94

Rep: Reputation: 17
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.
 
Old 12-23-2007, 03:37 PM   #7
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
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.

Last edited by mbvpixies78; 12-23-2007 at 03:39 PM.
 
Old 12-23-2007, 08:57 PM   #8
FraGGod
Member
 
Registered: Jun 2007
Location: Yekaterinburg, RU
Distribution: gentoo
Posts: 59

Rep: Reputation: 16
Quote:
Originally Posted by mbvpixies78 View Post
[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.

Last edited by FraGGod; 12-23-2007 at 09:01 PM.
 
Old 12-24-2007, 04:44 PM   #9
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by FraGGod View Post
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.

Last edited by mbvpixies78; 12-24-2007 at 04:47 PM.
 
Old 12-30-2007, 09:57 PM   #10
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
I downloaded PHP from php.net-- where do I install it?
 
Old 12-31-2007, 01:39 AM   #11
digen
Member
 
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
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");
 
Old 01-02-2008, 09:44 AM   #12
mbvpixies78
Member
 
Registered: Nov 2007
Location: IL
Distribution: CentOS 6 & Fedora 17
Posts: 179
Blog Entries: 3

Original Poster
Rep: Reputation: 15
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

Last edited by mbvpixies78; 01-02-2008 at 09:46 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost links between Firefox and Thunderbird Paraply Linux - Newbie 2 07-17-2007 09:19 PM
I did some php scripts on Linux. Tested on linux's firefox and konquerer...but... StevenO General 1 02-23-2006 11:33 AM
Links in Thunderbird do not open Firefox on KDE chakatz Linux - Software 4 01-08-2006 09:31 AM
Clicking on links in Thunderbird doesn't pop up a browser window Valhalla Linux - Software 6 04-19-2005 08:24 PM
Handling Links with Firefox, Thunderbird, and Gaim apachedude Linux - Software 1 02-11-2005 08:07 AM


All times are GMT -5. The time now is 04:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration