Everything is fine, but .php files not working
Posted by: Mohamed Refai (---.34.44.16.tedata.net)
Date: April 04, 2012 02:03AM

wamp's icon is green
All services started
localhost assigned to wamp no conflicts with it
localhost/phpadmin is fine
but
.php files not executable and its content showed as text with php syntax
What's the problem ?

Thanks for help smiling smiley

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: RiggsFolly (---.as13285.net)
Date: April 04, 2012 09:54AM

Check the following

wampmanager -> apache -> apache modules -> php5_module


This should be ticked.

In php.ini look for this line

engine = On

the parameter should be On not Off

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: Mohamed Refai (---.43.32.240.tedata.net)
Date: April 04, 2012 11:26AM

php5-module
engine = on
already done, but the same problem still here
and .php file looks like notepad file however opening the file with my browser

Any help?

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: Kirk (---.dhcp.stcd.mn.charter.com)
Date: April 04, 2012 11:49PM

are your pages *.php or *.html? If the latter, you will just see the php.



Edited 1 time(s). Last edit at 04/04/2012 11:50PM by Kirk.

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: Mohamed Refai (---.43.35.64.tedata.net)
Date: April 04, 2012 11:57PM

nope its extension .php

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: RiggsFolly (---.as13285.net)
Date: April 05, 2012 10:37AM

OK,

Do you have mime_module ticked in the wampmanager -> Apache -> Apache Modules

Check you have the mime types set correctly in httpd.conf

This line is required
AddType application/x-httpd-php .php

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: Mohamed Refai (---.235.183.240.tedata.net)
Date: April 05, 2012 11:32AM

ya it already checked
but
php5-module can't checked
so
the problem I have from?
and
how I can configure it?
Thanks

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: natraj200 (59.92.182.---)
Date: April 08, 2012 05:19PM

I am also facing the same issue. Any help is much appreciated.

Thanks
Natraj

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: natraj200 (59.92.180.---)
Date: April 08, 2012 05:33PM

I seem to have a possible solution to the problem.

instead of just <? I have used <?php and rest is same.
This seem to do the trick. It works for me.

Here is my code.

<HTML>
<HEAD>
<TITLE>My First PHP page </TITLE></HEAD>
<BODY>
<?php
echo "Hello World!";
?>
</BODY>
</HTML>

Regards
Natraj

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: julius villapando (121.54.32.---)
Date: April 11, 2012 05:13AM

if your a novice, maybe the problem lies on how you open your php file.
instead of clicking the icon of the php file. you should open first your browser and type in localhost/filename.php

*your file should be under the www folder.

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: RiggsFolly (---.as13285.net)
Date: April 11, 2012 10:11AM

Edit php.ini

Look for short_open_tag = Off

You can change this to On and it will understand the <? ?> format for php tags.

But in all honesty it is best to use the full and proper <?php ... ?> tags as these will always work everywhere!

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: lenin (27.7.33.---)
Date: April 11, 2012 12:38PM

Hi, i have just installed Wampserver 2 successfully but i aint able to run it. Its showing Error 500- Internal Server Error.. When ever i run my projects it displays..

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error."

More information about this error may be available in the server error log."

And when i go to Apache-> Apache Error Log, it displays "httpd.exe: Could not reliably determine the server's fully qualified domain name, using 27.7.33.200 for ServerName"

What is the actual problem and how do i repair/check it so as to be able to run my projects.

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: RiggsFolly (---.as13285.net)
Date: April 11, 2012 05:58PM

lenin,

Please start your own thread and do not hijack somebody elses, especially when it is not the same problem.



Edited 1 time(s). Last edit at 04/11/2012 05:59PM by RiggsFolly.

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: lenin (27.7.33.---)
Date: April 11, 2012 10:23PM

My bad, RiggsFolly. I didnt know my thread was different from this.

Options: ReplyQuote
Re: Everything is fine, but .php files not working
Posted by: Mohamed Refai (---.43.116.92.tedata.net)
Date: April 12, 2012 11:59AM

Thanks guys
Everything is really fine now grinning smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.