Jump to content


Photo

help with php


  • Please log in to reply
2 replies to this topic

#1 shermili

shermili
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 October 2006 - 03:58 PM

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.


#2 shadow-x

shadow-x
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 27 October 2006 - 05:00 PM

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.



#3 shermili

shermili
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 30 October 2006 - 03:17 PM

it still doesn't work





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users