i am hosting a website on hostGator with Linux cpanel.
i am using httpRequest and Curl functions in my php script. But when i put the script on Live Server it says,
Fatal error: Class 'HTTPRequest' not found in home/directory/file.php on line42
Any way to set up the server as i,ve update the php version to 5.5 on server from Cpanel.
How to configure these settings i have no idea.
Don't Link to these Questions not Helping in my case:
PHP Fatal error: Class 'HttpRequest' not found
HttpRequest not found in php
You can try this Alternative, as if you are on shared hosting you might not able to get the desired modules:
instead of httprequest use CURL which is built in php module, and easily enabled on linux hosting servers as well.
Check this out might be helpful.
Alternative for HTTPRequest in php
This is a pecl module that is apparently not installed on your server. You can either install via cPanel -> PECL or using the pecl cli pecl install
http://www.php.net/manual/en/install.pecl.php
Looks like I was wrong there does not appear to be a pecl manager in cPanel just pear.
So you need to ssh to the server and use the pecl command else write support#hostgator.com and request they install the extension for you
Related
pthreads recognised in CLI on Ubuntu server but doesn't work in apache2
I've installed pthreads on my Ubuntu 18.04 server using the following tutorial:
https://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads
When I print these lines they both return "1":
php -r "echo PHP_ZTS;"
php -r "print_r(class_exists('Thread'));"
However, when I try to use the Threaded class in php I get fatal error class not found. The php ini file states that Thread Safety is disabled.
Please someone advise me. I've been trying to fix this for hours.
Thanks
PThreads can only work on the CLI. In the introduction on the PHP.net site for Pthreads, it's explicitly stated:
WARNING The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.
As a result, Pthreads will not operate in Apache.
I am migrating a Drupal site to another server and keep getting HTTP 500 error in the browser. When I investigate the PHP error log, I see that there is
PHP Fatal error: Call to undefined function sqlsrv_connect()
in one of the files. I am on a Linux environment and have Composer installed. Is there a way to install the mssql extension using the Composer? Alternatively, what is an efficient way to install MSSQL extension?
the SQLSRV functions are only available on Windows machines.
you can try using the ODBC functions, after installing the drivers but you will have to rewrite your code to use them.
if you happen to be running Ubuntu, here's a script for installation.
I was trying to use soap services but i have been facing following error
Fatal error: Class "SoapClient" not found
I have determined one part that was the easy one that soap extension is not installed. So now i want to install it but i can only access to the server through terminal and root user.
I cannot find any tutorial which can guide me to install soap extension to remote server. Also I am not sure what risks are involved as i am very beginner to it. So any kind of help will be much appreciated.
my php version is 5.1.6, apache version is 2.2.3 and Server OS is CentOS release 5.2
Regards
http://www.wallpaperama.com/forums/how-to-install-php-soap-extension-in-apache-linux-php-server-remove-t1756.html
The above url shows you how to install soap extension for php and Fatal error: Class 'SoapClient' not found this link would show you do you have it installed or not or it is enabled or not.
Thanks & Regards,
Alok Thaker
I have RabbitMQ running on one of our servers and am trying to connect to it via PHP. I am developing on a Windows7 machine and my first line of code reads:
$cnn = new AMQPConnection();
It gives me the error:
Fatal error: Class 'AMQPConnection' not found in
I know that it is something that I need to install but what is it ? I am new to PHP so a little help would be nice.
Ps: I can connect to the RMQ server via the RabbitMQ admin web interface.
Thank you
Jack
Installation guide for php_amqp 1.4.0 (Stable version):
Download proper package for your php version from https://pecl.php.net/package/amqp/1.4.0/windows
Unpack php_amqp.dll to X:/php/ext/ directory
Unpack rabbitmq.1.dll to X:/Windows/system (not system32) directory
Modify php.ini file and add "extension=php_amqp.dll" line at the end of extensions list
Verify module installation by executing command "X:/php/php.exe -m" in command line
Restart webserver
I am developing on a Windows7 machine
You may be out of luck using that specific code. That class is from the PECL aqmp extension. Inside the installation instructions, it states:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
You will want to use another library to speak to your message queue instead.
The rabbitmq-c library supports windows now, and the php_amqp pecl extension builds on windows as well. The documentation just hasn't been updated, nor are there any official binary builds in the wild. However, I managed to get them to build and have some 32 bit dll's available for download here:
http://www.nathanjohnson.info/?p=77
# AMQP installation php.net:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
But here at RabbitMQ website is a windows installer...
Apparently this php.net page is outdated
To install do like this:
Download the correct package for your php from this official PECL amqp 1.4.0 page
unzip
add amqp.dll to your php ext folder
add rabbitmq.1.dll to your windows system 32 folder.
This according to the post on the blog I found here i think it is from the same #NathanJohnson who posted also here.
How I got it working:
My System Config: Win 7 Pro, (x64) XAMPP running PHP 5.6(x86)
Follow instruction from here to install RabbitMQ:
https://www.rabbitmq.com/install-windows.html
Now download compatible extension from here
https://pecl.php.net/package/amqp/1.4.0/windows
in my case it is "5.6 Thread Safe (TS) x86"
Now from zip file (php_amqp-1.4.0-5.6-ts-vc11-x86.zip) downloaded copy dll "php_amqp.dll" to your php extension folder in my case it is "xampp/php/ext" and copy dll "rabbitmq.1.dll" to "Windows\system" directory.
now register your php_amqp dll in php.ini file as
"extension=php_amqp.dll"
now restart apache.
Done. Now you should not get AMQPConnection not found exception.
I have developed a PHP site using PHP 5.3.4 and deployed it to a server that has PHP 5.2.6 installed. I am not doing anything fancy; in fact, the only major library I am using is PHP's native SOAP library.
However, when I test my deployed site, I get the error:
Fatal error: Class 'SoapClient' not found in (path) on line 20
Are there any major differences between PHP 5.2.x and 5.3.x with respect to the SOAP library? I have already changed the configuration files. (Well, actually I told the sysadmin to do it, because I don't have permission to do so.) And I get the same error. Any ideas?
EDIT: More information...
I'm deploying my site to a Windows server.
The server has AppServ installed.
For some reason I don't understand, PHP's configuration file is C:\Windows\php.ini instead of PHP_DIR\php.ini.
I dont think soap is installed on the server try
sudo aptitude install php-soap
change the following line in php.ini:
;extension=php_soap.dll // before
extension=php_soap.dll // after
this enables the soap extension since PHP 5.0