Web Hosting Talk







View Full Version : Any PHP expert out there (server side) ?


prime
08-24-2002, 07:36 PM
Hello,

It seems I can't get PHP (4.2.2) to work properly with Apache 1.3.23-11. I think I got it all right, but obviously not since it's not working.

During compile, I got no error messages. During all the process, no error message appears in the log files.

So here it goes. Whenever I try to see a PHP file from my browser, it seems ok. But if that file is a form (login form, for example), the page reloads with no other effect when I try to submit it. Again, no error messages are given, the page just reloads.

It's probably just a 'switch' somewhere, but I've searched and can't find it...

Any help would be appreciated.

jks
08-24-2002, 09:47 PM
Originally posted by prime
Hello,

It seems I can't get PHP (4.2.2) to work properly with Apache 1.3.23-11. I think I got it all right, but obviously not since it's not working.

During compile, I got no error messages. During all the process, no error message appears in the log files.

So here it goes. Whenever I try to see a PHP file from my browser, it seems ok. But if that file is a form (login form, for example), the page reloads with no other effect when I try to submit it. Again, no error messages are given, the page just reloads.

It's probably just a 'switch' somewhere, but I've searched and can't find it...

Any help would be appreciated.

Have you remembered to turn on register_globals for old scripts?

prime
08-25-2002, 04:03 AM
Yes, still no luck :(

iamdave
08-25-2002, 04:06 AM
Originally posted by prime
Hello,

It seems I can't get PHP (4.2.2) to work properly with Apache 1.3.23-11. I think I got it all right, but obviously not since it's not working.

During compile, I got no error messages. During all the process, no error message appears in the log files.

So here it goes. Whenever I try to see a PHP file from my browser, it seems ok. But if that file is a form (login form, for example), the page reloads with no other effect when I try to submit it. Again, no error messages are given, the page just reloads.

It's probably just a 'switch' somewhere, but I've searched and can't find it...

Any help would be appreciated. I've had the same problem, I don't think it a problem with your scripts. I found that and scripts that use global, stopped working. I had the same problems you did...

prime
08-25-2002, 04:30 AM
Were you able to fix it? Some of these scripts are pretty recent...

I don't think it's the scripts either. I feel it's something in my php config. Some error messages sure would help.

iamdave
08-25-2002, 04:44 AM
Originally posted by prime
Were you able to fix it? Some of these scripts are pretty recent...

I don't think it's the scripts either. I feel it's something in my php config. Some error messages sure would help. There are no errors, it's just when you hit submit, it seems like it submits but it just shows a blank screen. What type of scripts are you using?

phpdeveloper
08-25-2002, 06:29 AM
Looks like it's register_globals problem, I've installed PHP 4.2.2 on my server lately and looks like it runs ok... just either keep the older php.ini file with register_globals On or set it manually...

Gyrbo
08-25-2002, 07:01 AM
Mka sure you restart apache after you make the change to php.ini

phpdeveloper
08-25-2002, 08:50 AM
Originally posted by Gyrbo
Mka sure you restart apache after you make the change to php.ini

That goes without saying... :)

Alan @ CIT
08-25-2002, 08:54 AM
Hi,

You may want to check that you are not using an old php.ini file. When I upgraded from v4.0x to 4.2, PHP wouldn't read php.ini (although it didn't tell me this), even after restarting apache.

Check phpinfo() and see if it says if register_globals are on or off.

Thanks,
Alan.

Gyrbo
08-25-2002, 01:05 PM
Make sure you edit the correct php.ini. In new php versions the default is /usr/lib/

prime
08-25-2002, 02:33 PM
Thanks all for your tips... here it goes.

Originally posted by iamdave
There are no errors, it's just when you hit submit, it seems like it submits but it just shows a blank screen. What type of scripts are you using?

There are a couple I'm trying to set up, all with the same result.
-Webmail included with Plesk (Imp I think)
-Some matrixscripts (psaUsageMonitor & psaMailbot)
-phpManager
-...

I tried with many scripts, all with the same result. And the problem is only present when using PHP via Apache. Plesk has its own server for its admin module, in PHP too, and it works ok.

Originally posted by phpdeveloper
Looks like it's register_globals problem, I've installed PHP 4.2.2 on my server lately and looks like it runs ok... just either keep the older php.ini file with register_globals On or set it manually...

Done... no luck there either.

Originally posted by Gyrbo
Mka sure you restart apache after you make the change to php.ini

Of course ;)

Originally posted by Alan @ QCS
Check phpinfo() and see if it says if register_globals are on or off.

Originally posted by Gyrbo
Make sure you edit the correct php.ini. In new php versions the default is /usr/lib/

Ahhh! Getting somewhere... The scripts work. It was a php.ini problem, that was in /etc,*combined with a bad use of a ./configure option that was given on the phpmanager website.

Now, all I have to figure out is how to get rid of all those errors that come up when Apache starts. But that's a lot easier, in my experience... I probably need to recompile PHP, fixing some options (again) and upgrade another module.

If anyone's interested, here it is..

(1)
PHP Warning: ftp: Unable to initialize module
Module compiled with module API=20010901, debug=0, thread-safety=0
PHP compiled with module API=20020429, debug=0, thread-safety=0
These options need to match
in Unknown on line 0

(2)
PHP Warning: Function registration failed - duplicate name - imap_open in Unknown on line 0
... and a lot of other imap errors

(3)
Same thing as #2, but mysql being the problem.

Well, thanks all for your help. It was appreciated.