blank page when using php script with mysql database
Posted by: intosoul (---.vc.shawcable.net)
Date: August 10, 2006 06:01AM

I have no trouble installing the server. I managed to get the php script that runs with txt doc to work fine. But when it comes to connecting to mysql, I get error messages. I know I did nothing wrong with my phpmyadmin configuration. So I am totally at loss here.

The error messages I get from all my php script that has to do with databases are:
Fatal error: Call to undefined function mysql_connect() in D:\path\to\file.inc.php on line 345

And I would also get a blank page and when I view page source, I get:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Can someone tell me what I am missing here? I think I followed all the steps to configure my apache file. Do I need to also configure my.ini? If so, how do I do it? I don't have shell. Just windows. And I am clueless what I am supposed to do to make the mysql_connect() work properly.

thanks.


Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: CyberSpatium (67.170.181.---)
Date: August 10, 2006 08:12AM

you need to put all your php, html, images and other website files in
c:\WAMP\www

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: intosoul (---.vc.shawcable.net)
Date: August 11, 2006 06:42AM

Thank you CyberSpatium for your assistance. Apparently, I found out even after putting all my files into the www directory made no difference. It turned out, wamp server only works when installed in C:/ drive. I had mine installed in F:/. I don't understand why installing in another drive besides C drive would make such huge difference. But after installing onto the C:/ drive instead, everything is working accordingly.

I am still curious why it must be in C drive. I would appreciate you tell me. Thanks again for your assistance.

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: yfastud (---.mia.bellsouth.net)
Date: August 11, 2006 06:23PM

He he....
My wamp install in drive X and my data in drives Y and Z w/o any problem. Might got the problem when installation.

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: molikjain (---.71.246.61.touchtelindia.net)
Date: August 17, 2006 03:19PM

Hi,

I am having the same problem.

Can anybody help me out with what is the solution.

A lot of thanks in advance.



Molik Jain

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: CyberSpatium (67.170.181.---)
Date: August 17, 2006 05:43PM

to make your wamp tray menu work when using a different drive then c, do this

open your wampserver.ini file with notepad
F:\wamp\wampserver.ini

use find and replace to find all "C:\" and replace it with "F:\"

now save the file and all your wamp tray icon menu items will now work.

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: molikjain (---.156.246.61.touchtelindia.net)
Date: August 18, 2006 05:53AM

Hi,

Thanks for the reply. But my wamp tray menu is already working fine.

I am saying that my problem is that my php pages, containing mysql scripts are showing me the blank page, when wamp is installed on F: drive, but it is working fine, when wamp is installed in C: drive.

Also, I searched for "c:\" in wampserver.ini and I could not find such a thing there. That means all is fine there.

How to resolve this.

Please let me know.

Regards

Molik Jain



Molik Jain

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: intosoul (---.vc.shawcable.net)
Date: August 18, 2006 06:12AM

If you checked everything and still get a blank page, then I recommend you reinstall wamp. That is what I did and it worked for me well. Make sure you have set up your database and username priviledges correctly with regard to your php script. And if you have .htaccess on your particular script, see to it that there is not a particular code within the file that would affect the php script working or just rename it so that the file won't affect the script.

I almost forget to mention another important thing. Be sure to uncomment in your C:\wamp\Apache2\cpmf\httpd.conf the following line:

LoadModule rewrite_module modules/mod_rewrite.so

Hope that works for you.



Post Edited (08-18-06 06:18)

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: molikjain (---.156.246.61.touchtelindia.net)
Date: August 18, 2006 06:22AM

Thanks.

But everything you said, is just not working for me.

The thing I have just found working is that :

when I downloaded the latest version of wamp wamp5_1.6.4a.exe it shows the blank page in C: and F: drive.

whereas my older version of wamp wamp5_1.4.4.exe is working fine with both C: and F: drive. SO there looks to be some problem wth the latest version.

So, I am coming back to the older version of wamp.

That works for me.



Molik Jain

Options: ReplyQuote
Re: blank page when using php script with mysql database
Posted by: intosoul (---.vc.shawcable.net)
Date: August 18, 2006 06:39AM

> Also, I searched for "c:\" in wampserver.ini and I could not find such a thing there. That
> means all is fine there.

I am using my data at a separated drive but still out of curiosity, I decided to see for myself by opening my F:\Wamp\wampserver.ini and I found it in line 90.

Type: item; Caption: "www directory"; Action: shellexecute; FileName: "F:/Wamp/www"; Glyph: 2

Options: ReplyQuote


Sorry, only registered users may post in this forum.