Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

/proc/kallsyms format, sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas

Links

XODOX
Impressum

#1: Testing PHP and MySQL

Posted on 2008-01-17 11:43:08 by Gaston Verhulst

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.

Report this message

#2: Re: Testing PHP and MySQL

Posted on 2008-01-17 18:32:09 by Shion

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

Report this message

#3: Re: Testing PHP and MySQL

Posted on 2008-01-17 19:26:20 by Gaston Verhulst

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.

Report this message

#4: Re: Testing PHP and MySQL

Posted on 2008-01-17 19:37:10 by Shion

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

Report this message

#5: Re: Testing PHP and MySQL

Posted on 2008-01-17 20:08:09 by Gaston Verhulst

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

Report this message

#6: Re: Testing PHP and MySQL

Posted on 2008-01-17 21:33:00 by Shion

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

Report this message