Link to home
Start Free TrialLog in
Avatar of roy_sanu
roy_sanuFlag for India

asked on

PHP to run wampserver issue

Hello,
 I have setup wampserver, with mysql. I could able run http://localhost/phpmyadmin
but when i run webgrind it gives me error. it tell "You don't have permission to access /webgrind/ on this server".

As i am new to PHP can i get some idea how to run a php file in the wampserver. suppose
i want have a simple helloworld to run. How i can i do it.

Thanks
Roy_sanu
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

did you start the wamp server and you know where to place the file to run etc.,? It should be very simple ... ref Simple Example
You can run simple PHP file normally. create the file "hello.php":
<?php
echo "Hello world !";
?>
Put this file in the path (if your WAMP installed in the drive C):
C:\wamp\www

Open in new window

then write in the browser:
http://localhost/hello.php

Open in new window

I think this will run while you said that you able to run phpMuAdmin.
I think your problem is in webgrind . Try to change in the conf to match your existed one.
Avatar of roy_sanu

ASKER

are you referring about config.php file of webgrind ?

roy_sanu
Yes but did you try to create the hello.php file and test it to ensure your php is working fine?
yes it is working
Avatar of rinfo
rinfo

edit windows\system32\drivers\etc\hosts file.
Its a hidden system file , you may need to enable viewing hidden , system files.
Make sure that you have just one entry on it.
127.0.0.1       localhost
Save edited file and restart wamp server.
This is what i added  on the php.ini file and i downloaded and extracted webgrind in the www folder, I donot know why i get the same forbidden error
[xdebug]
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "c:\wamp\www\webgrind\tmp"
xdebug.profiler_output_name = cachegrind.out.%t.%p

xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
zend_extension = c:\wamp\bin\php\php5.4.3\ext\php_xdebug-2.1.0-5.3-vc6.dll
Do you have ".htaccess" file in that folder??
ASKER CERTIFIED SOLUTION
Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you it is working fine..................
May i know the reason why it was quoted as "B" if it helped you perfectly.
if you want me to change  i can change it to "A", i do not have any issue on it, pls tell the procedure to do that , may be it was my mistake.

Roy_sanu
No, I just wanted to inquire whether my suggestion , was completely help full or not .
If you wish u can do it by clicking 'Request Attention' to moderator