0
votes

I can get the content of the CSS file when it´s running on my GoDaddy Windows shared hosting account. The CSS file is in the same directory of the index.php file:

<head>
<link rel="stylesheet" type="text/css" href="all.css" media="screen" />
</head>

But the things go wrong when I try to run the same PHP and call the same CSS file in my local development machine. The Opera browser shows me the 404 error. No File Found. If I click the css link in Firefox, displays a browser empty window.

I don´t have problems when using several php resources on my local machine, MySql connections and queries too.

I am using a PHP manual installation and setup on Windows 7 and IIS as Web Server.

Looking for a fix I´ve checked in my local host the $_SERVER array, getting the next values:

////////////////////////////////////////////////////////////////////////////////////////
The Document_Root is: C:\inetpub\wwwroot

The Script_FileName is: C:\inetpub\wwwroot\sisco\index.php

The PHP_Self is: /sisco/index.php

The Path_Translated is: C:\inetpub\wwwroot\sisco\index.php

The Original_Path Info is: /sisco/index.php

The Appl_Physical_Path is: C:\inetpub\wwwroot\

The HTTP_ACCEPT is: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, /;q=0.1
///////////////////////////////////////////////////////////////////////////////////////

Where sisco it´s the application directory, index.php and all.css are in that folder.

Why the CSS file does NOT LOAD in my local machine, while all goes Ok on GoDaddy Windows Shared Hosting servers?

Can anyone help me, Please? Thanks in advance...

1
And you're sure that the files on the server and locally are exactly the same? I mean no typos, no missing files etc?display-name-is-missing
What's the local URL in the browser and where (from C:) is the all.css file?Popnoodles
Try to add text/css in your HTTP_ACCEPT (Thanks for informing me Popnoodles)Stefan
Hi @Popnoodles , these are the url´s: localhost/sisco/index.php and C:\inetpub\wwwroot\sisco Thanks for your time! Please tell me where I wrong...Armando Guerrero
@Stefan , I´m really newbie. Adding text/css to HTTP_ACCEPT is it something about php.ini file? In that case, how can I add that MIME Type? Thanks in advance!Armando Guerrero

1 Answers

0
votes

I found the fix in the IIS options in the Windows installation features. I've checked the boxes that enable the CSS read and processing capability.
 
I could access clicking the Start button>>Control Panel>> Programs>> Windows Features, and I have enabled HTTP features in IIS.
 
I guess that situation was generated because I have been using a PHP over IIS manual installation and configuration, so I have omitted some basic services.

Thanks to all who supported me!