# Problems with php DOMDocument class (URGENT)

**URL:** <https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675>\
**Category:** NGINX\
**Created:** [November 21, 2012, 12:18pm UTC](https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675 "2012-11-21T12:18:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 21, 2012, 12:18pm UTC](https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675/1 "2012-11-21T12:18:15Z")

</div>

Hello to everyone,  
Unfortunately I have an urgent problem that I can not solve.

I’m migrating a webapp that runs on nginx in a CentOS 6 server.  
The webapp use DOMDocument php class.  
The php-xml module is installed correctly: phpInfo shows dom section  
enabled.

In nginx error.log I keep getting the following error:  
[error] 19403#0: \*1 FastCGI sent in stderr: “PHP Fatal error: Class  
‘DOMDocument’ not found in  
/home/ixtanteuser/webroot/Ixtante/classes/lib/config/Config.class.php on  
line 51” while reading response header from upstream, client:  
213.187.3.72,  
server: [vo.dev.viralbis.com](http://vo.dev.viralbis.com), request: “GET /test.php/ HTTP/1.1”,  
upstream:  
“fastcgi://127.0.0.1:1903”, host: “[vo.dev.viralbis.com:8091](http://vo.dev.viralbis.com:8091)”

I simply copied the files from the server being disposed, including  
nginx.conf, where everything works perfectly.

Any help is appreciated!

–  
Pasqualini Ing. Marco  
Project Manager at StudioVatore

Contacts:  
Mail: removed\_email\_address@domain.invalid  
Web: [http://www.studiovatore.com](http://www.studiovatore.com)  
Phone: 0425 073641  
Fax: 0425 019813

RISERVATO: Questo messaggio e gli eventuali allegati sono confidenziali  
e  
riservati. Se vi stato recapitato per errore e non siete fra i  
destinatari elencati, siete pregati di darne immediatamente avviso al  
mittente. Le informazioni contenute non devono essere mostrate ad altri,  
n  
utilizzate, memorizzate o copiate in qualsiasi forma.

CONFIDENTIAL: This e-mail and any attachments are confidential and may  
contain reserved information. If you are not one of the named  
recipients,  
please notify the sender immediately. Moreover, you should not disclose  
the  
contents to any other persons, nor should the information container be  
used  
for any purpose or stored or copied in any form.

---

<div class="post-metadata">

**Author:** ![Marco\_Pasqualini](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@Marco\_Pasqualini](https://www.ruby-forum.com/u/Marco_Pasqualini)\
**Post date:** [November 21, 2012, 12:24pm UTC](https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675/2 "2012-11-21T12:24:05Z")

</div>

On Wed, Nov 21, 2012 at 6:17 PM, Marco Pasqualini  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello to everyone,  
> Unfortunately I have an urgent problem that I can not solve.
> 
> I’m migrating a webapp that runs on nginx in a CentOS 6 server.  
> The webapp use DOMDocument php class.  
> The php-xml module is installed correctly: phpInfo shows dom section  
> enabled.

try comparing output of phpinfo between new and old servers.

---

<div class="post-metadata">

**Author:** ![Marco\_Pasqualini](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@Marco\_Pasqualini](https://www.ruby-forum.com/u/Marco_Pasqualini)\
**Post date:** [November 21, 2012, 6:58pm UTC](https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675/3 "2012-11-21T18:58:37Z")

</div>

I noticed that if I view phpInfo() through apache there is properly the  
DOM  
section (DOM/XML enabled ecc…)  
instead, if I view phpInfo() through nginx the DOM tab does not appear  
at  
all!

So the question is: how do I make sure that the php in nginx can see the  
php-xml?  
But php.ini is not the same between apache and nginx?

Please help!  
I’m new in nginx… and looking on google and I have not seen similar  
problems…

Thanks

2012/11/21 Edho A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> try comparing output of phpinfo between new and old servers.
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Pasqualini Ing. Marco  
Project Manager at StudioVatore

Contacts:  
Mail: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Web: [http://www.studiovatore.com](http://www.studiovatore.com)  
Phone: 0425 073641  
Fax: 0425 019813

RISERVATO: Questo messaggio e gli eventuali allegati sono confidenziali  
e  
riservati. Se vi stato recapitato per errore e non siete fra i  
destinatari elencati, siete pregati di darne immediatamente avviso al  
mittente. Le informazioni contenute non devono essere mostrate ad altri,  
n  
utilizzate, memorizzate o copiate in qualsiasi forma.

CONFIDENTIAL: This e-mail and any attachments are confidential and may  
contain reserved information. If you are not one of the named  
recipients,  
please notify the sender immediately. Moreover, you should not disclose  
the  
contents to any other persons, nor should the information container be  
used  
for any purpose or stored or copied in any form.

---

<div class="post-metadata">

**Author:** ![Marco\_Pasqualini](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@Marco\_Pasqualini](https://www.ruby-forum.com/u/Marco_Pasqualini)\
**Post date:** [November 21, 2012, 7:37pm UTC](https://www.ruby-forum.com/t/problems-with-php-domdocument-class-urgent/224675/4 "2012-11-21T19:37:12Z")

</div>

On Wed, Nov 21, 2012 at 06:58:18PM +0100, Marco Pasqualini wrote:

Hi there,

> I noticed that if I view phpInfo() through apache there is properly the DOM  
> section (DOM/XML enabled ecc…)  
> instead, if I view phpInfo() through nginx the DOM tab does not appear at  
> all!
> 
> So the question is: how do I make sure that the php in nginx can see the  
> php-xml?

There isn’t a php in nginx.

nginx talks to the fastcgi server which “does” the php.

apache tends to use an embedded php.

So you’ll want to find whatever php.ini is in effect in your apache  
setup,  
and make something similar be in effect for your fastcgi setup.

nginx is not involved in this. You’ll probably get a  
more-directly-useful  
answer from a php list.

Good luck with it,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
