# Why nginx not support php new $class()

**URL:** <https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662>\
**Category:** NGINX\
**Created:** [August 13, 2011, 2:52pm UTC](https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662 "2011-08-13T14:52:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 13, 2011, 2:52pm UTC](https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662/1 "2011-08-13T14:52:11Z")

</div>

Hi everyone:

the error is  
502 Bad Gateway  
nginx/0.7.65

my php scripts:

$RTR =& load\_class(‘Router’); ----\>pass  
…  
$class = $RTR-\>fetch\_class(); ----\>pass  
…  
$CI = new $class(); ----\>nopass my breakpoint step here

give me some advice ,friends,tks

Posted at Nginx Forum:

> **[why nginx not support php new $class()](https://forum.nginx.org/read.php?2,213761,213761#msg-213761)**
>
> Hi everyone: the error is 502 Bad Gateway nginx/0.7.65 my php scripts: $RTR =& load\_class('Router'); ----\>pass ....... $class = $RTR-\>fetch\_class(); ----\>pass ...... $CI = new $class(); ----&gt

---

<div class="post-metadata">

**Author:** ![chinafirefox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bbe5ce/32.png) [@chinafirefox](https://www.ruby-forum.com/u/chinafirefox)\
**Post date:** [August 13, 2011, 5:26pm UTC](https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662/2 "2011-08-13T17:26:27Z")

</div>

On Saturday 13 August 2011 16:51:34 chinafirefox wrote:

> $class = $RTR-\>fetch\_class(); ----\>pass  
> …  
> $CI = new $class(); ----\>nopass my breakpoint step here
> 
> give me some advice ,friends,tks

Actually, nginx doesn’t support php at all. Your problem may be related  
to  
your php interpreter or application server, that you use to run php  
scripts.

–  
Valentin V. Bartenev  
[http://vbart.info/](http://vbart.info/)
