[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1226
  • Last Modified:

Problem connecting MySQL Database in RADPHP XE2

Hi,

I was make a little application with RADPHP XE2 and i try to connect with a MySQL database...

I put in the form a Database non visual control from the palette and i fill the properties:
Connected=true
Databasename=MyDatabaseName
Dictionary=MyTableName
Host=localhost
UserName=user
UserPassword=psw

When I start I get the following error in my web browser:

Fatal error: Call to undefined function mysql_connect() in C:\PHP5\pear\rpcl\mysql.inc.php on line 257

Anyone know where can be the problem?

Thanks
0
josepmd_madd
Asked:
josepmd_madd
  • 3
  • 2
1 Solution
 
Randy DownsOWNERCommented:
Sounds like an issue with php.ini. You may have more than one .ini file.

Is this the path to php? C:\PHP5\pear\rpcl\mysql.inc.php
0
 
josepmd_maddAuthor Commented:
Hi,

Well... I am a two PHP folders:

C:\PHP5 ...

and

C:\Program Files (x86)\Embarcadero\RadPHP\4.0\php ...

I'm not sure what is the folder that PHP uses...
If i rename the first one (C:\PHP5) my project do not run...
The second one is the folder that RADPHP XE2 create in the installation...

In the folder of C:\PHP5 no exists any file named php.ini
In the folder of C:\Program Files (x86)\Embarcadero\RadPHP\4.0\php exists one file named php.ini

You know how can i know where is located the correct php.ini. Any environment variable...

Thanks
0
 
Randy DownsOWNERCommented:
Maybe this will help

http://docwiki.embarcadero.com/RadPHP/en/PHP_Settings

You can actually customize all PHP settings of RadPHP integrated web server:

    Open php.ini.template file, which is inside php folder in your RadPHP installation directory.
    Edit it. File is full of comments explaining everything, but you can also check php.ini directives chapter in PHP Documentation.
    Delete php.ini file in shared data folder. It will be replaced with the file you edited later.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Julian HansenCommented:
<?php
phpinfo();
?>

Try running the above script and checking that the mysql libraries are loaded - if in doubt do a search on mysql on the ouput and post that section here.
0
 
josepmd_maddAuthor Commented:
Hi,

Finnally i was solved this question reinstalling RadPHP (HTML5 Builder) with a Administrator user...

Thanks
0
 
josepmd_maddAuthor Commented:
I was not found the solution in any response... I reinstall the product and it runs fine... I do not know the correct solution to solve this but the reinstallation was solve my problem...
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now