Solved

How can I get HttpRequest PHP class on OS X 10.10?

Posted on 2015-01-14
10
158 Views
Last Modified: 2015-02-03
I'm trying to set up a local LAMP environment on my macbook (os x 10.10) and am having problems getting pecl_http to work -- specifically need to be able to access the HttpRequest PHP class.

I've googled the heck out of this and feel like I'm very close, but missing something. Thanks in advance!
0
Comment
Question by:Trevor Lettman
  • 5
  • 4
10 Comments
 
LVL 18

Expert Comment

by:SimonAdept
ID: 40550301
On a Mac it's MAMP rather than LAMP (as the 'L' refers to Linux)...

How have you gone about it? Macports, Homebrew or another route?
0
 

Author Comment

by:Trevor Lettman
ID: 40550308
Ah, yes. I'm using AMPPS for my basic setup. Macports is installed. Here's what I'm getting in the Apache error logs on restart:

PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.5/lib/extensions/ext/propro.so' - dlopen(/Applications/AMPPS/php-5.5/lib/extensions/ext/propro.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.5/lib/extensions/ext/raphf.so' - dlopen(/Applications/AMPPS/php-5.5/lib/extensions/ext/raphf.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.5/lib/extensions/ext/http.so' - dlopen(/Applications/AMPPS/php-5.5/lib/extensions/ext/http.so, 9): image not found in Unknown on line 0
[Wed Jan 14 18:36:26.646287 2015] [mpm_prefork:notice] [pid 4386] AH00163: Apache/2.4.10 (Unix) PHP/5.5.19 mod_wsgi/3.5 Python/2.7.8 OpenSSL/1.0.1j configured -- resuming normal operations
[Wed Jan 14 18:36:26.646307 2015] [core:notice] [pid 4386] AH00094: Command line: '/Applications/AMPPS/apache/bin/httpd'

Thanks!
0
 
LVL 18

Expert Comment

by:SimonAdept
ID: 40550314
I don't know about AMPPS. I'll google it. I  have a working MAMP setup (on Mavericks) using the instructions at
Macports: How to integrate Apache2, PHP, and MySQL (MAMP)
which was re-written just a couple of weeks ago to suit Yosemite.

I note that you'd get a newer version of PHP using the Macports package manager, but your focus may be different as I see that AMPPS includes some other stuff.
0
 

Author Comment

by:Trevor Lettman
ID: 40550316
Once again, it's all set up EXCEPT I get this error:

Fatal error: Class 'HttpRequest' not found in [file name]

It has to do with missing depencies, based on my error log. Just incorrect paths?
0
 

Author Comment

by:Trevor Lettman
ID: 40550317
To be clearer: I'm running a php script that is trying to access the "HttpRequest" class, which isn't available.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 18

Expert Comment

by:SimonAdept
ID: 40550333
Sorry, I can't help. Someone else on here may be able to, or try the AMPPS support or forums link. It doesn't install to the same paths as Macports does.
0
 

Accepted Solution

by:
Trevor Lettman earned 0 total points
ID: 40551204
Thanks for your help. The issue is resolved (sort of). It was twofold: path issue with the .so files and AMPPS, and a 32/64 bit conflict with the same files once those paths were resolved.
0
 
LVL 18

Expert Comment

by:SimonAdept
ID: 40551246
Whew! glad you managed to make progress with it. I had a quick look at AMPPS website - it looks good, but I had no idea what the level of support might be like or how active the user community might be.
0
 
LVL 27

Expert Comment

by:serialband
ID: 40552634
Was it something to do with the LD_LIBRARY_PATH variable?

I don't have MacPorts, but your error basically tells you it was failing to find the correct propro.so in /Applications/AMPPS/php-5.5/lib/extensions/ext/propro.so
0
 

Author Closing Comment

by:Trevor Lettman
ID: 40585857
Although this was resolved, I'm not sure this is going to help anyone else... the entire process is too lengthy to document here, and may be quite specific to my environment.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mac and Windows domain 6 83
Problem to go to page 12 68
Viewing XML as a table on a Mac 3 64
Mac OSX can't search on smb  via finder 10 80
Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built onto of the OSX Server NetBoot system and uses images & workflows as its core assets. While work…
The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac (http://www.symantec.com/business/products/purchasing.jsp?pcid=pcat_security&pvid=825_1) - the Enterprise product vers…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now