nrsh_ram Posted June 11, 2008 Share Posted June 11, 2008 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)); } ?> Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted June 11, 2008 Share Posted June 11, 2008 well there is lots of settings to be done when you install them separately I would suggest installing wampserver http://www.wampserver.com this is a complete package of the 3 and is easier to install Quote Link to comment Share on other sites More sharing options...
nrsh_ram Posted June 11, 2008 Author Share Posted June 11, 2008 i know about xamp but ourcollege not allow us to use xamp... Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 11, 2008 Share Posted June 11, 2008 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 Quote Link to comment Share on other sites More sharing options...
nrsh_ram Posted June 11, 2008 Author Share Posted June 11, 2008 10q sir... i change it ready..it show the errors. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 11, 2008 Share Posted June 11, 2008 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. Quote Link to comment Share on other sites More sharing options...
nrsh_ram Posted June 11, 2008 Author Share Posted June 11, 2008 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? Quote Link to comment Share on other sites More sharing options...
fenway Posted June 12, 2008 Share Posted June 12, 2008 What are all those "ar"? Quote Link to comment 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.