0

My php script that uploads files in my centos - apache server was working fine. Today I enabled suphp in server and after that script is not uploading any files. I was used "php_flag register_globals on" in .htaccess before. But I removed that line from ".htaccess" in order to prevent 500 server error. Pls help

user1010966
  • 473
  • 1
  • 6
  • 13

2 Answers2

0

After a long search and testing, I found the solution myself. Just created a php.ini file and added a line: register_global = on

and removed all php flags in .htaccess. Now its working fine.

user1010966
  • 473
  • 1
  • 6
  • 13
0

As you figured out the parameter has to be in a php.ini file and suPHP has to be instructed to read this file. More information in this answer: php.ini not being read (Debian / ISP Config)

But; If your upload script requires register_globals to be enabled it's probably badly written or outdated. You should try to avoid using register_globals since it poses a security threat. More about that here: What are register_globals in PHP?

Community
  • 1
  • 1
Thomas Jensen
  • 2,138
  • 2
  • 25
  • 48