---
title: "PHP 4.1.2 / Apache 2.0"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/39979-php-4-1-2-apache-2-0"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Picklezz"
published: "2002-03-20T10:05:10.000Z"
updated: "2002-03-20T19:38:11.000Z"
replies: 2
views: 246
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/39979-php-4-1-2-apache-2-0"
---

# PHP 4.1.2 / Apache 2.0

## #1 — Picklezz, 2002-03-20T10:05Z

Någon som vet hur man installerar PHP 4.1.2 till Apache 2.0.
Under Windows. Vill köra SAPI och inte genom CGI...

Permalänk: https://www.webforum.nu/p/39979

## #2 — Tim, 2002-03-20T12:12Z

LÄS TEXTEN INSTALL som följer med PHP paketet. 

Jag har på en tidigare cgi-installation av PHP försökt installera php som modul istället. 

Har kollat i manualen lite och gjort följande: 

Kommenterat bort gamla cgi direktiven i httpd.conf. 

Lagt till dessa direktiv längst ner i httpd.conf istället: 

LoadModule php4_module c:/php/sapi/php4apache.dll 
AddType application/x-httpd-php .php .phtml 

OCH allting fungerar när jag startar Apache, dvs, alla php sidor utom dom som är databasrelaterade. Så fort jag försöker komma åt en sådan får jag följande felmeddelanden(nån som vet orsaken? Observera denna sida funkar när jag kör PHP som CGI): 

Warning: Can't connect to MySQL server on 'localhost' (10061) in c:\\rootwww\\root.php on line 13 

Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10061) in c:\\rootwww\\root.php on line 13 

Warning: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 15 

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 15 

Warning: MySQL: A link to the server could not be established in c:\\rootwww\\root.php on line 15 

Warning: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 19 

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 19 

Warning: MySQL: A link to the server could not be established in c:\\rootwww\\root.php on line 19 

Warning: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 23 

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\\rootwww\\root.php on line 23 

Warning: MySQL: A link to the server could not be established in c:\\rootwww\\root.php on line 23 

Warning: Supplied argument is not a valid MySQL-Link resource in c:\\rootwww\\root.php on line 25

Permalänk: https://www.webforum.nu/p/626016

## #3 — Picklezz, 2002-03-20T19:38Z

> Lagt till dessa direktiv längst ner i httpd.conf istället: 
> 
> LoadModule php4_module c:/php/sapi/php4apache.dll 
> AddType application/x-httpd-php .php .phtml

Jaså...jag hade lagt mina överst i filen så det var därför jag inte fick det att fungera...men nu fungerar det ju =) iallafall i 1.3...skall installera 2.0 senare...

Har dock inte testat Databas-kopllingar.

Permalänk: https://www.webforum.nu/p/629183

---

Tråden på webben: https://www.webforum.nu/amne/php/39979-php-4-1-2-apache-2-0
