From 1331d210507259aa169c84f8e2abef92fbbda64d Mon Sep 17 00:00:00 2001 From: Tom Coonen Date: Wed, 14 May 2014 08:55:05 +0200 Subject: [PATCH 1/3] Zend Guard Loader recipe added --- Vagrantfile | 2 + Vagrantfile.chef | 1 + public/index.php | 186 ++---------------- site-cookbooks/app/recipes/zendguardloader.rb | 17 ++ 4 files changed, 38 insertions(+), 168 deletions(-) create mode 100644 Vagrantfile.chef create mode 100644 site-cookbooks/app/recipes/zendguardloader.rb diff --git a/Vagrantfile b/Vagrantfile index 4cf8cc9..ac0c611 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -48,9 +48,11 @@ # Enable and configure chef solo config.vm.provision :chef_solo do |chef| + chef.custom_config_path = "Vagrantfile.chef" chef.add_recipe "app::packages" chef.add_recipe "app::web_server" chef.add_recipe "app::vhost" + chef.add_recipe "app::zendguardloader" chef.add_recipe "memcached" chef.add_recipe "app::db" chef.json = { diff --git a/Vagrantfile.chef b/Vagrantfile.chef new file mode 100644 index 0000000..dc06693 --- /dev/null +++ b/Vagrantfile.chef @@ -0,0 +1 @@ +Chef::Config.ssl_verify_mode = :verify_peer \ No newline at end of file diff --git a/public/index.php b/public/index.php index 3582e5f..e0ee2b6 100644 --- a/public/index.php +++ b/public/index.php @@ -1,169 +1,19 @@ server_info; -} - -$mysqli->close(); - -// Memcached -$m = new Memcached(); -$memcached_running = false; -if ($m->addServer('localhost', 11211)) { - $memcached_running = true; - $memcached_version = $m->getVersion(); - $memcached_version = current($memcached_version); -} -?> - - - - - Vagrant LAMP stack - - - - - - -
-
- -

The Virtual Machine is up and running, yay! Here's some additional information you might need.

- -

Installed software

- - - - - - - - - - - - - - - - - - - - - - - - - -
PHP Version
MySQL running
MySQL version
Memcached running
Memcached version
- -

PHP Modules

- - - - - - - - - - - - - - - - - - - - - - - - - -
MySQL
CURL
mcrypt
memcached
gd
- -

MySQL credentials

- - - - - - - - - - - - - - - - - - - -
Hostnamelocalhost
Usernameroot
Passwordroot
Note: External access is enabled! Just use as host.
-
- -
-
- - - - +/** + * This Software is the property of OXID eSales and is protected + * by copyright law - it is NOT Freeware. + * + * Any unauthorized use of this software without a valid license key + * is a violation of the license agreement and will be prosecuted by + * civil and criminal law. + * + * @link http://www.oxid-esales.com + * @copyright (C) OXID eSales AG 2003-2014 + * @version OXID eShop PE + */ + +require_once dirname(__FILE__) . "/bootstrap.php"; + +//oxDb::getDb()->query( "delete from mysql_log;" ); +//Starts the shop +Oxid::run(); \ No newline at end of file diff --git a/site-cookbooks/app/recipes/zendguardloader.rb b/site-cookbooks/app/recipes/zendguardloader.rb new file mode 100644 index 0000000..b7e1335 --- /dev/null +++ b/site-cookbooks/app/recipes/zendguardloader.rb @@ -0,0 +1,17 @@ +# Install Zend Guard Loader +bash "zend-guard-loader" do + user "root" + cwd "/tmp" + code <<-EOH + wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz + tar xzf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz + cp ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386/php-5.4.x/ZendGuardLoader.so /usr/lib/php5/20100525+lfs/ + + file=/usr/lib/php5/20100525+lfs/ZendGuardLoader.so + echo zend_extension=$file > /etc/php5/conf.d/zend_extensions.ini + chmod 644 $file + chown 0:0 $file + + service apache2 reload + EOH +end \ No newline at end of file From d0bf0ef7e55d0e3d756156820c5feb83222c244f Mon Sep 17 00:00:00 2001 From: Tom Coonen Date: Wed, 14 May 2014 08:57:42 +0200 Subject: [PATCH 2/3] Updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fd578bd..f488d5d 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ If you are using the default configuration, just create a `dump.sql` file in the * memcached * postfix * vim, git, screen, curl, composer +* Zend Guard Loader 6 ## Default credentials ### MySQL From 04c4da8b181ff5e2b99067843128d088edcb6049 Mon Sep 17 00:00:00 2001 From: Tom Coonen Date: Wed, 14 May 2014 09:05:36 +0200 Subject: [PATCH 3/3] Default index.php now shows zend loader status --- public/index.php | 191 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 173 insertions(+), 18 deletions(-) diff --git a/public/index.php b/public/index.php index e0ee2b6..85ef82c 100644 --- a/public/index.php +++ b/public/index.php @@ -1,19 +1,174 @@ query( "delete from mysql_log;" ); -//Starts the shop -Oxid::run(); \ No newline at end of file +// MySQL +$mysqli = @new mysqli('localhost', 'root', 'root'); + +$mysql_running = true; +if (mysqli_connect_errno()) { + $mysql_running = false; +} else { + $mysql_version = $mysqli->server_info; +} + +$mysqli->close(); + +// Memcached +$m = new Memcached(); +$memcached_running = false; +if ($m->addServer('localhost', 11211)) { + $memcached_running = true; + $memcached_version = $m->getVersion(); + $memcached_version = current($memcached_version); +} +?> + + + + + Vagrant LAMP stack + + + + + + +
+
+ +

The Virtual Machine is up and running, yay! Here's some additional information you might need.

+ +

Installed software

+ + + + + + + + + + + + + + + + + + + + + + + + + +
PHP Version
MySQL running
MySQL version
Memcached running
Memcached version
+ +

PHP Modules

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MySQL
CURL
mcrypt
memcached
gd
zend loader
+ +

MySQL credentials

+ + + + + + + + + + + + + + + + + + + +
Hostnamelocalhost
Usernameroot
Passwordroot
Note: External access is enabled! Just use as host.
+
+ +
+
+ + + +