Go Back   Serif Software Forums > Design and Publishing > WebPlus

Notices

WebPlus Questions about using WebPlus for website design

Reply
 
Thread Tools Display Modes
Old 23rd April 2012, 01:07 AM   #1
linkassoc
Regular Member
 
Join Date: Feb 2009
Location: Lake District
Posts: 305
linkassoc is on a distinguished road
Default Preview .php pages

Hi,

I cannot preview .php pages in my FireFox or my IE browsers - I just see a page of code. But, a colleague, using exactly the same versions of these browsers has no problem previewing them.

Is there a setting somewhere that I am missing ?

Thanks in anticipation.

John.
__________________
John - working in Paradise (The Lake District)

'The beginning is the most important part of the work' ... Plato
linkassoc is offline   Reply With Quote
Old 23rd April 2012, 01:33 AM   #2
nfc212
Master
 
nfc212's Avatar
 
Join Date: Sep 2009
Location: Cardiff
Age: 56
Posts: 12,918
nfc212 is a splendid one to beholdnfc212 is a splendid one to beholdnfc212 is a splendid one to behold
Default Re: Preview .php pages

To preview .php pages in a browser you will need to install something like EasyPHP, WAMP or XAMP first.

Then you will need to publish the project to a folder in the www folder of the above and preview from there.
__________________
Nigel

The Ferret - Using PHP and MySQL to create dynamic Web Plus sites
What is the difference between genius and stupidity? Genius has limits.
nfc212 is offline   Reply With Quote
Old 23rd April 2012, 01:46 AM   #3
linkassoc
Regular Member
 
Join Date: Feb 2009
Location: Lake District
Posts: 305
linkassoc is on a distinguished road
Default Re: Preview .php pages

Thanks Nigel. I did see your earlier post about this, but my colleague hasn't got anything else installed and he certainly doesn't publish to a folder. Just uses the WP preview.

Thanks for you info - I may have to revert to this.
__________________
John - working in Paradise (The Lake District)

'The beginning is the most important part of the work' ... Plato
linkassoc is offline   Reply With Quote
Old 23rd April 2012, 02:00 AM   #4
nfc212
Master
 
nfc212's Avatar
 
Join Date: Sep 2009
Location: Cardiff
Age: 56
Posts: 12,918
nfc212 is a splendid one to beholdnfc212 is a splendid one to beholdnfc212 is a splendid one to behold
Default Re: Preview .php pages

Quote:
Originally Posted by linkassoc View Post
Thanks Nigel. I did see your earlier post about this, but my colleague hasn't got anything else installed and he certainly doesn't publish to a folder. Just uses the WP preview.

Thanks for you info - I may have to revert to this.
Then they are either incredibly lucky or haven't actually changed the page extension.

Pages with a .php extension will not preview in any browser, FF10, IE9, Chrome or Opera here. They will not preview in the built Preview Window either.
__________________
Nigel

The Ferret - Using PHP and MySQL to create dynamic Web Plus sites
What is the difference between genius and stupidity? Genius has limits.
nfc212 is offline   Reply With Quote
Old 23rd April 2012, 03:52 AM   #5
djln10
Regular Member
 
djln10's Avatar
 
Join Date: Jul 2009
Location: London. UK
Posts: 433
djln10 is well on the road to greatness
Default Re: Preview .php pages

Quote:
Originally Posted by nfc212 View Post
Then they are either incredibly lucky or haven't actually changed the page extension.

Pages with a .php extension will not preview in any browser, FF10, IE9, Chrome or Opera here. They will not preview in the built Preview Window either.
Then I guess I'm incredibly lucky...

I obviously can't preview the PHP content itself but I don't have any problem previewing PHP pages using the WP preview OR the preview window. It shows how the rest of the page will look but without the PHP content. The pages in question do have the .php file extension.

I can preview these pages in all the latest versions of Firefox, Opera, Chrome and even IE!! Safari is the only one that will not show the page - just the code.

Example pics attached.
Attached Images
File Type: jpg esiWPX5screenshot.jpg (213.7 KB, 7 views)
File Type: jpg esiWPX5previewWindow.jpg (187.0 KB, 6 views)
File Type: jpg esiFirefoxPreview.jpg (141.9 KB, 8 views)
__________________
Blue Checkbox
djln10 is offline   Reply With Quote
Old 23rd April 2012, 04:10 AM   #6
Ali
Guru
 
Ali's Avatar
 
