Solved: ZEND OPTIMIZER 3.3.3 failure - and again always the same UMLAUTE Failure with APACHE

Hello All, during the installation ofan OXID eshop 4.0.0.1 CE

i had 2 solve 2 basic problems. I regularily run into them but as so often forget the solutions allready known.
I guess, it might be helpfull for on or an other OXID USERs to know about.

The new Rootserver I should configure for a customer (8 Processors, 16 GB RAM, Debian ETCH, PLESK 8.6) was a promising powerfull machine, but somehow i had 2 Problems to solve.

  1. despite the processors are indicated 64bit ZEND OPTIMIZER 3.3.3 64bit did not work out.

look into the linux cpu info.

cat /proc/cpuinfo

as “Quad-Core AMD Opteron™ Processor 2344 HE” the installation with ZEND Optimizer Version “3.3.3 64bit” worked “OK” during the installation, but the restart of the Apache Server was not possible. I killed the apache processes but restart still failed until i removed the ZEND installed Symbolic link for the php.ini at ->

/etc/php5/apache2/php.ini

and replaced it with ZEND made backup from the same directory.

Long search and discussion did not solve anything, from the PLESK Forum i got repeatedly the hint to check the ZEND Version touroughly. So i tryed to install ZEND OPTIMIZER 3.3.3. 32bit and “BINGO” - now ZEND and the Environment worked perfect. I guess my provider or plesk put into the default installation for the debian system some a 32 Bit Libraries (shame on the provider or Plesk - to force 32bit on such fine hardware) !.

Then the OXID installation was possible but now the
üöäßÜÖÄ
Umlaute and russian
абвгдеёжзийклмно

etc. have been not visible.

  1. Every year i run into this problem and forget what was the simple solution.
    I started googling around, pushed the provider for help, mad a lot of fuzz before i read an old forum entry wich i allready remembered reading it.

It just recomended to check the Apache Config file and define the default Charset. That somehow enables the Apache2 to switch in case of the VHOST conf files does not reconfiger or enable it later.

The Apache Configuration was w/o default switche off. I started vi and found the entry (you know the magic “/” ? in vi just try its nice)

vi /etc/apache2/apache2.conf

AddDefaultCharset ISO-8859-1

So since the complete Environment of the server runs UTF-8
I had a hard time to display the Umlauts (even switching correctly the charset inside the oxid ./out/basic/de/lang.php)

vi /etc/apache2/apache2.conf

AddDefaultCharset UTF-8

saving, testing and restarting
apache2 -t
apache2 -k restart

the Shop did what was expected from him.
I have no idea why some apache configuration dont switch codepages and charsets correctly until this is done. Might be there is a wise guy telling me - but i guess this exceeds the sope of the oxid forum.

Regards
Max

Hi Max,

unfortunately, I am not the wise person :slight_smile:
Thanks for your detailled report!

Kind regards


Marco Steinhäuser
Community Operator
OXID eSales AG

Hello,

We are facing a similar issue. Has anybody found a solution?

Thanks
Ashant

Hello Ashant,

what exactly happens? Any error message?

Marco

I have installed oxid 4.4 according to the instruction. I am ZEND SERVER community edition, using PHP 5.3.1 and apache 2.2.14, windows 7.
But when I run setup I get an error that mod_rewrite is not enabled. I checked httpd.conf and
LoadModule rewrite_module modules/mod_rewrite.so IS NOT COMMENTED.
Any help how to enable mod_rewrite?

Hello abagray,

this is actually not a Zend related problem. Anyway, could you check if your phpinfo() shows up a loaded mod_rewrite module?

Regards

in phpinfo() mod_rewrite is not loaded.

[QUOTE=abagray;36797]in phpinfo() mod_rewrite is not loaded.[/QUOTE]
Alright. So you have to activate it firstly on your server. Which system do you use, maybe XAMPP? Or did you install apache, php and mysql from scratch on your windows machine? Maybe this could be a good alternative for your development environment:

Regards

as I mentioned earlier I am using Zend Server community edition and mod_rewrite is activated(if uncommenting in apache means activation). I am using port 8080 for apache. Even I changed changed apache port to 80 still mod_rewrite it is not activated. if it sheds some light to the problem, I got the following support reply from a brother in ZEND support group:

[B][B]"[I]Please verify with Oxid that they do not check mod-rewrite against Apache while PHP is executed as PHP module, since we execute it as fastCGI on Windows and it is the recommended way by Microsoft.
I looked in the oxid community edition source and found 2 checks - one is to port 80 and the other checks apache module… so if you installed Apache on port 81 (for example, when IIS or Skype or another software holds port 80) it will fail the check, since port 80 is not configurable in oxid system requirements file and you need to change it yourself to the correct port to pass the test. Actually you can just return 1 and the installer should continue to set the rewrite rules…

