Radid PHP - Preview problems.

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Radid PHP - Preview problems.

Post by rajenkins »

Hi,
I'm still having problems getting the preview to work in Rapid PHP.

I am using a remote server, however I now have Webdrive installed and the server web root is mapped to a drive letter & the 'filesystem' path is simply like X:\subdirectory\

When I go to the preview tab, it still says it is not configured.

The path to IE is setup in 'configure browsers', but clicking the IE icon in preview gives an error 'Unable to create Mozilla browser object'???
I could understand this if I clicked the Mozilla icon, but for IE?

(The files are already on the server, it's the same as I have configured in save to FTP & the URL works in IE itself).
Robert Jenkins
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Radid PHP - Preview problems.

Post by chrisjlocke »

rajenkins wrote:The path to IE is setup in 'configure browsers', but clicking the IE icon in preview gives an error 'Unable to create Mozilla browser object'???
I could understand this if I clicked the Mozilla icon, but for IE?
The IE icon is a toggle, rather than a 'submit' button - clicking the IE button will toggle it between the Firefox and IE views. To create a preview file, click the Refresh icon.

If my understanding is correct, you won't be able to use the server root mapped to a drive letter, as you're simply using it as storage - documents and scripts aren't being processed by the web server, but you're using it like an FTP 'wrapper'.
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

....you're using it like an FTP 'wrapper'.

That's all the left-hand side of the mapping is supposed to be? Their example is: c:\apache\htdocs\

As far as I can see, the preview Mapping option is supposed to set up a path to save the files to (Filesystem Path), and the equivalent URL to view from via the webserver (Web Server Path).

I can understand the preview not working over FTP, but now it is effectively a local path on this machine; there should be no difference to how it would work with a server actually installed on here rather than remotely?

(I have now installed both Firefox & Opera. Both work with the URL entered manually, but still not in preview).

The Refresh button only appears to refresh the 'The software is not yet configured ' page, no actual preview.
That may be another bug; Opera is configured in Browsers, but no option for it on the Preview tab?

It does say on that page, that even with a remote server you can preview after manually uploading it - the files are on the server and working, but 'preview' is dead..
Robert Jenkins
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

No, as far as mappings go, the 'Web server path' must be to an http:// server (it begins with http://) so that the server can process it.

If the server was installed locally to your machine, you would still access it with http://localhost

I've only got WeBuilder, so Rapid PHP might be different, but is your mappings like mine then (the selected option - drive d: mapped to e: as an example)
Last edited by chrisjlocke on Mon Dec 17, 2007 1:02 pm, edited 1 time in total.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

rajenkins wrote:That may be another bug; Opera is configured in Browsers, but no option for it on the Preview tab?
No, its no bug - there is no third party support for Opera like there is for IE and Firefox (ie, no wrapper around the browser engine)
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

The 'web server' path IS like http://www.site.com/ the (real) base URL of the site, which works fine in IE etc.

I'm using webdrive purely to make the remote FTP access to the server appear as a local path in the 'filesystem path' side of the mapping. (I mentioned previously it was the left-hand side of the mapping).

If you change the URL mapping on your setup from http://localhost/ to the same machine's full hostname or IP address, like http://192.168.1.5/ or whatever, does preview still work?

Re. Opera, I was just going to ask what's the point of the setup if it's not used, but having another look through the menus I've found the 'Tools > Preview in' item.

This indeed opens a browser, using a slightly odd URL:-
file://localhost/C:/Web%20Sites/test/include/dgcode.php
(Isn't it normal to use file:/// for local files rather than stating 'localhost' ?)

However it obviously doesn't do anything much useful by opening a PHP source file directly in a browser..
The file://localhost/ prefix appears to be built in to the program, I can't find it anywhere in the config.
Robert Jenkins
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

That is indeed an odd URL. Any chance of a screenshot of your mappings page, just to see whats in there? rapidshare.de is a free image host.
If you change the URL mapping on your setup from http://localhost/ to the same machine's full hostname or IP address, like http://192.168.1.5/ or whatever, does preview still work?
Yes, 'localhost' is the same as your machines IP address - actually, its the IP of 127.0.0.1 which is reserved for your machine.
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

Yes, that's what I'm getting at - I'm beginning to suspect that http://localhost/ is hardcoded into the program and any other URL is rejected as being remote.

It appears a 'remote' preview facility is partly coded in, hence the FTP option in mapping setup. I'd expect it to decide local or remote based solely on file access being via drive:\path or FTP:, but possibly it's comparing the URL as well..

As you appear to have preview working on your setup, can you try using an alternate URL - as you say, http://127.0.0.1/ should be ok - and see if preview still works or if it then says it's not configured?

Re. the weird preview URL, I don't have any mention of localhost in my one and only mapping line, the remainder (c:\..) is the path in the Project setup.
Robert Jenkins
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

As above ... a screenshot would be handy...
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

I presume this works fine (taken from the help file)
Step 3 - Make sure your web server works
Verify that your web server really works with PHP files. To do this, save a PHP file to your web document root and try to open it via web browser. For example, if your web document root is c:\htdocs\, save your file as c:\htdocs\index.php and try to open it via URL http://localhost/index.php
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

Hi Chris,
I'm not prepared to publish the URL of our test server & if I fake the URL a screenshot is meaningless.

The mapping is simply s:\a_path on the left and http://a.working.url/ on the right.

As mentioned previously, pasting the URL into IE brings up the site index so it is a valid, functional URL. (And yes, the whole site is PHP including the index).

The s:\path leads to the same directory on the server as I've got set up in the Project's FTP config.
Robert Jenkins
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

The web path for mapping absolutely *must* be http:// or https:// any non-HTTP-standard compliant links simply won't work, even if you can view them in some browsers.
Karlis Blumentals
Blumentals Software
www.blumentals.net
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

Hi Karlis,

the mapping I'm using (or trying to) is an absolutely standard URL like http://www.site.com/dir/ on the right and drive:\directory on the left.
It's simply a full URL rather than http://localhost/

The drive:\directory is being done with webdrive so Rapid PHP can save files to the 'live' server without knowing it's an FTP link. It appears in Windows Explorer or ZTree etc. to simply be another hard drive.

The Preview tab just gives the 'not configured' page.

(Using 'Preview in' from the Tools menu opens the raw PHP file in a browser, using the path from the project setting, which would be fine if I was working with HTML, but no use for PHP).
Robert Jenkins
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

The filepath must also be real/physical, it won't work with virtual paths. It must be that the webdrive does not act 100% like a physical drive, so the editor can not detect it as real drive.
Karlis Blumentals
Blumentals Software
www.blumentals.net
rajenkins
Posts: 32
Joined: Tue May 23, 2006 11:04 am

Post by rajenkins »

I've just tried it with the filepath set to a temp directory on C:

I made a directory c:\temp\atemp and set the mapping to this for the filesystem side & still have the full HTTP:// url of the webserver on the right.

I realise this would not work to preview unsaved edited files, but I have the FTP path in the project settings set up to the real server (that the HTTP:// url points to) & all the files are synchronised.
It's just a test.. The file it saved locally would already be present on the server so there is no way the program should be able tell it's not saving to the web root?

When I open a file & go to preview, it does not write anything to the local path & still says preview is not configured...
Robert Jenkins
Post Reply