Join Date: Feb 2009
Location: Rushmere St Andrew, Ipswich, Suffolk, UK
Age: 48
Posts: 21,604
Ali has a brilliant futureAli has a brilliant futureAli has a brilliant futureAli has a brilliant future
Default Re: Preview .php pages

I think there is a bit of confusion here. There are two types of .php page possible in WP: the type that contains a php code snippet and has had its extension changed to accommodate this, but is still essentially a WP page with ordinary content, and the type that has been set up as an HTML page and had its extension changed to .php (this type contains just .php code between .php tags, and views in WP as a code page). The former type will preview fine, the latter will not without EasyPHP or similar installed on your machine. I have both types of page - I have always been able to preview the former, and that is the type that is being shown in the attachments above.
__________________
Ali
Did I help you? If so, you could add to my reputation (click the scales icon on the left). Thanks!
Win7 Ultimate 64-bit SP1 | Samsung Laptop with Intel Core i5-2450M CPU @ 2.50GHz & 8GB RAM
WPX2-6 SITES: The Falcon Inn (X6) | Martin Sexton - Artist (X2) | Clover Greetings
(X6)
Ali is offline   Reply With Quote
Old 23rd April 2012, 04:49 AM   #7
djln10
Regular Member
 
djln10's Avatar
 
Join Date: Jul 2009
Location: London. UK
Posts: 433
djln10 is well on the road to greatness
Default Re: Preview .php pages

Quote:
Originally Posted by Ali View Post
I think there is a bit of confusion here. There are two types of .php page possible in WP: the type that contains a php code snippet and has had its extension changed to accommodate this, but is still essentially a WP page with ordinary content, and the type that has been set up as an HTML page and had its extension changed to .php (this type contains just .php code between .php tags, and views in WP as a code page). The former type will preview fine, the latter will not without EasyPHP or similar installed on your machine. I have both types of page - I have always been able to preview the former, and that is the type that is being shown in the attachments above.
Absolutely correct. That's what the examples above show. From my understanding, for some reason, John the OP can't preview his pages in the same way and yet they are created in the same way in WP with just a small PHP include (same as in my examples) and with the extension changed to .php
__________________
Blue Checkbox
djln10 is offline   Reply With Quote
Old 23rd April 2012, 05:34 AM   #8
Ali
Guru
 
Ali's Avatar
 
Join Date: Feb 2009
Location: Rushmere St Andrew, Ipswich, Suffolk, UK
Age: 48
Posts: 21,604
Ali has a brilliant futureAli has a brilliant futureAli has a brilliant futureAli has a brilliant future
Default Re: Preview .php pages

Quote:
Originally Posted by djln10 View Post
Absolutely correct. That's what the examples above show. From my understanding, for some reason, John the OP can't preview his pages in the same way and yet they are created in the same way in WP with just a small PHP include (same as in my examples) and with the extension changed to .php
He doesn't actually say which type they are, as far as I can see, which is why I sought to clarify the distinction. Nonetheless, there is clearly some anomaly if he has a friend who can see them and he can't.
__________________
Ali
Did I help you? If so, you could add to my reputation (click the scales icon on the left). Thanks!
Win7 Ultimate 64-bit SP1 | Samsung Laptop with Intel Core i5-2450M CPU @ 2.50GHz & 8GB RAM
WPX2-6 SITES: The Falcon Inn (X6) | Martin Sexton - Artist (X2) | Clover Greetings
(X6)
Ali is offline   Reply With Quote
Old 23rd April 2012, 09:48 AM   #9
nfc212
Master
 
nfc212's Avatar
 
Join Date: Sep 2009
Location: Cardiff
Age: 56
Posts: 12,918
nfc212 is a splendid one to beholdnfc212 is a splendid one to beholdnfc212 is a splendid one to behold
Default Re: Preview .php pages

Quote:
Originally Posted by djln10 View Post
Then I guess I'm incredibly lucky...

I obviously can't preview the PHP content itself but I don't have any problem previewing PHP pages using the WP preview OR the preview window. It shows how the rest of the page will look but without the PHP content. The pages in question do have the .php file extension.

I can preview these pages in all the latest versions of Firefox, Opera, Chrome and even IE!! Safari is the only one that will not show the page - just the code.

Example pics attached.
I can;t get any type of page with a .php extension to preview here, in any browser. I have to publish to the www folder of EasyPHP.

No doubt it is something to do with the configuration of the OS and file associations.

It would be nice if one of the browser vendors included a PHP parser. If you are using includes then the page appearance may be different when the PHP code is actually active. Which could break the static layout.

It is much like using XML, only Firefox has a built in XML parser so XML code will not work in other browsers.
__________________
Nigel

