1

I'm deploying an application on a server in Japan. The application is a product which my company is selling, and it's been successfully installed on many other servers without such problems. The application is written in PHP/CodeIgniter, and the same package was successfully tested on other servers.

The problem is- the application only shows some question marks (and then it dies with an error, that a certain class is not found, although the same code works on other server). Some application files are encoded with Zend Guard- Zend Optimizer is available on both servers. What I have tried/found out:

1) Major PHP version on both servers is the same- 5.2.x

2) Zend Optimizer versions are the same- 3.3.9

3) The question marks are in fact question marks- piped the output to file with wget and opened it in HEX editor- the file mostly contains 3F, with some random HEX symbols between:

0000000: 3f3f 3f3f 3f3f 3f3f 3f3f 3f01 3f3f 3f3f  ???????????.????
0000010: 3f3f 3f3f 3f3f 3f3f 3f3f 203f 3f3f 3f3f  ?????????? ?????
0000020: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000030: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000040: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000050: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000060: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000070: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000080: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000090: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000a0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000b0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000c0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000d0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000e0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
00000f0: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000100: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000110: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000120: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????
0000130: 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f 3f3f  ????????????????

4) I suspect, that the problem is related to PHP settings- so far, I have tried setting default_charset to 'utf-8' in php.ini, but that does not change anything.

5) Expected output to the point where application crashes should be nothing- no output at all. Instead, I get the output above (it continues on in that manner).

6) PHP is run under Apache as a module.

Any ideas on what might cause this? The files were copied to server by scp'ing the archive and unzipping it on server.

These are the response headers- I don't see anything suspicious there.

Date    Mon, 31 Jan 2011 16:09:34 GMT
Server  Apache/2.0.63 (Red Hat)
Content-Length  5339
Keep-Alive  timeout=15, max=100
Connection  Keep-Alive
Content-Type    text/html; charset=utf-8

I asked this question on stackoverflow.com first, but decided to repost it here: https://stackoverflow.com/questions/4852122/php-outputs-question-marks

EDIT: I guess I am getting somewhere- the problem is with Zend Optimizer. Replacing the encoded files helped, and the output is as expected. This creates another problem- how to tell what's wrong with Zend Optimizer? The encoded files were tested on different server with the same version of Zend Optimizer, and they run fine. PHP versions are 5.2.14 on the server which works, vs 5.2.13 on the server where the encoded files do not work.

2
  • Not seen this before so shot in dark but is there any commands disabled in the php.ini ?
    – trozz
    Jan 31, 2011 at 16:19
  • It's hard to tell, as PHP was not configured by me- but I didn't see any configuration settings that stood out.
    – fest
    Jan 31, 2011 at 16:32

1 Answer 1

1

php.ini:

zend_optimizer.enable_loader=0

The error was cryptic enough though...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .