Jump to content


This topic is now archived and is closed to further replies.


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

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.

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites


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.