The Ferret - Using PHP and MySQL to create dynamic Web Plus sites
What is the difference between genius and stupidity? Genius has limits.
nfc212 is offline   Reply With Quote
Old 23rd April 2012, 01:37 PM   #10
linkassoc
Regular Member
 
Join Date: Feb 2009
Location: Lake District
Posts: 305
linkassoc is on a distinguished road
Default Re: Preview .php pages

Thank you all for your comments. Ali, how does one ensure that the right kind of PHP is created so that it can be previewed (albeit without the PHP items) ? I insert a code fragment and change the page extension - is there another way ?

My site structure looks exactly the same as DJLN10's.

Like a number of others here, I have started to use the PulsePro CMS and Blog due to the failings of the SWR solutions and this requires .PHP pages. I can, therefore, only see the need growing to be able to preview pages quickly, so it is important that this problem gets resolved.

Isn't it time that someone from Serif stepped in and contributed to this ? Maybe explain why some can see it and some can't. Maybe X6 will have the answer ?
__________________
John - working in Paradise (The Lake District)

'The beginning is the most important part of the work' ... Plato

Last edited by linkassoc; 23rd April 2012 at 02:25 PM.
linkassoc is offline   Reply With Quote
Old 23rd April 2012, 03:55 PM   #11
Ali
Guru
 
Ali's Avatar
 
Join Date: Feb 2009
Location: Rushmere St Andrew, Ipswich, Suffolk, UK
Age: 48
Posts: 21,604
Ali has a brilliant futureAli has a brilliant futureAli has a brilliant futureAli has a brilliant future
Default Re: Preview .php pages

Quote:
Originally Posted by linkassoc View Post
Thank you all for your comments. Ali, how does one ensure that the right kind of PHP is created so that it can be previewed (albeit without the PHP items) ? I insert a code fragment and change the page extension - is there another way ?

My site structure looks exactly the same as DJLN10's.

No - that's what I do, too. Previewing in FF11.


Quote:
Originally Posted by linkassoc View Post
Isn't it time that someone from Serif stepped in and contributed to this ? Maybe explain why some can see it and some can't. Maybe X6 will have the answer ?
Well, not really, since it is probably to do with a combination of OS and browser. I don't think that Serif can be held accountable for this anomaly, really.
__________________
Ali
Did I help you? If so, you could add to my reputation (click the scales icon on the left). Thanks!
Win7 Ultimate 64-bit SP1 | Samsung Laptop with Intel Core i5-2450M CPU @ 2.50GHz & 8GB RAM
WPX2-6 SITES: The Falcon Inn (X6) | Martin Sexton - Artist (X2) | Clover Greetings
(X6)
Ali is offline   Reply With Quote
Old 23rd April 2012, 11:45 PM   #12
linkassoc
Regular Member
 
Join Date: Feb 2009
Location: Lake District
Posts: 305
linkassoc is on a distinguished road
Default Re: Preview .php pages

Quote:
Originally Posted by Ali View Post
Well, not really, since it is probably to do with a combination of OS and browser. I don't think that Serif can be held accountable for this anomaly, really.
Ali, I wasn't suggesting it was a fault in WP. I was meaning that they are the experts, they might know why we get these discrepancies between users and therefore, can provide us with a solution.

Your admirable defence of your beloved Serif was not needed.
__________________
John - working in Paradise (The Lake District)

'The beginning is the most important part of the work' ... Plato
linkassoc is offline   Reply With Quote
Old 24th April 2012, 02:28 AM   #13
linkassoc
Regular Member
 
Join Date: Feb 2009
Location: Lake District
Posts: 305
linkassoc is on a distinguished road
Default Re: Preview .php pages

Following on, I have never tried the Preview in Window (Internet Explorer)before, always instead, choosing one of the six browsers on Alt+1 to Alt+6.

And guess what - a PHP page does display correctly. So, why should this be ?

So, there is a way to view a PHP page without constantly changing it from PHP to HTML and back again. But it's not ideal. Anyone from Serif know the answer ?
__________________
John - working in Paradise (The Lake District)

'The beginning is the most important part of the work' ... Plato
linkassoc is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WebPlus X4: How do I put a Shopping Cart Preview on my pages? TheFlyingT WebPlus 0 1st March 2012 11:03 PM
WebPlus X5: Why wont the home page preview but the other pages do? Cruzzen WebPlus 23 28th September 2011 05:14 PM
No preview view on linked pages? Hawk WebPlus 3 3rd March 2007 02:42 PM


All times are GMT +1. The time now is 11:52 PM.