Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Testing PHP and MySQL

 
   Database Forums (Home) -> PHP SQL RSS
Next:  totally noob plz help  
Author Message
Gaston Verhulst

External


Since: Jan 17, 2008
Posts: 5



(Msg. 1) Posted: Thu Jan 17, 2008 7:01 am
Post subject: Testing PHP and MySQL
Archived from groups: alt>php>sql (more info?)

Hello,
I'm working in FC8 and I like to use MySQL with PHP.
I have installed:
[gastonv@telenetPC ~]$ yum list installed | grep php
php.i386 5.2.4-3 installed
php-cli.i386 5.2.4-3 installed
php-common.i386 5.2.4-3 installed
[gastonv@telenetPC ~]$ yum list installed | grep mysql
mysql.i386 5.0.45-6.fc8 installed
mysql-libs.i386 5.0.45-6.fc8 installed
mysql-server.i386 5.0.45-6.fc8 installed

I can run separately PHP and MySQL, but not together.
For that, I have to do first:
[gastonv@telenetPC ~]$ sudo /etc/init.d/mysqld start
Starten van MySQL: [ OK ]
[gastonv@telenetPC ~]$ sudo /etc/init.d/httpd start
Starten van httpd:

And then I can start MySQL:
[gastonv@telenetPC Mysql]$ mysql -u gastonv -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.06 sec)

mysql> exit
Bye

To test working together, I have done 2 tests:

1. Testing PHP with test.php with the command phpinfo():
My working directory:
[gastonv@telenetPC public_html]$ ls mysql_up.php
mysql_up.php
[gastonv@telenetPC ~]$ firefox http://localhost/~gastonv/test.php
It shows a table with PHP Information:
PHP Version 5.2.4
....
Here, I have to see a Section for MySQL, indicating that MySQL support
is On.
But I don't see that section.

2. Testing MySQL with a well known program called mysql_up.php.
My working directorie for MySQL:

[gastonv@telenetPC public_html]$ firefox
http://localhost/~gastonv/mysql_up.php
The result should be a table with a long list of variable names and values.
And I read, if no error or warning messages are displayed, MySQL is
working fine.
But Firefox opens a blanco empty white window with the correct title,
and doesn't show any error message.

Please, is this correct, or do I have to configure more?

Thanks in advance for helping tips,
Gaston Verhulst.

 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 2) Posted: Thu Jan 17, 2008 6:32 pm
Post subject: Re: Testing PHP and MySQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gaston Verhulst wrote:
> Hello,
> I'm working in FC8 and I like to use MySQL with PHP.
> I have installed:
> [gastonv@telenetPC ~]$ yum list installed | grep php
> php.i386 5.2.4-3 installed
> php-cli.i386 5.2.4-3 installed
> php-common.i386 5.2.4-3 installed
> [gastonv@telenetPC ~]$ yum list installed | grep mysql
> mysql.i386 5.0.45-6.fc8 installed
> mysql-libs.i386 5.0.45-6.fc8 installed
> mysql-server.i386 5.0.45-6.fc8 installed

Run

yum install php-mysql

then

/etc/init.d/httpd restart


Thats all.


--

//Aho

 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
Gaston Verhulst

External


Since: Jan 17, 2008
Posts: 5



(Msg. 3) Posted: Thu Jan 17, 2008 6:32 pm
Post subject: Re: Testing PHP and MySQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

J.O. Aho schreef:
> Gaston Verhulst wrote:
>> Hello,
>> I'm working in FC8 and I like to use MySQL with PHP.
>> I have installed:
>> [gastonv@telenetPC ~]$ yum list installed | grep php
>> php.i386 5.2.4-3 installed
>> php-cli.i386 5.2.4-3 installed
>> php-common.i386 5.2.4-3 installed
>> [gastonv@telenetPC ~]$ yum list installed | grep mysql
>> mysql.i386 5.0.45-6.fc8 installed
>> mysql-libs.i386 5.0.45-6.fc8 installed
>> mysql-server.i386 5.0.45-6.fc8 installed
>
> Run
>
> yum install php-mysql
>
> then
>
> /etc/init.d/httpd restart
>
>
> Thats all.
>
>
I have to thank you very much for the beautiful tip!
[gastonv@telenetPC ~]$ yum list installed | grep php
php.i386 5.2.4-3 installed
php-cli.i386 5.2.4-3 installed
php-common.i386 5.2.4-3 installed
php-mysql.i386 5.2.4-3 installed
php-pdo.i386 5.2.4-3 installed
After that and a reboot, the result of the 2 tests is succesfull.
Now I can experiment more ...
Greetings,
Gaston Verhulst.
 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 4) Posted: Thu Jan 17, 2008 7:37 pm
