Install Apache/Ubuntu failing (just downloads the php file)

Discussion about the open-source Phalanger [?] project.

Install Apache/Ubuntu failing (just downloads the php file)

Postby JeffCave » June 5th, 2013, 1:39 am

I have followed the instructions @ http://wiki.php-compiler.net/Installation/3.0/Linux

The included script did not work for me so I did have to manually edit the config files.

I have created a sample web app with three files: test.html, test.aspx, test.php. The first two work, but when i go to access test.php, all it does is download the file (as a text file).

performing a wget on the php file gives a 500 error, but I don't see anything interesting in the logs.

Any suggestions?
JeffCave
 
Posts: 3
Joined: June 5th, 2013, 1:09 am

Re: Install Apache/Ubuntu failing (just downloads the php fi

Postby Jakub Misek » June 5th, 2013, 4:55 pm

This is usually caused by incorrect mime type of .php files and/or missing request handler.

Just ensure, your web server handles *.php files with
Code: Select all
PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Install Apache/Ubuntu failing (just downloads the php fi

Postby JeffCave » June 6th, 2013, 1:49 am

Fixed. Though I'm almost too embarrassed to respond.

I think your diagnosis was correct though that was not the problem. I think I forgot to refresh my application pool. :oops:

Interestingly, that was the a flaw I had tracked down on my own before posting. It hadn't fixed the problem. I went back and double checked just now, and I am receiving a ASP.NET 500 error page. It is at least passing the PHP through the .net handler, and I am receiving error messages.

It's really a sad comment on my setup that I am happy to be getting error messages. ;)
JeffCave
 
Posts: 3
Joined: June 5th, 2013, 1:09 am

Re: Install Apache/Ubuntu failing (just downloads the php fi

Postby Jakub Misek » June 6th, 2013, 1:52 pm

Good :-) anyway thanks for your feedback; we are aware, linux is not Phalanger's primary target system, but it should work until mod_mono works. If you would have any other issues, let us know.

Thanks!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Install Apache/Ubuntu failing (just downloads the php fi

Postby JeffCave » June 7th, 2013, 1:19 am

Got it working and running a Wordpress test site (not the goal, but it was handy for the test). I thought I would share some of the things I had to do:

There is a bug in the install script on the wiki. The machine.config file ends up with
Code: Select all
<add assembly="PhpNetXmlDom, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"/>

which should be
Code: Select all
<add assembly="PhpNetXmlDom, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="dom"/>

Also, I was running the application as a root folder and was getting an error about a Virtual App ":machine:". I know that this is a known problem associated with short app names (viewtopic.php?f=3&t=790). I worked around it with redirects:
Code: Select all
<Location "/phalangery/">
    RewriteEngine On
    RewriteRule !^phalangery/ phalangery%{REQUEST_URI} [L]
    RewriteCond %{THE_REQUEST} ^GET\ /phalangery/
    RewriteRule ^phalangery/(.*) /$1 [L,R=301]
JeffCave
 
Posts: 3
Joined: June 5th, 2013, 1:09 am

Re: Install Apache/Ubuntu failing (just downloads the php fi

Postby Jakub Misek » June 7th, 2013, 10:07 am

Thanks! I've updated the config script. I'm glad it works for you now!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 15 guests

cron

User Control Panel

Login

Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 15 guests