cannot detect char set for .php file

Asked by valtech

trying ot open a .php file, which i was able to before. now it says:
Quoted from the message box:
"gedit has not been able to detect the character coding.
Please check that you are not trying to open a binary file.
Select a character coding from the menu and try again."

The file is fully in English and could be edited in Notepad.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ralph Janke (txwikinger) said :
#1

what is the output of file for this filename?

Do on a commandline terminal:

file <filename>.php

Please post the output here.

Thanks.

Revision history for this message
valtech (valtech) said :
#2

phpcart.php: PHP script Zend Optimizer data

Revision history for this message
valtech (valtech) said :
#3

Aslo tried a file that does open in gedit and got:

feedback.php: PHP script text

Corrupt descriptor?

Revision history for this message
Soren Hansen (soren) said :
#4

Could you share the file with us?

Revision history for this message
eloj (srm-dfr) said :
#5

If not, maybe at least the output of something like "hexdump -C -n 64 phpcart.php"

Revision history for this message
valtech (valtech) said :
#6

You can certainly download the file from website: www.valtechcomputers.co.uk/php_cart/phpcart.php

If you prefer, I can email it to you as attachment tomorrow (UK time)

The code runs OK - just cannot view/edit the file any more. Could do with looking in it to customise a few bits. Thanks for all your help!

Revision history for this message
Ralph Janke (txwikinger) said :
#7

I fear this php-file is a compiled one that is binary and not ascii.. therefore not editable. You would need to find first a de-compiler that recreates the original source.

I hope this answers the question.

Can you help with this problem?

Provide an answer of your own, or ask valtech for more information if necessary.

To post a message you must log in.