Page MenuHomePhabricator

Fatal error during configuration
Closed, ResolvedPublic

Asked by Ray on Oct 25 2015, 7:47 AM.

Details

While attempting to configure Phabricator, all of the mysql configuration commands produce an error similar to the one below.

Fatal error: Call to undefined function mysql_real_escape_string() in /var/www/lab.linguisticteam.org/public/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php on line 12

After pulling Phabricator into my server, creating a subdomain, setting up apache's vhosts file and then restarting apache, I discovered that the [B] flag is not recognized by my server's apache version (2.2.3), as this flag was not introduced until apache 2.2.7. I removed the offending flag to see if it would work without it before running the commands noted above. I'm assuming here that the error is being caused by the lack of support for that flag, but that is only an assumption.

I'm running an enterprise-level OS (CentOS) which does not lend itself to simply updating to non-CentOS-supported versions of core apps (all CentOS-supplied apps, etc. are provided fully-backported security updates from RHEL - RedHat Enterprise), so I'm a bit stuck on how to work around this issue.

Add'l info:
The OS includes php 5.1.6, with an upgrade path to 5.3.3 for the core system.
We use a compiled 5.4.36 for our production sites and development projects, yet I suspect that Phabricator may be trying to use the much older one included with the OS.

Any help in resolving this would be greatly appreciated.

Warm Regards,
Ray

Answers

johnny-bit
Updated 3,315 Days Ago

mysql_real_escape_string is old as dirt in PHP world and part of core since 4.3.

Since You need cli for configuring phabricator it would be advisable to either set your compiled php in path fo phabricator to use or install system php-mysql module, so that mysql_real_escape_string is available.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.