Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Installer prompts for file download / causes error 500

Started: July 26, 2009, 06:54 PM  ⋅  Zone: Public Forums  ⋅  Category: Install & Modification  ⋅  Posts: 9  ⋅  Views 561
Started by: Markus  ⋅  Description: No description.
Post #1
Member: Markus  ⋅  Date: July 26, 2009, 06:54 PM  ⋅ Subject: "Installer prompts for file download / causes error 500"

Three separate customers have reported a problem with iWiccle installer prompting for file download for installer.php when attempting to install. I haven't been able to replicate the problem on any of the test setups I have access to.


If you have this problem, please try any the following:

  1. If you access the file directly as yoursite.com/install/installer.php, does the problem persist?
  2. Upload this test file (contains a phpinfo(); command) to see if this problem exists with all .php files in the folder.
  3. Rename or delete the .htaccess file from the iWiccle root directory.
  4. Try this installer (for iWiccle 1.01) -- unzip and upload, replace current installer with this.

If any of these steps work, or if you figure out anything else that could be done, please check back in and let us know what fixed it.


This problem seems to be caused by wrong file headers being sent out, making it an Apache issue. As to what triggers this, that's still something I'm working on.


If anyone can give me temporary access to a server where this problem occurs, I can get to an environment where I can see what causes the problem, and get a fix in place once and for all.

Post #2
Member: daryllau  ⋅  Date: July 26, 2009, 07:20 PM  ⋅ Subject: "(No title)"

Report:

1. Yes problem remains

2. Got 500 Internal server error

3. Problem remains

4. Problem remains

Post #3
Member: Markus  ⋅  Date: July 26, 2009, 07:25 PM  ⋅ Subject: "(No title)"

2. Very odd that you should get a 500 server error from a blank file with only <?PHP phpinfo(); ?> inside. Does the php_info.php file behave the same, no matter where you put it, or does it give you 500 server error only when it's in the install folder?


4. Let me know the results, please.

Post #4
Member: daryllau  ⋅  Date: July 26, 2009, 07:35 PM  ⋅ Subject: "(No title)"

Tried it with the following combo:

1] Install folder - Internal Server Error

2] Main folder - 500 Internal Server Error

3] Main folder (without .htacess) - 500 Internal Server Error

Post #5
Member: Markus  ⋅  Date: July 26, 2009, 07:38 PM  ⋅ Subject: "(No title)"

Even with the php_info.php file... Weird! Because that's as elementary as a file gets. Can you get any PHP files working there?


You could double check that the file is being correctly uploaded --- upload in binary mode, instead of ASCII.

Post #6
Member: daryllau  ⋅  Date: July 26, 2009, 07:49 PM  ⋅ Subject: "(No title)"

PMed you.. please check your mailbox Markus... cheers!

Post #7
Member: john  ⋅  Date: July 27, 2009, 12:10 AM  ⋅ Subject: "(No title)"

Hi Marcus,

Removing .htaccess did the trick for me!

I can now access my admin cp and start 'playing'.

Thanks and regards,  John

Post #8
Member: Markus  ⋅  Date: July 27, 2009, 12:39 AM  ⋅ Subject: "(No title)"

Cause of the problem with 500 Server Error messages, as discovered from daryllau's installation:

  • Folder permissions 0777 for install folder causes all php-scripts in the folder to return a server error.

This seems to be a security restriction enforced by some hosts. It may also cause the file download prompt --- that I have not been able to study in live environment yet.

This issue is fixed by:

  • Return /install folder permissions to 0755.
  • Use this installer file (just updated).

This solution uses the /tmp folder for storing the config.php file, and will be the default solution for all future installers.


Special thanks to daryllau for access to his server, fixing this and the following issue would have been difficult without it.

Post #9
Member: Markus  ⋅  Date: July 27, 2009, 12:50 AM  ⋅ Subject: "(No title)"

Cause of download prompts turned out to be the following line in the .htaccess file:

  • AddType application/x-httpd-php .php

This line was there as a backup in the silly case that someone's server might not be set for parsing php files by default. As it turns out, it removed the valid handler from some Apache installations, leaving the server clueless as to what headers should be served out (options being a HTML document or an unknown file).


Solution for this problem:

  • Delete the line above from your .htaccess file, or
  • Delete the entire .htaccess file (Smart URLs will not work).

The default .htaccess file will smarter in terms of maximum compatibility for the next release.


(You should also remove the DirectoryIndex index.php statement if you have files in non-iWiccle folders under the iWiccle installation that need to act as default pages, such as index.html.)

 

Install & Modification

Add to Favorites
Public Forums
Category  ⋅  Deploying iWiccle and Wiccle into unique solutions that match your needs.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top