Production Server

Hello

we use SC8 with postgres, and I try to keep running a virtual machine to test deployment of production server, SO is Ubuntu 14.04.2 LTS x64

I have installed apache 2.4.7, php 5.5.9, postgresql 9.3, libapache2-mod-php5 5.5.9, php5-cli

zip, mbsrting, gd are installed

but when I try to open the first page I ve got only white blank page

in apache error log I,ve got the following

Failed loading /etc/apache2/ZendGuardLoader.so: /etc/apache2/ZendGuardLoader.so: wrong ELF class: ELFCLASS32
[Mon Mar 09 15:32:18.989330 2015] [mpm_prefork:notice] [pid 1475] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.6 configured – resuming normal operations
[Mon Mar 09 15:32:19.003304 2015] [core:notice] [pid 1475] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Mar 09 15:57:17.253361 2015] [:error] [pid 1493] [client 172.16.60.1:52451] PHP Parse error: syntax error, unexpected ‘else’ (T_ELSE), expecting function (T_FUNCTION) in /var/www/html/dm/dm/index.php on line 670

On the SC8 server the project work perfectly
what do I have to check?

Regards

A couple of things:

  1. PHP 5.5 is not supported as yet - I’m not saying it won’t work - but you are likely to have issues?

  2. Have you followed the steps to setup the “prod” environment, from an SC perspective? This is over and above building a server with Apache and PHP. The first time you “deploy” your project to what will be your production system you need to go through a few short hoops that basically point your SC implementation to your Database (with an appropriate connection).

The fact that your errors mention Zend makes me think you haven’t done that initial set of things (It’s well documented). That’s because Zend is only needed in the dev environment.

thanks for reply,
removed the Zend
the connection to DB is working
found php 5.4.30 but I’m newbe to install it from source :frowning:
could you point me to documentation to install it?

Thanks again

Im also on 14.04 and downgrading PHP is near impossible - don’t even bother (I looked into it quite hard - and the general consensus is downgrade your Ubuntu to 12.04 for now). Or, as I did in my case, was kept 14.04 but created a 12.04 VM under 14.04 - until such time 5.5 is supported.

I know it’s possible (tryng right now to compile without curl support), our development server with SC8 is a 14.04 server, and the scriptcase installed php 5.4.30

Now, I tried to configure php 5.4.30 without curl support (I had an error og missing libraries) and installed

user@VM1-Missus:~$ php -v
PHP 5.4.30 (cli) (built: Mar 10 2015 16:44:55)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies

But still have the blank page :mad:

The apache error log still has

[Tue Mar 10 16:56:33.340805 2015] [mpm_prefork:notice] [pid 2103] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.4.30 configured – resuming normal operations
[Tue Mar 10 16:56:33.340910 2015] [core:notice] [pid 2103] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Mar 10 16:57:04.489191 2015] [:error] [pid 2107] [client 172.16.60.1:57441] PHP Parse error: syntax error, unexpected ‘else’ (T_ELSE), expecting function (T_FUNCTION) in /var/www/html/dm/dm/index.php on line 670

Just hope the only solution is not to install 12.04 LTS

I’m not saying you cannot do it - it’s just that 14.04 has lots of dependencies that rely on 5.5 - so you may well get 5.4 working for SC, but it will break a bunch of other key things.

My dev is in 14.04 but under a full SC implementation using its own apache and PHP 5.4 / Zend environment - however, using 14.04 as a prod environment is where it all gets rather tricky.

ok, I’m done
now install 12.04 LTS

thanks again

installed 12.04.5 LTS
Server version: Apache/2.2.22 (Ubuntu)
PHP 5.3.10-1ubuntu3.16 with Suhosin-Patch (cli) (built: Feb 13 2015 20:15:04)
Copyright © 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2012 Zend Technologies

And all is working, hope the team in working to make projects compatible with php 5.5

:slight_smile: here’s hoping…

Perhaps they should go a bit further, since 5.6.6 is the current stable release of PHP

Dave

Hi dreamtech
If you want to install php 5.4 on ubuntu follow this link https://www.digitalocean.com/community/questions/how-to-install-php-5-4-4-or-newer-version-of-5-4-on-ubuntu-12-04-lts

Here we are again…
after the test on a VM with ubuntu 12 as above, we bought a virtual server with centOS 6 x64

httpd -v

Server version: Apache/2.2.15 (Unix)
Server built: Oct 16 2014 14:48:21

php -v

PHP 5.3.3 (cli) (built: Oct 30 2014 20:12:53)
Copyright © 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies

GD Version bundled (2.0.34 compatible)
mbstring Multibyte Support enabled

Zip enabled
Extension Version $Id: php_zip.c 300470 2010-06-15 18:48:33Z pajoye $
Zip version 1.9.1

Connection with DB is ok but still have tha black page and https error log
[Thu Mar 19 17:02:37 2015] [error] [client 217.133.106.68] PHP Parse error: syntax error, unexpected T_ELSE, expecting T_FUNCTION in /var/www/html/dm/dm/index.php on line 670

what am I missing …

upgraded php

php -v
PHP 5.4.38 (cli) (built: Feb 18 2015 16:46:56)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies

still no luck …

How about your php.ini?

zend_extension=/var/ZendGuardLoader/php-5.4.x/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0

… after that

service apache2 restart

Hi
installed zend guard loader as http://www.servermom.org/how-to-install-zend-optimizer-on-centos-6-with-apache/775/
for centos 64bit

with a php info page I got
Zend Guard Loader enabled
License Path no value
Obfuscation level 0

but still no luck, blank page with firefox and chrome, HTTP 500 with Internet Explorer

php -v
PHP 5.4.38 (cli) (built: Feb 18 2015 16:46:56)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies
with Zend Guard Loader v3.3, Copyright © 1998-2013, by Zend Technologies

Any ideas?

could be httpd 2.2.15?
on ubuntu test I had apache 2.2.22

EDIT
built another virtual server ubuntu 12.04

root@DM-02:/var/www# apache2 -v
Server version: Apache/2.2.22 (Ubuntu)
Server built: Mar 5 2015 18:10:09

root@DM-02:/var/www# php -v
PHP 5.3.10-1ubuntu3.17 with Suhosin-Patch (cli) (built: Mar 17 2015 12:00:21)
Copyright © 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2012 Zend Technologies

and all is working …