webForumDet fria alternativet

PHP 4.1.2 / Apache 2.0

2 svar · 240 visningar · startad av Picklezz

PicklezzMedlem sedan jan. 2002448 inlägg
#1

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...

TimMedlem sedan jan. 2002120 inlägg
#2

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

PicklezzMedlem sedan jan. 2002448 inlägg
#3

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.

Genererad på 386 ms · cache AV · v20260730165559-full.f96bc7eb