[SOLVED] Enabling PHP on Remote Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dewaphp
Forum Newbie
Posts: 10
Joined: Mon Nov 03, 2003 3:20 am

[SOLVED] Enabling PHP on Remote Server

Post by dewaphp »

Hello Folks,

Sorry for this dumb question. I just upload a simple "hello world" php code to my remote server.

When i try to access http://www.myserver.com/helloworld.php , the page doesn't display anything and I can read my php source code using view source option on IE.

Where did I make mistake?. Should I create my custom httpd.conf in order to enable php processing on my remote server? (ochosting.com)

TIA,
Andy
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you asked your host if they support PHP?

Mac
dewaphp
Forum Newbie
Posts: 10
Joined: Mon Nov 03, 2003 3:20 am

Post by dewaphp »

Hi mac:),

They certainly do support php


TIA,
Andy
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Perhaps you are using short tags and they have these disabled?
E.g, you have:

Code: Select all

<? echo 'hello world'; ?>
or

Code: Select all

<?='hello world'?>
but you need to have

Code: Select all

<?php echo 'hello world'; ?>
Mac
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Sometimes a host does support php but the package you purchased doesn't entitle you to use it.

Double-check that because it has happened before to someone I know.

There could also be a .htaccess in the directory that can force all filetypes to be plaintext.
dewaphp
Forum Newbie
Posts: 10
Joined: Mon Nov 03, 2003 3:20 am

Post by dewaphp »

Hi Mac,

You are right , they disable short tags, thx!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Glad to help :).

Mac
Post Reply