logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Functions not working properly on PHP 4.4.7
Author
Arez



Joined: 11 Jul 2007
Posts: 6

PostPosted: Wed 11 Jul '07 2:30    Post subject: Functions not working properly on PHP 4.4.7 Reply with quote

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

PostPosted: Wed 11 Jul '07 12:58    Post subject: Reply with quote

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

PostPosted: Thu 12 Jul '07 0:40    Post subject: Reply with quote

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

PostPosted: Thu 12 Jul '07 9:57    Post subject: Reply with quote

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

PostPosted: Thu 12 Jul '07 19:46    Post subject: Reply with quote

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

PostPosted: Fri 13 Jul '07 9:01    Post subject: Reply with quote

A little bit wrong Wink

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

PostPosted: Sat 14 Jul '07 4:26    Post subject: Reply with quote

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

PostPosted: Sat 14 Jul '07 10:44    Post subject: Reply with quote

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

PostPosted: Sat 14 Jul '07 19:23    Post subject: Reply with quote

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

PostPosted: Mon 30 Jul '07 6:20    Post subject: Cannot load mcrypt extension Error in phpMyAdmin Reply with quote

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

PostPosted: Mon 30 Jul '07 13:33    Post subject: Reply with quote

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

PostPosted: Wed 31 Oct '07 17:38    Post subject: Reply with quote

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


Reply to topic   Topic: Functions not working properly on PHP 4.4.7 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software