introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

php files suddenly stop showing in IE8/FF3



Posted by: sleepyfrog
March 04, 2010 10:56AM
I had Easyphp set up an running ok on my pc - windows xp

It would open php files no problem in Firefox or IE stored locally anywhere on my pc - not just in the www folder.

Nothing has changed (as far as I know) but I now get a popup box asking me what to do with the file when I try and view any php file stored locally.

I do not need it to run the script, just view the page so that I can check the design elements.

Have tried uninstalling and reinstalling EasyPHP but still getting the same problem.

Any ideas why this would have stopped working / what I need to do to fix?

I am a novice so have no idea what the problem could be.

Thanks
Options: ReplyQuote
Posted by: Amour
March 05, 2010 06:40AM
>>Nothing has changed (as far as I know) but I now get a popup box asking me what to do with the file when I try and view any php file stored locally.

It's not made to do that : you must call PHP files into browser with "[127.0.0.1"]; because Apache and PHP must read PHP file and interpret it.

So, you can only use "www" folder, or add Aliases to use other folders ;)
Options: ReplyQuote
Posted by: sleepyfrog
March 05, 2010 11:48AM
Sorry - but you are wrong.

I am a web designer and have been viewing local php files offline for the 2 years since I've had this pc.

As far as I remember I had to change something in the php.ini file but can't remember what and can't find the original instructions online.

I also think I changed something so that the php extension was opened by apache/php - in the same way that you can specify .jpg or .doc files to open in a particular prpogramme.

I know it can be done, because I've been doing it! I have had to install the latest browsers for Opera, Safari and Chrome for testing purposes and I have a feeling one of these has reset the extension handling properties.
Options: ReplyQuote
Posted by: Amour
March 05, 2010 12:38PM
You don't understand...

"[127.0.0.1"]; is offline, but you must use that to see PHP files into your browser ;)
Options: ReplyQuote
Posted by: SoftKnight
March 05, 2010 02:12PM
sleepyfrog Wrote:
-------------------------------------------------------

> I am a web designer and have been viewing local
> php files offline for the 2 years since I've had
> this pc.

You need a PHP interpreter to view ths files in your browser. You had one, when it worked before, but it is not installed when u buy a new PC. I view PHP-Files only in editors locally and send them to the Webpage to view/test them. With EasyPHP (just another WAMP) you can do this without an internet connection on your PC.

> I also think I changed something so that the php
> extension was opened by apache/php - in the same
> way that you can specify .jpg or .doc files to
> open in a particular prpogramme.

That is not neccesary. If the browser calles an local file from the local web folder the Apache server takes care to use PHP. U can still link the extension *.php to a browser or, that's what I do, to my preffered editor (it is PSPad).

> I know it can be done, because I've been doing it!
> I have had to install the latest browsers for
> Opera, Safari and Chrome for testing purposes and
> I have a feeling one of these has reset the
> extension handling properties.

Oh, same answere as before =)

Amour has the correct solution. When you access the files in your browser via the full directory, like c:\program\mywebfiles\index.php, it won't work. Use instead [127.0.0.1]

Hope it helps you

Cya,
Softi
Options: ReplyQuote
Posted by: sleepyfrog
March 06, 2010 04:27PM
Well, I am obviously hallucinating now then, as I have fixed the problem by reverting my computer back to before the new browsers were installed. I can now (again) enter

c:\buildfolder\client\index.php or whatever and can the html portion of the php file rendered without it trying to process the php parts, and without having the files in the www folder, and without using 127.0.0.1

I also found I could (partially) solve the problem by changing the paths in the config files to point to my build folder, rather than the www folder, but not ideal as this way it tries to run the php code and gives me lots of mysql errors, and I don't want/need to have the databases stored locally.

If I find the original instructions on the internet I will let you know.
Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.