6 Replies - 1841 Views - Last Post: 21 December 2010 - 09:08 PM

#1 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Just starting PHP - having serious problems

Posted 21 December 2010 - 07:54 PM

I'm following the instructions in a book I just got for setting up and Apache server, MySQL, and PHP on my computer. I'm running into a lot of problems though.

So far I have downloaded and installed MySQL on my computer - mysql-essential-4.1.21-win32.msi.

I set that up and proceeded to download Apache 2.2 - httpd-2.2.17-win32-x86-openssl-0.9.8o.msi.

I set that up and proceeded to download PHP 5.2.6 - php-5.2.6-Win32.zip
And pecl 5.2.6 - pecl-5.2.6-Win32.zip

When I'm trying to add PHP to my Apache Configuration I'm running into problems. I'm suppose to add the following lines:
LoadModule php5_module c:/php/php5apache2_2.dll
PHPIniDir "c:/php/"
AddType application/x-httpd-php .php

The problem is I can't save upon adding these lines. When I edit it and then try to save it right back in the directory where it was, I get a pop up saying: "You don't have permission to save in this location. Contact the administrator to obtain permission."

I have no idea what to do.

Also when I try to save a PHP file in the htdocs directory, I get the same message.

This is very disappointing. I just want to get into some learning, but I can't even set up the environment.

Help is greatly appreciated!

Is This A Good Question/Topic? 0
  • +

Replies To: Just starting PHP - having serious problems

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2870
  • View blog
  • Posts: 11,023
  • Joined: 15-July 08

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 08:05 PM

Your user does not have adequate permissions to do these things. IF you are the administrator, you need to change your account type to an Administrator account (through the Control Panel). If this is not the issue, then try opening the File manager as an administrator.
Was This Post Helpful? 0
  • +
  • -

#3 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 08:40 PM

Okay the book says, in regards to configuring php, "In the main directory, you will see a file called php.exe and one called php5ts.dll. You need these files to run PHP as a CGI. If you want to run it as a SAPI module instead, you can use the relevant DLL file for your web server: php5apache2_2.dll in this case. The choice is up to you."

Am I suppose to actually do anything with these files? I have all of them in my directory, but don't know what to do with them.
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 08:50 PM

As this question does not pertain to PHP coding, it's a Web Hosting/Administration issue. I'll move it to the correct sub forum : Web Servers & Hosting
Was This Post Helpful? 0
  • +
  • -

#5 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 08:57 PM

Thank you, didn't even know that existed.

Okay I think I have everything set up correctly, but I can't test it. I can't run my Server. Every time I try and start the sever it says: "Only one usage of each socket address (protocol/network address/port) is normally permitted", and then shuts down. Even when I close my browser it does this. I don't have any thing else running.


EDIT: Scratch that, I got the server up and running now. I just wrote some test code and saved is as test.php in my htdocs directory of it. I wrote:
<? phpinfo(); ?>



Unfortunately, I did not get the expected results. When I go on my browser and put in http://localhost/test.php all I see is this on the page:

<? phpinfo(); ?>


What could the problem be?

This post has been edited by eZACKe: 21 December 2010 - 09:02 PM

Was This Post Helpful? 0
  • +
  • -

#6 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,901
  • Joined: 10-May 07

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 09:01 PM

Try rebooting your server. A static bind to port 80 may be in place. A fresh reboot will assure you that the port is free.
Was This Post Helpful? 0
  • +
  • -

#7 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Re: Just starting PHP - having serious problems

Posted 21 December 2010 - 09:08 PM

Got it fixed myself :bigsmile: .

I had AddType application/x-httpd-php .php in the wrong spot of the document.

Thanks for trying to help anyway guys!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1