[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

PHP has encountered an Access Violation

Posted on 2009-02-10
12
Medium Priority
?
1,037 Views
Last Modified: 2013-12-12
Just done a new install of PHP, MySQL and PhpMyAdmin using IIS 5.1 and Windows XP Pro and get the dreaded "access violation" when trying to use PhpMyAdmin.

Have searched high and low for a solution to this, and note many people have been raising similar questions for at least five years! I'm guessing that the bug fixes within PHP are now all in place, and I cannot find a recent occurrence of this issue here on EE or anywhere else on google.

I have downloaded the latest stable versions of the software elements mentioned above, so wonder if I've just done something inappropriate in the .ini or config files. I've followed all the instructions pretty closely though, so I'm at a loss on that score.

Any useful ideas?
0
Comment
Question by:berba
  • 7
  • 5
12 Comments
 

Author Comment

by:berba
ID: 23604725
Well, I guess if no-one's interested, I don't know how to make my problem seem more exciting...

Seems to me similar things have happened in the past, so I would have thought there is a solution out there that ought to be robust. But others appear to have been disappointed on this site with similar issues, so maybe it's just too much "off message".

Disappointed by the "get answers from experts in about an hour" rhetoric though.

Doesn't seem like a site worth joining. But - hey - I'm willing to be proved wrong!
0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 2000 total points
ID: 23606485
The problem with "Access violation" is that it forms the first two words of almost every Windows error dialog ever written. You might as well as say "does not work".

I'm sorry for being so negative, but I'm just trying to explain your discovery of why the error message is still unresolved after five years. Your best option is probably to reinstall phpmyadmin.

Did you install all these components as separate installs? I would normally advice anyone on Windows to do a WAMP install and then to move Apache to port 81 if they want to use IIS instead of Apache. WAMP installs are nice in that they do the lot as a package of compatible binaries. Enabling IIS instead of Apache is donw like so http://www.herrodius.com/blog/23
 
0
 

Author Comment

by:berba
ID: 23609117
Notwithstanding the commonness of the "violation" error syntax, I would have thought the very specific circumstances in which this message arose would have been encountered many times before. A squiz around google confirms this, but the solutions that I've seen are old (like 2004) and refer to things like php bugfixes that must have been incorporated in php long ago. Can't help thinking that there's a simple solution here that would be useful to lots of other people too.

BTW, why do you think a reinstall of phpmyadmin might work? I thought it was less of an "install" and more of a "copy the unzipped files into your webroot" kind of thing. What is actually installed anywhere?

Having said all that, I can see that there is little point in sweating the "old way" of separate mysql, php and phpmyadmin installations if there is already an integrated, compatible and compiled version to hand. I'm afraid I'd never heard of WAMP, but having looked at the reference you gave me it seems clear that there is not just one sort of WAMP but many. Can you recommend exactly what WAMP I should go for, why, and where I can get it?

Also, what sort of uninstall precautions do I have to take with the existing mysql? Presumably I can't just do a WAMP install over the top of it and hope for the best!?

I know there's a lot of how/why/where in this, but your help would be much appreciated. Glad I stuck 500 points on what I naively thought was a simple problem!!

Thanks
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 23609445
Before we start this I should warn you that in our offices we threw all the Windows kit out about three years ago and have been on Linux ever since and I cannot help you with IIS.

"why do you think a reinstall of phpmyadmin might work? I thought it wasless of an "install" and more of a "copy the unzipped files into yourwebroot"

This is a fair point  and you are correct - phpmyadmin is a collection of PHP scripts so it makes it more likely that your problem is with PHP , MySQL or IIS. If IIS is working normally then it is PHP or MySQL that may be caused the problem.


"Can you recommend exactly what WAMP I should go for, why, and where I can get it?"
As far as I am aware, there is only one official download.

http://www.wampserver.com/en/download.php


"Also, what sort of uninstall precautions do I have to take with theexisting mysql? Presumably I can't just do a WAMP install over the topof it and hope for the best!?"

Try using the MySQL tools such as mysqldump to export the database in question and store the resulting text output somewhere safe. After the install is complete simply run the data back in again. You had best assume that anything within your PHP/MySQL structure will be lost, so copy them all somewhere else.

If you have the time to do it, why not download the Wamp install on to another PC and install and test it there. If it works then install it on your existing machine. I would also uninstall the existing stuff first and (because it Windows) a reboot before doing the install is probably a good idea.

0
 

Author Comment

by:berba
ID: 23609767
Thanks - it's so helpful when someone addresses multiple questions sequentially and clearly like that. Much appreciated!

Downloading the file seemed to bounce off sourceforge.net, and sourceforge appears to have various versions of wampserver that can be directly downloaded from there. Puzzling.

With regard to the uninstall of mysql and php prior to running the wamp installer, presumably this is just a matter of using the mysql wizard to remove the current instance of mysql and then deleting the .ini and config files associated with the two programs.

Mention of the .ini and config files makes me wonder how you tinker with PHP settings and the like once wamp is installed. Do you have to go through the same process of copying an ini file into Windows?

0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 23609933
"Downloading the file seemed to bounce off sourceforge.net"

I tried clicking on the link for wampserver which took me to sourceforge and it started to download an executable. Did this not happen for you?


"presumably this is just a matter of using the mysql wizard to remove the current instance of mysql"

I guess so... or the Add/Remove programs in Control Panel. Ironically, given the installation problems I used to have in Linux, the Linux installers seem to give less hassle than the Windows ones - as long as you use the repositories!

Read this http://www.experts-exchange.com/Database/MySQL/Q_24118846.html about getting data in and out of MySQL on Windows. Make sure you have copies of all your data before you do anything.


"Mention of the .ini and config files makes me wonder how you tinker with PHP settings"

I cannot remember if WAMP has a control panel for this but php.ini is very easy to edit by hand.




0
 

Author Comment

by:berba
ID: 23610003
I tried clicking on the link for wampserver which took me to sourceforge and it started to download an executable. Did this not happen for you?

Yes it did. But the fact that I was taken to sourceforge made me wonder what other versions existed there, and they seemed to have several. I guess this isn't an issue so I won't waste your time with it - 'twas merely that I've had experiences in the past where a complex download/installation is followed by a comment such as "why did you choose that one when there's a better version under this rock!"

I cannot remember if WAMP has a control panel for this but php.ini is very easy to edit by hand.

I don't have a problem with editing it by hand, but how does the ini file magically get itself into the Windows directory? Do I have to surgically remove it from somewhere in order to drop it into Windows? Or does the install take care of all this stuff so that the program initialises successfully? And, in that case, where do I find the ini file so that I can edit it by hand?

Sorry for the supplementary how-tos - but I'd rather ask them upfront and feel confident once I turn the ignition key on the WAMP.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 23610077
"but how does the ini file magically get itself into the Windows directory?"

As I recall, it winds up in C:\php5\php.ini

Just let it install and then do a search for php.ini and see where it turns up.
 
0
 

Author Comment

by:berba
ID: 23610336
OK - makes sense!

I'll fire up the WAMP this afternoon/evening and get back to you with results asap.

Thanks for the help so far...

Rgds
0
 

Author Closing Comment

by:berba
ID: 31545008
This recommended solution didn't actually solve the problem, it simply made the problem irrelevant by pointing me in the direction of a much better, much simpler, much quicker way of doing things! Very much appreciated.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 23615723
I take it that everything worked out OK?
0
 

Author Comment

by:berba
ID: 23620430
Everything went very smoothly - as you predicted!

Many thanks for your help in trying to find what was going wrong with the interactions between the individually installed packages. But, as you suspected, the best method proved to be the simplest.

Rgds
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question