403 Error For PHP Pages

This is a discussion on 403 Error For PHP Pages within the Apache Web Server forums, part of the Web Server and Related Forums category; ok, had a look in event viewer, and this is what I'm getting : The Apache service named reported the ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 12-02-2006
MarkP
 
Posts: n/a
Default Re: 403 Error For PHP Pages


ok, had a look in event viewer, and this is what I'm getting :

The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 115 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php5apache2.dll into server: The specified module could not be found.


Is this the right one ?? There is also another in c:/php called
phpapache2_2.dll

What's the next step in the debug process ??

Cheers,
Mark.

  #12 (permalink)  
Old 12-03-2006
HansH
 
Posts: n/a
Default Re: 403 Error For PHP Pages

"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165102137.579256.30210@79g2000cws.googlegrou ps.com...
> The Apache service named reported the following error:
>>>> httpd.exe: Syntax error on line 115 of C:/Program Files/Apache Software
>>>> Foundation/Apache2.2/conf/httpd.conf: Cannot load
>>>> C:/PHP/php5apache2.dll into server: The specified module could not be
>>>> found.

>
> Is this the right one ??

NO :-( It's still a version cludge ...
.... did not notice you use Apache 2.2 till now

> There is also another in c:/php called phpapache2_2.dll

Assumed typo php5apache2_2.dll

> What's the next step in the debug process ??

Change your line in config to
LoadModule php5_module "c:/php/php5apache2_2.dll"

Hope this will finally get you going,

HansH


  #13 (permalink)  
Old 12-03-2006
shimmyshack
 
Posts: n/a
Default Re: 403 Error For PHP Pages

yeah good lcuk mark, its a hassle isnt it all these versions! imagine
if youve got a hundred modules installed, and you decide to upgrade to
the next version of apache, youve got all that hassle to cope with
AGAIN, so my advice document what you do so you wont start getting grey
hair like me (and im only 32!)

  #14 (permalink)  
Old 12-03-2006
MarkP
 
Posts: n/a
Default Re: 403 Error For PHP Pages


No grey hair, just losing it instead I'm afraid !!

Right, I think we're moving forward, very slowly, but we are getting
there.

Changed the file to 2_2.dll ( yes it was a typo, thanks ), and now I
can actually start the service ok, unfortunately there's a BUT,

I went to my php index page, and I get the following :

Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software
Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php on line 32

This is the opener for the database, but presumably I haven't allowed
something to get php to recognise it's supposed to be using MySQL.

I have included the following line in the httpd.conf file :

PHPIniDir "C:/windows"

this is where my php.ini file is, which has both the below lines in :

extension_dir = "c:\php\ext"
extension=php_mysql.dll

What else have I missed ??

  #15 (permalink)  
Old 12-03-2006
HansH
 
Posts: n/a
Default Re: 403 Error For PHP Pages

"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165161079.662460.291730@l12g2000cwl.googlegr oups.com...
> No grey hair, just losing it instead I'm afraid !!

That's a bold statement ;-))

> I went to my php index page, and I get the following :
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software
> Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php on line 32
> I have included the following line in the httpd.conf file :
>
> PHPIniDir "C:/windows"
> this is where my php.ini file is, which has both the below lines in :
> extension_dir = "c:\php\ext"
> extension=php_mysql.dll
>

Installing the msi downloaded at
http://www.php.net/get/php-5.2.0-win.../from/a/mirror
would have provided that file
IF you have selected the proper extention(s).

Your need to configure Apache make me think you obtained
http://www.php.net/get/php-5.2.0-Win.../from/a/mirror
where this file is apperantly named 'libmysql.dll'...

.... change the line in php.ini accordingly

> What else have I missed ??

Third party logic in naming the same file differently :-[

HansH


  #16 (permalink)  
Old 12-03-2006
MarkP
 
Posts: n/a
Default Re: 403 Error For PHP Pages


Thanks Hans, but I'm having a very thick day, sorry.....

I previously ran php / mysql under IIS and everything has been hunky
dorey. So I have the php_mysql.dll file in the ext folder which is
pointed to in the php.ini file.

The php.ini file extentions also refer to the php_mysql.dll and not the
libmysql.dll.

SOOOooo, which are you saying I SHOULD be running ??

I also saw this in the install doc :

php_mysql.dll MySQL functions PHP >= 5.0.0, requires libmysql.dll
(bundled)

so are you saying libmysql.dll is an integral part of php_mysql.dll ??
or the other way round ??

  #17 (permalink)  
Old 12-03-2006
HansH
 
Posts: n/a
Default Re: 403 Error For PHP Pages

"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165165376.639123.197780@l12g2000cwl.googlegr oups.com...
> Thanks Hans, but I'm having a very thick day, sorry.....

Oops, I must have had a fly in both eyes ....
BOTH
http://www.php.net/get/php-5.2.0-win.../from/a/mirror
http://www.php.net/get/php-5.2.0-Win.../from/a/mirror
DO supply ./ext/php_mysql.dll and ./libmysql.dll

DO IGNORE MY PREVIOUS POST

> The php.ini file extentions also refer to the php_mysql.dll

Looks good on second thought ...

The installer creates a PHP.ini with among others these lines
extension_dir =C:\PHP\ext
extension=php_mysql.dll

When compared to yours, note the missing quotes and space!!

You stated previously ' PHPIniDir "C:/windows" ' is in your httpd.conf.
Some reports a trailling / [within the quotes] solved their problems ...

If you have other php.ini files on your system do rename them and check 'set
path' not to list these folders.

Have yourself a litle info.php file reading '<?php phpinfo() ?>' to easily
view your settings.
On the 5th line it tells you which php.ini is used.

Change, try and report ?

HansH


  #18 (permalink)  
Old 12-03-2006
MarkP
 
Posts: n/a
Default Re: 403 Error For PHP Pages


okey dokey,

Took the quotes and space out of the php.ini lines - No change

put the trailing slash on the PHPIniDir line - No Change

don't have any other php.ini files - check

did the 'ole phpinfo() jobbie, and sure enough php.ini is fine, and the
ext directory looks good.

The only query I have, looking at the phpinfo results is this line :

In The Apache Environment Section

Heading Entry
PATH C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32
\Wbem;C:\WINDOWS\php;%SytemRoot&\php\ext

Note that the ext directory has %systemroot&% before the \php\ext and
not C:\windows as per the other entries. Could this be the cause ?? If
so, is it lurking somewhere in the httpd.conf file, 'cos if it is, I
can't see it for looking. What do you think ??

  #19 (permalink)  
Old 12-03-2006
HansH
 
Posts: n/a
Default Re: 403 Error For PHP Pages

"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165181253.363320.169850@n67g2000cwd.googlegr oups.com...
> did the 'ole phpinfo() jobbie, and sure enough php.ini is fine, and the
> ext directory looks good.

Assuming C:\php\php.ini and c:\php\ext.
Assuming php_mysql.dll is at c:\php\ext and libmysql.dll is at c:\php
Do either confirm or correct each.

> Heading Entry
> PATH C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32
> \Wbem;C:\WINDOWS\php;%SytemRoot&\php\ext
>
> Note that the ext directory has %systemroot&% before the \php\ext and
> not C:\windows as per the other entries. Could this be the cause ?? If
> so, is it lurking somewhere in the httpd.conf file, 'cos if it is, I
> can't see it for looking. What do you think ??
>

No way 'php_mysql.dll' is found along those pathes!
I take it %SytemRoot& is a blooper to be changed.
On the other hand, why need this path, when extension_dir is given???

Next worry is 'C:\WINDOWS\php', I think that should be 'C:\php' -and hence
'C:\php\ext'-??

W'ill meet again ...

HansH


  #20 (permalink)  
Old 12-03-2006
MarkP
 
Posts: n/a
Default Re: 403 Error For PHP Pages


Ok, back to being thick for a second I'm afraid.

I'm not at all sure where libmysql.dll comes into the equation, so I've
left it alone fro the minute.

The line in the phpinfo actually reads :

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;C:\WINDOWS\php;%SytemRoot&\php\ext


So it's not a blooper as in me typing incorrectly ( although I did add
an extra % at the end )

so should there not be a % at the beginning and end of the SystemRoot,
rather than an & ???

and you're right, I have no idea what the C:\Windows\php is about as
there is no php directory under the Windows folder.

Any ideas where I can can "play" with the path settings ?? Can't seem
to see them in the httpd.conf file

And hey, after this MySQL thing is done, I need to make sure I can use
the MOD_REWRITE stuff. It's the original reason I decided to Install
apache. So I'm not done with you yet my friend....

But many many thanks for you help so far, it was driving me mad....
Keep it up, and we'll have it resolved before Christmas....... ;o)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:08 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0