Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MYSQL websites connecting to database.

Have mysql installed with phpMyAdmin, Mysql is running and can log in via of localhost, 127.0.0.1 and via of domain name through phpMyadmin, however website cannot access database, have researched this problem for days without success.

Posted on Aug 4, 2023 9:15 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 5, 2023 7:22 AM

Yes, I am running Mac os 10.13.6 Server 5.6.3


I believe you have pointed me in how to correct the problem, here is what is in the error log:


"[Fri Aug 04 14:26:43.433373 2023] [php7:error] [pid 2733] [client 127.0.0.1:50272] PHP Fatal error: Uncaught Error: Call to undefined function mysql_query() in /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodbSQL_drivers/mysql/mysql_driver.inc:352\\nStack trace:\\n#0 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodb.inc.php(316): mysql_driver_ADOConnection->do_query(‘SELECT id,scrip...’, -1, -1, false)\\n#1 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/classes/dbconnect.php(12) : eval()’d code(3) : eval()’d code(119): ADOConnection->Execute(‘SELECT id,scrip...’)\\n#2 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/classes/cronjobs.php(12) : eval()’d code(3) : eval()’d code(63): DBConnect->querySelect(‘SELECT id,scrip...’)\\n#3 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/logic/cron_seed.php(28): Cronjobs->getReadyCronJobs(1691175403, false)\\n#4 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/cron_seed.php(29): include(‘/Library/Server...’)\\n#5 {main}\\n thrown in /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodbSQL_drivers/mysql/mysql_driver.inc on line 352, referer: http://www.MYDOMAIN.Com/account/"


  • Have reviewed PHP-mysql connect and PHP: Choosing an API, I am assuming I am to modify my PHP.IN file with mysqli_connect() and PDO::__construct()
  • Then use one of the MYSQL API examples.
  • Being a notice it would be great to have an example what to add to the PHP.IN file
  • Beyond that being able to hire you for an hour would be the best outcome.


6 replies
Question marked as Top-ranking reply

Aug 5, 2023 7:22 AM in response to MrHoffman

Yes, I am running Mac os 10.13.6 Server 5.6.3


I believe you have pointed me in how to correct the problem, here is what is in the error log:


"[Fri Aug 04 14:26:43.433373 2023] [php7:error] [pid 2733] [client 127.0.0.1:50272] PHP Fatal error: Uncaught Error: Call to undefined function mysql_query() in /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodbSQL_drivers/mysql/mysql_driver.inc:352\\nStack trace:\\n#0 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodb.inc.php(316): mysql_driver_ADOConnection->do_query(‘SELECT id,scrip...’, -1, -1, false)\\n#1 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/classes/dbconnect.php(12) : eval()’d code(3) : eval()’d code(119): ADOConnection->Execute(‘SELECT id,scrip...’)\\n#2 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/classes/cronjobs.php(12) : eval()’d code(3) : eval()’d code(63): DBConnect->querySelect(‘SELECT id,scrip...’)\\n#3 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/logic/cron_seed.php(28): Cronjobs->getReadyCronJobs(1691175403, false)\\n#4 /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/cron_seed.php(29): include(‘/Library/Server...’)\\n#5 {main}\\n thrown in /Library/Server/Web/Data/Sites/www.MYDOMAIN.Com/account/adodb/adodbSQL_drivers/mysql/mysql_driver.inc on line 352, referer: http://www.MYDOMAIN.Com/account/"


  • Have reviewed PHP-mysql connect and PHP: Choosing an API, I am assuming I am to modify my PHP.IN file with mysqli_connect() and PDO::__construct()
  • Then use one of the MYSQL API examples.
  • Being a notice it would be great to have an example what to add to the PHP.IN file
  • Beyond that being able to hire you for an hour would be the best outcome.


Aug 4, 2023 9:36 PM in response to Harvey Murray

Are you really still using macOS Server here? The last server version—ignoring the MDM stuff—was macOS 10.13.


Anything interesting in the (presumably) Apache httpd web server logs?


Are the php files set up for the connection? (Info)


Same for MySQL setup? (See /etc/mysql/my.ini, or wherever my.ini is located)


Have you invoked phpinfo() in some testing php code, to see how php is configured?

Aug 5, 2023 10:09 AM in response to MrHoffman

I have resolved the connection problem based upon your first reply and links you provided. I had been running an Xserve with server 10.6 for more than 11 years and Coldfusion 9, I understand the challenges presented with security and overcoming them. I thought it was time to upgrade somewhat. Being a Mac die hard I wanted to stay with the things I was most comfortable with. As far as being able to afford you one never knows until they know a price, "this time your price was excellent". I did have one more question, not related to this post I had asked sometime back.


I must say thanks for pointing me in the correct direction and I will be clicking "Best Answer", lastly I did appreciate your arrogance for being so knowledgeable– "I couldn't afford you".

Aug 5, 2023 12:12 PM in response to Harvey Murray

De-racked an Xserve last month, and the network services provided by the remaining macOS Server servers are nearly all migrated to NAS and to other platforms. Completion of that will retire several more older and power-hungry boxes. And yes, I’m still a little salty about the end of macOS Server, too.


But don’t confuse my “you couldn’t pay me enough to do that” with arrogance.

Aug 5, 2023 1:00 PM in response to MrHoffman

I think we all are salty about the xserve and mac servers, I have 13 setting in the rack, all of which have run for more than 14 years, have replaced a few raid batteries along with a few power supplies along the way. The great thing about Macs is they just run without having to work on them.


I meant no offense with arrogance, when you are knowledgeable it doesn't hurt to let others know.

Aug 5, 2023 9:12 AM in response to Harvey Murray

Harvey Murray wrote:

Yes, I am running Mac os 10.13.6 Server 5.6.3


I’d be disinclined to run a macOS Server 10.13 configuration internet-accessible, given the age of all of what is involved. If you do want or need to expose it to the ‘net, partition your internal network to contain and isolate potential security breaches. Set up a DMZ, minimally. Avoid running that on an open internal network.


I believe you have pointed me in how to correct the problem, here is what is in the error log:
MYDOMAIN…


MyDomain·com is a real and registered domain, and is not yours. If you need to obfuscate a domain, you will want to use example.org, example.net, or example.com, all of which are reserved for this purpose.


• Being a notice it would be great to have an example what to add to the PHP.IN file


Those setup files are php.ini and my.ini, usually.


* Beyond that being able to hire you for an hour would be the best outcome.


No offense intended, but you can’t afford me. 😉


MYSQL websites connecting to database.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.