How to run php file from other location? [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have installed my XAMPP in C drive, normally, I save the file in this location C:\xampp\htdocs and run it as localhost/example.php. If I change my project folder to E:\project\example.php, what are the settings that need to be altered in XAMPP to run the file from other saved location other than C:\?.

You can relocate your project by editing the DocumentRoot entry in XAMPP\apache\conf\httpd.conf. There, you have to replace the line
DocumentRoot C:\xampp\htdocs\
With:
DocumentRoot E:\Project\

This tutorial will guide step by step through this operation.
http://mattots.blogspot.com/2009/10/changing-document-root-in-xampp.html

Related

Access files on server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a private server on which I have placed a .php file in the root folder.
I want to run the .php file script by accessing it from the URL.
SO how can this be achieved.
Did you installed apache yet? to run a php page you need a web server like apache, nginx.
If installed, place your php file in public_html folder.
then, you can execute your php file by visiting http://yourdomain.com/yourpage.php

I can't connect to my system in some pc of the workgroup [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Well , i have Appserv appserv-win32-2.5.10 installed in the server and i have a System in Php and mysql.
Some computers of the workgroup Can't enter to my system ,get a slow charge of the system an never finish.
Please Help
Sorry for my english.
In your httpd.conf Apache file, in the directory tag, you should try something like this:
<Directory "/www/your_webroot">
order allow,deny
allow from all
</Directory>
The allow from all, should works ;)
PS: Here is a nice example of httpd.conf file:
http://www.devside.net/guides/config/windows/httpd-conf

Error :- php is not recognised as an internal or external command [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
So this is my path I have:
C:\wamp\bin\php\php5.4.3
And my php.exe file is in that folder...
I have tried to put:
C:\wamp\bin\php\php5.4.3;
C:\wamp\bin\php\php5.4.3\php.exe
C:\wamp\bin\php
C:\wamp\bin\php;
But none of is not working.
I have no idea why its not working...
Thanks
PHP is not included in your PATH.
Right click your My Computer, then Properties, Advanced System Settings, Environment Variables and then find PATH variable, add your PHP installation dir there. Close your previously launched CMDs, re-launch it, it should work now.

www.domain.com not displaying website but www.domain.com/index.php displays it correctly [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a Php website and I recently renewed the domain and hosting. When I checked www.domain.com it it not displaying website but when I check for www.domain.com/index.php displays it correctly.. what shall I do to make this correct.
The simplest way is with .htaccess file;
Create a .htaccess file in your web root.
Add the following line...
DirectoryIndex index.php
You may have to create/modify .htaccess file in the hosting server.
More info: http://www.thesitewizard.com/apache/change-default-page-for-domain.shtml

Apache httpd.conf file missing [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've looked on
etc/apache/httpd.conf
/etc/httpd/conf/http.conf
/etc/httpd/http.conf
Is there somewhere else where this file can be?? Am I missing something...?
Run the following command on the command line:
apachectl configtest
This should attempt to test the config, and it should also tell you where it's testing the config from.
run the following command:
cd /
sudo find *.conf
this should find all .conf files for you, just look threw and see what there is
More information on this command located here: https://help.ubuntu.com/community/find

Categories