Jump to content

help with php


Recommended Posts

installed Apache on solaris 10, used localhost for my domain name serrver and website, installed it etc.. then went to http://localhost in my browser and it said "it works" , saved my script to it with is a basic script

Code:
<?php
echo "hello";
?>
and I saved it to exmaples folder as first.php and when i went to http://localhost/first.php it didnt come up as hello it come up as the code, i think this might be a problem with the apache installation i made because the code is pefectly fine from what I can see.
Link to comment
Share on other sites

This might be a silly question but its an easy mistake to make, have you turned on the php proccessor? This is done (at least on windows in every installation Ive seen) by running a batch file or other executable so try any executable you might have with the word "start" in it, it will be in the home folder for the installation like "root/apache/". Ive had this before and it was because i completely forgot to turn apache on ::) Another thing is to make sure that the URL is definitely http://localhost/file.php and make sure it hasn't gone back to root/dir/dir/file.php although as you said the first file worked its likely that apache is on but the script is in the wrong folder. IN my installation i have to go into a few folders until i get to the htdocs folder. I belive on an X server the live directory is var/www  so make sure that the script is in a folder like that or the corresponding folder if its different. If its not in the right place it might not get parsed as php. Thats all i can think of for now. Good luck.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.