Click to See Complete Forum and Search --> : MySQL No Worky!?!?
XxMaCaBrExX
02-20-2001, 05:19 PM
Well, I just did a clean install of Mandrake 7.2 which I have never had any problems with before. I needed to have a MySQL server running as a backend for PHP. Well, I decided to use phpMyAdmin to set it up. Well, Uh uhhh! I keep getting errors from PHP in my browser on the exact line that holds the MySQL DB Login string. So I thought, "Mayyybe it's just phpMyAdmin, I'll try PHP-Nuke." Still Nothing! So I tried upgrading to the latest MySQL packages for Mandrake off of RPMFIND.net. Still nothing. What am I missing??? :confused:
XxMaCaBrExX
02-20-2001, 05:49 PM
Man, everytime I post a question on here, nobody ever helps me out. I guess My questions are too advanced for you guys or something. J/K :D
Energon
02-20-2001, 06:03 PM
maybe try building from source?
XxMaCaBrExX
02-20-2001, 06:21 PM
It really sounds like a good idea, doesn't it? But the last time I tried that, I ended up having to re-install completely because all of the dependecy's I had screwed up by un-installing RPM's, and building up from source. It's really a pain in the ARSE! I've come to realize that several other people are in the same situation as me from the PHP-NUKE forums, and it seems to be a Mandrake Issue. One that could really stand to be fixed. ;)
Energon
02-20-2001, 06:30 PM
ouch... I had no idea it was that much trouble to switch out some rpms and then to build from source... :(
Best of luck with it though, hopefully in some manner you can switch out what you can and get it going with source... :)
XxMaCaBrExX
02-20-2001, 06:36 PM
Ok, to whom it may concern, here is the exact error messege,:
Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/mainfile.php on line 17
Which just so happens to be the line where PHP tries to connect to the MySQL database. Maybe I'm just crazy or something, I don't know? :rolleyes:
nanode
02-20-2001, 07:15 PM
You aren't, by chance running an older php?
A lot of us here can help you out with a complete, mysql/php/apache install from source. (If you're interested)
Strike
02-20-2001, 07:32 PM
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/
A wonderful tutorial on getting PHP and MySQL working together on apache.
Sweede
02-21-2001, 02:26 AM
your not using php4, if you had been using php4, you would be fine, you should be using php 4
also, REMOVE the mysql_pconnect lines from nuke, and use mysql_connect. FB (i cant spell his name, the creator of nuke), was a dumbass for using persistiant connections.
o well,
XxMaCaBrExX
02-21-2001, 09:47 AM
I am using php 4. This is Mandrake 7.2 and it's standard packages. I've upgraded everything to the latest version from rpmfind.net.
XxMaCaBrExX
02-21-2001, 10:05 AM
I'm going to grab the latest packages from the cooker and install those. I would build from source, but with Mandrake, it just ends up making things worse. :(
XxMaCaBrExX
02-21-2001, 10:15 AM
Ok, I upgraded to a new version of PHP and mod_php and now the page doesn't get parsed. All I see is the source in the window. I'm pretty sure I'm doing something wrong here, so can somebody point me in the right direction??? Thanks ;)
nanode
02-21-2001, 10:26 AM
Sweede:
What's the problem with mysql_pconnect()?
I was under the impression that a persistent connection to the DB improved performance and scaled better.
XxMaCaBrExX
02-21-2001, 10:30 AM
While we're here, has anybody gotten the Apache::ASP module with FrontPage2000 extensions working either???
XxMaCaBrExX
02-21-2001, 10:39 AM
Ok, got it to parse the PHP again, but still no luck with connecting to the database. Can somebody PLEEZE help me out here. AAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!! !!!!! I think I'm going insane! :p
Salmon
02-21-2001, 02:30 PM
Are you sure that the RPM had MySQL support built into it? Check the output of phpinfo() in your browser and see if your PHP install actually has MySQL support (I would put money on it that it doesn't).
Sweede
02-21-2001, 02:41 PM
drakes standard packages dont include mysql modules.
which is stupid.
compile it from source, apache, php, etc etc
i dont like doing MySQL from source, so i use RPMS.
also, apache::asp relies on mod_perl, which is ugly and stupid. there is a port of ASP that doesnt require mod perl.
if you need some info on how to set it all up, link me to apache::asp and i'll be able to get it all working.
MentatTux
02-21-2001, 03:32 PM
Well, I didn't have a problem compiling MySQL from source on Mandrake 7.2. And it workys for me fine :D
Anyhow, maybe someone can let me know how to compile PHP with MySQL support? I did a completely default MySQL compile, and with php3, I'm pretty sure it worked with --with-mysql=/usr/local, but not anymore.
Any ideas?
jemfinch
02-21-2001, 03:37 PM
posted 20 February 2001 04:19 PM:
...
What am I missing???
posted 20 February 2001 04:49 PM:
Man, everytime I post a question on here, nobody ever helps me out. I guess My questions are too advanced for you guys or something.
:rolleyes:
Jeremy
Salmon
02-21-2001, 03:59 PM
Originally posted by Sweede:
drakes standard packages dont include mysql modules.
which is stupid.
Not that stupid really. What if you didn't want to use MySQL? Maybe you had a different database that you wanted to use. Then those people would be complaining that it's stupid to include MySQL support. It's kind of a no win situation, although I think that the latter group would have a stronger argument.
My guess is that the PHP RPM doesn't have a lot of optional features enabled. Luckily, PHP is pretty painless to install from the source.
nanode
02-21-2001, 04:11 PM
the docs on php.net are explicitly clear on howto build php as an apache module w/ mysql support:
http://php.net/manual/en/install.unix.php
...
7. cd ../php-x.x.x
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
...
In this context mySQL is a given, how it arrived is not relavent to php.
XxMaCaBrExX
02-21-2001, 04:23 PM
Ok, everybody calm down. I figured it out and it works fine. Now I just have to get Apache::ASP along with FrontPage2000 extentions working. It turned out that there is a PHP-MySQL module rpm that doesn't even come with the installation that needed to be installed to add MySQL support. :) Thanks for all your help you guys. :D
nanode
02-21-2001, 05:00 PM
Ok, everybody calm down.
d00d, you're the one spazzing out, starting redundant threads titled "I'm going nutzzz" err whatever and spamming all of LNO.
XxMaCaBrExX
02-21-2001, 05:11 PM
I never spammed anything fuchtard! Your the one spamming with your rude comments trying to start flam-wars. Take a look at the # of replies to this thread and then look at how many of them are mine. :p
Sweede
02-21-2001, 06:14 PM
Originally posted by nanode:
Sweede:
What's the problem with mysql_pconnect()?
I was under the impression that a persistent connection to the DB improved performance and scaled better.
MySQL pconnect can quickly eat up your persistant links on a server.
if your running your own, you can control these yourself, but if your on a hosted server, many hosts set the max links to 100 or so, some dont allow them.
persistant links are ONLY good if the connection overhead to the database is high, i.e. across the internet.
you cannot close persistant connections, you need to restart Apache/MySQL to close a persistant connection.
r00t619
02-21-2001, 08:50 PM
Can you even login to the db from the command line? ie. mysql -u root mysql
If you can't do that then how in the heck are you ever going to be able to login from mysql_pconnect?? I suspect that you tried to change the default mysql passwd since it tells you to install and you fsck'd the whole thing. Just a guess...what do the rest think???