0

everybody, I have this propblem and I don't know how to solve it. I explain:

I hired a vps and installed a centos6 template with vhm/cpanel.Itried to configure everything and it seems to be working; The only propblem is that the script that I used on a shared host are no more runing and I get this error "Fatal error: Cannot redeclare class + name of class". This scripts are for example joomla2.5,joomla 3 ,...

I have searched on forums and no body seems to understand this problem. Everybody is thinking it's about using "include" instead of "require_once" but that is not the case because I did not touch anything on this scripts and I simply moved them from the former host to the new environment on the new vps. For me I think something is going wrong on this envirnment not the scripts. Does anybody have an idea about what's going on on my new vps? Please?

  • Well if you think that has something to do with the environment, wouldn't it be smart to give us some information about the environment (php, modules, etc.)? – Andreas May 26 '13 at 08:36
  • Thanks for the interest@Andreas here are theVersion Apache 2.2.23 Version PHP 5.3.21 Version MySQL 5.1.66-cll or is there a particular module to handle classes other than the core php ? Architecture x86_64 Système d'exploitation linux – Staulen Green May 27 '13 at 16:17
  • Hey, I have solved the problem! The error was due to a wrong php handler "sdo".When I changed to "cgi" everything started running smothly. I think cpanel should not include sdo php handler as default but set "cgi" or "suPHP" instead. – Staulen Green Jun 10 '13 at 07:39

1 Answers1

0

I have solved the problem! The error was due to a wrong php handler "dso".This handler does not allow you to load or redeclare classes inside one script operations. When I changed to "cgi" everything started running smothly. I think cpanel should not include "dso" php handler as default but set "cgi" or "suPHP" instead. Here is an article about running PHP as a cgi/apache module. http://docs.joomla.org/Should_PHP_run_as_a_CGI_script_or_as_an_Apache_module%3F

This other article sugest using cgi on php5 environment and dso on php4.

http://blog.servint.net/2011/10/28/the-tech-bench-all-about-php-handlers/

If you have this problem on shared host I don't know any other work around but calling the hosting campany to adress the issue by changing php handlers on the sever.

Here is another interesting article about php handlers http://www.webhostingtalk.com/showthread.php?t=679944

Thanks and I hope this will help someone.