Jump to content

Recommended Posts

Can enyone give some proposition where to look, to solve this:

 

Apache 1.3.* + php 5.2 on VinXP.

I foloved instructions on www.php.net and apache manual, used php.recomended ini file, and now

Apache works properly, but <?php ....?> part just dont be parsed.. I put test.php file

(<?php

phpinfo();

?> )

it just been copied in source of the page, no parsing.. I checked php.ini and .config files; can't see nothing suspitius... I copied php.ini file in widows directory, restarted system.. Nothing seems to bi enough..

Have anybody idea what's goin' on here?

How have configured Apache.

 

Adding the following lines to the httpd.conf should be sufficient:

LoadModule php5_module "C:/php/php5apache.dll"
AddType application/x-httpd-php .php

 

Make sure you save the httpd.conf and restart the Apache server for the changes to take effect.

 

Also make sure you have added the php folder to the windows path too.

How have configured Apache.

 

Adding the following lines to the httpd.conf should be sufficient:

LoadModule php5_module "C:/php/php5apache.dll"
AddType application/x-httpd-php .php

 

Make sure you save the httpd.conf and restart the Apache server for the changes to take effect.

 

Also make sure you have added the php folder to the windows path too.

 

 

Thanks for those lines.. but...

 

without line

LoadModule php5_module C:/php/php5apache.dll Apache refuses to start..

and without line

AddType application/x-httpd-php .php

php code been shown in browser! with lastone line php code was not shown, at least..

 

and, offcourse i saved httpd.conf and restarted Apache whenever I made some change..

 

What could be problem here? Gremlins? :)

Huh! I do not understand what you just said. Are you not adding those line in? If you dont add those lines in then your php scripts will not run.

 

Attach your httpd.conf file here - Do not post the contents of the file. Attach it. To attach it click the reply button and then expand the addition options link to attach a file.

well, thank's again..

 

I added mentioned lines before, but I understand that:

Adding the following lines to the httpd.conf should be sufficient:

LoadModule php5_module "C:/php/php5apache.dll"
AddType application/x-httpd-php .php

should meen that I shouldn't add those.. Never mind...

 

Here are my httd.conf and php.ini files.. configured by advises from official manulas..

 

 

[attachment deleted by admin]

  • 2 weeks later...

If you are using apache2.2.x and php5.2 then use the php5apache2_2.dll module and not php5apache2.dll

 

So use this line for add php as an apache module:

LoadModule php5_module "C:/php/php5apache2_2.dll"

 

I used that line you recommended already, but no results...

I can attach my php.ini file later.. if you have some time to see it..

  • 2 weeks later...

I just can't beleive it..

 

I installed WampServer 5.1.7 and situation is the same I described above...

No results of executing php code, and in the source of the page in the browser it can be seen php code.

 

So, i gues, reason for those isn't configuration (httpd.conf php.ini), but something else...

I'm using Kerio firewall, but even Kerio is disabled, no effect on workin' php+Apache..

 

Anybody have an idea what may be cause? (little people  :) )

 

 

Make sure you have removed previous configuration files, httpd.conf, php.ini etc or any left over files from your previous installation.

 

Also make sure your files end with .php and not another extension like .html

Make sure you have removed previous configuration files, httpd.conf, php.ini etc or any left over files from your previous installation.

 

Also make sure your files end with .php and not another extension like .html

 

yeah, yeah...

during instalation of wamp5, I was asked to overwrite php.ini file in windows directory, I agreed, offcourse..

httpd.conf now should not bee problem, 'cause Apache instalation is placed in new directory...

 

name of test file is: "php.ini" its content is:

 

"first <br>

 

<?php

echo'something..';

phpinfo();

?>

 

last"

 

and in browser I can se output like this:

 

"first

last"

 

no php parsing at all!

 

I just haven't idea, what else can be wrong.. enybody have?

 

 

steel running wamp 5.1.7

 

I found in php_error file those lines:

 

[27-Apr-2007 01:57:16] PHP Warning:  ksort() expects parameter 1 to be array, null given in C:\wamp\scripts\refresh_apache_mod.php on line 37

 

this message was writen every time apache was restarted..

 

I checked refresh_apache_mod.php file, and on the start of this file is this code(including line 37):

 

<?php

 

//v1.0 by Romain Bourdon

 

$httpdfile = "../apache2/conf/httpd.conf";

 

 

$myhttpd = @file($httpdfile) or die ("httpd.conf file not found");

 

foreach($myhttpd as $line)

{

    if (preg_match('|^#LoadModule|',$line))

    {

        $mod_table = explode(' ', $line);

        $mod_name = $mod_table[1];

        $mod[$mod_name] = '0';

    }

    elseif (preg_match('|^LoadModule|',$line))

    {   

        $mod_table = explode(' ', $line);

        $mod_name = $mod_table[1];

        $mod[$mod_name] = '1';

    }

}

 

$mywampini = @file("../wampmanager.ini");

$mywampfp = fopen("../wampmanager.ini","w");

$i = 0;

while ($mywampini[$i] != ";start_apache_mod

")

{

    fwrite($mywampfp,$mywampini[$i]); 

    $i++;

   

}

fwrite($mywampfp,$mywampini[$i]);

ksort($ext);

....

 

so, it is standard code for this file in wamp instalation..

does anybody knows what I should do?

 

I also checked wampmanager.ini and found nothing suspitius..

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.