Post subject: Re: Testing PHP and MySQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gaston Verhulst wrote:

> I have to thank you very much for the beautiful tip!
> [gastonv@telenetPC ~]$ yum list installed | grep php
> php.i386 5.2.4-3 installed
> php-cli.i386 5.2.4-3 installed
> php-common.i386 5.2.4-3 installed
> php-mysql.i386 5.2.4-3 installed
> php-pdo.i386 5.2.4-3 installed
> After that and a reboot, the result of the 2 tests is succesfull.

You know you are using Linux? So no point in rebooting, that is only needed if
you switch to a new version of the kernel, all you needed to do was to restart
the apache server with the simple

/etc/init.d/httpd restart

Thats all you need to do if you change settings in your php.ini or your in one
of the apache config files.


> Now I can experiment more ...

Good luck.
If you will be working with images, I suggest you use imagick (imagemagick)
instead, this will of course require that you first install imagemagick and
pecl and then use pecl to install imagick extension for php, it's a lot better
IMHO than gd.

--

//Aho
 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
Gaston Verhulst

External


Since: Jan 17, 2008
Posts: 5



(Msg. 5) Posted: Thu Jan 17, 2008 7:37 pm
Post subject: Re: Testing PHP and MySQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

J.O. Aho schreef:

>> After that and a reboot, the result of the 2 tests is succesfull.
>
> You know you are using Linux? So no point in rebooting, that is only needed if
> you switch to a new version of the kernel, all you needed to do was to restart
> the apache server with the simple
>
> /etc/init.d/httpd restart
>
> Thats all you need to do if you change settings in your php.ini or your in one
> of the apache config files.
>

Thanks too for remembering to this tip, it's easier of course, I was
forgotten it.

Please, was the following text intendet for me?

> If you will be working with images, I suggest you use imagick (imagemagick)
> instead, this will of course require that you first install imagemagick and
> pecl and then use pecl to install imagick extension for php, it's a lot better
> IMHO than gd.
>
 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
J.O. Aho

External


Since: Dec 01, 2003
Posts: 397



(Msg. 6) Posted: Thu Jan 17, 2008 9:01 pm
Post subject: Re: Testing PHP and MySQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gaston Verhulst wrote:

> Please, was the following text intendet for me?
>
>> If you will be working with images, I suggest you use imagick
>> (imagemagick)
>> instead, this will of course require that you first install
>> imagemagick and
>> pecl and then use pecl to install imagick extension for php, it's a
>> lot better
>> IMHO than gd.

For you and everybody else reading.

--

//Aho
 >> Stay informed about: Testing PHP and MySQL 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
testing a mysql database - I'm using WAMP but having a problem executing a php script getting an error 'Can't update database' the script seems ok is there a way to examine why this might be... ie have i set it up incorrectly? plato

mysql - I am new to PHP and mysql. I am trying to create a database with just one table. How do I setup the username and password ? I am trying to run a script like this $user="username"; $password="password"; $database="database&qu...

Var to use in MySql - Hi! What kind of var should I use to store some words in a field? For instance, I would like to save some key words for each user. How can I achieve it? USER KEY WORDS john family,sports,basket,pete lucas mirror,dog,soccer I can't use SET var..

MySQL -> XML -> MySQL - I'm trying to go back and forth between a db and XML pages that filter db data. I have a multidimensional array (parsed from XML) like this (simplified): Array ( [name] => TABLE1 [attributes] => Array ( [ID] => ID1 [FIELD1] => Value...

MySQL Query - If I have a table set up like this: Name | VARCHAR Email | VARCHAR Age | TINYINT | NULL (Default: NULL) And I want the user to enter his or her name, email, and age - but AGE is optional. My insert would look something like: INSERT INTO data (Name,....
   Database Forums (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]