Symfony2 and ownCloud PDO dependency

Asked by:
JTGary / 8 Points
Time:
2013-09-07 3:50 pm EST
Category:
Website Troubleshooting
Hits:
1,448
I had some issue getting Symfony2 to work. It's not quite turnkey after installing it via Control Panel.

You have to add this to the .htaccess file for it to work. suPHP_ConfigPath /home/<youraccountname>/public_html

However, adding that breaks ownCloud. ownCloud will then tell you that PDO is missing. I assume that is for database access. How do I fix this? I tried using another .htaccess file in the ownClou folder without that line and ownCloud was still broken. Currently I have a broken Symfony2 install but working ownCloud install whne I have that line commented out. I also had some WordPress rewrite directives in there that have been commented out as well.

Can I have both Symfony2 and ownCloud working at the same time working?

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

johnpaulb-whh2
Staff
12,339 Points
2013-09-09 7:00 pm EST
Hello JTGary,

Thank you for your question. Initially, I don't see any problem using both Owncloud, and Symfony2 on your account, but I will need more information so I can investigate further, such as a link to the errors.

I installed Symfony2 successfully using softaculous, are you getting an error that required you to modify the .htaccess? What is the full error?

PDO is enabled on all of our servers, you can check your PHPinfo page to confirm this.

Are you attempting to modify your PHP settings, then make them recursive (affect all accounts)?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

To submit a comment on this answer, please first login.

I can dispense with the ownCloud for the moment. My main concern in the inability to make it through the Symfony2 configuration and setup screens. I cleaned out installs of everything and started over a couple times. I'm doing it again for the purposes of this community support post.

After installing Symfony2 into a folder I have named "showcase" I can't access the config.php file because it has code that requires localhost access only.I go here /showcase/web/config.php and I get this message...

"This script is only accessible from localhost."

This is not an issue because I just add my IP address to the config.php file to have access. Once I do that I can see the page and it has recommendations for correct setup. Here they are...

MAJOR PROBLEMS
1. Set detect_unicode to off in php.ini.
- even when set in the php.ini file the problem does not get resolved till I have added this to my top level .htaccess file
"suPHP_ConfigPath /home/<myAccountName>/public_html"

RECOMMENDATIONS

1. Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.
- even though I switch the version of PHP from cPanel to 5.4.* or 5.5.* it still shows up as 5.3.* when I use a PHP info file. Not a super huge deal but it would be nice if I could actually be using at least 5.4.

2. Install and enable a PHP accelerator like APC (highly recommended).
- not really worried about that now. As far as I know it is not vital.

3. Set short_open_tag to off in php.ini.
- I have done this.


Ok, so after doing all that as well as checking the php.ini file for the presence of

extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=sqlite.so

detect_unicode = off // As recommended
short_open_tag = off // As recommended

I go back to the /showcase/web/config.php page and I still have this...

RECOMMENDATIONS

1. Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.
- would be nice to actually have 5.4.11 but still does not seem to actually switch using cPanel PHP control

2. Install and enable a PHP accelerator like APC (highly recommended).
- Speed is not a big concern at the moment.

3. Install PDO (mandatory for Doctrine).
- Now this is new! This is the problem. I assume without PDO being detected or a misconfiguration in Symfony2 it can't get to the php class files it neeeds to proceed to the actual control panels and setup pages for Symfony2.

Then this occurs on this page which is linked at the bottom /showcase/web/app_dev.php (I edited this one as well to add my current IP so I could access it)

"FatalErrorException: Error: Class 'PDO' not found in"
"/home/<myaccountname>/public_html/showcase/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php line 148"

So I check that line and it has variables for parameters and I assume path info.

148: return new $wrapperClass($params, $driver, $config, $eventManager);

This is where I am at. Been looking around for help on this issue, boards and what not.

JTGary
8 Points

2013-09-09 9:20 pm EST
Hello JTGary,

It looks like you've gotten past this point now, as when I attempted to take a look at your PHP version it was running PHP 5.5.3. I'm also not seeing an error about PDO any longer.

Please let us know if you've run into any new issues with this.

- Jacob
JacobN
3,713 Points
Staff
2013-09-16 10:29 pm EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}