resalath ahamed resalath ahamed - 1 year ago 77
PHP Question

Unable to run small php program in WAMP PHP

I have installed 64-Bit WAMP Server on my local computer. I have a sample php program placed under

c:/Users/Admin/Documents/First.php
. I have checked the phpmyadmin.conf and it looks as below:

Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.6.4/"
<Directory "c:/wamp64/apps/phpmyadmin4.6.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<ifDefine APACHE24>
Require all granted
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Allow from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
# To import big file you can increase values
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>


I have made sure the WAMP server is running and all services are good.

When I try to run the following on IE:
http://localhost/c:/Users/Admin/Documents/First.php


I get the following error:

You don't have permission to access
/c:/Users/Admin/Documents/First.php
on this server.

Can someone guide me through the steps, to run my program successfully?

Answer Source

WAMP should have created its own folders. If you have installed WAMP on C: the folder to place your script in, should be s.th. like C:\WAMP\www. Place your script First.php in that directory and then call http://localhost/First.php via browser. That should run...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download