Solved

Where to save my php scripts on a standalone machine?

Posted on 2002-03-22
21
187 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
ID: 6890293
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
ID: 6890436
Yeah,

Very confusing is your problem description.

JD
0
 

Author Comment

by:astoller
ID: 6890618
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
ID: 6890704
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
ID: 6890706
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
ID: 6890793
Why to change document root ??

JD
0
 

Author Comment

by:astoller
ID: 6892078
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
ID: 6892080
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
ID: 6892164
i get web page unavailiable off line.
Work' offline?
yes
Result
Browser reverts bac to previous page.
0
 
LVL 5

Expert Comment

by:dkjariwala
ID: 6892176
Have you started apache ????

Also ask to go online instead of working offline.

JD
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:astoller
ID: 6893952
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
ID: 6894096
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
ID: 6894414
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
ID: 6894513
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
ID: 6894827
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
ID: 6895560
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
ID: 6895563
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
ID: 6895565
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
ID: 6898981
I did this but it is still not working.
Sorry.
Arthur
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6913377
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
ID: 7082239
50 points refunded, no additional input from Experts, item closed.

Moondancer - EE Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to count occurrences of each item in an array.
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…

920 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

13 Experts available now in Live!

Get 1:1 Help Now