Jump to content
  • 0
Sign in to follow this  
ToiletMaster

Flux Issue unable to connect back to database

Question

Hi there guys,


I'm not really sure whether does this affect FLUX currently as i'm trying to install Flux on my web hoster.

 

However it comes with an error upon installing it.  One of it would be this

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 473474176 bytes) in Unknown on line 0

 

Aside from that, it doesn't allow it to connect to my SQL server on my VPS. However sources have indicated that it could be my hoster that's giving the problem since i've already allowed access for my web hoster into my VPS.

 

This is the current web hoster's configuration on their side. I'm not sure if it fits the requirement though.

 

Apache 2.2.24CentOS 5.9 64bitcPanel: 11.36.1 (build 6)curl 7.15.5Ver 14.12Distrib 5.0.96phpMyAdmin 3.5.5Python 2.4.3Perl: 5.8.8PHP 5.3.25ionCube PHP Loader v4.2.2Zend Optimizer: 3.3.9ruby 1.8.7Rails 2.3.18OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008


Could this requirements fit the current Flux requirement?


Please and thanks!

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I have never tried FluxCP yet so I can't help you connecting to the database, but this kind of errors are kinda frequent in shared web hosting:

 

Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in Unknown on line 0

 

You tried to use 451,54 MBytes of memory when your hoster only allowed you to use 128 MBytes. Since installation didn't work properly, I'd reccommend deleting your FluxCP installation and doing it again, but changing something.

 

What can you do? In most cases, you can locally alter memory limit to your liking (just avoid setting it too high). Either:

  • Make a php.ini file un your FluxCP root before installing it. and write in it:
    memory_limit = 512M
  • Open your installer php file (or each of the installation steps) and add on it (them) the following, where corresponds:
    ini_set('memory_limit', '512M');
  • Make a .htaccess file (or edit it if it already exists) in the root of FluxCP and write (add) the following in it:
    php_value memory_limit 512M 

Try only one of these at once or you may drive your hosting mad. If neither of they work, I suggest getting a good web hosting.

 

If you fix this error, chances are you'll fix the DB error.

Share this post


Link to post
Share on other sites
  • 0

I have never tried FluxCP yet so I can't help you connecting to the database, but this kind of errors are kinda frequent in shared web hosting:

 

Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in Unknown on line 0

 

You tried to use 451,54 MBytes of memory when your hoster only allowed you to use 128 MBytes. Since installation didn't work properly, I'd reccommend deleting your FluxCP installation and doing it again, but changing something.

 

What can you do? In most cases, you can locally alter memory limit to your liking (just avoid setting it too high). Either:

  • Make a php.ini file un your FluxCP root before installing it. and write in it:
    memory_limit = 512M

  • Open your installer php file (or each of the installation steps) and add on it (them) the following, where corresponds:
    ini_set('memory_limit', '512M');

  • Make a .htaccess file (or edit it if it already exists) in the root of FluxCP and write (add) the following in it:
    php_value memory_limit 512M 

Try only one of these at once or you may drive your hosting mad. If neither of they work, I suggest getting a good web hosting.

 

If you fix this error, chances are you'll fix the DB error.

 

Hi there,

 

I've spoken to my web hosting. They increased the memory limit from 128mb to 512mb. The fatal error doesn't come up anymore.

 

However still, I'm unable to connect to My VPS currently. It's an issue with MySQL definitely I believe.

 

But i can't figure out who's providing the error. Whether it's my hoster itself, or the SQL itself.

 

Thank you for your great reply though!

 

Kind Regards,

 

TM

Share this post


Link to post
Share on other sites
  • 0

Now that I remember, by default the MySQL server didn't allow connections from outside (just from the same machine) and you have to edit the MySQL configurations to allow that (that's disabled by default for security reasons). This means, you won't be able to access from outside even if your have a user with all privileges, if you haven't allowed connections from other computers.

 

So, if you haven't done it yet, try to enable remote connections to your MySQL server. I once was needing this and this guide was useful to me.

 

If you have already allowed remote connections, then the problem is 99.99% from flux and I can't help you there since I've never used it.

Share this post


Link to post
Share on other sites
  • 0

Now that I remember, by default the MySQL server didn't allow connections from outside (just from the same machine) and you have to edit the MySQL configurations to allow that (that's disabled by default for security reasons). This means, you won't be able to access from outside even if your have a user with all privileges, if you haven't allowed connections from other computers.

 

So, if you haven't done it yet, try to enable remote connections to your MySQL server. I once was needing this and this guide was useful to me.

 

If you have already allowed remote connections, then the problem is 99.99% from flux and I can't help you there since I've never used it.

 

Currently i'm remotely connecting my database using this command

 

 

grant all privileges on *.* to username@address identified by 'password'

 

and done, able to connect to my database via MySQL Workbench xD

 

however following the same steps of providing the connection to Flux username and password, it din't work :(

Edited by ToiletMaster

Share this post


Link to post
Share on other sites
  • 0

Granting all priviledges that way is really risky. 

You should try to only setup per-database priviledges and ideally per-table as needed. 

 

Either case, assuming Flux and the Server's database are on the same host, try doing this from the command line

mysql -u<username> -p database_name

It should connect or give you the corresponding error. Feel free to post the error if it shows here (Y)

Share this post


Link to post
Share on other sites
  • 0

Granting all priviledges that way is really risky. 

You should try to only setup per-database priviledges and ideally per-table as needed. 

 

Either case, assuming Flux and the Server's database are on the same host, try doing this from the command line

mysql -u<username> -p database_name

It should connect or give you the corresponding error. Feel free to post the error if it shows here (Y)

 

 

Hi there Xgear,

 

thanks for the tip! Someone else warned me about this as well,

 

however it has been resolved on my end.

 

Thanks for the tips! Don't worry bout the grant all privileges part XD

 

However i did face an issue though,

 

 

it seems that currently my security code for capcha doesn't come out.

 

Any idea on that?

solved.

 

 

 

when i try and register an account, it says Uh Oh! What happened? tried googling but it din't manage to solve my issue :(

Edited by ToiletMaster

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.