Author |
|
monkquito
Joined: 11 Apr 2008 Posts: 4 Location: UK
|
Posted: Fri 11 Apr '08 12:37 Post subject: Newbie Help - PHP functions in Apache |
|
|
Hi,
Set up Apaches to work with PHP code but cannot get it run functions i.e
mysql_connect().
How do I achieve this?
Regards
M |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 11 Apr '08 15:42 Post subject: |
|
|
You need to load the mysql driver in php.ini
change extension_dir e.g. extension_dir = C:/php5/ext/
and ;extension=php_mysql.dll to extension=php_mysql.dll |
|
Back to top |
|
monkquito
Joined: 11 Apr 2008 Posts: 4 Location: UK
|
Posted: Fri 11 Apr '08 16:05 Post subject: |
|
|
Done that
doesn't work |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 11 Apr '08 16:17 Post subject: |
|
|
Where is your php.ini ?
Did you define in httpd.conf that apache should use that ini file?
e.g.
Code: |
PHPIniDir "C:/php5"
|
You can test thatr with phpino(); |
|
Back to top |
|
monkquito
Joined: 11 Apr 2008 Posts: 4 Location: UK
|
Posted: Sun 13 Apr '08 1:30 Post subject: |
|
|
Cheers
I've tried this.
Looks like the functions are working, but now i'm getting the http 500 error.
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 13 Apr '08 12:57 Post subject: |
|
|
When do you get an 500 error? What do you do? What is about that in your error.log ? |
|
Back to top |
|
monkquito
Joined: 11 Apr 2008 Posts: 4 Location: UK
|
Posted: Sun 13 Apr '08 20:52 Post subject: |
|
|
I've looked in the error log and it reports that the mysql_connect function is undefined. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sun 13 Apr '08 21:20 Post subject: |
|
|
Try mysqlinfo.zip at the download page for troubleshooting your mysql setup.
Steffen |
|
Back to top |
|