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: cofiguring for php 5.2.6 Page 1, 2, 3  Next
Author
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Tue 23 Sep '08 23:33    Post subject: cofiguring for php 5.2.6 Reply with quote

i'm nothing but a newbie to apache.
i download 2.2.9 from your site and have it running. but when i place a php file in htdocs the browser wants to open or save the file. if i select open then dreamweaver opens and shows the code. obviously i haven't configured php correctly or that's not the folder for php files. if u can help me out i sure would appreciate it. i'm doing login and register forms as a volunteer.
the instructions i have in php5 and mysql don't help and the topic about installing php and apache aren't clear enough for a dummy like me. i can't find the file php5apache2_2.dll on your site.
sorry if this is to much info.
i'm ready to give up.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 24 Sep '08 5:52    Post subject: Reply with quote

the php5apache2_2.dll comes with PHP, it should be in the php directory, default is c:/php unless you've put it elsewhere.
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Wed 24 Sep '08 15:25    Post subject: Reply with quote

o.k. thank you glsmith. because i was following an outdated book i had php5apache2.dll so i uninstalled php and downloaded again. now i have the right .dll.
ran httpd and it says no listening sockets available, shutting down unable to open logs.
if u could give me a clue that'd be great. does it have to do with listen 80?
or is it this line: If your host doesn't have a registered DNS name, enter its IP address here.?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 24 Sep '08 17:26    Post subject: Reply with quote

No .. you have the service installed and running, then you are trying to run again in the console. 1st instance of Apache (the service) has a lock on port 80.

You can either run as service or run from command line, not both at the same time.

When you need to restart service, from the command line

httpd -k restart

you can do the same from the services window in Windows as well.
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Wed 24 Sep '08 18:59    Post subject: Reply with quote

great, it works now, Apache. but if i go to http:// localhost/register.php or phpinfo.php i get a blank window in the browser. the two files are in htdocs. so how do i see them .. what do i have to fix?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 24 Sep '08 19:13    Post subject: Reply with quote

ok .. I just want to know what you've done to load php in Apache.

Obviously I know you've gotten this much from your prior post (or similar depending on where you put php on the hard drive) ..

LoadModule php_module c:/php/php5dll2_2.dll

anything else?
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Wed 24 Sep '08 22:32    Post subject: Reply with quote

thank you for your reply. i placed the following:

LoadModule php5_module "c:/php5/php5apache2_2.dll"

AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php

PHPIniDir "c:/php5"
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 25 Sep '08 5:23    Post subject: Reply with quote

AddType application/x-httpd-php .php


That is all I have ..

sorry for the late reply
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 14:30    Post subject: Reply with quote

thanks .. not to worry about late reply. i took then night off. i already have that line of code in the conf file. i read the troubleshooting php files and i set display_errors=On but still nothing. here's the url i used:http://localhost/phpinfo.php
files are in htdocs.
in system i have windows/system32/Apache2/php.ini
but php.ini is in php5 directory?? should i change path?
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 14:38    Post subject: Reply with quote

this is what u have for installing php
Variable value: C:\php5;%SystemRoot%\system32;..... but i don't know what goes after system32; if u can let me know that might solve the issue. thanks.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 25 Sep '08 16:47    Post subject: Reply with quote

Well, you've got the PHPIniDir set for c:/php5 ... so that is where you are telling php it is going to find it, so it should be there ... logical yes?

windows/system32/Apache2/php.ini this is useless

C:\php5;%SystemRoot%\system32; this looks like your path environment .. this is good, this puts php in the path so the php5ts.dll can be found. What goes after system32? nothing more for php anyway .. anything else is purely at the discretion of other software. mine looks like
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

Personally, I cheat and go the old php4 setup style that has always worked well for me. I just have to remember to update the php5ts.dll when I upgrade versions.

What I do, not suggesting anyone do it this way .. just works well for me

