Upgraded to 4.2 - AAAAAGGGGGGGGGGGGGGGG

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Upgraded to 4.2 - AAAAAGGGGGGGGGGGGGGGG

Post by DSM »

Ok, now that I have upgraded to 4.2 nothing works correctly.
Scripts I wrote using 4.0.6 don't work in 4.2; on my box at least.
The majority of the websites I write are template based and all content is inserted using includes based on form / menu input. When I use form input I use method = "post", I think my problem lays in how I am passing the variables and how they are being interperted by Php.

Am I going to have to relearn how to write code and how I pass variables to comply with the upgrade in Php?

I have noticed code using $_POST, $_HTTP.*.VAR[],etc... is this the preferred method of passing variables?

And here i thought I knew somewhat of what I was doin'

Is anyone else having this problem?
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

In your php.ini file, set register_globals to on.
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

Jason, that worked, almost; now at the bottom of my pages I get these funky little errors:

Code: Select all

Warning: open(./Windows/Cookies\sess_a3e0a7f9527bde7808b832b30f371662, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (./Windows/Cookies) in Unknown on line 0
All else seems to work...

Thx
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

Fixed it...wrong slash direction in the session.save_path
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

I can see by the amount of views this thread has gotten in less then 24 hour that I was not the only one who had issues with upgrading.
Come on now, you can admit it some of you had issues too.

Anyway, next upgrade issue.

Should I run php as an Apache module or cgi?

Right now I am running it as a cgi, intially I tried to install the upgrade as a module but got an error when Apache started up something to the effect of "You need two files to load php module" or something close to that.

My question is; Is there any real advantage to loading Php as a module vs a cgi, and if there is any advantages what are they?
User avatar
EvilWalrus
Site Admin
Posts: 209
Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA

Post by EvilWalrus »

as for loading the php4 module with apache, you must add the LoadModule line to the httpd.conf AS WELL AS the AddModule mod_php4.c line below that in the addmodule list...
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

Ok,
In the php.ini I changed "extension_dir" to php path
c:\php\sapi\
Thats where my dll's are

Added to httpd.conf:
AddModule mod_php4.c
To the AddModule list.
code line 175

Added to httpd.conf:
LoadModule php4 module c:/php/sapi/php4apache.dll
To the LoadModule list.
code line 203

Added to httpd.conf:
AddType application/x-httpd-php .php
To the AddType section.
code line 770

Now I get error:
Cannot add module vie name mod_php4.c, not in the list of loaded modules.

This is on a win98/apache1.3.9/php4.20 set up.

Anyone have any ideas?
User avatar
EvilWalrus
Site Admin
Posts: 209
Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA

Post by EvilWalrus »

first off, win98? can we collectively say 'ewww'? secondly, Apache 1.3.9? i think it's time to upgrade EVERYTHING, and try again.. and by the way, upgrading to the latest (1.3.24 i believe) of Apache will solve 99% of your problems...
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

ok, I have copies of XP and 2000 sitting here. What do you suggest, also just dl'd apache 2.0.36 I am willing to try just about anything. My biggest fear is that I am going to have a nightmare on my hands if I upgrade my OS.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I'm (still) using w2k and apache 2.0.35. Works fine even though the apache2filter.dll is located in the directory 'experimental'.
After the SuSE8 CDs will've arrived (go donkey go ;) ) I'm going to 'upgrade' my server to linux (again).
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

See thats what I say, my win98/apache1.3.19/php2.0 (cgi) is working great, its when I try to run php as a module that I get the errors, so I think until I build a new box I am going to stick w/what is working. At least I upgraded to php2.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

If it works, it works.

However, PHP as CGI will be just as slow as Perl. PHP as a module will be faster.

As far as the problem with 4.2, I don't see how its a problem. The register_globals debate has been going on for sometime now, and was even mentioned in the change_logs that it was set to OFF by default.

In fact, read it here: http://ca.php.net/release_4_2_0.php as read the part in bold.

Now repeat after me: Upgrading without reading the changelog will mean things WILL break. =)
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

:oops:

actually its php4.2 not php2 & if anyone has an answer to my problem about running as a module w/apache 1.3.19 please help.
DSM
Forum Contributor
Posts: 101
Joined: Thu May 02, 2002 11:51 am
Location: New Mexico, USA

Post by DSM »

Well my worst fears were realized at 3pm Sunday afternoon. Windows2000 crashed & wiped out my BIOS and fried my video card.
So much for that idea, have a new motherboard with Athalon 1.4 and new video card onthe way. This time I will load up XP and see what happens. Old board was a PCChips, do yourselves a favor stay away from these guys, absolutly no support what so ever. I had to trace them down by the chipset/AMIBIOS chip and pictures. They are outta Taiwann and they suck.
Luckly I have a clean 30gig HD ready to be formatted when the board arrives. I will try to recover my files from the old drive if I can get back into it. Yes I have BU's but would still like to have all the files.
Well that was an adventure...later PHP'rs
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

at this moment all files from my (so called) server are beeing copied to my primary PC. As soon as this is done (zzzZZZzzz) I will install linux. Hopefully clonecd (and/or nero burn) will run on top of wine or this experiment ends in it's infancy. But I'm quiet curious about apache/php/python/kde on linux again
Post Reply