I have a php page that will needs to navigate to other directory that is hosted in iis in order to access the images but it keep telling me file not found.
IIS
D:\website\images (the website folder here is already a website hosted by IIS)
Apache
D:\xampp\htdocs\page.php
From page.php, I try to access the image with relative path. So the path i tried is ../../website/images/whatever.jpg but i can't access it. Any settings that needs to be done in IIS?
Btw, I can access it using browser though.
Thanks
Related
I have saved a PHP file to my Applications/XAMMP/htdocs directory and I want to run it in a browser.
I have used all sorts of url combinations including:
http://localhost/xammp/htdocs/HelloWord.php
http://localhost/xammp/HelloWord.php
amongst others and I cannot find the right url.
I am using XAMPP on a Mac Majove.
If you installed the XAMPP VM version, then you can probably access it via http://192.168.64.2/HelloWord.php (check the General tab in the XAMPP app for the IP address)
If you installed the native version, then I guess it is
http://localhost/HelloWord.php
The htdocs/ folder is the document root. Its content is served under the server address. Neither the xampp nor the htdocs folder will be part of the URL. The paths are relative to the document root, and you shouldn't be able to access parent directories above htdocs/ (although server-side code such as PHP has access to the file system and may work with files outside of the document root).
First of all, expecting the php file to have information that can be visualized in a web browser, inside xampp if you have the .php file in the htdocs folder you should be able to visualize it like this:
http://localhost/HelloWord.php
Found it by trial and error, quite different from what I took from various instructions on line:
http://localhost/HelloWord.php
XAMPP's default root should be "htdocs" or "www". Put your PHP files into those folder and try again.
if it is not work, find the configuration of Apache and PHP in XAMPP folder.
My website runs correctly on xampp server, but I tried the Windows PHP localhost server (IIS), but for unknow, reason mysite.php run but can not show the CSS or the image that are on subfolders
I tried to give full access permission but with not help, and I have no idea what else can I do to make my PHP website able to access the subfolder that contains CSS/images/and txt files.
I have created an asp.net virtual directory in php website.
Used IIS to host php website.
But when I try to access the virtual directory, I get 404.
Following is the folder structure
--wwwroot
--php website files
--asp.net web application
Set ASP.Net extention to 4.0 (Integrated Pipeline).
Give read and write permission to the virtual directory.
Not sure what causes 404.
I am struggling with socialengine php installation to my private server. I already have it hosted but want to develop it on my own computer. I have installed xampp, FileZilla server and client and netbeans.
I download and extract my socialengine zipped folder to into a folder within ht docs. Then I upload onto the FileZilla server. I then right click on the folder to copy the path. When I paste this into google browser I am not seeing the socialengine install wizard page where you enter your licence key.
Instead I am seeing an index page listing all the folders and other folders within ht docs directory. I have looked at many tutorials. Deleted everything and re-installed.
Can somebody please tell me what I am doing wrong.
Here are the cases to debug:
Check mod_rewrite enabled
.htaccess is available in that directory.
Server directory index set to index.php (DirectoryIndex index.php) in .htaccess file.
Check permission are fine on files and folders
All the servers are running correctly in XAMPP, and I when I run http://localhost the XAMPP page comes up. However when I try to run a php through xampp by accessing the directory where the file is stored, i.e.,
http://localhost/Applications/XAMPP/xamppfiles/htdocs/gallery.php
I get error 404. I've tried loads of different paths, but here is the path to the file in finder path image
Any ideas?
Thanks!
your webserver is resolving the domain localhost to a specific directory, the so called document root. (this can be adjusted in your server config). I would assume that it points to /Applications/XAMPP/xamppfiles/htdocs. so your file should be accessible via
http://localhost/gallery.php