Skip to main content Help Control Panel

Login   A+   A-

Community «   Discussion forum «   Installation support «  

problem with install [Solved]

Im sure it is something stupid im missing
Immediate solution has been provided

Solution Manager: Bernard

Issue description

when trying to run the setup.php i get this error Fatal error: Call to undefined function mysql_real_escape_string() in /var/apache2/htdocs/yacs/shared/sql.php on line 201 i created the mysql Db and gave it proper permissions

any help would be great i am useing php 5, mysql 5, and solaris 10

Comments

Hadies
Member
6 posts
registered on May 9 2007

on May 9 2007


Ok this issue still has me stumped in researching this issue it seems most problems come from useing older versions of php since im useing php5 thiis shouldent be the issue. the yacs Db is setup in mysql 5 and all permissions are set, i have phpmyadmin setup and working so i know apache is seeing php and mysql corectly, i have double checked the package requierments for yacs and i do have all the requiered apps installed and set in the path corectly. if there are any other ideas out there i would apreciate the help
Fernand
avatar
from Paris
Member
1286 posts
registered on Nov. 29 2004

inspired from hadies on May 9 2007


Hadies : As a matter of answer I got exactly the same error (on line 201 too) as I was failing to upgrade a site from one release to the next one. The error persisted and I finally got off all my files by FTP thus placing the last release (after having the database saved).

All was ok, save the fact that my images no more appear as they still exist into the dbase (I verified). But I did add some errors of my own during the operation as I had to write again the parameters of the Dbase. The lack of images persisted as I was rewriting correctly the parameters...

You are very welcome.
It sounds like that you are the 1000° registered member on this site clap .
GnapZ
from Caribbean
Member
2970 posts
registered on Mar. 5 2006

on May 9 2007


Hello and welcome in the Yacs world.

mysql_REAL_escape_string() is the new function in Php5 replacing mysql_escape_string() who is now depreciated.

Try without "real_" to see if you have an other error.

Do you have Php4 and Php5 installed ? it could be Php4 who runs your Php scripts (add 'AddType x-mapp-php5 .php' in your .htaccess file).
Hadies
Member
6 posts
registered on May 9 2007

on May 9 2007


I tryed both of your suggestions and im getting the same error i have php5 installed i re ran the phpinfo script just to verrifie it wasent seeing another ver of php on the system
GnapZ
from Caribbean
Member
2970 posts
registered on Mar. 5 2006

on May 9 2007


Hadies :

Ok, i think that it could be something else ... did you look at the rights of your folders ans files of Yacs (644 recommended) ?

If you really are our 1000° member: i wish this error will make you a powerfull member clap yippee (sorry for my poor english).
Hadies
Member
6 posts
registered on May 9 2007

on May 9 2007


The permissions are correct on the yacs folder and files, i went back and double checked the rights even re chmod them all, still get the same error i have the yacs files in the apache directory /apache2/htdocs/yacs i also dbl checked my installed packages ap2_modphp5 - PHP 5 - Apache 2.2.x Module, php5 - PHP Hypertext Processor 5, php5_mysql - PHP 5 - MySQL Extension, MySQL 5.0.33 64bit, i know there is a loss in comunication betwen something but i have me and 2 others working on this issue and right now we are all scraching our heads...
GnapZ
from Caribbean
Member
2970 posts
registered on Mar. 5 2006

inspired from hadies on May 9 2007


Hadies :

If possible, can you try an install of yacs on Php5 - MySql 4 ? Maybe it is a MySql 5 problem in Yacs ?
Hadies
Member
6 posts
registered on May 9 2007

on May 9 2007


Ill give that a shot it might be th 64 bit version it dosent like, im going to give it a shot now ill report the findings
Bernard
avatar
from nearby-an-airport
Associate
6571 posts
registered on Sep. 12 2003

on May 11 2007


Maybe you could patch the function in shared/sql.php as follows:

/**
 * escape a string
 *
 * @param string to be escaped
 * @return string safe version
 */
function &escape($text) {
    if(
is_callable('mysql_real_escape_string'))
        
$output mysql_real_escape_string($text);
    else
        
$output mysql_escape_string($text);
    return 
$output;
}

Hadies
Member
6 posts
registered on May 9 2007

on May 13 2007


Okthe issue has been resolved, first off the program dose work with php5 and mysql5, the problem acually lied in a broke php4 in the computer that was not showing up in the package maniger and was not showing up in any command strings for some reason solaris 10 comes with php4 not 5 i thought i had it all removed but aperintly i was wrong i had to dig for it and only found the problem after i had taken my webserver completly offline and just went line by line thru the config files once the broken php4 was cleared i reinstalled php5, mysql5, and apache2 all is well and working fine, acually going thru the configuration of yacks now, if others run into this issue you dont have to take your server down like i did lol, solaris 10 as of now comes with php4 installed, uninstall it first and go into usr/local/ and etc make sure it removes it all then install php5 all should be ok after that, Thank you to everyone for your advice i would prolly still be pulling my hair out over this issue.
Bernard
avatar
from nearby-an-airport
Associate
6571 posts
registered on Sep. 12 2003

inspired from hadies on May 13 2007


Hadies: Thank you for the positive feed-back. If you have successfully installed YACS on a Solaris server I would be very interested to know details of the related procedure. Would you like to write a page to document this please?

Rate this page
Posted by Hadies on May 9 2007, page edited by Bernard on May 13 2007, (popular)