Author |
|
Arez
Joined: 11 Jul 2007 Posts: 6
|
Posted: Wed 11 Jul '07 2:30 Post subject: Functions not working properly on PHP 4.4.7 |
|
|
I made a complete back-up of my site (clanin.net) and set it up with my local Apache and MySQL.
If you go to clanin.net and click on members, it displays the members... but for my computer, it ALWAYS brings up the homepage. I do not understand this!
It is bringing up the homepage on my computer perfectly (reading from the database), but the page always stays the same (if I go to http://localhost/clanin.net/index.php?p=Members it still shows the homepage).
The other problem is that my passwords do not work which are encrypted in MD5.
Also, at the bottom of PhpMyAdmin, it gives me this error:
"Cannot load mcrypt extension. Please check your PHP configuration."
So, can anyone give me advice on how to get my pages to show, get my password to work, and get the mcrypt error resolved? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jul '07 12:58 Post subject: |
|
|
You need to enable mbsting and mcrypt in php.ini and restart apache
e.g.
Code: |
extension=php_mbstring.dll
extension=php_mcrypt.dll
|
|
|
Back to top |
|
Arez
Joined: 11 Jul 2007 Posts: 6
|
Posted: Thu 12 Jul '07 0:40 Post subject: |
|
|
I uncommented both of those already, but I still get the error, even when I put the php_mcrypt.dll in the same directory as php_mbstring.dll (which resolved a different error).
I'm really confused... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 12 Jul '07 9:57 Post subject: |
|
|
Make sure that your ini file will be loaded from apache
with PHPIniDir
e.g.
Code: |
PHPIniDir "C:/server2/php"
LoadModule php5_module "C:/server2/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
|
|
|
Back to top |
|
Arez
Joined: 11 Jul 2007 Posts: 6
|
Posted: Thu 12 Jul '07 19:46 Post subject: |
|
|
Code: |
PHPIniDir "C:/Program Files/Apache Group/Apache2/php"
LoadModule php4_module "C:/server2/php/libmcrypt.dll"
AddType application/x-httpd-php .php
|
That code brings up an error when I restart apache, and when I use PHPIniDir the php_mbstring.dll always seems to be in the wrong directory and brings back my second error. Ahhhh |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 13 Jul '07 9:01 Post subject: |
|
|
A little bit wrong
Copy the php4apache2.dll from C:/Program Files/Apache Group/Apache2/php/sapi to C:/Program Files/Apache Group/Apache2/php/
httpd.conf
Code: |
PHPIniDir "C:/Program Files/Apache Group/Apache2/php"
LoadModule php4_module "C:/Program Files/Apache Group/Apache2/php/php4apache2.dll"
AddType application/x-httpd-php .php
|
and in php.ini
change
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
to
extension=php_mbstring.dll
extension=php_mcrypt.dll |
|
Back to top |
|
Arez
Joined: 11 Jul 2007 Posts: 6
|
Posted: Sat 14 Jul '07 4:26 Post subject: |
|
|
Alright, I had both of those uncommented already so php.ini is set.
When I replaced your code with the code that was already at the top, I got an error and Apache wouldn't start. Here's what is already in my httpd.conf:
Code: | LoadModule php4_module php/sapi/php4apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps |
This damn thing should be working...
PHP Warning: Unknown(): Unable to load dynamic library './php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 14 Jul '07 10:44 Post subject: |
|
|
Did you set the right extension dir in php.ini?
Code: |
extension_dir = C:/Program Files/Apache Group/Apache2/phpext/
|
|
|
Back to top |
|
Arez
Joined: 11 Jul 2007 Posts: 6
|
Posted: Sat 14 Jul '07 19:23 Post subject: |
|
|
Now it's all set. I used the php_mcrypt.dll from the php extensions folder and set my extension dir. Thanks for support! |
|
Back to top |
|
busycloud
Joined: 30 Jul 2007 Posts: 1
|
Posted: Mon 30 Jul '07 6:20 Post subject: Cannot load mcrypt extension Error in phpMyAdmin |
|
|
I'm actually experiencing the same error. "Cannot load mcrypt extension. Please check your PHP configuration." There was an additional error displayed showing that mbstring was not loaded but I was able to fix that but uncommenting that extension in my php.ini file.
I also enabled the mcrypt extension in my php.ini file and restarted Apache on my PC but no luck, the error still appears in phpMyAdmin.
The directory in which the loadable extensions are set correctly according to my PC install which is:
extension_dir = "E:\php\ext" and I also verified that the "php_mcrypt.dll" file is there too.
Any ideas on why this error still shows? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 30 Jul '07 13:33 Post subject: |
|
|
Enable error logging so that you can see what error is going on
display_startup_errors = On
log_errors = On
error_log = C:/php/phperror.log |
|
Back to top |
|
madmonkey
Joined: 31 Oct 2007 Posts: 1 Location: South Wales
|
Posted: Wed 31 Oct '07 17:38 Post subject: |
|
|
If after:
- Removing the comments in PHP.INI for mcrypt -and-
- Making sure the php_mcrypt.dll file shows up in the EXT folder -and-
- Verifying that "extension_dir" in PHP.INI points to that EXT folder
and mcrypt still doesn't work, then go to this web site http://files.edin.dk/php/win32/mcrypt/
Download libmcrypt.dll, and save it into your system32 folder. You shouldn't need to even restart Apache, mycrypt will normally work immediately after. |
|
Back to top |
|