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

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
superjboss
Forum Newbie
Posts: 4
Joined: Tue Jul 27, 2010 12:03 pm

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

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

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

Post 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).
(#10850)
superjboss
Forum Newbie
Posts: 4
Joined: Tue Jul 27, 2010 12:03 pm

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

Post 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...
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

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

Post 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.
superjboss
Forum Newbie
Posts: 4
Joined: Tue Jul 27, 2010 12:03 pm

Fatal error: Call to undefined function oci_connect()

Post 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
superjboss
Forum Newbie
Posts: 4
Joined: Tue Jul 27, 2010 12:03 pm

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

Post 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...
Post Reply