Re: MySQL & PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I had trouble with php and mysql until I changed two settings in the /etc/php.ini.

The first wouldn't apply to the snippet you showed but might help others:

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
short_open_tag = On


The second might help:

; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = On


At 08:13 AM 1/18/2003 -0800, you wrote:
hello all,

I'm posting on 2 lists because I'm not sure were the problem is, so I'm hoping
that some one can help me out.

I'm running a stock RH8 machine running amongst other things MySQL 3.23.52-3,
Apache 2.0, PHP 4.2.2-8.0.5 When I try a simple php script that is this
(sensitive information changed to protect me):

<?php $link = mysql_connect ("localhost", "user", "password") or die ("Could not connect"); print ("Connected successfully"); $query = "SELECT * FROM who"; $result = mysql_db_query ("mcdougrsMedia", $query) or die ("Query failed"); ?>
The page produces the following output:

Fatal error: Call to undefined function: mysql_connect() in
/home/username/public_html/testing.php on line 5

Can you guys see what is wrong... or if there is other information that is
needed that isn't there please let me know and I will post whatever information
is needed to fix it.

TIA,
Ryan



--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux