ns1025 Posted July 17, 2006 Share Posted July 17, 2006 I have a few questions for you experienced people out there: I have my php files in the Apache2.2/Homeblog/htdocs folder. When I access my index.php file on my Browser under http://localhost/HomeBlog/index.php I get this error message:Fatal error: Call to undefined function mysql_pconnect() in C:\Web\Apache2\htdocs\HomeBlog\Connections\connBlog.php on line 9In my connBlog.php I have the following definitions.$hostname_connBlog = "mysql";$database_connBlog = "blg_blog";I am not sure, but I think that is what I need to set the values to. I think geocities database hostnames are always mysql. Also, do I pick the database name that I defined in phpMyAdmin for the database_connBlog? So why is it that I still can't connect to my database? Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/ Share on other sites More sharing options...
wildteen88 Posted July 17, 2006 Share Posted July 17, 2006 The problem is you havnt enabled the mysql extension for PHP5. Have a read of [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this thread[/url] to enable the mysql extension for PHP5. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-59207 Share on other sites More sharing options...
ns1025 Posted July 18, 2006 Author Share Posted July 18, 2006 Thats not it. I already enabled the mysql extensions and I also defind the path to my folders. I followed the instructions in Step-by-Step Help from NicholasSolutions very closly.Thank you very much, any help is greatly appreaciated. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-59752 Share on other sites More sharing options...
wildteen88 Posted July 18, 2006 Share Posted July 18, 2006 Well if you have enabled it then you should be able to use the ysql functions. You may have uncommented the extension within the php.ini, but is PHP using the correct php.ini file, have you moved a file called libmysql.dll to C:\WINDOWS?Also when you move or change any settings with php/apache make sure you restart Apache.Also could provide details of you PHP setup so I can try an recreate your problem on my local dev server. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-59854 Share on other sites More sharing options...
ns1025 Posted July 20, 2006 Author Share Posted July 20, 2006 I am so stuck :-[I guess PHP is using the right php.ini file. Where or in which file would I have to change or check the file name?However, I think my PHP setup is ok, because I tested it by going to http://localhost/Homeblog/phpinfo.phpMy PHP files including php.ini are saved in C:\Web\PHP and my apache files are saved in C:\Web\Apache2.All my php including index.php are saved in the C:\Web\Apache2\htdocs\Homeblog file.It would be great if you would tell me what information you need in order to understand my setup because I have no clue as of where to start explaining. Could you also maybe give me an example of how you connect to your database, host name and database name?Thanks,Nathalie Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-60850 Share on other sites More sharing options...
ns1025 Posted July 20, 2006 Author Share Posted July 20, 2006 I should also tell you that... My web host is Geocities or yahoo and I want to connect to my online database blg_blog. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-60852 Share on other sites More sharing options...
ns1025 Posted July 21, 2006 Author Share Posted July 21, 2006 Hey wildteen,I got the installation part all figured out with the help ofhttp://www.puremango.co.uk/cm_wamp_97.phpI did not know that there was a php.ini in C:\Windows. I had to uncomment the extension in that file. And I had to copy C:\PHP\ext\php_mysql.dll to C:\Windows.I still haven't figured out how to connect to my database on geocities.Thanks for all your help,Nathalie Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-61509 Share on other sites More sharing options...
jpratt Posted July 25, 2006 Share Posted July 25, 2006 So you are running on localhost trying to connect to your db at geocities? If so, alot of hosting companies will not allow remote connections to their db severs except thru their own hosting servers. Just one thought. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-63394 Share on other sites More sharing options...
ns1025 Posted July 26, 2006 Author Share Posted July 26, 2006 I would run my blog remote if I would know how?What do I type into the URL window.When I try to see my php pages online I get a blank pagelike the one athttp://www.nathaliesteinfeld.com/Blog/blg/index.php(/Blog/blg/ is where I store my php files on my online webserver)I would hate all my work to go to waste just because of an technical small problemI found a page at geocities.com that explains how to define host and databasehttp://help.yahoo.com/us/geo/mysql/mysql-06.htmlThis site talks about localhost too. But I can't make it work.Hope that makes it clearer Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-64032 Share on other sites More sharing options...
legohead6 Posted July 30, 2006 Share Posted July 30, 2006 it could be a code probelm.... would you be able to post ur code on that page? Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-65726 Share on other sites More sharing options...
ns1025 Posted August 3, 2006 Author Share Posted August 3, 2006 Thanks so much. I attached the folder. You can tell me anytime if you need more info.[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-68340 Share on other sites More sharing options...
manmadareddy Posted August 3, 2006 Share Posted August 3, 2006 Just small suggestion, I hope you don't need to do any coding changes for this. Just need to have the permissions for your IP at Geocities.To know this just open the cpanel of geocities in the main page clickthe mysql databse and in that page you will find the list of IPs which are having permissions to access that database.Just you needto put one entry of your IP there. I am sure this will solve your problem. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-68355 Share on other sites More sharing options...
ns1025 Posted August 4, 2006 Author Share Posted August 4, 2006 ;DCool! You are the man! I didn't know about this feature. But I am still not clear about the details. When adding an A Record in my ADVANCED DNS Settings what do I put in the SOURCE FIELD and do I enter my IP address in the destination field? Not thinking anything (duh), I added the following A Record to my settings.Source:www.nathaliesteinfeld.comDestination: MY_IPAnd of course every time I tried to access my website it was forwarded to my computer administrator login.If I set my advanced settings up the right way, what am I calling up as my URL to view my Blog? Would it be something like the following??http://localhost:8080/Homeblog/index.php(the folder Homeblog is a subfolder in my Apache htdocs) Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-68991 Share on other sites More sharing options...
manmadareddy Posted August 4, 2006 Share Posted August 4, 2006 It won't workout for local machines.If we want to connect to a remote databaseyou must need to access that database from astatic IP. That is your public IP. You just needto give your IP address at the remote db accesspanel. Quote Link to comment https://forums.phpfreaks.com/topic/14804-help-i-need-to-connect-to-my-database/#findComment-68992 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.