• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

anyone know how to setup php with mysql?

lozina

Lifer
first time using php, I downloaded php 5 zip and unzipped it to c:\php on my windows xp machine.

then I followed some steps here to set it up so i can use it on my Apache Tomcat install. I created a file with php.phpinfo() in it and it worked- got a page full of config details. But the mysql section was missing from this page, and when I try a code snippet that does database I get the following error:

Fatal error: Call to undefined function mysql_connect() in C:\Tomcat6\webapps\test\test.php on line 6

and there is alot of stuff on google on resolving this but NONE of it is helping. basically i am supposed to activate the php_mysql.dll in extensions in php.ini (done) and make sure that libmysql.dll and php_mysql.dll are in the c:\php directory (done) and that c:\php is part of system path (done). I even restarted my computer after doing this and still getting that error and no mysql section is showing up from phpinfo..

can someone help me?
 
Sounds like you need to do a MySQL install. Also, if it is installed, then try putting your libmysql.dll in the windows system32 folder. You also may need the libmysql_c.dll in there but I'm not sure about that. The php_mysql.dll and php_mysqli.dll files should be in the php directory called "ext" for php5, then make sure you reference that directory for extension_dir in the php.ini. But I can't remember if php5 even requires those dll's anymore; I thought it was built in now.
 
yeah i definitely have mySql 5 installed.

i had originally tried using the php_mysql.dll and libmysql.dll which came with php5, but i have downloaded the latest ones from mySql's web site and overwritten them but no luck.

I did put them both in the c:\php folder and the c:\php\ext folder. in php.ini i have set extension_dir to "c:\php\ext"

I did not put the dlls in system32 because c:\php was made part of my system's path.

i restarted the computer after doing all this too.
 
well, I got it working only after I tried it with a regular Apache 2 server. I just can't get it to work with Tomcat. Bummer...
 
Not my area of expertise, but any chance that connections from Jakarta Tomcat to MySQL require a Java library file such as MySql Connector/J? I know that standalone clients require said jar file(s), but I'm not sure if your specific environment/setup would.
 
Originally posted by: Kur
Isn't tomcat just a addon with apache? That's what I thought it was...
Tomcat isn't an addon. It's more of an application platform like JBOSS. It provides a platform to roll out java-based applications through the web. Most web portals utilize this kind of technology to manage their backends. Some admins use html in front of them in Apache to sort-of proxy the engine to port 80 rather than it running in its default of 8080, but this isn't necessary for most apps.

-Scar
 
Back
Top