If you have Zend Server GUI working, your mod rewrite should be operative.
You can also set some rewrite rule in httpd.conf and when you restart Apache it might show in the log a nasty error in case mod rewrite is not functioning[/I]."
[/B][/B]

Hi,

alright, please give me some time to double check that.

Thanks and regards

Hi,

About always assuming that server port is 80th - it’s a bug. I wrote it here:
https://bugs.oxid-esales.com/view.php?id=2011

it’s already fixed and will be released with shop in next Patch.
If you need the fix now - please check the comments of this bug entry - there is a solution posted.

Thank you for report.
Best regards

all right. thanks

all right. Thanks

Dainius, if I understand right, you mean add a code:
$iPort = isset( $_SERVER[‘SERVER_PORT’] ) ? $_SERVER[‘SERVER_PORT’] : 80;
just before
if ( $sScript && $rFp = @fsockopen( $sHost, $iPort, $iErrNo, $sErrStr, 10 ) ) {
in the file oxsysrequirements.php which is located in oxid /core/
I did that but still mod_rewrite is not enabled. At least that is what the Oxid setup is saying.
I tried to use both port 8080 and port 80 and of courses restarted apache.I am using windows 7.
Am I missing something?

Hi abagray,

both lines were added to the method checkModRewrite() to fix the bug in the next version.

More clear?

Not really clear. This is what I have originally.
public function checkModRewrite()
{
$iModStat = null;
$sHost = $_SERVER[‘HTTP_HOST’];
$sScript = $_SERVER[‘SCRIPT_NAME’];

     $iPort = isset( $_SERVER['SERVER_PORT'] ) ? $_SERVER['SERVER_PORT'] : 8080;
if ( $sScript && $rFp = @fsockopen( $sHost, $iPort, $iErrNo, $sErrStr, 10 ) ) { {
        if ( isAdmin() ) {
            $sScript = oxConfig::getInstance()->getConfigParam( 'sShopURL' ).'oxseo.php?mod_rewrite_module_is=off';
        } else {
            $sScript = str_replace( basename( $sScript ), '../oxseo.php?mod_rewrite_module_is=off', $sScript );
        }

        $sReq  = "POST $sScript HTTP/1.1

";
$sReq .= “Host: $sHost
”;
$sReq .= “User-Agent: oxid setup
”;
$sReq .= “Content-Type: application/x-www-form-urlencoded
”;
$sReq .= “Content-Length: 0
”; // empty post
$sReq .= "Connection: close

";

        $sOut = '';
        fwrite( $rFp, $sReq );
        while ( !feof( $rFp ) ) {
            $sOut .= fgets( $rFp, 100 );
        }
        fclose( $rFp );

        $iModStat = ( strpos( $sOut, 'mod_rewrite_on' ) !== false ) ? 2 : 0;
    } else {
        if ( function_exists( 'apache_get_modules' ) ) {
            // it does not assure that mod_rewrite is enabled on current host, so setting 1
            $iModStat = in_array( 'mod_rewrite', apache_get_modules() ) ? 1 : 0;
        } else {
            $iModStat = -1;
        }
    }
    return $iModStat;

The two lines suggested are the same as you can see in the method checkModRewrite() above.
I am using port 8080. Do you mean I change the port 80 to my port 8080?
If I changed to port 8080, I do not see the colored system requirments.

Since i had the same problem, but with a other reason, here a additional info for Zend Server:

When you use a fresh Zend Server installation, you have to do one small config change to get “mod_rewrite” to work.

By default the Apache “AllowOverride” option is set to “none” for the [installdir]\Apache2\htdocs folder.
If you want to allow all subfolders, just change the option to “all”

[installdir] = the folder where you installed Zend Server. By default “C:\Program Files\Zend”

  • Go to the folder: [B][installdir]\Apache2\conf[/B]
  • Backup the file [B]httpd.conf[/B]
  • Open [B]httpd.conf[/B] with a normal texteditor (Notepad)
  • Find the line: [B]<Directory “[installdir]\Apache2\htdocs”>[/B]
  • a few lines below you should find a line: [B]“AllowOverride none”[/B]
  • Change it to: [B]“AllowOverride all”[/B]
  • save the file and restart the Apache.

Now mod_rewrite should work!

++ When you installed Zend Server on Windows 7 in C:\Program Files\Zend\ then you need to modify the filesystem-rights before you can modify the httpd.conf!
Easier way to fix it, deinstall Zend Server and reinstall on a other folder. By example: C:\Zend\ :wink: ++

Hi Dema,

thanks for that one!

Regards