Jump to content

how to know mysql is work or not in system?


nrsh_ram

Recommended Posts

i installed apache php n mysql...

mysql-5.0.51b-win32..n try use command prompt all is work like show databases,password,help n all but when i try using .php its cannot run, its show blank...not show any errors.

 

im not sure, is it can link or not.

 

i save this as mysqlconnect.php, then i run it in local host...it show a blank page....y its not show any errors?

 

<?php

$mysqli = new mysqli("localhost", "joeuser", "somepass", "testDB");

 

if (mysqli_connect_errno()) {

printf("Connection failed: %s\n", mysqli_connect_error());

exit();

} else {

printf("Host information: %s\n", mysqli_get_host_info($mysqli));

}

 

?>

Link to comment
Share on other sites

Blank php pages are usually caused by fatal parse or fatal runtime errors and the display_errors setting is off or the error_reporting setting is not set to show all errors.

 

When learning php, developing php code, or debugging php code, always turn on full php error reporting to get php to help you. To have fatal parse errors displayed, you need to turn these settings on in the master php.ini or in a .htaccess file.

 

In php.ini, make these two changes and stop and start your web server to get any changes made to php.ini to take effect -

 

error_reporting  =  E_ALL
display_errors = On

Link to comment
Share on other sites

Can you post what operating system you are using (eg Win XP, Ubuntu Linux etc) and what HTTP Server you have installed (eg Apache, IIS etc). Also can you provide details on how you installed PHP and MySQL.

 

By default MySQL support is not enabled when PHP is installed. You have to enable the mysql extension(s) (php_mysql.dll and/or php_mysqli.dll) within the php.ini in order to use any of the mysql_* or mysqli_* functions

 

Another thing before making any changes to the php.ini make sure PHP is actually reading the php.ini you are editing. You can check this by creating a simple script, call this info.php and place following code in it:

<?php phpinfo(); ?>

Save info.php to where your server servers your websites files. Open your browser and go to your http://your_site.com/info.php

Scroll down and look for the line that starts with Loaded Configuration File. To the right of that, should be the full PATH to the php.ini PHP is reading. Make sure that path stated is the same as the php.ini you're editing.

Link to comment
Share on other sites

im using window XP

 

ok....i installed by follow the instruction from this site..

http://www.sebastiansulinski.co.uk/web_design_tutorials/web_server/installing_apache_php_mysql_c.php

 

mysql-5.0.51b-win32

apache_2.0.63-win32-x86-no_ssl

php-5.2.6-win32-installer

 

everything i done as that site....

 

and i have run the .php its can run in localhost show the phpadmin page

<?php phpinfo(); ?>

 

but i have problem in mysql

i followed as this link http://www.sebastiansulinski.co.uk/web_design_tutorials/dreamweaver/link_exchange_system_part_1_b.php

 

until the step SHOW DATABASES; i done then \. c:/links.sql i cant create the link...in command prompt its show the errors...i dont know how to solve it...

 

the errors is-->

 

------------

--------------

--------------
ar
--------------

--------------
ar
ar
CREATE TABLE tbl_admin (
--------------

--------------
ar
ar
CREATE TABLE tbl_admin (ar
adminid tinyint(3) unsigned NOT NULL auto_increment,
--------------

--------------
ar
ar
CREATE TABLE tbl_admin (ar
adminid tinyint(3) unsigned NOT NULL auto_increment,ar
adminusername varchar(15) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_admin (ar
adminid tinyint(3) unsigned NOT NULL auto_increment,ar
adminusername varchar(15) NOT NULL,ar
adminpassword varchar(15) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_admin (ar
adminid tinyint(3) unsigned NOT NULL auto_increment,ar
adminusername varchar(15) NOT NULL,ar
adminpassword varchar(15) NOT NULL,ar
PRIMARY KEY (adminid)
--------------

No connection. Trying to reconnect...
ERROR 2005 (HY000): Unknown MySQL server host 'Arial;}}' (11001)
ERROR:
Can't connect to the server

--------------

--------------

--------------
ar
--------------

--------------
ar
ar
INSERT INTO tbl_admin (adminid, adminusername, adminpassword)
--------------

No connection. Trying to reconnect...
ERROR 2005 (HY000): Unknown MySQL server host 'Arial;}}' (11001)
ERROR:
Can't connect to the server

--------------

--------------

--------------
ar
--------------

--------------
ar
ar
CREATE TABLE tbl_categories (
--------------

--------------
ar
ar
CREATE TABLE tbl_categories (ar
catid int(10) unsigned NOT NULL auto_increment,
--------------

--------------
ar
ar
CREATE TABLE tbl_categories (ar
catid int(10) unsigned NOT NULL auto_increment,ar
catname varchar(30) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_categories (ar
catid int(10) unsigned NOT NULL auto_increment,ar
catname varchar(30) NOT NULL,ar
PRIMARY KEY USING BTREE (catid)
--------------

No connection. Trying to reconnect...
ERROR 2005 (HY000): Unknown MySQL server host 'Arial;}}' (11001)
ERROR:
Can't connect to the server

--------------

--------------

--------------
ar
--------------

--------------
ar
ar
CREATE TABLE tbl_links (
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,ar
linkdate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAM
P,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,ar
linkdate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAM
P,ar
linkdescr varchar(255) NOT NULL,
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,ar
linkdate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAM
P,ar
linkdescr varchar(255) NOT NULL,ar
PRIMARY KEY (linkid),
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,ar
linkdate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAM
P,ar
linkdescr varchar(255) NOT NULL,ar
PRIMARY KEY (linkid),ar
KEY FK_tbl_links_1 USING BTREE (linkcat),
--------------

--------------
ar
ar
CREATE TABLE tbl_links (ar
linkid int(10) unsigned NOT NULL auto_increment,ar
linktitle varchar(45) NOT NULL,ar
linkurl varchar(255) NOT NULL,ar
linkrecip varchar(255) NULL,ar
linkemail varchar(100) default NULL,ar
linkapproved enum('n','y') NOT NULL default 'n',ar
linkcat int(10) unsigned NOT NULL,ar
linkdate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAM
P,ar
linkdescr varchar(255) NOT NULL,ar
PRIMARY KEY (linkid),ar
KEY FK_tbl_links_1 USING BTREE (linkcat),ar
CONSTRAINT FK_tbl_links_1 FOREIGN KEY (linkcat) REFERENCES tbl_categories (catid
) ON DELETE CASCADE ON UPDATE CASCADE
--------------

No connection. Trying to reconnect...
ERROR 2005 (HY000): Unknown MySQL server host 'Arial;}}' (11001)
ERROR:
Can't connect to the server

--------------

--------------

No connection. Trying to reconnect...
ERROR 2005 (HY000): Unknown MySQL server host 'Arial;}}' (11001)
ERROR:
Can't connect to the server

mysql>

 

 

 

y its show this errors?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.