Php installscript hangs on resolving ca3.php.net

software development

#1

I need to compile php5 again because my domain was moved to a new server. I need to have my own php so I can dynamically load a library of charting routines. I keep trying to run the installscript from http://wiki.dreamhost.com/Installing_PHP5 but I keep getting the message
http://ca3.php.net/get/php-5.2.10.tar.gz/from/us2.php.net/mirror
=> `mirror’

Resolving ca3.php.net… failed: Temporary failure in name resolution.
This seems to be a valid link. Is there a problem with this install script?

This signature line intentionally blank.


#2

I’m fairly sure the Wiki scripts worked before people started treading all over them. The link appears valid, so it could be just a temporary resolution problem from your machine. What library do you need to load that requires a complete rebuild, and are you adding these libraries into the build script itself?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

I looked back at my support history and last time, 7/08, I also had difficulty using this wiki procedure. I used the http://wiki.dreamhost.com/Advanced_PHP_configuration instead.

I have to compile my own PHP because I need to dynamically load a library of charting routines that I bought. Any script with require_once("…/ChartDirector/lib/phpchartdir.php"); is failing now. I think it was around 06/08 or 07/08 that this started happening because DH withdrew the ability to dynamically load libraries when using the default system PHP for security reasons that I don’t understand.

This signature line intentionally blank.


#4

Includes and requires should work with the current default DH PHP as long as they’re local (ie. “url includes” would be blocked due to security, but same-account paths should be perfectly fine).

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

I thought the only way to do it was compile my own php5 so I could specify an extension directory in the php.ini.

This signature line intentionally blank.


#6

The extension_directory is used mostly to auto-load .so library files (like ionCube, PDF, etc.). Inclusion of regular php files such as the example you gave above only need the correct path to be present in the calling script - e.g. require_once("/home/user/includes/required.php")

Is it the case, perhaps, that your php files also have some companion .so libraries packaged with them as well?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

Oh, yeah, it has libchartdir.so and .dll files for php versions 4.04 to 5.2. I don’t know how it works, but I figured phpchartdir.php selects the correct version somehow and then loads the .so the correct way.

This signature line intentionally blank.


#8

Ahhh, so you’d need to specify an extension_directory for the .so library.

You don’t need to build PHP tho (unless you want extra features like PDF support etc.) Just use a custom php.ini script then edit your php.ini file. There’s info in the Wiki or see link below for an automatic install.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#9

Well, I followed the procedure at http://wiki.dreamhost.com/PHP.ini so now I have a php.ini in my cgi-bin. I edited php.ini so it has the lines
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/home/ykfpdata/ykfp.org/php/ChartDirector/lib"
so it’s pointed at my libraries.

Now http://ykfp.org/php/phpinfo.php runs, and shows that it’s using the ini file in cgi-bin

But now none of the scripts that call the library will run. Look at http://ykfp.org/php/BOR/test.php This seems to indicate the library can’t load because DH’s php is running in safe mode. But in my php.ini file I have enable_dl = On and safe_mode = Off

Isn’t the problem that my library contains .so files, not just .dll and php files? Isn’t that what caused me to compile my own php back in 7/08?

This signature line intentionally blank.


#10

From the error list it seems you’re complying with it’s requirements.

Check that the extension_path you edited is the only one in your ini file and add a trailing slash to it for good measure.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#11

It turns out the reason my chart library is not working was the host switch. kiki was i386 and bogota is 64 bit. Once I installed the 64 bit version of the libraries, it started working. Now I’m using DH default php and my own php.ini, rather than attempting to compile my own php.

This signature line intentionally blank.


#12

Just kicked myself for not picking up on that! I can’t count the number of times I’ve told people to re-run the ionCube install after a server move for precisely that reason (they’re usually from x86 -> x86_64 machines for shared and vice-versa moving to VPS).

Glad you got it sorted!

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#13

I was sure headed down the wrong track thinking I had to compile my own php to dynamically load this library. I got great help from the developer of the package advsofteng.com: http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_support&thread=1256080286#N1256149260

This signature line intentionally blank.