Installation help

 
 
Picture of Nadhir Silver
Stuck at installing moodle; Configuring Apache n PHP
 

Ok,i'm installing moodle ,step by step by following each instruction from

 

docs.moodle.org/25/en/Manual_install_on_Windows_7_with_Apache_and_MySQL#Step_4:_Configure_Apache_and_PHP

 

and I'm stuck at Step 4: Configure Apache and PHP, where I should have restart the apache to load the changes at the end of the step, but this error happen

httpd: Syntax error on line 530 of C:/Apache24/conf/httpd.conf: Cannot load C:/P HP/php5apache2_4.dll into server: %1 is not a valid Win32 application.

 

I'm using 5.5.4 version of php and Apache 2.4.6 Win64 (my system run on 64bit), and i'm sure i've edited the httpd.conf correctly as told.

 

So,anyone know the solution? thanks

 

 

 

 
Average of ratings: -
Gmads
Re: Stuck at installing moodle; Configuring Apache n PHP
Group Particularly helpful MoodlersGroup Testers

Hi Nadhir,

You seem to have a space between the "P" and the "HP":

C:/P HP/php5apache2_4.dll

 

 
Average of ratings: -
Picture of Nadhir Silver
Re: Stuck at installing moodle; Configuring Apache n PHP
 

ops,i accidently add space to the file when copying from the command prompt, but the real file has no space, i checked it for like,4 times.

 
Average of ratings: -
Gmads
Re: Stuck at installing moodle; Configuring Apache n PHP
Group Particularly helpful MoodlersGroup Testers

Hello Nadhir,

Sorry to ask for the obvious, but we sometimes miss that kind of things...

1. The PHP installation is actually at C:\PHP?

2. You are doing clean installations? I mean, you are not overwriting previous installations, are you?

3. Have you checked that the php5apache2_4.dll file actually exists in the php directory?

4. You downloaded everything from the correct sites (Apache from apachelounge.com and PHP from php.net)?

5. What's the name of the Apache zip file you download and installed?

6. You downloaded the PHP Thread Safe version (check the name of the file at the PHP/dev directory, it should be php5ts.lib)?

7. Does the web server run before you add the LoadModule, AddHandler and PHPIniDir lines? Have you checked this by going to http://localhost in your browser?

8. Have you installed the required Microsoft VC versions?

I noticed that the error message didn't include the name of the server (should be localhost):

Cannot load C:/P HP/php5apache2_4.dll into server: %1 is not a valid Win32 application

Search in the http.conf file for the parameter ServerName; its value should be localhost:

ServerName localhost

 
Average of ratings: -
Picture of Nadhir Silver
Re: Stuck at installing moodle; Configuring Apache n PHP
 

Hey Guillermo, thanks for replying.

 

1. The PHP installation is actually at C:\PHP?

-yes,i've extracted the zip file i've downloaded from http://www.php.net/download and follow the exact instruction in the moodle doc from here

2. You are doing clean installations? I mean, you are not overwriting previous installations, are you?

- yep, i'm doing clean installation.

 

3. Have you checked that the php5apache2_4.dll file actually exists in the php directory?

yes,it really does exist.

 

4. You downloaded everything from the correct sites (Apache from apachelounge.com and PHP from php.net)?

- yes i did smile

 

5. What's the name of the Apache zip file you download and installed?

-httpd-2.4.6-win64-VC11 <-- Apache 2.4.6 Win64

 

6. You downloaded the PHP Thread Safe version (check the name of the file at the PHP/dev directory, it should be php5ts.lib)?

- Yep, i did.

PHP 5.5 (5.5.4)- VC11 x86 Thread Safe (2013-Sep-18 23:44:17),

and yes, the file is there- php5ts.lib

7. Does the web server run before you add the LoadModule, AddHandler and PHPIniDir lines? Have you checked this by going to http://localhost in your browser?

-Yes i did, the web server run fine, it shows the "It works" sign when i tried opening localhost right after i installed Apache. the problem happen right after i install PHP and wanna configure both PHP and Apache file.

 

8. Have you installed the required Microsoft VC versions?

-Yes,i've downloaded from microsoft site, and it's for 64bit,the same with my system..

 

 

