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; "MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht news:1165185827.217850.116610@16g2000cwy.googlegro ups.com... &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165185827.217850.116610@16g2000cwy.googlegro ups.com... > I'm not at all sure where libmysql.dll comes into the equation, so I've > left it alone fro the minute. I take it php_mysql.dll will depend on it. > The line in the phpinfo actually reads : > C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \ > Wbem;C:\WINDOWS\php;%SytemRoot&\php\ext > so should there not be a % at the beginning and end of the SystemRoot, > rather than an & ??? Neither ... > 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. .... the lesser unlogic would be to have C:\WINDOWS\php;%SytemRoot&\php\ext replaced by C:\php;C:\php\ext > Any ideas where I can can "play" with the path settings ?? Can't > seem to see them in the httpd.conf file It's a windows setting you can reach via Start, Setup, Configuration, System, Advanced, Enviroment, system variables. (Names may vary, had to translate from locale language -Dutch-) > 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.... Hm, second line of inital post. BTW what version of Apache|PHP|MySQL is running on the other machine??? > But many many thanks for you help so far, it was driving me mad.... Hm, not sure this says what it reads ;-) > Keep it up, and we'll have it resolved before Christmas....... ;o) Sure, we will -luckely you forgot a 4 digit number- ;-) HansH |
|
|||
|
i personally would keep my php.ini file away from c:\windows
somewhere nearer home, in the main php directory, then all those paths will be fixed. Also im certain i have no PHPDir anywhere in my httpd.conf, and never have, (Im running 5.2/2.2.3) so moving one and deleting (commenting out) the other will fix you up Im sure. er good luck! |
|
|||
|
WOOOOHOOOOO !!!!! ( sort of ) As I thought, the PATH settings did have everything to do with the problem. changed that in the environment variables for both c:\php & c:\php\ext and lo and behold I connect to the database. YAY !!! So Next bit : Seems I have a session problem : <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: open(C:\PHP\sessiondata\sess_1c38dd87bdd48ca5e90b9 bd8f0d6e873, O_RDWR) failed: No such file or directory (2) in <b>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on line <b>45</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php:45) in <b>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on line <b>45</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php:45) in <b>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on line <b>45</b> Session support is enabled, but I'm not sure what directives should be set to what.... Any ideas ?? |
|
|||
|
MarkP wrote: > WOOOOHOOOOO !!!!! ( sort of ) > > As I thought, the PATH settings did have everything to do with the > problem. changed that in the environment variables for both c:\php & > c:\php\ext and lo and behold I connect to the database. YAY !!! > > So Next bit : > > Seems I have a session problem : > > <b>Warning</b>: session_start() [<a > href='function.session-start'>function.session-start</a>]: > open(C:\PHP\sessiondata\sess_1c38dd87bdd48ca5e90b9 bd8f0d6e873, O_RDWR) > failed: No such file or directory (2) in <b>C:\Program Files\Apache > Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on > line <b>45</b><br /> > <br /> > <b>Warning</b>: session_start() [<a > href='function.session-start'>function.session-start</a>]: Cannot send > session cookie - headers already sent by (output started at C:\Program > Files\Apache Software > Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php:45) in > <b>C:\Program Files\Apache Software > Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on line > <b>45</b><br /> > <br /> > <b>Warning</b>: session_start() [<a > href='function.session-start'>function.session-start</a>]: Cannot send > session cache limiter - headers already sent (output started at > C:\Program Files\Apache Software > Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php:45) in > <b>C:\Program Files\Apache Software > Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on line > <b>45</b> > > > Session support is enabled, but I'm not sure what directives should be > set to what.... > > Any ideas ?? im not sure if you my last post worked, but the basic point was move your php.ini file to c:\path\to\php so that all the relative paths would be magically fixed, then all these little glitches will go away without manually editing the environmental variables. and also phpdir directive isnt in my httpd.conf file so im not sure why you need it. However, i guess you can contrinue to do what youre doing, but it does seem like very hard work, chasing down problems caused by not having php.ini in the same directory as the program calling for it, which is where all the paths are anyway!! If you want to fix the sessions open php.ini and fix the paths to the sessions. Also in httpd.conf there is a temporary directory for the sessions you might need to fix that as well. |
|
|||
|
"shimmyshack" <matt.farey@gmail.com> schreef in bericht
news:1165248540.079342.23800@79g2000cws.googlegrou ps.com... >> As I thought, the PATH settings did have everything to do with the >> problem. changed that in the environment variables for both c:\php & >> c:\php\ext and lo and behold I connect to the database. YAY !!! >> >> So Next bit : Seems I have a session problem : > im not sure if you my last post worked, but the basic point was move > your php.ini file to c:\path\to\php It never was elsewhere and phpinfo() confirmed its use. > so that all the relative paths would be magically fixed, then all these > little glitches will go away without manually editing the environmental > variables. One of those variables was screwed, a hammer was needed to repair. > and also phpdir directive > isnt in my httpd.conf file so im not sure why you need it. It's PHPIniDir ... .... set according to documentation .... probably redundant when same folder is in path too HansH |
|
|||
|
HansH wrote: > "shimmyshack" <matt.farey@gmail.com> schreef in bericht > news:1165248540.079342.23800@79g2000cws.googlegrou ps.com... > >> As I thought, the PATH settings did have everything to do with the > >> problem. changed that in the environment variables for both c:\php & > >> c:\php\ext and lo and behold I connect to the database. YAY !!! > >> > >> So Next bit : Seems I have a session problem : > > im not sure if you my last post worked, but the basic point was move > > your php.ini file to c:\path\to\php > It never was elsewhere and phpinfo() confirmed its use. > I have included the following line in the httpd.conf file : PHPIniDir "C:/windows" this is where my php.ini file is, - so i suggested moving it into the same directory as php binary, which is standard these days, its also much more transparent than spreading ini files throughout the file system. > > so that all the relative paths would be magically fixed, then all these > > little glitches will go away without manually editing the environmental > > variables. > One of those variables was screwed, a hammer was needed to repair. > the reason why it was screwed in the first place was that the php.ini was in %systemroot%!! > > and also phpdir directive > > isnt in my httpd.conf file so im not sure why you need it. > It's PHPIniDir ... > ... set according to documentation > ... probably redundant when same folder is in path too > yeah redundant, at least way back when php.ini was in c:\windows \long with my.ini and so tit might have had a use, but as I see it keep all the files near the programs they affect, and then when something goes wrong you dont have to edit a file in a sea of other files, you just go to the directory of the thing thats broke and fix it there. I mean for a webie its not so much of a mystery as constantly thinking - now where did I put those things? > HansH |
|
|||
|
"shimmyshack" <matt.farey@gmail.com> schreef in bericht
news:1165256171.626345.127190@l12g2000cwl.googlegr oups.com... > - so i suggested moving it into the same directory as php binary, AFAIK at the OP's system php.ini has always been in the same folder -C:\php- as php.exe >> > ... without manually editing the environmental variables. >> One of those variables was screwed, a hammer was needed to repair. > the reason why it was screwed in the first place was that the php.ini > was in %systemroot%!! Negative, php.ini was NOT in c:\windows. However, c:\windows\php was added to the path env var HansH |
|
|||
|
"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165248207.599746.178330@f1g2000cwa.googlegro ups.com... > Seems I have a session problem : > <b>Warning</b>: session_start() [<a > href='function.session-start'>function.session-start</a>]: > open(C:\PHP\sessiondata\sess_1c38dd87bdd48ca5e90b9 bd8f0d6e873, O_RDWR) > failed: No such file or directory (2) in <b>C:\Program Files\Apache > Software Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php</b> on > line <b>45</b><br /> > <br /> Create folder 'C:\PHP\sessiondata' and retry Consider setting some extra params in php.ini http://nl3.php.net/manual/nl/ref.session.php > <b>Warning</b>: session_start() [<a > href='function.session-start'>function.session-start</a>]: Cannot send > session cookie - headers already sent by (output started at C:\Program > Files\Apache Software > Foundation\Apache2.2\htdocs\fashion\inc\startup.in c.php:45) in Any program should collect a set of headers -cookies included- and send it before anything else to the browser. Structural failure of program ... need to fuzz some outputbuffering -header. http://www.php.net/manual/en/function.header.php Try to change or add to php.ini output_buffering = On HansH |
|
|||
|
Guys, please, no fighting, we're doing ok here... but I have to say, shimmy is perfectly correct - the php.ini file was in the windows folder / but it no longer is, as per his suggestion. HOWEVER, that hasn't made diddly squat difference. To be honest I would have been amazed if it did. After all, after hacking the environment variables, it could see the php.ini file anyway, but I digress..... had another quick look over the info output, and sure enough, it looked like it was trying to save session stuff to c:\php\sessiondata so I created the folder, and that's got rid of all those nasty error messages. Which means we're almost there guys !!! Just need to get the MOD_REWRITE bit working, and I can go to sleep tonight a happy man. :o) Now, my mod_rewrites are not working at all, I don't get any errors, other than a lovely ie page with page cannot be found. I have a ..htaccess file where ( I think ) it should be, but how do I go about debugging this bit ?? |
|
|||
|
"MarkP" <mark_paceyuk@yahoo.co.uk> schreef in bericht
news:1165263279.948009.327540@80g2000cwy.googlegro ups.com... > Now, my mod_rewrites are not working at all, I don't get any errors, > other than a lovely ie page with page cannot be found. I have a > .htaccess file where ( I think ) it should be, Should be below documentroot, but for some [script]alias-sed folders. > but how do I go about debugging this bit ?? Add a line reading 'bogus' -I mean it;-)- to your .htaccess. If request to anything this folder does NOT fail code 500, check config for 'Allowoverride All' and 'AccessFileName .htaccess' If it faills remove the bogus if failure persists (!), check config for a line *like* 'LoadModule rewrite_module modules/mod_rewrite.dll' Needs te be uncommented most likely bbs HansH |