ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    MySQL/PHP issue.

    IT Discussion
    6
    31
    5.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      WLS-ITGuy @marcinozga
      last edited by WLS-ITGuy

      @marcinozga said in MySQL/PHP issue.:

      Actually, you might have more than one php.ini file. Create info.php file with this content:

      <?php phpinfo(); ?>
      

      and visit it in web browser. See what memory limits it shows and where could additional configs be located.

      http://i.imgur.com/Z9Ltyp0.png[/img]

      http://i.imgur.com/blBpUgw.png[/img]

      1 Reply Last reply Reply Quote 0
      • M
        marcinozga
        last edited by

        So limit is set to 2G, is the conversion script still refusing to run?

        W 1 Reply Last reply Reply Quote 0
        • W
          WLS-ITGuy @marcinozga
          last edited by

          @marcinozga

          Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152

          D 1 Reply Last reply Reply Quote 0
          • S
            scottalanmiller
            last edited by

            Just to be sure.... you aren't out of memory, right?

            1 Reply Last reply Reply Quote 2
            • M
              marcinozga
              last edited by

              Oh, that's a cli script, I thought you were calling it with browser. Try this:

              php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
              
              W 1 Reply Last reply Reply Quote 1
              • W
                WLS-ITGuy @marcinozga
                last edited by

                @marcinozga said in MySQL/PHP issue.:

                php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list

                That all worked! And now I am on to the next part of the upgrade!

                1 Reply Last reply Reply Quote 0
                • M
                  marcinozga
                  last edited by

                  Just to clarify, -d option allows you to override any php settings.

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    WLS-ITGuy @marcinozga
                    last edited by

                    @marcinozga said in MySQL/PHP issue.:

                    Just to clarify, -d option allows you to override any php settings.

                    OK. So why would php.ini show that it is allowing 2G but not actually allow 2G?

                    1 Reply Last reply Reply Quote 0
                    • M
                      marcinozga
                      last edited by

                      php-cli has its config file elsewhere, I'm not sure where. When you check it through web, it's shows what's in php.ini.

                      W 1 Reply Last reply Reply Quote 0
                      • W
                        WLS-ITGuy @marcinozga
                        last edited by

                        @marcinozga
                        Gotcha! Thanks for the help!

                        1 Reply Last reply Reply Quote 0
                        • M
                          marcinozga
                          last edited by

                          Run

                          php --ini
                          

                          and see what it returns.

                          W 1 Reply Last reply Reply Quote 0
                          • W
                            WLS-ITGuy @marcinozga
                            last edited by

                            @marcinozga Gives me a list of files pulled from /etc/php5/cli/

                            M 1 Reply Last reply Reply Quote 1
                            • M
                              marcinozga @WLS-ITGuy
                              last edited by marcinozga

                              @WLS-ITGuy line Loaded Configuration File: will give you config location.
                              See what the memory limit is set there.

                              W 1 Reply Last reply Reply Quote 1
                              • W
                                WLS-ITGuy @marcinozga
                                last edited by

                                @marcinozga said in MySQL/PHP issue.:

                                @WLS-ITGuy line Loaded Configuration File: will give you config location.

                                Yup. Got it. Changed the memory_limit there and was able to run the script without using -d.

                                1 Reply Last reply Reply Quote 2
                                • D
                                  dafyre @WLS-ITGuy
                                  last edited by dafyre

                                  @WLS-ITGuy said in MySQL/PHP issue.:

                                  @marcinozga

                                  Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152

                                  Run that same php info.php file from the CLI... and search for the php.ini file that way...

                                  php info.php|grep -i "php.ini"

                                  And see what file(s) it spits out.

                                  Edit: Dang... Day late, $1 short.

                                  1 Reply Last reply Reply Quote 1
                                  • 1
                                  • 2
                                  • 2 / 2
                                  • First post
                                    Last post