Why Zend server not show me undefined variable ?

General discussion forum for the Zend Server

Why Zend server not show me undefined variable ?

Postby kris1211 on Sun Feb 03, 2013 11:29 am

I have tried to write

<?php
print $xxx;
?>

this will not make any error in web-page. I want the zend server to tell me which variable not defined If I do it mistakenly in my code.

If I write
<?php
$fb = new Facebook()
?>

This will create fatal issue because their is nothing Facebook in my page. Do someone know how to solve it. I have changed the php.ini file found in zendserver folder. I don't have too much knowldge of how this thing work .please help I tried first Zend server.

I want to know another thing well, Is Zend server (I used community edition for now) have something for me specially used in development.
kris1211
 
Posts: 1
Joined: Sun Feb 03, 2013 11:25 am

Re: Why Zend server not show me undefined variable ?

Postby dpqmphkncfd71gvxju44 on Tue Feb 05, 2013 6:20 am

It must be related to error_reporting.
Try setting E_ALL at the beginning of the script or in php.ini
dpqmphkncfd71gvxju44
 
Posts: 9
Joined: Fri Jan 11, 2013 7:06 am

Re: Why Zend server not show me undefined variable ?

Postby zvika on Thu Mar 07, 2013 12:44 pm

Hi

After Zend Server installation, you need to visit the GUI once and set the type of installation you wish to use, namely Development / Production.

Usually in production, there is no exposure to PHP errors in the client side, and you can see the errors as Events from Zend Monitor component.

Last thing - PHP Applications usually catch the non-fatal errors and report "friendly" errors to the client, with or without extra details.
Also this can be enhanced to alerting the admin, in any form of leaving a message or queue or problems.
Zend Server monitor events can send email alert when defined in specific rules (application or global), and also send "custom events" to the queue from PHP code that is aware of Zend Monitor.
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 803
Joined: Sun Dec 14, 2008 9:48 am


Return to Zend Server

Who is online

Users browsing this forum: 3f62010 and 1 guest

cron