Jump to content

joziv

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joziv's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. And it's working! It was of course a mis-type on my behalf. In php.ini, it used to read: ; Directory in which the loadable extensions (modules) reside. extension_dir = "\ext\" However, after looking into the Apache log errors I discovered it was looking to "\\ext\\" - which obviously has too many slashes making the directory very wrong. Simply changing it and resetting the server sorted it all out. ; Directory in which the loadable extensions (modules) reside. extension_dir = "ext" Many thanks to PFMaBiSmAd for suggesting to look in the log files.
  2. Ok so I've made a discovery. Maybe this will shed some light on the situation for someone? Using the code below, it turns out I don't have the mysqli libraries. if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) { echo 'We don\'t have mysqli!!!'; } else { echo 'Phew we have it!'; } Does this help anything?
  3. Thanks, I uncommented that earlier - sorry forgot to mention that! I did install php using the zip file. If it's any help, I can't see any details about MySQLi in my phpinfo page? I've read you should be able to see some sql information there...?
  4. Hmm ok. Well I've now changed some error settings in php.ini and it produces this error: Fatal error: Class 'mysqli' not found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 2 I've been looking up this error and tried various things, but to no avail yet. Anyone else seen this error before?
  5. I have installed PHP 5, Apache and MySQL on my machine, which runs on Windows Vista. Apache tells me it's working (at http://localhost/), and the status bar in the Apache Service Monitor tells me it's connected to PHP/5.2.10. However I seem to be having problems connecting to my database. I am using a simple php page to test the connection to the database, but it just returns a blank page, which has nothing in the source code. My test.php file is: <?php $mysqli = new mysqli("localhost", "root", "password", "db"); if (mysqli_connect_errno()) { printf("Connection failed: %s\n", mysqli_connect_error()); exit(); } else { printf("Host information: %s\n", mysqli_get_host_info($mysqli)); mysqli_close($mysqli); } ?> I can use MySQL on the database through a MySQL Line Client, so I'm not sure where the error is - I think it may be in the php.ini file? I have not altered it yet. After many hours of googling the problem, and reinstalling everything, I'm getting a bit fed up. I have added the PHP directory to the windows path. Any help will be greatly appreciated! Cheers.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.