Elxis CMS Forum

Support => Technical support => Topic started by: A.Translator on December 17, 2008, 19:22:52

Title: Cannot install php on windows 64-bit
Post by: A.Translator on December 17, 2008, 19:22:52
Following the excellent tutorial of datahell in https://www.elxis.org/guides/developers-guides/64bit-apache-php-mysql-windows.html I ran into a problem.
All went well, the Apache monitor is up and running, but when I tried to copy
C:/php/php5ts.dll
C:/php/php5isapi.dll
C:/php/php5apache2_2.dll
C:/php/ext/php_mysql.dll
into my windows system folder, I got the error message:
"files cannot be copied - file name not valid or too long".

Screen shot of error is attached.

Can someone please help?
Thank you.

[attachment deleted by admin]
Title: Re: Cannot install php on windows 64-bit
Post by: datahell on December 17, 2008, 21:54:38
You might have no access to that directory, are you logged in as an administrator? It might be a vista security issue. Or the file might be corrupted. I dont know, this has nothing to do with the guide, it has to do with your windows. Make sure these services (apache, mysql) are not running when you do such works.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 17, 2008, 23:05:47
You might have no access to that directory, are you logged in as an administrator? It might be a vista security issue. Or the file might be corrupted. I dont know, this has nothing to do with the guide, it has to do with your windows. Make sure these services (apache, mysql) are not running when you do such works.

Thanks for replying so quickly.
I am logged in as administrator, but I did have Apache running while I tried.

No time now, but I will try again tomorrow.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 18, 2008, 19:27:18
Ok, exiting Apache made it possible to copy the necessary files.

I now get an error saying port 80 is already taken (I am indeed using Skype, but not on port 80), see nedstat report.
But since Apache ran ok previously I'll try and sort this out first.

Thanks for your prompt reply.

[attachment deleted by admin]
Title: Re: Cannot install php on windows 64-bit
Post by: datahell on December 18, 2008, 19:33:53
Most probably you have an other copy of apache running (xampp? an older installation? a rooter? an other program that uses apache for his standalone administration console? something else?)... Stop that apache. Or you have IIS running! Stop IIS!
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 19, 2008, 16:52:50
Most probably you have an other copy of apache running (xampp? an older installation? a rooter? an other program that uses apache for his standalone administration console? something else?)... Stop that apache. Or you have IIS running! Stop IIS!

No other apache is running. And no ISS either.

I did everything again, from the start. Made all the changes you suggest.
The Apache monitor is running in the taskbar. The error log says it is running.

But when I type "http://localhost/" (without the brackets) into my browser's address bar, I get the error:

"The connection to the server was reset while the page was loading."

I am thinking of giving up, but thank you for your help and patience.

Edit 16.17 GMT -1

I just found out it works when I test:
http://127.0.0.1/
Title: Re: Cannot install php on windows 64-bit
Post by: xmanhattan on December 19, 2008, 18:28:45
You might want to have a look at this.

http://www.sitepoint.com/forums/showthread.php?t=409782&highlight=install+php+windows (http://www.sitepoint.com/forums/showthread.php?t=409782&highlight=install+php+windows)

Hope it helps.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 19, 2008, 18:45:40
You might want to have a look at this.

http://www.sitepoint.com/forums/showthread.php?t=409782&highlight=install+php+windows (http://www.sitepoint.com/forums/showthread.php?t=409782&highlight=install+php+windows)

Hope it helps.

Thank you for replying.
As I said in an edit to my message above it seems to be working now, but only when approached as
http://127.0.0.1/ i.e not when I try to access localhost.

Thanks anyway!
Title: Re: Cannot install php on windows 64-bit
Post by: datahell on December 19, 2008, 19:28:47
You should edit the apache configuration (httpd.conf) and set up your host. Apache is running so the guide is good and works.

If you wish to set up virtual hosts on windows follow my guide (tested on windows xp and vista 32/64 bit):
https://www.elxis.org/guides/developers-guides/local-apache-and-virtual-hosts.html (https://www.elxis.org/guides/developers-guides/local-apache-and-virtual-hosts.html)

