Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2006
    Posts
    5

    Unanswered: Cannot manage to load any of the extensions

    Hi everyone, I have a problem concerning the loading of php extensions, via the php.ini.

    I have followed the tutorial linked in this forum's sticky and all went fine (php's working and so Apache), apart from the extension loading feature of php.

    Here are my specs: Apache 2.2.2, PHP 5.1.4, MySQL 5.0.26.

    I have set, in the php.ini the following (releated to extensions):

    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = C:\php5\ext
    
    extension=php_gd2.dll
    extension=php_mcrypt.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    Here is the resoult of a get_loaded_extensions() function:
    Code:
    Array ( 
    [0] => bcmath 
    [1] => calendar 
    [2] => com_dotnet 
    [3] => ctype 
    [4] => date 
    [5] => ftp 
    [6] => hash 
    [7] => iconv 
    [8] => odbc 
    [9] => pcre 
    [10] => Reflection 
    [11] => session 
    [12] => libxml 
    [13] => standard 
    [14] => tokenizer 
    [15] => zlib 
    [16] => SimpleXML 
    [17] => dom 
    [18] => SPL 
    [19] => wddx 
    [20] => xml 
    [21] => xmlreader 
    [22] => xmlwriter 
    [23] => apache2handler )

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Create a .php file with the following and browse to it -
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    In the first section of the output, there is a line with Configuration File (php.ini) Path Make sure that this lists the php.ini that you are changing the lines in. Also, you must stop and start your web server to get changes to take effect.

  3. #3
    Join Date
    Oct 2006
    Posts
    5
    The path is the same of the one I'm modifing, and yes, I have restarted my server.

  4. #4
    Join Date
    Oct 2006
    Posts
    5
    Here is an error that comes up:

    Code:
    Fatal error: Call to undefined function mysql_connect() in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\test_mysql_insert.php on line 8
    Provoked by this code:
    PHP Code:
     $connection mysql_connect($dbhost,$dbusername,$dbpasswd

  5. #5
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Check the apache server logs for errors.

    Make sure that the .dll files exist in the ext folder.

    About the only other thing that comes to mind is if "c:\php5" is in your windows path statement.

    I notice that you are using Apache 2.2, are you using PHP as an apache module or under CGI? If an apache module, where did you get the php5apache2.dll as this is not distributed with PHP from php.net.

  6. #6
    Join Date
    Oct 2006
    Posts
    5
    1- Looking in the apache logs I've found the following:

    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php5\\ext\\php_gd2.dll' - Specified module not found.\r\n in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php5\\ext\\php_mcrypt.dll' - Specified module not found.\r\n in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php5\\ext\\php_mysql.dll' - Specified module not found.\r\n in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php5\\ext\\php_mysqli.dll' - Specified module not found.\r\n in Unknown on line 0
    2- The dll files are in the following folder (as set in php.ini): c:\php\ext

    3- I have set my System PATH Variable (c:\php)

    4- I have PHP as a module. I got the php5apache2.dll from Apachelounge as adviced in this comment in the PHP official manual (on PHP.net): http://www.php.net/manual/en/install...che2.php#69012

  7. #7
    Join Date
    Oct 2006
    Posts
    5
    Issue resolved, I had a messed up config file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •