Jump to content


Photo

php install help


  • Please log in to reply
18 replies to this topic

#1 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 27 May 2005 - 10:18 PM

i have apache, and mysql on my computer installed, now when i try to install php, it works, but when i try to test it, its not working, im using this tut http://www.webmasterstop.com/48-3.html and im using the latest version of php (not the one he has) and im getting a 404 error not found when i try to do the code at the bottom of the page for phpinfo.php

any help plz??

#2 eric81

eric81

    Young Padawan

  • Members
  • Pip
  • 258 posts
  • Gender:Male

Posted 29 May 2005 - 09:08 PM

i'm sure this topic will get moved... anyway...

installing PHP from the ground up http://webmonkey.wir...?tw=programming

#3 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 30 May 2005 - 02:26 AM

Make sure you're storing the phpinfo.php in the apache/htdocs directory.
Also make sure the phpinfo file has the .php extention on it instead of .txt or other (I've done that once :ph34r:)

#4 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 30 May 2005 - 12:49 PM

ok ill try the link, thx zeal, and raenef, the phpinfo.php is in apache2/htdocs and it has .php :)

edit: ok since the tut i used is for php4 i just used that insteed of php5 and now it works, and the tut u gave me zeal, i searched around and it didnt work

edit #2: im installing phpmyadmin now and i made all the changes as i was sposed to and instead of the login coming up, it shows the index of phpmyadmin and all the files, how do i fix this?

nvm got it, but now i get a error, i installed the mysql admin tool and changed what was needed (as said in the tut in my first post) but i still get a error #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Edited by venomsnake, 30 May 2005 - 03:45 PM.


#5 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 30 May 2005 - 06:59 PM

Make sure you have the mysql support in your php.ini file uncommented. (Without the ; )

#6 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 30 May 2005 - 07:04 PM

i cant seem to find the file, what folder is it under, and do i know what line i should look at?

#7 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 31 May 2005 - 11:41 AM

Well mine installed to C:\windows\php.ini althou it could be different depending on the installation. Just open it up in wordpad/notepad and look for
;extension=php_mysql.dll
just remove the little ; to uncomment the extension and restart the server. Then php should have mysql support.

#8 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 31 May 2005 - 04:15 PM

all i found where these two lines that is even close

;extension=php_mssql.dll
;extension=php_msql.dll

i tried taking out the ; in the bottom one and i got a popup error saying cant find the module, then i tried changing msql to mysql with the ; and it doesnt work either

#9 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 31 May 2005 - 05:11 PM

msql wont work. I believe thats a different database support. Check out the directory where php installed and see if you have the php_mysql.dll file in there. Thats the only reason I can think of why extension=php_mysql.dll wouldnt work. (If its missing) ;)

#10 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 31 May 2005 - 06:01 PM

i looked at the php folder and all i have is php4ts.dll, how do i get the other one?

#11 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 31 May 2005 - 06:18 PM

Well I got mine from the ext folder in the php folder.
If its not there, you can extract it from the php zip package http://us3.php.net/g...p/from/a/mirror

Edit: Quote from the php.net site

MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH.


You can probably find the libmysql.dll in the same place where you'll find php_mysql.dll :P This file totally slipped my mind earlier.

#12 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 31 May 2005 - 06:28 PM

there is no ext in my php folder, im using v4 since i couldnt get v5 working right

in the v4 zip i just got, there also is no php_mysql.dll file, but i did find libmysql.dll, where do i place that?

#13 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 31 May 2005 - 06:35 PM

Ah I see, I dont have much experience with v4 and Im sure some things have changed. However I do believe v4 comes with mysql support already enabled by default so its strange how its not working properly.

Perhaps theres a different reason why you're getting error #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Edit: libmysql.dll according to php.net has to be placed in the windows path. So I'd just put it in c:\windows

#14 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 31 May 2005 - 07:27 PM

ok, i put libmysql.dll in windows and it doesnt work, i played around for a bit and cant get it to work, so i uninstalled php4 and installed php5 using the installer, but it doesnt have all the files thats in the php5.zip and i tried both ways and cant get it to work

now when i try to load phpmyadmin i get this error

cannot load mysql extension,
please check PHP Configuration

#15 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 01 June 2005 - 08:20 PM

hmmm, Im sorry but I dont know what else to try if Im not sitting right there in front of the system.
So instead heres a link that helped me when I was first installing my server:
http://www.webmasterstop.com/48.html
There were others but I've since cleared my bookmarks.
Also you could try an all-in-one program such as LAMP that installs Apache, Mysql, and PHP for you all at once.

#16 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 01 June 2005 - 08:22 PM

that tut is the tut i used, its in my first post :lol: where do i get one of the all in one programs?

thx for trying to help

#17 raenef

raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 01 June 2005 - 11:09 PM

Not a problem, and the latest all-in-one program that I know about is WAMP which is available from http://www.wampserver.com/en/index.php

WAMP5 1.4.4 is now delivered with :

- PHP 5.0.4
- Apache 1.3.33
- MySQL 4.1.10a
- PHPmyadmin 2.6.1-pl3
- SQLitemanager 1.0.4

Warning however if you're on dial-up it could take a while since its a 20+MB file.

#18 Prelithe

Prelithe

    Young Padawan

  • Members
  • Pip
  • 50 posts

Posted 02 June 2005 - 02:18 AM

Here are some instructions i followed and it's pretty clear.

This page describes how to set up Apache 2 to work with PHP 5.0.3 and MySQL 4.0.24 on your home PC. Other version combinations are not supported on this page. In particular, PHP 5 and/or MySQL beyond version 4.1 require a slightly different setup which is not covered here.

I presume that your OS is Win XP, if not, you'll have to see what fits.

Download notes
The download links here are current as of 21/3/2005. Before you download, check apache.org for new versions of their HTTP server, similarly check the NZ mirror of php.net for new PHP versions. Do NOT download the installer version of PHP - its setup is completely different from what is described here.

Apache (2.0.53 for Windows, 4.6 MB) -
http://apache.fast.c...-x86-no_ssl.msi

PHP (PHP 5.0.3 ZIP package for Win 32,9 MB, zipped manual, 7.3 MB) -
http://nz.php.net/ge....php.net/mirror
http://nz2.php.net/g...rom/this/mirror

MySQL (MySQL 4.0.24 ZIP package with installer for Win 32, 25 MB, zipped manual)
http://dev.mysql.com...inspire.net.nz/
http://dev.mysql.com...inspire.net.nz/

Installing Apache

Before you install Apache, ensure that you don't have Microsoft's Internet Information Server (IIS) running - if it runs, it hogs TCP port 80 that is needed by Apache. Go to Control Panel, Administrative Tools, Services, and shut IIS down if you can find it there. Similarly, chase Tomcat away if it's running on port 80.

To start the Apache installation, click on the MSI file and follow the installer instructions. When asked, install Apache for all users on our computer, and enter "localhost" as the server name.

If Apache refuses to start and complains about a port already being in use, ensure that you have no IIS, Tomcat, or other webserver already running on your machine.

After installation, locate the httpd.conf file. It's probably in C:\Program Files\Apache Group\Apache2\conf\. Open the file in a text editor (no, MS Word is not a text editor - use Windows Notepad or somesuch!). You'll need to make a few changes here:

Look for a line that starts with DocumentRoot. Enter your preferred directory here (use forward slashes in the path). E.g., C:/Documents and Settings/joebloggs/My Documents/mywebdir/.
A bit further down there'll be a <Directory ...>-Directive with the comment "This should be set to whatever you set DocumentRoot to". Indeed: Change it to <Directory "C:/Documents and Settings/joebloggs/My Documents/mywebdir/"> or whatever.
Scroll down a few lines until you see a comment that says "Controls who can get stuff from this server". Below the line Order deny,allow insert a line that says Allow from 127.0.0.1. This makes your Apache web server private (i.e., the rest of the world are turned down when they want to spy out your documents).
Almost there: Scroll down a few more lines until you see a piece of code like this:

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

Add two more blocks like this, to prevent people from accessing .inc and .phpi files (file extensions you might want to use for includes in PHP):

<Files ~ "\.phpi$">
Order allow,deny
Deny from all
</Files>

<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>


Save httpd.conf but don't close the text editor yet. Restart Apache. Put an HTML file into the document root directory (e.g., open a Word file, type a few lines and save it as, e.g., yourfilename.html there). Now point your browser at http://localhost/yourfilename.html. If the document displays in the browser, you're in business for now. Time to install PHP.


Installing PHP
Unzip the distribution into your C:\ drive and rename the top directory that it's in from C:\php-5.0.3-Win32 to C:\php.

Now rename php.ini-dist in this directory to php.ini. You'll need to edit it a little in a moment, so open it in a text editor.

Go back to your http.conf file that you opened during the Apache configuration. Somewhere in the file will be a whole raft of LoadModule directives. Add the following lines at the bottom of the block:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"

Finally, find a line that starts with DirectoryIndex and add index.php to the end of the list.

DirectoryIndex index.html index.html.var index.php

Now add c:\php to your path: Right-click on "My Computer", select "Properties" and the "Advanced" tab. At the bottom of the tab, click on "Environment Variables". In the window that opens, go to the bottom list "System Variables" and add c:\php to the existing entry for Path.


Almost done - just that we can't quite talk to MySQL yet. Copy the file c:\php\libmysql.dll to c:\Windows\system32 and overwrite any older version there. Now edit php.ini and remove the semicolon in front of extension=php_mysql.dll and in front of extension=php_sockets.dll. Also, look for the entry extension_dir and set it to "c:/php/ext" - note that the forward slashes are well understood by Windows and are in fact the preferred notation in php.ini.


Save php.ini and httpd.conf and restart Apache. Still all fine? Great, you're running PHP now.

To install the PHP manual, unzip all the contents of the zip file into a folder and run php_manual_en.chm in that folder to start the help program.

Installing MySQL
Install MySQL by unzipping the ZIP distribution and running Setup.exe. Look at the MySQL manual on how to start the server and how to set up user privileges. Note that it's a good idea to restrict users to users that come from localhost. The MySQL home page also has some GUI admin tools for MySQL.

Hope this helps ^^

#19 venomsnake

venomsnake

    Jedi In Training

  • Members
  • PipPip
  • 481 posts
  • Gender:Male

Posted 02 June 2005 - 07:16 AM

thx ill try that out later

edit: its working fine now, thanks much, but now when i go into phpmyadmin, on the bottom it says:

The mbstring PHP extension was not found and you seem to be using multibyte charset. Without mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.


Edited by venomsnake, 02 June 2005 - 04:33 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users