Title: Re: Cannot install php on windows 64-bit
Post by: xmanhattan on December 19, 2008, 19:40:16
A.Translator,

In essence, 127.0.0.1 is localhost.  Does the C:\Program Files\Apache Group\Apache2\conf\httpd.conf exist?

Check to see if that exists and use notepad to edit it and see if localhost is defined.

Also, if you are using firefox, please see the following:
http://kb.mozillazine.org/Error_loading_any_website (http://kb.mozillazine.org/Error_loading_any_website)

You can also assign your localhost to port 81 in httpd.conf if necessary to see if that works.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 19, 2008, 19:43:49
You should edit the apache configuration (httpd.conf) and set up your host. Apache is running so the guide is good and works.

The guide is excellent! I was not complaining.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 19, 2008, 19:48:42
A.Translator,

In essence, 127.0.0.1 is localhost.  Does the C:\Program Files\Apache Group\Apache2\conf\httpd.conf exist?

Check to see if that exists and use notepad to edit it and see if localhost is defined.

I have the httpd.conf in C:\apache\conf , with:

ServerRoot "C:/apache"
ServerName localhost:80


I am very tired now, will try again tomorrow but it doesn't really matter whether I have to access it through "http://127.0.0.1/" instead of "http://localhost/", does it?

Thanks again.


Title: Re: Cannot install php on windows 64-bit
Post by: xmanhattan on December 19, 2008, 20:17:31
Try a search on your system for the hosts file.  Edit it to see if it too has 127.0.0.1 localhost on a line.

Usually it is in
Code: [Select]
C:\WINDOWS\system32\drivers\etc\hosts
Don't give up, you are almost there. Patience is a virtue.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 20, 2008, 11:42:38
Try a search on your system for the hosts file.  Edit it to see if it too has 127.0.0.1 localhost on a line.

Usually it is in
Code: [Select]
C:\WINDOWS\system32\drivers\etc\hostsDon't give up, you are almost there. Patience is a virtue.


I cannot find another hosts file.
It is not where you suggest and a Search did not find one either.
You are very encouraging! Thanks for that.
I have no idea what else to do, though.
I am not a techie at all.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 20, 2008, 13:57:33
Ok, I do have the line 127.0.0.1 localhost on a line in the etc/hosts file
underneath it is a line:
::1             localhost

Could that have something to do with it?
Title: Re: Cannot install php on windows 64-bit
Post by: Ivan Trebješanin on December 20, 2008, 14:49:23
This is IP6 address, but try to add IP4 address too (127.0.0.1)

127.0.0.1 localhost
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 20, 2008, 17:47:36
This is IP6 address, but try to add IP4 address too (127.0.0.1)
127.0.0.1 localhost

I commented out the second line ::1        localhost
and now everything is fine.

Thank you all for your help and patience.
Title: Re: Cannot install php on windows 64-bit
Post by: xmanhattan on December 21, 2008, 10:29:14
That is shown using ip6.  You can change that line to:
127.0.0.1    localhost
use the tab key to space between.
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 21, 2008, 11:15:23
That is shown using ip6.  You can change that line to:
127.0.0.1    localhost
use the tab key to space between.

Gee, that was all! I had spaces in between, the moment I changed that to a tab all was well!
Thank you very much.
Title: Re: Cannot install php on windows 64-bit
Post by: datahell on December 21, 2008, 11:18:28
Some times the solution is simple but weird!  :D
Title: Re: Cannot install php on windows 64-bit
Post by: A.Translator on December 21, 2008, 11:22:02
Some times the solution is simple but weird!  :D
But it is good there are so many helpful people out there.
Have a good Christmas - or whatever you celebrate over where you are.
Title: Re: Cannot install php on windows 64-bit
Post by: profinuyasha on December 29, 2008, 12:28:59
for vista, you would have to turn User Account Control off then you can install PHP

otherwise, I recommend XP/2000/20003/2008 or Linux for webserver