| View previous topic :: View next topic |
| Author |
Message |
antigone7
Joined: 29 Feb 2008 Posts: 5
|
Posted: Sat Mar 01, 2008 3:36 am Post subject: Solved: opening saved php files |
|
|
Hi,
This is my first post even though I've read quite a bit at this forum. I've been using nvu/kompozer for about 2 years now in linux.
I've recently started using php includes for navigation, and I'm not really sure I understand from reading here how php works with kompozer. I can make the includes and save the previous html pages as php pages, and everything works great.
However, when I try to open to edit the php pages (the full pages with the includes, not the ones with only the nav code), kompozer opens a window asking me what I want to use to open the php file (It suggests kwrite.) If I rename from page.php to page.php.html , it will open so I can edit it.
Is this what I have to do to all my pages with a php extension - rename them as .html so I can edit with kompozer again?
Thanks for your help!
Last edited by antigone7 on Thu Mar 06, 2008 3:08 am; edited 1 time in total |
|
| Back to top |
|
 |
wink0r
Joined: 28 Aug 2007 Posts: 422 Location: East Coast - USA
|
Posted: Sat Mar 01, 2008 4:51 am Post subject: |
|
|
| I can't really answer your question, but under Windows I have no problem opening .php pages to edit. I am not a Linux user so have no experience with that OS. I would not think that there would be a problem, though. |
|
| Back to top |
|
 |
antigone7
Joined: 29 Feb 2008 Posts: 5
|
Posted: Sat Mar 01, 2008 5:44 am Post subject: |
|
|
Thanks, but I thought I should be able to open php files, but I can't.
I have kompozer 0.7.10 installed on 2 different computers now.
I click File > Open File and navigate to the folder with the web files. I click the drop down to choose All files (*) and select file.php. Then I get a pop up that says:
| Quote: | You have chosen to open file.php which is a: PHP script from: /path/file.php
What should KompoZer do with this file?
Open with kwrite (default)
Save to disk
Do this automatically every time. |
Note: the screen image I get is the same as this one in the ubuntu forum:
http://ubuntuforums.org/showthread.php?t=623712
The Open with is a drop down with 2 choices kwrite and other. If I choose Other and then select /usr/bin/kompozer which is where kompozer is installed, it just opens the kompozer profile manager and tells me an instance of kompozer is open, and so it can't use the default profile.
How can I associate php files with kompozer?
Thank you! |
|
| Back to top |
|
 |
tri2pleez
Joined: 02 Mar 2008 Posts: 3 Location: Portland, OR
|
Posted: Sun Mar 02, 2008 8:04 am Post subject: PHP files don't open on the mac os |
|
|
I've had the same problem antigone7. I have clients that want to update their website after I've built it. I thought having them download Kompozer would have been the solution, but I build my sites in dreamweaver with PHP scripts and extentions and if they were to try to open these files in Kompozer for Mac, they couldn't. Does anyone know a way around this? According to the person who answered your question antigone7, I guess Kompozer for windows does not have this problem. That is good news, but I can't confirm that, because I am on a mac. Can anyone else confirm that php files can be opened in Kompozer? I tried changing the extention to .html to see how the program worked and I learned quickly that you don't do that. Kompozer changes the code on your file and deletes the PHP scripts if you do that. So, you can not change the ectention and changes it back to .php it would ruin your file. _________________ Stephen |
|
| Back to top |
|
 |
BobCP Moderator
Joined: 26 May 2007 Age: 62 Posts: 492 Location: Connecticut
|
|
| Back to top |
|
 |
tri2pleez
Joined: 02 Mar 2008 Posts: 3 Location: Portland, OR
|
Posted: Sun Mar 02, 2008 5:52 pm Post subject: Opening PHP Files |
|
|
Thank you Bob CP, at very least we now have confirmed opening PHP files works on Windows. Most of my clients use windows, so they will be able to use Kompozer for changing content and images on their own and for free. I will suggest they donate because I think it is amazing that someone would make such a complicated program open-source aka free. I will keep using Dreamweaver though, because I need the extra features it has to build the sites for my clients. _________________ Stephen |
|
| Back to top |
|
 |
antigone7
Joined: 29 Feb 2008 Posts: 5
|
Posted: Tue Mar 04, 2008 7:24 pm Post subject: |
|
|
Hi,
Does anyone know the answer to my question about php files in kompozer in linux?
Thanks! |
|
| Back to top |
|
 |
tri2pleez
Joined: 02 Mar 2008 Posts: 3 Location: Portland, OR
|
Posted: Tue Mar 04, 2008 11:03 pm Post subject: |
|
|
sorry antigone7, i do not. i'm hoping that if someone does, it is a similar solution to Mac os as well, because if I need to consult any of my clients on php files with Kompozer, I can not, I still have to use Dreamweaver. _________________ Stephen |
|
| Back to top |
|
 |
