title: Apache won't load Zend Guard Loader
body: <p>I'm using Ubuntu 15.04 - 64 Bit with the following setup:</p>
  
  <p><strong>Apache</strong></p>
  
  <blockquote>
    <p>Server version: Apache/2.4.10 (Ubuntu),
    Server built:   Jul 24 2015 17:25:18</p>
  </blockquote>
  
  <p><strong>PHP</strong></p>
  
  <blockquote>
    <p>PHP 5.6.4-4ubuntu6.2 (cli) (built: Jul  2 2015 15:29:28)  Copyright,
    (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c),
    1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright,
    (c) 1999-2014, by Zend Technologies</p>
  </blockquote>
  
  <p><strong>My php.ini (The last 5 lines)</strong></p>
  
  <pre><code>; Local Variables: 
  ; tab-width: 4 
  ; End
  zend.loader=1
  zend_extension="/var/www/extensions/ZendGuardLoader_56.so"
  </code></pre>
  
  <p>And yeah, ZendGuardLoader won't be loaded (it's not mentioned in "php -v" and also not in "phpinfo()").
  Thread safety is disabled! If you need other options, let me know.</p>
  
  <p><strong>What i've tried so far:</strong></p>
  
  <ul>
  <li>removed the "zend.loader=1" option,</li>
  <li>Tried "zend_loader.enabled = 1" instead "zend.loader"</li>
  <li>included an older version from ZendGuardLoader (5.5 instead 5.6)</li>
  <li>Changed the owner and group from both files to my account (instead www-data)</li>
  <li>Changed the permissions to 777, 775, 755</li>
  </ul>
  
  <p><strong>Also nice to know:</strong></p>
  
  <p>My Apache Error Log is also "clean". If i rename the .so file, my Apache logs that exception. But on the current setup, the file is readable.. Don't get me wrong, but i expect a message like "ZendGuardLoader can't be loaded because "..</p>
  
  <p><strong>Update1</strong></p>
  
  <p>After a few hours, i'm pretty scared! I've installed vagrant incl. "Debian 7.8" as well, started everything and so on. On my box i've installed PHP (5.4) and Apache, created the www folder to the same destination, and downloaded the 5.4 ZendGuard Loader. In my box setup i did the same, as on my main system like -> php.ini, last entry: "zend_extension=/vagrant/ZendGuardLoader.so" </p>
  
  <p>The file exists, is readable as well, and so on. After creating a new "info.php" ("phpinfo()"), it's still without ZendGuardLoader Extension. The command php -v says mostly same, as main system (differences on version..). </p>
  
  <p><strong>Solution for php -v</strong></p>
  
  <p>Okay guys, my mind was broken - but it's not fixed! I told you, by checking php -v the output is pretty default (no ZendGuardLoader). BUT(!): php -v gets executed by commandline (cli) - so i've added the "zend_extension" inside php5\cli\php.ini -> works like a charm!</p>
  
  <blockquote>
    <p>PHP 5.4.41-0+deb7u1 (cli) (built: May 22 2015 12:49:18) 
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
        with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies</p>
  </blockquote>
  
  <p>That's what i've wanted. So i've called the phpinfo file by using commandline - and save the output into a separated file. And as i can see, the ZendGuardLoader is given, too!</p>
  
  <p>But there is still the Apache Problem. The zend_extension line matches exactly between apache2\php.ini and cli\php.ini.</p>
  
  <p>So it's not a permission problem, because CLI has no problem. I think, apache is broken, because it won't load that less special extension..</p>
  
  <p><strong>A new day - new ideas</strong></p>
  
  <p>Okay guys, yesterday we got the point, why it won't work on CLI, but that's less the major problem. So i've integrated ioncube on CLI and also on apache. CLI works like a charm. Apache won't load ioncube, too. So what  is wrong with this apache..?</p>
  
  <p>I tried to provoke some errors by creating a new file in the php5\apache2\conf.d\ directory. The new file contains the same "zend_extension=/vagrant/ZendGuardLoader.so" snippet, as my php5\apache2\php.ini - so apache2 would try to load the .so twice, and throws the expected error:</p>
  
  <blockquote>
    <p>PHP Fatal error:  [Zend Guard Loader] Extension "Zend Guard Loader" cannot be loaded twice in Unknown on line 0</p>
  </blockquote>
  
  <p>Apache tries to load both extensions. So i might be right, if i'm gonna say, apache2 load the extension, if it's only one! But it seems, that apache can't work with the extension. Remember - php cli ("php -v" / "php -m" ) can!</p>