Search

I've been trying to install my collective ensemble on a Joyent Shared Hosting account. But, I've only just realized how (relatively) ancient the legacy Joyent architecture is. It is still running PHP 5.2.12, and I'm getting 500 Internal Server errors after installation. Symphony installs and I am able to log in, but I then see blank pages when redirected to /symphony/blueprints/sections/. Trying to access any admin page results in a blank page.

I added the following line to the .htaccess file to turn on the display of errors.

php_flag display_errors on

Which reveals that I'm getting 500 Internal Server errors on all backend pages.

I tried installing a clean install of Symphony 2.2.x and I am experiencing the same problems.

Joyent is planning an upgrade for these legacy Shared Hosting accounts, but we won't be seeing anything for about a month, it seems.

For my personal sites on Joyent, it appears that I'm stuck (waiting to migrate to the upgraded Joyent servers), unless I stick to the 2.1.x versions of Symphony, as I was testing versions of Symphony before 2.2 and they install just fine. So, what might have changed between 2.1 and 2.2 that could cause 500 Internal Server Errors when running PHP 5.2.12? Or is this a Joyent-specific thing (Joyent support has, so far, not been helpful in diagnosing the issue)?

Just a quick heads-up: I ran into some 500 issues on a shared hosting of a client of mine just this week. That had to do with some unsupported .htaccess features (e.g. they do not support Options +FollowSymlinks and also do not support php_value).

It could, of course, be a lot of different things, but it might be helpful to try and simplify your .htaccess as much as possible.

Thanks, David. I actually did try paring down the .htaccess file in a number of different ways, but that didn't appear to work.

Where is php_value being used in Symphony?

For now, I think I'll just do my testing and development on our development server at work. It was a simple process to create the virtual server, navigate to the web root directory:

cd /home/builders/public_html

clone the Git repository into that directory:

git clone --recursive git://github.com/builders/collective.git .

and install the ensemble. It installed with no issues and is running fine. I guess I'll just wait for the server upgrades at Joyent.

But it would be good to know whether we need to modify the Server Requirements for Symphony from PHP 5.2 to PHP 5.3, or I need to pursue this support issue with Joyent.

No, Symphony should work on PHP5.2. Symphony 2.3 will be last branch that supports PHP5.2 though.

Do you have access to the server logs?

I have access to the logs and I think I've turned on logging to output Debug-level messages. But the error_log is empty. The access_log is logging requests (replaced the IP).

255.255.255.255 - - [11/Nov/2011:04:13:13 +0000] "GET /test/ HTTP/1.1" 500 342 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"

But that's about it. So, the logs aren't very helpful, but that's probably because the server is not getting farther than the .htaccess file. I know that because I replaced the index.php file with this:

<?php
die('got to here');

The server never got to there. So @davidhund, you're right. It's got to be something about the .htaccess file.

Hmm. I was wrong. It was the php_flag display_errors on directive that was causing the 500 error on the front end as well as the back end.

Actually Stephen that's what I thought: I wrote php_value but I also had php_flag in mind. Most (shared) hosting that is a bit restrictive will break on many such .htaccess features :(

So, when you comment out the php_flag display_errors on the site's running?

when you comment out the php_flag display_errors on the site's running?

Yes. The front end works fine.

I just found some more time to test and I'm having no errors on the front end with the default workspace. So, I'm only experiencing the 500 errors when trying to access any Symphony admin page.

Since I'm getting as far as the administration page, I'm trying to see how far I get with the Administration class

If I modify the Administration class file to see how far I can get, it fails at line 230:

$this->Page->build($this->_callback['context']);

If I invoke the die() function in front of this line, I get the expected output:

die('got to here');

If I place it after this line, I get a 500 error.

Tracking this down a little further, it appears that the build() method of the AdministrationPage class contains the offending code. If I comment out these lines, all of the admin pages are able to render as expected.

$this->addElementToHead(
    new XMLElement(
        'script',
        "Symphony.Context.add('env', " . json_encode($this->_context) . "); Symphony.Context.add('root', '" . URL . "');",
        array('type' => 'text/javascript')
    ), 72
);

Maybe this is the problem?

The solution was ridiculously simple. Modify the PHP5 php.ini settings to use the JSON extension. Uncomment the line:

extension=json.so

That's it. Perhaps we should update the server requirements to include the JSON extension.

For reference, this is the list of PHP5 extensions that is working for me on Joyent Shared Hosting:

extension=curl.so
extension=dom.so
extension=gd.so
extension=iconv.so
extension=json.so
extension=mbstring.so
extension=mcrypt.so
extension=mysql.so
extension=mysqli.so
extension=pdo.so
extension=xsl.so
extension=zip.so
extension=zlib.so

That's it. Perhaps we should update the server requirements to include the JSON extension.

This has been discussed before on the forum and I believe Nick has stated that it is a default module in PHP 5.2.0 so if it is not enabled, this was done deliberately by the host.

Anyway, this is the reason why it is not in the server requirements list, because it is an implicit requirement with PHP 5.2.0 or greater.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details