ajy0852
Joined: 26 May 2007 Posts: 25 Location: Oregon
|
Posted: Wed Mar 05, 2008 1:27 am Post subject: |
|
|
Sorry I can't help more, but I'm using Kompozer 0.7.10 on Ubuntu 7.10 and I have no problems opening PHP files!
I am using the NSM context extension and Handcoder as well. I don't know if this would make a difference.
I think Kompozer creates a temporary hidden html file for editing when you open a PHP file. There's a post in the Kompozer Development section somewhere about that. |
|
| Back to top |
|
 |
antigone7
Joined: 29 Feb 2008 Posts: 5
|
Posted: Wed Mar 05, 2008 2:46 am Post subject: |
|
|
| ajy0852 wrote: | | I am using the NSM context extension and Handcoder as well. I don't know if this would make a difference. |
Can you please tell me what NSM is? Also where do I find Handcoder? I can only find Tidy and it has a .tgz with 2 files in it but they aren't extension files and there are no instructions for installation in linux that I can find.
I have kompozer installed on 3 systems right now and get the same error when trying to open php. I have downloaded kompozer again and reinstalled, and there is no change. Two of my systems are Mepis 7 based on Debian Etch and one is Mepis 6.5 which is based on Ubuntu Dapper.
Thank you. |
|
| Back to top |
|
 |
ajy0852
Joined: 26 May 2007 Posts: 25 Location: Oregon
|
Posted: Thu Mar 06, 2008 2:32 am Post subject: |
|
|
The extensions and some information about them can be found at http://fabiwan.kenobi.free.fr
Tidy is not an extension, it's just a simple program to clean up your html files (basically just indenting nicely) and it is called by the Handcoder extension. I always have trouble finding the most up-to-date version of Tidy. It's just an executable file, nothing to install really, I just put it in my ~/.kompozer folder.
Again, I can't promise this has anything to do with me being able to open PHP files, I wish I knew a ltitle more about what I am doing......... good luck! |
|
| Back to top |
|
 |
antigone7
Joined: 29 Feb 2008 Posts: 5
|
Posted: Thu Mar 06, 2008 3:06 am Post subject: |
|
|
ajy0852,
I just want you to know that you're my hero today!!
Thanks so much for the page link for Handcoder and NSM. I had seen that page a long time ago, but just couldn't find that page this time. (I found others though.) Anyway I think it is the NSM extension that allows php editing because I had tried Handcoder before.
For those who need to know the extension is installed by:
To install on Nvu:
* choose your language above
* save the extension on your hard drive (save link target as...)
* launch Nvu
* Tools > Extensions > install
* close and relaunch Nvu |
|
| Back to top |
|
 |
bodhirayo
Joined: 04 Jun 2008 Posts: 1
|
Posted: Sun Jun 08, 2008 6:12 pm Post subject: How to open a PHP file with KompoZer under Windows |
|
|
A tip of the hat to Ralpharama for posting the FireFox hint that led to this solution.
Need:
Some of my web clients want to be able to make simple updates to their web pages without my help. The (most excellent) program of choice for this task is KompoZer.
For most of my clients I use PHP includes to implement the nav bar links in the page header and footer. So their web pages are primarily html, with one or two PHP include statements.
Problem:
KompoZer, without extensions, under Windows, may fail to open PHP files if the PHP file type has a registered association under Windows when KompoZer is installed.
If you install Kazé’s HandCoder and NsmConText extensions, KompoZer will then open PHP files, but replaces any unicode characters with "?" and makes some other curious reformatting changes.
A Solution:
As already pointed out by antigone7 above, simply renaming the file from, for example, home.php to home.htm, will do the trick. KompoZer opens the file as an HTML file, no problem. It is a bit of a hassle for the user though, since they have to remember to rename the file for editing, then rename it back when finished editing.
A Better Solution:
1. Find your KompoZer profile folder. In Windows XP it will be here:
C:\Documents and Settings\<user>\Application Data\KompoZer\Profiles\<xxxxxxxx>.default
where <user> is your user name and <xxxxxxxx> is a random string of letters and numbers. Note you need to enable the “Show hidden files and folders option” in Windows file explorer to do this. More info about how to do that here…
2. In this folder locate the file mimeTypes.rdf and if present rename it to something like mimeTypes.old.rdf
3. In KompoZer, disable the HandCoder and NsmConText extensions if they are installed.
4. Restart KompoZer. Voilá! You are done.
PHP files can now be edited in KompoZer’s wonderful visual WYSIWYG editor. There is some minor reformatting that will occur, but the content of file will be preserved.
Note that the same trick can be used to open PHP files in FireFox under Windows if you need to check the html portion only, and don't have a PHP server installed on your local machine. See the Ralpharama link above for more info...
~ Bodhi ~ |
|
| Back to top |
|
 |
wink0r
Joined: 28 Aug 2007 Posts: 422 Location: East Coast - USA
|
Posted: Sun Jun 08, 2008 7:10 pm Post subject: |
|
|
KompoZer does support UTF-8 if you set it as the character encoding. Did you ever try changing the character encoding form the default ISO-8859-1 to UTF-8? I have had to do that with some pages.
I have just set up a new Windows box and was having problems with php pages until I installed the handcoder extension. |
|
| Back to top |
|
 |
|