[SOLVED] Error when viewing Profile

6 years 1 week ago - 6 years 1 week ago #303561 by nycsd
I recently added cbSubs and when users try to view the profile they get

"Error: 0 - Call to undefined function mysql_connect()"

Checking the error log, I get

"PHP Warning: DateTime::modify(): Failed to parse time string (- HOUR) at position 0 (-): Unexpected character in /hermes/bosnaweb23a/b1426/ipw.nycsdorg/public_html/libraries/CBLib/CBLib/Date/Date.php on line 391"

Any ideas?

Please Log in to join the conversation.

6 years 1 week ago #303579 by krileon
Replied by krileon on topic Error when viewing Profile

"Error: 0 - Call to undefined function mysql_connect()"

mysql_connect doesn't exist in PHP 7 and is deprecated in PHP 5.5. CB doesn't establish a database connection directly and utilizes Joomla API to do so. Ensure Joomla is configured correctly with the correct database engine for your version of PHP.

"PHP Warning: DateTime::modify(): Failed to parse time string (- HOUR) at position 0 (-): Unexpected character in /hermes/bosnaweb23a/b1426/ipw.nycsdorg/public_html/libraries/CBLib/CBLib/Date/Date.php on line 391"

You've something trying to subtract hours from a date, but no hours were specified. Looks like it's probably due to the "Hours for payment basket to timeout in front-end" or "Hours for payment basket to timeout in administration" parameters being empty in CBSubs > Settings > Display > Baskets. Please ensure you've saved CBSubs > Settings at least once and see if that clears that error up.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 1 week ago #303591 by nycsd
Replied by nycsd on topic Error when viewing Profile
Fixed. Double checked the items mentioned - all correct. When you highlighted the mysql deprecated it reminded me of an older module that was associated with the profile page - and that was the culprit. No issues with CBsubs and settings. Thank you for your help!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.227 seconds

Facebook Twitter LinkedIn