Solved

Where to save my php scripts on a standalone machine?

Posted on 2002-03-22
21
186 Views
Last Modified: 2008-03-17
Apache 1.3 and php4 version 1.0.6 all installed on my one standalone pc machine.

If I type http://localhost/     in my browser, I see several files of  types  .pl  .html  .php and I can run them ok.

I can browse to these files but I can’t save new files to it.
So I cant run my newly creatred php scripts.

Arthur

Paths I have are:
C:\program files\nusphere\apache\htdocs\
Or
C:\program files\nusphere\apache\nsdocs\
0
Comment
Question by:astoller
  • 10
  • 7
  • 2
  • +1
21 Comments
 
LVL 32

Expert Comment

by:Batalf
Comment Utility
I'm not sure if I understand your question correctly, because it sounds so strange.

You have installed PHP and Apache on your PC and you're unable to save files to the folder mapped to localhost?

What kind of files are these?
- Is it your php-scripts, or files you create with your php-script?

This is probably a stupid question, but if we're talking about problems when saving php-scripts, I assume you're trying to save them to "C:\program files\nusphere\apache\htdocs\" and not to "http://localhost/" which is the http-path to the file ???

If i'm way off, could you please explain some more, maybe give us some errormessages or something?

Batalf



 
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Yeah,

Very confusing is your problem description.

JD
0
 

Author Comment

by:astoller
Comment Utility
Batalf

I created a file  called Saturday.php in notepad.
I saved it to:
C:\program files\nusphere\apache\htdocs\Saturday.php

I am having problem browsing to this file.

I enter
http: // localhost
But cannot find Saturday.php anywhere.

There seems to be a different interpretation of paths between normal paths where you create and save a file as opposed to http paths.

For example:

C:\program files\nusphere\apache\php\doc
And
The browsers path to the same place  which is
http://localhost:9000/phpdoc/
 Both these last 2 addresses lead to the same place.
But I cannot replicate this with Saturday.php

Arthur
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
If you have saved Saturday.php in htdocs,

Then you can get it through,

http://localhost/Saturday.php .

Actually when you do http://localhost/ then it would show you index.htm [ or otherfile ] depending upon your DirectoryIndex configuration in apache and also it would show you list of files if you have Directory listing ON.

JD
0
 
LVL 32

Expert Comment

by:Batalf
Comment Utility
Locate your httpd.conf file and see what the document-root(ie: localhost/). That's a line like this:

DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"  

httpd.conf is located in a directory called "conf", which is a subdirectory of your apache-files.(On my computer, the path is: c:\program files\Apache Group\apache\conf ).¨

You could change the DocumentRoot to whatever you like.

Batalf
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Why to change document root ??

JD
0
 

Author Comment

by:astoller
Comment Utility
I previously had a newer version of php 4.1.2 in another folder.
I removed this by deleting all files in this php folder.
I then uninstalled nusphere and reinstalled the total thing.
Still not working.

My root for apache in httpd is:
C:/program files/nusphere/apache/

I saved test file Saturday2.php to
C://program files/nusphere/apache/htdocs

I browsed to
http://localhost/saturday2.php
Doesn’t work
The index.html file works ok (Nusphere welcome screen)

My php.exe is located at
C:/program files/nusphere/apache/php/php.exe
And is 20k file

Here is my DirectoryIndex line in httpd:
<IfModule mod_dir.c>
DirectoryIndex  index.shtml  index.html  index.htm  index.php  index.php3
</IfModule>

Arthur.
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
When you do http://localhost/saturday2.php, it doesnt work.

But what happens ? I mean what does browser say, does it just put up PHP code, or say 404 not found or what.

You need to define 'Doesnt work'.

JD
0
 

Author Comment

by:astoller
Comment Utility
i get web page unavailiable off line.
Work' offline?
yes
Result
Browser reverts bac to previous page.
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Have you started apache ????

Also ask to go online instead of working offline.

JD
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:astoller
Comment Utility
In browser I type:
http://localhost/saturday2.php
  The web page you requested is not available offline.To    view, click connect.
I connect.
  No connection to the internet is currently available
  To view content that is saved on your computer select  Work Offline.
I select work offline
  Web page unavailable offline.

If I simply type http://localhost/
I get the nusphere opening screen.
So its reading html document but not php document.
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
You basically need to check up your internet settings.
Cause earlier same kinda problem someone had.

What happens is that IE doent connect to server and try to get the page. In case of http://localhost/ it is showing you page which is in cache.


So tell me what is your IE connection settings.

JD
0
 

Author Comment

by:astoller
Comment Utility
Here are my settings:

Server types
PPP Windows 98

Only the following boxes are ticked:
Enable s/w compression
TCP/IP

           Server assigned IP address
           Server assigned names
           Use IP header compression
           Use default gateway

Arthur
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Hm....
Seems like you are on Dial up.

Possible to clear up those settings and configure internet for local Lan access ??

JD
0
 

Author Comment

by:astoller
Comment Utility
Yes I am on dial up. I only have my personal computer.

Tools/options/connections
Shows 4 dial up accounts.
But surely we don’t actually use the dial ups because it’s a personal web server?

Lan settings:

Options are:
1. Auto detect settings or
2. Use auto config script (asks for an address..what do I enter?)

What effect will this have on my browser?

Arthur
0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Actually what I am asking you to do is configure your connection to connect to internet using LAN and not dial up.

If you go to Tools/Internet Options/Connections.

Click on Setup.
It would give you three options.

Select last one manual internet connection using LAN.

Then click on next, select I connect through LAN. Click next.

Do not select  any of the checkboxes about proxies.

Then say no to setting internet mail account. Dismiss all dialog box by clicking ok.

Then restart browser and then try to browse , see if it works.


JD

0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Actually what I am asking you to do is configure your connection to connect to internet using LAN and not dial up.

If you go to Tools/Internet Options/Connections.

Click on Setup.
It would give you three options.

Select last one manual internet connection using LAN.

Then click on next, select I connect through LAN. Click next.

Do not select  any of the checkboxes about proxies.

Then say no to setting internet mail account. Dismiss all dialog box by clicking ok.

Then restart browser and then try to browse , see if it works.


JD

0
 
LVL 5

Expert Comment

by:dkjariwala
Comment Utility
Actually what I am asking you to do is configure your connection to connect to internet using LAN and not dial up.

If you go to Tools/Internet Options/Connections.

Click on Setup.
It would give you three options.

Select last one manual internet connection using LAN.

Then click on next, select I connect through LAN. Click next.

Do not select  any of the checkboxes about proxies.

Then say no to setting internet mail account. Dismiss all dialog box by clicking ok.

Then restart browser and then try to browse , see if it works.


JD

0
 

Author Comment

by:astoller
Comment Utility
I did this but it is still not working.
Sorry.
Arthur
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20062246.html
http://www.experts-exchange.com/questions/Q.20078869.html
http://www.experts-exchange.com/questions/Q.20083001.html
http://www.experts-exchange.com/questions/Q.20082999.html
http://www.experts-exchange.com/questions/Q.20163509.html
http://www.experts-exchange.com/questions/Q.20215528.html
http://www.experts-exchange.com/questions/Q.20244825.html
http://www.experts-exchange.com/questions/Q.20260659.html
http://www.experts-exchange.com/questions/Q.20262339.html
http://www.experts-exchange.com/questions/Q.20270035.html
http://www.experts-exchange.com/questions/Q.20280549.html
http://www.experts-exchange.com/questions/Q.20282697.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
Comment Utility
50 points refunded, no additional input from Experts, item closed.

Moondancer - EE Moderator
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now