HELP! I NEED TO CONNECT TO MY DATABASE
Posted 17 July 2006 - 12:24 AM
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 9
In 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?
Posted 18 July 2006 - 02:30 AM
I followed the instructions in Step-by-Step Help from NicholasSolutions very closly.
Thank you very much, any help is greatly appreaciated.
Posted 18 July 2006 - 10:31 AM
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.
Posted 20 July 2006 - 05:41 AM
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.php
My 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?
Posted 20 July 2006 - 05:46 AM
My web host is Geocities or yahoo and I want to connect to my online database blg_blog.
Posted 21 July 2006 - 04:50 AM
I got the installation part all figured out with the help of
I 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,
Posted 25 July 2006 - 02:07 PM
Posted 26 July 2006 - 02:13 PM
What do I type into the URL window.
When I try to see my php pages online I get a blank page
like the one at
(/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 problem
I found a page at geocities.com that explains how to define host and database
This site talks about localhost too. But I can't make it work.
Hope that makes it clearer
Posted 30 July 2006 - 04:56 AM
Posted 03 August 2006 - 05:21 AM
You can tell me anytime if you need more info.
[attachment deleted by admin]
Posted 03 August 2006 - 06:42 AM
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 click
the mysql databse and in that page you will find the list of IPs
which are having permissions to access that database.Just you need
to put one entry of your IP there. I am sure this will solve your problem.
Posted 04 August 2006 - 04:59 AM
Cool! 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.
And 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??
(the folder Homeblog is a subfolder in my Apache htdocs)
Posted 04 August 2006 - 05:04 AM
If we want to connect to a remote database
you must need to access that database from a
static IP. That is your public IP. You just need
to give your IP address at the remote db access
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users