httpd.conf
LoadModule php5_module c:/php/php5apache2_2.dll
AddType application/x-httpd-php .php
--------------------------------------------
copy php5ts.dll to c:\windows\system
place php.ini in c:\windows


In your case however, I'm leaning on addhandler getting in the way. The only tihng I have an AddHandler for is cgi/perl cause it is a seperate exe (like php-cgi.exe) and is not loaded as a module like php5apache2_2.dll is, so in that sense, Apache needs to know this and seems the AddHandler does just this. While typing this I've been looking at different tutorials on php/apache and not one has said to use addhandler.

just a thought
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 17:51    Post subject: Reply with quote

so; i have made suggested changes and when i get localhost/index.html i get my opening page with the nav on the right. then when i click on register which is one of the options and is transfered thru index.php i get a search page from my high speed provider with the following message:

Did you mean: Localhost? We did not find results for: [localhostindex.php].
You can also try the suggestions below or try typing a new search above.

i think i'll call my isp and see if i'm allowed to run a server. if not how do i configure for 8080? do i have to set a url .. i don't have a registered site. this is for testing my files.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 25 Sep '08 18:19    Post subject: Reply with quote

try http://localhost/index.php

Different port:
very old (circa 2002) .. but still valid

http://www.dslwebserver.com/main/sbs-Apache-2035-change-port-number.html
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 19:43    Post subject: Reply with quote

o.k. but no go: the following appears:
This webpage is not available.

The webpage at http://127.0.0.1/8080 might be temporarily down or it may have moved permanently to a new web address.

Here are some suggestions:
Reload this web page later.
View a cached copy of the web page from Google
More information on this error
Below is the original error message

Error 104 (net::ERR_CONNECTION_FAILED): The attempt to connect to the server failed.
same if i change to 8888
oops forgot to add colon.
now with 127.0.0.1:8080 i get home page and if i hover over links i get correct path in status bar but nothing happens .. i.e. it doesn't move to page for links .. like login.php nor the others. but i have a web address for one of the links and it goes there to that life website??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 25 Sep '08 20:22    Post subject: Reply with quote

What did you set to "servername" and "Listen" in the httpd.conf?
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 21:46    Post subject: Reply with quote

servername www.dslwebserver.com
listen 8080 but now i see i had one set to 8888 so i changed it to 8080.
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Thu 25 Sep '08 21:58    Post subject: Reply with quote

windy wrote:
servername www.dslwebserver.com
listen 8080 but now i see i had one set to 8888 so i changed it to 8080.

same thing happsens.
got it from a site glsmith mentioned. so, i went there and boy i might be a bare naked just born newbie ..but .. do i need to install IIS? 'cause i haven't
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 26 Sep '08 5:59    Post subject: Reply with quote

No, what I sent you too was for Apache .. it may states IF you have IIS you need to run on another port. The config shown is Apache.

whoa .. wait a minute.

unless you are Brian Lee, you cannot have the servername of www.dslwebserver.com that was an example you saw.

Best put your server name at simply "localhost" till everything runs ... then, and if you have a actual hostname pointing to your IP via DNS, you can have a real honest to goodness hostname that is available world wide.

Just curious .. anything strange in the error log?
Back to top
windy



Joined: 19 Sep 2008
Posts: 40

PostPosted: Fri 26 Sep '08 15:02    Post subject: Reply with quote

this is what i get when i go to the following:
http://localhost/index.html:80
Forbidden

You don't have permission to access /index.html:80 on this server

do i have to set permissions .. how do i do that or am i being blocked. i know i have to set permissions when i upload to my isp's server.
i can get "hello world":
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 26 Sep '08 17:44    Post subject: Reply with quote

http://localhost/index.html:80 is wrong!

only http://localhost/index.html if apache listen on port 80. If a different port e.g. 8080 use this shema http://localhost:8080/index.html
Back to top


Reply to topic   Topic: cofiguring for php 5.2.6 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software Page 1, 2, 3  Next