- any other suggestion..or else i'm thinking of gonna try uninstalling and try to start back from the beginning

 
Average of ratings: -
Gmads
Re: Stuck at installing moodle; Configuring Apache n PHP
Group Particularly helpful MoodlersGroup Testers

From the info you have posted, I can't actually see any problems; as a matter of fact, I recently did a complete installation on a 64 bit laptop with Windows 7 and I used the latest components at the time (httpd-2.4.6-win64-VC11, php-5.5.1-Win32-VC11-x86.zip) and I don't recall having that error message. I had to install the required VC files, too, and while at first I had some issues with them, at the end everything worked fine.

Right now I have my server running as FastCGI, but here are the lines I originally had working at my httpd.conf file:

LoadModule php5_module "C:/Php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/Php"

This shouldn't be related to your problem, but did you see about the ServerName directive?

Well, this things can be quite tricky; the first time I tried to upgrade, now some time ago, I struggled so much that I finally ended keeping my ancient versions and forgetting about the upgrade sad So the first times it does take some patience to get it running.

If I can think of something else, I'll let you know. In the meantime, yes, maybe you could uninstall everything and retry.

 
Average of ratings: -
Picture of Abdisalam Abdi
Re: Stuck at installing moodle; Configuring Apache n PHP
 

Hi I am new to moodle. I am registered  using Moodle. Can someone help me how to download the application. please send to my email gorod_ilmi@hotmail.co.uk

 
Average of ratings: -
Picture of Nadhir Silver
Re: Stuck at installing moodle; Configuring Apache n PHP
 

the same thing happen... can you explain this to me:

Now, navigate to C:\PHP, and copy php.ini-development to php.ini. Edit this file, find the following lines and modify them as follows (all should exist already):

   memory_limit = 256M
   post_max_size = 128M
   upload_max_filesize = 128M

 

what does "navigate to C:\PHP, and copy php.ini-development to php.ini." means? do i have to rename the php.ini-developement to php.ini in the PHP directory?

 

 

 

 
Average of ratings: -
Gmads
Re: Stuck at installing moodle; Configuring Apache n PHP
Group Particularly helpful MoodlersGroup Testers

Hello Nadhir,

It only means that you must select (not open) file php.ini-development and then copy it (press Ctrl-C) and paste it (press Ctrl-V) in the same folder (i.e. c:\php).

This will get you a php - copy.ini-development file that you must rename (select it and press F2) as php.ini.

Finally, open file php.ini and edit directives memory_limit, post_max_size, upload_max_filesize (or any other) as needed.

The PHP system comes with two template files, php.ini-development and php.ini-production, which one shouldn't modify but use as a starting point. If one wants to use the server for production, one would copy the php.ini-production file as php.ini and then edit this php.ini as needed.

 
Average of ratings: -
Picture of Nadhir Silver
Re: Stuck at installing moodle; Configuring Apache n PHP
 

I did that, and there are still errors... But finally, I change the PHP to the VC11 x64 Thread Safe  version, it works like a charm..i previously used VC11 X32 version cause i don't wanna use the 64 version as it stated that it is experimental. Anyway, thank you for your help

 
Average of ratings: -
Gmads
Re: Stuck at installing moodle; Configuring Apache n PHP
Group Particularly helpful MoodlersGroup Testers

Hi Nadhir,

Great to know! I'm using the 32 bit version without issues. You're welcome.

 
Average of ratings: -
Picture of king Amodeni
Re: Stuck at installing moodle; Configuring Apache n PHP
 

Dear Guillermo Madero S,

I also had a lot of issues with several combinations of the 32bit versions php/Apache.

I eventually followed Nadhir Silver's suggestion and installed  Apache 2.4.7 win 64 vc11(from ApacheLounge) with php-5.5.7-Win32-VC11-x64 TS (from the php.net site) even though its stated experimental, "it works like a charm" just as Nadhir stated

 
Average of ratings: -
Picture of Howard Miller
Re: Stuck at installing moodle; Configuring Apache n PHP
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

You have the wrong version of the dll (probably). I had lots of problems with this. The dll has to be built for *exactly* the same version of Apache. This is explained in the previous paragraphs - it's probably changed since the page was written (newer versions) but the important point is that the Apache version and the PHP version match. Check again smile

 
Average of ratings: -