Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

PHP Script can't write to SQL Database


  • Please log in to reply

#1
CompNetWeb

CompNetWeb

    Member

  • Member
  • PipPip
  • 14 posts
Hello,

I am having some problems with my webserver setup. I am running Windows Server 2003 Web Edition, IIS 6.0, PHP 5.2, MySQL 5.1.11 (all on the same box). I am trying to use a type of knowledge base script written in PHP that for the most part just works as Forum. I had previously been using Apache Friends' product called Xampp (www.apachefriends.com) which is basically a all-in-one installer for a quick and easy webserver for development purposes. Now, however, I need a more secure and stable enviroment so I switched to IIS and have tried tutorial after tutorial but I still have the same problem.

I have PHP working fine. The knowledge base script opens just fine and is able to read its database in MySQL. The problem comes in when I try to add data to the MySQL database. The PHP Script will come up and say that the data was saved but in reality nothing was added so it seems like it's lacking write permissions. It should have all appropriate permisions (actually at the moment more than it needs since the script logs on as root user) so I don't understand what is wrong. By the way, the script I'm trying to use is called "WSN Knowledge Base Free 2.0.10F" and is located at http://scripts.webma...site.net/wsnkb/

Any help or suggestions would be greatly appreciated considering I've been going on my own with this problem for about a month or so now. Thank you in advance!


-Chris
  • 0

Advertisements


#2
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
You have switched from Apache to IIS because you need something more stable and secure :whistling:

Most attacks made on web servers are done on IIS, despite more servers useing Apache. So you might want to switch back if you can.

I had the same problem as this before once, I am not exactly sure what was wrong, but I know it was something to do with MySql not being set up right. You might want to try reinstalling it.

I set up Apache, PHP and MySql about 3 months ago, and had no problems.
  • 0

#3
CompNetWeb

CompNetWeb

    Member

  • Topic Starter
  • Member
  • PipPip
  • 14 posts
Well this morning I tried uninstalling MySQL and reinstalling using the standard method of add/remove programs only to come up with an error at the very last part of the install. Any ideas?

Posted Image
  • 0

#4
CompNetWeb

CompNetWeb

    Member

  • Topic Starter
  • Member
  • PipPip
  • 14 posts
On an additional note, there is no firewall running on the system. I also removed the "data" folder manually after uninstalling and rebooting. When I tried to log in with MySQL Administrator with the password I had before I get the following password:

Posted Image
  • 0

#5
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
Well I was right, it is a MySql thing for sure.

What happens when your run MySQLInstanceConfig.exe ? Does that fix anything up?
  • 0

#6
CompNetWeb

CompNetWeb

    Member

  • Topic Starter
  • Member
  • PipPip
  • 14 posts
Well upon trying to manualy start the MySQL service I get this error:

Posted Image

I tried running the MySQLInstanceConfig.exe on the server got the following error :whistling:

Posted Image
  • 0

#7
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
Try reinstalling if over the top of what ever is there.
  • 0

#8
CompNetWeb

CompNetWeb

    Member

  • Topic Starter
  • Member
  • PipPip
  • 14 posts
Well, after too many failed attempts of reinstalling and uninstalling, MySQL has given me the final error. It is now to the point where it will not install anymore. So, I give up on IIS. I know that I was close to having it working, but yeah I'll go back to Apache and hope that I can get it to be friends with Exchange OWA.
  • 0

#9
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
Yeah, I don't trust IIS. I read several cases in the php manual where it will say that in a warning that due to some bog in ISS some unexpected result will happen. What more could I say?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP