Solved

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

Posted on 2015-01-14
10
160 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:Simon
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:Simon
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 18

Expert Comment

by:Simon
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:Simon
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 28

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
OS Sierra Time Machine 6 89
Apache/PHP: Cannot make phpinfo() and phpmyadmin work 4 34
PHP_POST() error message 9 41
Charging Macbook Pro 8 30
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

24 Experts available now in Live!

Get 1:1 Help Now