Page 1 of 1

Open a URL, but it will prompt to download a file

Posted: Tue Jul 27, 2010 12:13 pm
by superjboss
Hi,
When I tried to open a URL, e.g http://server01/index.php it will prompt to download the index.php file.
I've tried the phpinfo() as well but still the system prompted me to download the php file.
What is wrong with my configuration? Can somebody help me please?

Thanks.

Re: Open a URL, but it will prompt to download a file

Posted: Tue Jul 27, 2010 12:25 pm
by Christopher
You didn't say what OS or web server you are using?

It sounds like the web server is not configured correctly for PHP (e.g. no "AddType application/x-httpd-php .php" line).

Re: Open a URL, but it will prompt to download a file

Posted: Tue Jul 27, 2010 8:54 pm
by superjboss
The server is Windows 2003.
Apache version = 2.2.15
PHP version = 5.3.0

I checked the "AddType application/x-httpd-php .php" and it is there
I'm not sure what's wrong with it...it just working fine in my Vista that I use for development
The same installation files i used in the server Windows 2003 but didn't worked

Appreciate your advise...

Re: Open a URL, but it will prompt to download a file

Posted: Tue Jul 27, 2010 8:58 pm
by Benjamin
I'd go ahead and install XAMPP (http://www.apachefriends.org/en/xampp.html), or preferably, just wipe the disk and start using a decent operating system such as Linux or Mac.

Fatal error: Call to undefined function oci_connect()

Posted: Wed Jul 28, 2010 3:17 am
by superjboss
Thanks Benjamin...thats release me a bit
I've installed xampp and it's worked...at least i can see my phpinfo()

But now i faced another problem
When i open the website...it thrown this error message
Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\conn_test.php on line 2

The Oracle client version on the server where the xampp installed is 9.2.0.8.0

Can somebody help me again please? Thanks

Re: Open a URL, but it will prompt to download a file

Posted: Wed Jul 28, 2010 6:42 am
by superjboss
Problem resolved.

1) Open a URL, but it will prompt to download a file
For this issue, i think this was a configuration issue. Solved after i made new installation using XAMPP. Thanks to Benjamin for your suggestion.

2) Fatal error: Call to undefined function oci_connect()
I did exactly as in http://www.oracle.com/technology/pub/no ... stant.html under Enabling the PHP OCI8 Extension on Windows.
Since my PHP and Apache working correctly except for the OCI issue in XAMPP, I skipped that part except for Instant Client Package - Basic part.

I also encountered another error ORA-12705: Cannot access NLS data files or invalid environment specified after the 2nd issue fixed, so after googling again and again I found the solution is basically by edit the registry HKLM/Software/Oracle by renaming NLS_LANG to xLNS_LANG.

Now I'm happy man! Thanks to you guys...