Cant modify data in database with wamp - php

I am using wamp to to host my server on my computer and I have a webpage where, that modifys that data in a database, when ever I try to modify the data though I get this error
Forbidden
You don't have permission to access /htdocs/< on this server.
with htdocs being my project folder
if anyone knows how to fix this that would be great.
thanks

Wamp does not use a htdocs folder by default, it sounds like you have a very messed up system.
Do you have another Apache service running? Wamps apache service is called 'wampapache' and NOT Apache.
Did you install apache some ther way before installing wamp, if so Uninstall it, ditto MySQL if you had that installed before installing wamp.

Related

I had XAMPP on my device but I have to uninstall it now my project does not run on localhost

XAMPP has some error about ports I uninstall it but did not back up any information and now my project does not run on local host is there any way for me to restore my old project or I have to do it again on new XAMPP? another problem is after reinstalling XAMPP windows do not know PHP what should I do?
by the way I am a very beginner in this :)))
So, I will try to explain this:
Websites (i.e. with PHP) need a webserver. For example when you go to stackoverflow.com, you automatically call a webserver who then compiles the PHP scripts on the server to HTML code.
This principe does also apply to your local installation.
When you call localhost, you basically call yourself as the webserver. XAMPP is a tool that can "simulate" a webserver on your PC, thats why PHP sites do not work without it, because your browser doesn't know what to do with PHP code, it only understands HTML.
If you install XAMPP again you should be able to get it running.
If you have any questions/problems with the XAMPP installation, feel free to ask again.

How to setup a PHP server?

I'm trying to set up a PHP server. We have an old server that runs a bunch of in house forms over an intranet that is coded in ASP, and I'm trying to rebuild that into a better system using PHP.
I'm starting fresh, as have been given a Win 2012 r2 server.
I first tried installing IIS 8. I installed downloaded the files for php (version 7). I was successful in being able to access index.html and any other files placed in the c/inetpub/wwwroot folder from a different PC via a browser (http://servername/file.php). However, I installed MariaDB and phpmyadmin. phpmyadmin gave the the message the mysqli extension is missing.
I ultimately uninstalled IIS, and PHP, and the MariaDB. I wanted to start from scratch, and tried with Apache
I was able to get Apache and PHP to work together, but I could not access files in the htdocs folder from a different PC (going to http://<servername>/file.php). I could only access it via localhost.
I had the same problems with phpmyadmin and mysqli.
I also noticed there was no php.ini file... rather I saw a php-ini-production and php-ini-development files.
How to I fix the phpmyadmin problem? Any advice for configuring apache so that I can access files place in the htdocs folder from a device other than the server itself (non-localhost)?
I recommend using XAMPP, then you'll have MySQL, and may be you could configure to use MariaDB as well.
If you use XAMPP, phpmyadmin is not available other than localhost, but that is configurable. If you want i can help you find a good video for that.
take the php-ini-production file and rename it to php.ini and find the line
;extension=php_mysqli.dll
and just remove the leading semicolon (;), save and restart apache.
Also you need to open the firewall on your machine to allow port 80 to accept all connections.

WAMP installed, Apache running, but not MySQL

I am trying to install WAMP, webpages to be stored in localhost.
I have the relevant packages downloaded. Inside WAMP Apache running fine, but not mySQL. WAMP Icon is orange.
I have not downloaded anything regarding MySQL, before downloading WAMP.
What should i do?
It seems like MySQL is not initiated. I recommend, go to config->tick all modules, close. Restart computer, start WAMP Server. Disable firewall. If still no use, install a fresh copy.

I have both WAMP and APACHE installed. Do i just need one or both?

I downloaded APACHE to use as a server on my local machine. I tested it by turning it on 'http.exe' I believe it's called. And storing a 'index.php' file that just says "It works". It showed this file when I went on local host on my browser.
I've downloaded My SQL work bench, and WAMP, and PHPMyAdmin.
My question is, do I need to uninstall Apache since my WAMP local server is on. Because when I type in local host in to my browser it takes me to the WAMP server configuration page, instead of showing "It works".
So does this mean I don't need Apache any more?
WAMP is basically Apache,php and Mysql package. Once it is installed you have installed these 3 and ready to go. You don't need separate one. Phpmyadmin also installed there.
Once it is installed you can have a tray icon in right bottom of the desktop. Use this menu to manage Wamp for eg: Start or stop Apace and Mysql, configure Apache,PHP and Mysql etc. Once you started the apache and mysql. Just type http://localhost in web browser to check the installation is ok or not. Remember C:/wamp/www is the webroot where your php files should go.
Wamp includes Apache, so you don't need a separate installation.
WAMP stands for "Windows Apache MySQL PHP"
So having WAMP means you have Apache, PHP, MySQL, PHPMyAdmin etc.
To run PHP code you need Apache server. And WAMP is an apache server environment. Same as LAMP (Linux version) or XAMPP (my favourite, stands for "Cross-platform Apache MySQL PHP Perl")

XAMPP Error Solution? I have that installed on my Windows XP Dual Boot Machine

My system is dual boot, Win-XP Professional (32-bit) an Win-7 (64-bit).
I have XAMPP installed on my XP OS (C:/XAMPP).
I want to use the same htdocs directory for testing the php on my windows also.
But when I am installing the XAMPP on the same directory, I am getting this error.
Important! Because an activated User Account Control (UAC) on your
sytem some functions of XAMPP are possibly restricted. With UAC please
avoid to install XAMPP to C:\Program Files (x86) (missing write
permisssions). Or deactivate UAC with msconfig after this setup.
Can someone please help me in resolving this thing?
Thanks.
First : open Start Menu -> Run.. and type "lusrmgr.msc" inside. In the opened window, click "Users" on the left menu, then double-click on your username in the middle and then select "Member Of" in the opened window. Do you see "Administrators" there?
BTW you can try installing XAMPP in another directory, then open php.ini and set the VirtualDirectory parameters to point your previous XAMPP htdocs folder.
The question is not clear enough for a clear answer - but it sounds like you are trying to install XAMPP on your Windows 7 OS but use XP's htdocs folder as the content?
The warning you are receiving is from Windows 7 UAC, which authenticates all of your actions etc. when enabled. Go to your accounts and disable UAC, then you should be able to install XAMPP without this error message. However, if you are trying to install it in the same location then it will likely overwrite your XP installation. The question is very vague.

Categories