Re: MySQL & PHP

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

 



I ran into something similar a while ago. As I am not a php expert, I am not
sure how complete, or even accurate this is, but it *did* work in my case.
>From what I gather, PHP and the new Apache 2x series of servers are not
completely tested out yet. Hence, some stuff does not work correctly. PHP
happens to be one of them.

I tried installing PHPNuke 6 on my site and had nothing but problems. The
file_exists() function in php was completely hosed, so I had to rewrite
large portions of the code, making sure that there was a call to the
get_cwd() function to prefix each call. I never did get the MySQL stuff to
work, or even connect to the database - even though it was on the same box.

To get around the problem, I shutdown the apache service via the setup
utility. I then whacked the running processes via apachectl. Once this was
done, I downloaded the newest version of the apache 1x server, php, and
mysql. I exploded the packages into the tmp directory, compiled them and
used the --prefix directive for configure so that when the install ran they
would finish up in the opt directory. ( This is not necessary but kinda good
because I can use tar to capture apache, mysql, the databases and php in a
single tar file for backup. )

Once they were installed, I simply started them up. They have been up and
running since with no errors. The entire assembly works like a charm.

An additional note : If you do finish up compiling apache, make certain that
you configure your webserver to disallow proxying. One thing that I have
discovered during the course of running a site is that there is seemingly no
end to the lame tactics that wanna-be  ( and I put this into quotes here )
"hackers" will attempt to use. For example, I caught one the other day
attempting to pull down Yahoo's main page via my server.... lame.

Hope that this Helps.

Will


----- Original Message -----
From: "Ryan McDougall" <mcdougrs@yahoo.com>
To: "mysql" <mysql@lists.mysql.com>
Cc: "RedHat 8.0 Psyche" <Psyche-list@redhat.com>
Sent: Saturday, January 18, 2003 10:13 AM
Subject: MySQL & PHP


> 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):
>
> <html>
> <head><title>My PHP test file</title></head>
> <body>
> <?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");
> ?>
> </body>
> </html>
>
> 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
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>
>
> --
> Psyche-list mailing list
> Psyche-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/psyche-list
>



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