#22662 closed defect (fixed)
php5 +debug breaks multi-extension ports (php5-mssql, php5-mysql, php5-odbc, php5-oracle, php5-postgresql, php5-sqlite)
Reported by: | tq@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | debug | Cc: | |
Port: | php5-mssql, php5-mysql, php5-odbc, php5-oracle, php5-postgresql, php5-sqlite |
Description
I was horribly embarrassed in my previous post about this. The resolution was to remove the extension_dir and, though I swear swear swear that I had done it many times, upon your recommendation, it worked. I was happy and went to work on my project. A couple of weeks later, I got to the part that needed to actually use mysql and ARRRGGGGGHHHH!!!! the problem had returned. function_exists('mysql_connect') is false.
Not wanting to repeat my embarrassment, I have spent an incredible amount of time trying to make it work. I even figured out how to compile php and changed the configuration to include --with-mysql=... . It worked except for mysql. (That experiment told me that it couldn't find the mysql header files even though I could see a whole lot of .h files in the directory I pointed to.)
Anyway, I decided that I must have so totally screwed up my system that it was the problem. I cleaned up a hard drive and installed Snow Leopard from scratch. Then xCode. The Macport. Then the whole php/mysql setup.
I had two problems. First, the aspx command to add php to the httpd.conf told me it could not find httpd.conf!! I edited httpd.conf so that it executed php and it still doesn't find mysql.
This time it is a new system with everything under the control of Macports. The only thing I changed is apache stuff to point at my local directory and access php.
I am attaching the script I used to install the ports, the transcript of the installation process and a pdf of phpinfo(). I have burned a huge amount of time on this and am completely out of ideas. Any help will be deeply appreciated.
TQ White II
Attachments (3)
Change History (8)
Changed 15 years ago by tq@…
Attachment: | phpinfo().pdf added |
---|
Changed 15 years ago by tq@…
Attachment: | transcript added |
---|
Changed 15 years ago by tq@…
Attachment: | installedPorts.txt added |
---|
comment:1 Changed 15 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|---|
Port: | php5-mysql added |
comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | debug added |
---|---|
Port: | php5-mssql php5-odbc php5-oracle php5-postgresql php5-sqlite added |
Status: | new → assigned |
Summary: | php5-mysql won't connect to mysql - Redux → php5 +debug breaks multi-extension ports (php5-mssql, php5-mysql, php5-odbc, php5-oracle, php5-postgresql, php5-sqlite) |
comment:3 Changed 15 years ago by tq@…
+debug is soooooo gone! I'd like it well enough but it not mission critical.
I ran the install without it and it appears that I am back in business. PHP finds mySQL correctly. Everything else appears to be right. Thanks for the help.
comment:4 follow-up: 5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
As of r61490, all the php5 extensions should support the +debug variant (and the php5 extensions must then also be installed with the +debug variant).
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign@…:
As of r61490, all the php5 extensions should support the +debug variant (and the php5 extensions must then also be installed with the +debug variant).
Make that as of r61501.
Sorry for the trouble. It looks like the short answer is that this occurs when you use the +debug variant when installing php5. If you reinstall php5 omitting the +debug variant this time, and then rebuild all your php5 extension ports, the problem should go away.
The longer answer is that of the php5 extension ports you've installed, it looks like everything but mysql5 and sqlite is loading. I'm guessing not coincidentally, those are the only ports of the ones you've installed that install more than one extension. To build just one extension (the default), the php5extension portgroup runs "phpize", "configure" and "make" in the extension's directory. But to build more than one extension (this mode is activated by using "php5extension.use_phpize no" in the Portfile), it skips running "phpize", runs the global configure script with certain parameters and runs the global Makefile. I'm guessing that because we're not running "phpize", it doesn't realize that it should reconfigure itself for a debug build. Making this work will be more complicated, because you can't just run "phpize" at the top of the php source directory; you have to run it in each extension's directory. And I think those changes will only have an effect if you then run "configure" and "make" in each extension's directory, as we do for single-extension ports.
Do you need the debug variant? It was added by Anthony in r52241 and I'd never used it, so I'd never run into this problem. One simple solution to the problem would be for me to remove the variant from the Portfile again. If that's not desirable because it's actually useful, then the more complicated solution above is needed.