I have foxserv installed, now how do I view php files? please

  • Detonate
  • Novice
  • Novice
  • Detonate
  • Posts: 21

Post 3+ Months Ago

Hi. I installed foxserv after doing alot of research on this board but now I am stumped again. I used apache before, but I dont seem how I can goto a php file.

Let's say it's running, green light on both apache and mysql, I download a complete php script, and I want to see if I can view it on my computer.
"http://localhost/htdocs/test.php"
Is that how it's suppose to look in the address bar of internet explorer?
I get page not found. I moved the files to apache's htdoc folder. Do I have to have every single file inside the directory htdocs and no subdirectories? I see that when installing php scripts, most of the time the instructions says something about chmod. What is this? Well it's late (5 a.m.) and I stayed up all night researching. Thanks. I'll be awake in 1 hr for school.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

htdocs would be the parent of the website, so
http://mysite.com/test.php
if test.php is in the htdocs folder

to get php working in apache, you'll need this in Apache's httpd.conf file (found in the Apache/conf folder):
for *nix
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php

for Windows:
LoadModule php4_module c:/php/php4apache2.dll
AddType application/x-httpd-php .php

for both the location depends on your server's configuration, but these examples are pretty common.

As to deleting anything in the htdocs folder. You should delete anything you don't want published by the web server. As I stated above, htdocs is your document root, which means Apache thinks you're trying to publish everything under it.

You can change your DocumentRoot in the httpd.conf file also (be sure to use forward slashes if you're on Windows)
  • Detonate
  • Novice
  • Novice
  • Detonate
  • Posts: 21

Post 3+ Months Ago

Do I have to do anything to the php file and its files necessary to run like an install? The LoadModule and Addtype are already there when I installed Foxserv. Is the correct url http://mysite.com? I used apache when I wanted my cell phone to connect to my server and I remember using my ip address. If I do need a ip address how do I find it because I recently had my wireless router installed and can't seem to remember how to get the real ip address instead of the one given by the router. Thanks.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

If you don't have your DNS configured, then yes, you'll have to use your IP address

You'll need to go through your php.ini file and set the directives there to match your server (I can't remember which ones exactly, but I'm sure http://php.net would have that info.

What OS are you using for this?
  • Detonate
  • Novice
  • Novice
  • Detonate
  • Posts: 21

Post 3+ Months Ago

Windows XP Pro. Found my ip address too.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Here's a tutorial just for that
http://www.webthang.co.uk/tuts/tuts_server/sirj1/sirj1_2.asp
  • Detonate
  • Novice
  • Novice
  • Detonate
  • Posts: 21

Post 3+ Months Ago

I think I figured it out. Foxserv points the doc_root folder to foxserv/www. But what's funky is with phpinfo.php:

Configuration File (php.ini) Path C:\WINDOWS\php.ini

I changed the doc_root in that folder to htdocs and saved. It's saved there, but when I run the test through IE, it still shows in phpinfo.php that the doc_root is www. How do I change it to htdocs? Is there another file that relocates this?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

php.ini should be in c:\windows

The doc_root that's refering to is in your php.ini file, just open it in notepad and Edit>Find>doc_root to change it. I'm not sure how much PHP relies on this though - I've never changed my doc_root in my own php.ini file and everything has always worked fine - and it is pointing someplace nonexistant in that file.

You should probably look in C:\windows to see if there is already a php.ini file there (if that's not the one you edited). That being the first place the server looks for the file, if it is there, any changes you make to any other php.ini won't matter.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 131 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.