/    Sign up×
Community /Pin to ProfileBookmark

PHP files showing up as script instead of executing as a web page.

I’ve been working on installing the Mambo portal system on a test site to see what all it can do. But now that I’ve gotten it all uploaded, the pages are showing up as script instead of webpages. I used my webhost’s uploader to upload them. I’ve never had this issue before now. Why is this happening and what do I do to fix it?

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@ShmohelJun 01.2005 — Does your server have PHP installed? Might want to check with your admin. Have you been able to run PHP scripts before on this server?
Copy linkTweet thisAlerts:
@VernonKJun 01.2005 — The easiest way to test and see if your host has PHP support is to create a new file in notepad with the following:[code=php]<?php phpinfo(); ?>[/code] Save it as phpinfo.php and upload it to your site. Then try to browse to that file (ex. http://domain.com/phpinfo.php) and see what happens. If you have PHP support you will see a lot of information about your version of PHP.
Copy linkTweet thisAlerts:
@SuikoWarfieldauthorJun 02.2005 — Yes, PHP is installed. Yes, I've run PHP scripts before. There are many others running on other parts of my site without issue. I've never encountered this problem before.
Copy linkTweet thisAlerts:
@VernonKJun 02.2005 — Perhaps you can take a screenshot of what the output to the browser looks like. This might help in diagnosing the problem.
Copy linkTweet thisAlerts:
@SuikoWarfieldauthorJun 02.2005 — I've had someone else on a different computer try it. The result is the same.

[URL]http://portal.mindsjourney.net[/URL] You can try it for yourself.
Copy linkTweet thisAlerts:
@methanolJun 02.2005 — what file extension are you using for your scripts?

You only get the php source code returned to the browser if the web server isn't running the scripts through a php interpreter. This suggests a number of things:

a) The server hasn't been configured to send your scripts through a php interpreter, based on the file extension of the script file.

b) php has been removed or disabled on the server.

c) the uploader is screwing up your scripts, very likely by saving them under an inappropriate file extension, or by converting the php script into content *inside* a html file.
Copy linkTweet thisAlerts:
@ShmohelJun 02.2005 — How did you upload the scripts, through FTP?
Copy linkTweet thisAlerts:
@VernonKJun 02.2005 — Considering you used your webhost's uploader.. that could be the problem. Do you not have access to FTP? Is your index file index.php?
×

Success!

Help @SuikoWarfield spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...