Problem with MySQL step during installation

edited December 2011 in Bugs and Errors
via @edumont

During install got past the FTP/FTPS permissions issue I was having originally but now I am getting dialog to enter the MySQL information and it's not accepting anything. I verified that I can connect to the MySQL user using the login/password and verified that privs are set correctly. Screen never displays error, just cycles back to the main install page and when you click next it comes back to the Database Setup screen. I have read the code for this and even if I blank out the hostname and submit I dont' get the messages that say that a valid host name needs to be supplied. No errors at all.


  • I will need a little more information for this problem.

    1) Who is your web host? (or are you hosting this on an internal, VPS, or dedicated server)
    2) Can you please provide us with the PHP error log. Usually on cPanel hosts, there should be a file like 'error_log' or something like that.
    3) Check your /cc-core/logs directory. Are there any log files in there, if so can you please provide those as well.

    Since you were having problems previously, I recommend we get to a point where your install is clean and fresh. This way we can rule out any other old lingering problems.

    So if it's not too much trouble and you don't mind, please follow these steps:

    1) Delete all CumulusClips files, and re-upload them so that we're starting with a fresh install.
    2) Remove and recreate your CumulusClips database. (If this DB was shared with other apps. then just remove all CumulusClips tables)
    3) Clear your browser cache AND then close and re-open a new browser session.
    4) Try the install once more from the beginning
  • Okay, I finally got back from Christmas holiday and am working on this again.
    1. Dedicated server Ubuntu - PHP Version 5.3.2-1ubuntu4.11
    2. php_error log for the install below:

    [28-Dec-2011 13:57:25] PHP Warning: unserialize() expects parameter 1 to be string, object given in /var/www/mobile/install/index.php on line 22

    3.Nothing in the cc-core/logs directory

    As for removing and re-installing clear cache etc.., did it twice and get to the same point with no objects created in MySQL since it never gets past the above php error to try to connect.

  • Okay, let's try something rather hackish, but at least it should point us in the right direction.

    1) First turn on all PHP error reporting. We want to make sure PHP errors aren't being suppressed. To turn errors on set this setting:

    display_errors = On

    This needs to be done in your PHP.ini file, (vhost.conf if you're using Plesk)

    2) Next open the two files: /install/database.php & /install/ftp.php

    and remove any '@' symbols, make you get all of them because there are a bunch.

    3) Next open the file /install/index.php and look for about line 22 where the method 'unserialize' is being called and change that line to read:

    $settings = unserialize ( (string) $_SESSION['settings']);

    4) Save all files, clear your browser cache and start again with the install (no need to delete any files).

    Let me know how it goes.
  • I made the changes 1,2,3 and step 4 (verified twice) and now get different error below:

    Catchable fatal error: Object of class stdClass could not be converted to string in /var/www/mobile/install/index.php on line 22

    I also switched line for unserialized back to original and tried again but just gives original error

    [29-Dec-2011 12:50:31] PHP Warning: unserialize() expects parameter 1 to be string, object given in /var/www/mobile/install/index.php on line 22

    I have it back to your new string version of unserialize in case you have other changes for me to try.

    P.S. what does removing the @ signs in database.php and ftp.php do for me? other install php scripts still have the @ sign

    complete.php, index.php and requirements.php

    Thanks for the help

  • The '@' symbol suppresses any errors that a PHP might produce, since we're debugging here it'll be helpful to actually see any errors that normally might be suppressed.

    Please revert the 'unserialize' line back to it's original state discarding the change I suggested.

    Allow me to summarize what I think you're experiencing, just to make sure we're not missing anything. Please correct me in any parts that aren't accurate.

    1) User passes 'Welcome' screen
    2) User passes 'Requirements' screen
    3) User by-passes the 'FTP' screen because CumulusClips has write access through PHP
    4) User arrives at 'Database' screen
    5) User provides DB host, DB name, DB username, and DB user password (password is not blank)
    6) When user submits the form with all information populated he is directed to:

    i.e. ('Welcome' screen)

    7) When user clicks proceed on 'Welcome' screen he is directed to 'Database' screen once more and process begins again.

    If the form on the 'Database' screen is submitted with missing information such as host, username, password, etc., no on screen errors are displayed by CumulusClips in red text. It merely redirects you to the 'Welcome' screen.

    Please let me know if this is correct.
  • Yes, this is exactly correct on all counts. Both before the changes you had me make and after reverting back to original code for the unserialized line.

    P.S. I also have the display_errors turned back off since it was causing a problem in another part of my web site but I did turn that on for my initial testing and back off after it still didn't fix anything.

  • Wow, that is odd! I have never seen this before. Please excuse me if I'm attempting too many different things, but unfortunately I can't think of a cause for this. I'm going to suggest a few more things if you don't mind.


    A few things to check before we proceed:

    1) Make sure PHP safe mode is off

    2) Check the file /cc-core/config/config.php to see not only if it exists, but if it's contents are correct.


    Now for debugging

    1) Run this command

    sudo chmod -R 777 mobile

    I know this is not good, however it's only for debugging, we will change it back when we're done. Replace 'mobile' with whatever the directory name is where CumulusClips files are.

    2) Save these files to your computer, remove the .txt extension so that they become PHP files. Then upload them to your /install directory overwriting the existing files. Backup your originals so that they're not lost.

    3) Delete the php error log so that a new one is generated

    4) Try again and see how far you get. You should experience the exact same problem, only this time some debugging information was stored to your error log.

    Provide us with the new php error log so that I can review. Please note that your users and password will be exposed. If this is an issue use temporary or fake information.
  • Thanks, will have to do this a few days from now since I have some EOY commitments coming up but will get back to this as soon as I can.
  • Okay,
    1.php safe mode is off not have a config.php file at the location you provided nor any other subdirectory on the web server.

    1. chmod -R 777 on the directory completed
    2. wget on the two new files (backup made) and rename to .php as well as chown to www-data and 777 on these files
    3.saved php_errors.log to an backup file (new file generated with debug statements)

    4. php_errors.log file output below (with username password changed in the file)

    [02-Jan-2012 17:59:17] PHP Notice: Action - database in /var/www/mobile/install/index.php on line 39
    [02-Jan-2012 17:59:17] PHP Notice: SESSION - Array
    [settings] => stdClass Object
    [completed] => Array
    [0] => welcome
    [1] => requirements
    [2] => ftp

    [php] => /usr/bin/php
    [ffmpeg] => /usr/bin/ffmpeg
    [uploads_enabled] => 1
    [ftp_hostname] =>
    [ftp_username] =>
    [ftp_password] =>
    [ftp_path] =>
    [ftp_ssl] =>

    in /var/www/mobile/install/index.php on line 40
    [02-Jan-2012 17:59:17] PHP Notice: POST - Array
    in /var/www/mobile/install/index.php on line 41
    [02-Jan-2012 17:59:17] PHP Notice: GET - Array
    [database] =>
    in /var/www/mobile/install/index.php on line 42
    [02-Jan-2012 17:59:25] PHP Warning: unserialize() expects parameter 1 to be string, object given in /var/www/mobile/install/index.php on line 22
    [02-Jan-2012 17:59:25] PHP Notice: Action - database in /var/www/mobile/install/index.php on line 39
    [02-Jan-2012 17:59:25] PHP Notice: SESSION - Array
    [settings] =>
    in /var/www/mobile/install/index.php on line 40
    [02-Jan-2012 17:59:25] PHP Notice: POST - Array
    [hostname] => localhost
    [name] => mobile
    [username] => username
    [password] => password
    [password-show] =>
    [prefix] =>
    [submitted] => TRUE
    in /var/www/mobile/install/index.php on line 41
    [02-Jan-2012 17:59:25] PHP Notice: GET - Array
    [database] =>
    in /var/www/mobile/install/index.php on line 42
    [02-Jan-2012 17:59:25] PHP Notice: Action - welcome in /var/www/mobile/install/index.php on line 39
    [02-Jan-2012 17:59:25] PHP Notice: SESSION - Array
    [settings] =>
    in /var/www/mobile/install/index.php on line 40
    [02-Jan-2012 17:59:25] PHP Notice: POST - Array
    in /var/www/mobile/install/index.php on line 41
    [02-Jan-2012 17:59:25] PHP Notice: GET - Array
    in /var/www/mobile/install/index.php on line 42

  • One update, I don't have a config.php in the directory you specified nor anywhere under the "mobile" subdirectory. I do however have several other packages installed on my web server that also have config.php if that means anything to you.

    Thanks for your help
  • No the config.php won't affect anything. I was only asking about it to see if the CumulusClips installer got to create the file, or if it failed before it did so. In your case it was unable to create the file.

    I think I see what's going on, but if you don't mind I'd like to be 100% sure. Could you please save these two files as you did previously.

    The index file is a newer version of the one I provided you last time. You can simply overwrite the old one I gave you, since you already backed up the original.

    The ftp file is new, so please make sure you backup the original. No changes were made to the database file I last provided, so you can leave that one alone.

    Again, remove your php error log and try to install again. You will still encounter the same problem, we're just debugging here.

    I really appreciate your patience here, and you allowing us to debug this with you. Unfortunately we are unable to re-produce this strange issue and this is why we are operating in this manner.

    Your help will allow us to provide you with a working version of CumulusClips as well as empower us to help anyone else with the same issue you're having. So thanks for contributing to this community.
  • syntax error in the latest index.php file. Web Install page won't open now.

    [04-Jan-2012 01:07:35] PHP Parse error: syntax error, unexpected T_STRING in /var/www/mobile/install/index.php on line 40
  • Sorry about that, file has been corrected. Please grab the corrected version and continue with the instructions in my previous post.
  • Downloaded it, cleared the php_errors.log. New log and syntax error below:

    Got the install script now but fails when it calls the ftp script with syntax error.

    I am noticing also that the log is showing values that seem to come from my phpmotion install (differrent directory), but I was logged in as user Buddy in phpmotion so it seems an unlikely coincidence.

    [04-Jan-2012 15:42:26] PHP Notice: Action - welcome in /var/www/mobile/install/index.php on line 39
    [04-Jan-2012 15:42:26] PHP Notice: Settings - stdClass Object
    in /var/www/mobile/install/index.php on line 40
    [04-Jan-2012 15:42:26] PHP Notice: SESSION - Array
    [user_id] => 4
    [user_name] => Buddy
    [user_group] => member
    in /var/www/mobile/install/index.php on line 41
    [04-Jan-2012 15:42:26] PHP Notice: POST - Array
    in /var/www/mobile/install/index.php on line 42
    [04-Jan-2012 15:42:26] PHP Notice: GET - Array
    in /var/www/mobile/install/index.php on line 43
    [04-Jan-2012 15:44:01] PHP Warning: unserialize() expects parameter 1 to be string, object given in /var/www/mobile/install/index.php on line 22
    [04-Jan-2012 15:44:01] PHP Parse error: syntax error, unexpected ';' in /var/www/mobile/install/ftp.php on line 58
  • Okay, once again, I fixed the issue and this time I personally tested them. Let's try this again. You can grab the updated ftp.php.txt and follow through with my previous instructions.

    I'll be waiting for your response.

    No worries about that phpmotion issue. It won't affect anything. It only showed up because we were sharing a session.
  • okay, tried again, syntax working, same issue php_errors.log to big to post here.

    wget the file at

    I have removed any username and passwords in the files and permission is correct to be able to read it.

  • I can see why you are being redirected to the 'Welcome' screen. By looking through the code, and it makes sense why. It is behaving as it should be.

    The problem is being caused by the way serialized data is handled by sessions on your system.

    I've looked at the installer code VERY closely and even had other engineers take close scrutinizing looks as well and we all came to the same conclusion that the code is correct. However, based on your logs it's executing very strangely. I don't quite understand why it behaves this way on your server, and nowhere else.

    The installer's session settings variable "$_SESSION['settings']" should be a serialized string at all times, yet your log indicates that is being converted at some point to an object. By what, I don't know, but it's definitely not the code because I was looking for this specifically.

    This is what leads me to believe there must be some type of PHP setting that is interfering and causing the installer's session settings variable "$_SESSION['settings']" to be converted from a serialized string to an unserialized object.

    When can have one of our engineers attempt to fix the problem, for free. To do this, all we would need is temporary FTP or SSH access to the location where you're attempting to install CumulusClips. They'll go in, fix the problem and turn it back over to you so that you continue using CumulusClips. If you decide to approach this option please private message me either the FTP or SSH info.
  • I have seen a few issues with the fact that I am on such a new php version 5.3.2 and there are other comments on google search about issues with this. I would prefer making the changes myself as to having anyone on my system.

    I can provide the php.ini settings or you can look through a php_info file I setup for you if we can move forward with a fix to my settings without someone logging in.

    I am most interested in using cumulusclips in conjunction with my phpmotion site (providing automatic mobile capabilities) and will share any integration steps I use to make the two work together seemlessly (temporarly available for you to review)
  • Try turning "register_globals" off
  • Seems my last post got lost. I was able to turn register_globals off and that allowed me to proceed with the rest of the install (had to download missing php curl but everything else went fine. This issue is closed and now I will work on using the software in conjunction with my phpmotion as a quick way to get it up and running for mobile applications.

    Visit me at (redirect link) or

    Thanks for your time and effort helping resolve this install issue.
This discussion has been closed.