Re: [mapserver-users] php_mapscript not being loaded

2012-07-05 Thread William Kyngesburye
On Jul 5, 2012, at 9:39 AM, Stefan Schwarzer wrote:

> Hi there,
> 
> I thought I would have finally got over with all the errors while installing 
> everything anew (php, apache, postgres, mapserver).

apache?  You're not using the system apache?  If it's a major version change 
from the system apache, the APIs that php uses may have changed.

> But hadn't tested mapserver yet… Did all the installation with the latest 
> Kyngchaos libraries.
> 
> Running  "http://localhost/testphp.php";; but don't see any mapserver or 
> mapscript. Nothing in there.
> 
> There is a "php_mapscript.so" in 
> "/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
> "extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
> "/usr/local/php5cgi/lib/php/extensions"".

No need to set extension_dir, it defaults to the correct dir, which is not as 
you set it but includes the no-debug... subdir.

> Restarted the server, "sudo /usr/sbin/apachectl restart".

graceful is all that's needed: sudo apachectl graceful, but it probably doesn't 
matter.

> But still no Mapscript in testphp.php… Did it really restart and load php.ini 
> now?. Any way to check that? It should work that way, no?
> 
> Thanks for any help!
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-06 Thread soulsacrifire
Hi guys,

I'm a newbie on php and mapserver.
I'm working on a sample page and I'm able to find the line
dl('php_mapscript.so'); .
Which difference about load library in the page and call the library load by
apache?

Regards.

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/php-mapscript-not-being-loaded-tp4986285p4986509.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-06 Thread Eichner, Andreas - SID-NLKM

Hi,

> dl('php_mapscript.so'); .
> Which difference about load library in the page and call the 
> library load by apache?

there's basically no difference except that on some sites this PHP
extension is not enabled so a script needs to load it explicitly at
runtime via dl(). If your site uses it seldomly other scripts might run
faster since the interpreter doesn't need to initialize this extension
but I don't know that exactly. Regarding functionality it makes
absolutely no difference.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-06 Thread William Kyngesburye
Even more important is that dl() is not even available as of PHP 5.3 in PHP CGI 
and PHP Apache.  You MUST load an extension from php.ini now.

On Jul 6, 2012, at 7:47 AM, Eichner, Andreas - SID-NLKM wrote:

> 
> Hi,
> 
>> dl('php_mapscript.so'); .
>> Which difference about load library in the page and call the 
>> library load by apache?
> 
> there's basically no difference except that on some sites this PHP
> extension is not enabled so a script needs to load it explicitly at
> runtime via dl(). If your site uses it seldomly other scripts might run
> faster since the interpreter doesn't need to initialize this extension
> but I don't know that exactly. Regarding functionality it makes
> absolutely no difference.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-06 Thread Jeff McKenna
On 12-07-06 10:42 AM, William Kyngesburye wrote:
> Even more important is that dl() is not even available as of PHP 5.3 in PHP 
> CGI and PHP Apache.  You MUST load an extension from php.ini now.
> 

Excellent point William, this is the case for current MS4W users (PHP
5.4.x).  [funny how us packagers learn this early the hard way] :)

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-08 Thread Stefan Schwarzer

>> But hadn't tested mapserver yet… Did all the installation with the latest 
>> Kyngchaos libraries.
>> 
>> Running  "http://localhost/testphp.php";; but don't see any mapserver or 
>> mapscript. Nothing in there.
>> 
>> There is a "php_mapscript.so" in 
>> "/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
>> "extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
>> "/usr/local/php5cgi/lib/php/extensions"".
> 
> No need to set extension_dir, it defaults to the correct dir, which is not as 
> you set it but includes the no-debug... subdir.
> 
>> Restarted the server, "sudo /usr/sbin/apachectl restart".
> 
> graceful is all that's needed: sudo apachectl graceful, but it probably 
> doesn't matter.
> 
>> But still no Mapscript in testphp.php… Did it really restart and load 
>> php.ini now?. Any way to check that? It should work that way, no?

No, indeed, didn't matter. Still no mapserver/mapscript appearing in 
testphp.php. Had added "extension=php_mapscript.so" to php.ini before already.

What can I do? Thanks for any hints, as I am really stuck!


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-09 Thread Jeff McKenna
On 12-07-09 2:41 AM, Stefan Schwarzer wrote:
> 
>>> But hadn't tested mapserver yet… Did all the installation with the latest 
>>> Kyngchaos libraries.
>>>
>>> Running  "http://localhost/testphp.php";; but don't see any mapserver or 
>>> mapscript. Nothing in there.
>>>
>>> There is a "php_mapscript.so" in 
>>> "/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
>>> "extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
>>> "/usr/local/php5cgi/lib/php/extensions"".
>>
>> No need to set extension_dir, it defaults to the correct dir, which is not 
>> as you set it but includes the no-debug... subdir.
>>
>>> Restarted the server, "sudo /usr/sbin/apachectl restart".
>>
>> graceful is all that's needed: sudo apachectl graceful, but it probably 
>> doesn't matter.
>>
>>> But still no Mapscript in testphp.php… Did it really restart and load 
>>> php.ini now?. Any way to check that? It should work that way, no?
> 
> No, indeed, didn't matter. Still no mapserver/mapscript appearing in 
> testphp.php. Had added "extension=php_mapscript.so" to php.ini before already.
> 
> What can I do? Thanks for any hints, as I am really stuck!
> 

Whenever I get this stuck with loading mapscript, I try to:

- execute the php executable directly (php -i) and look for an error
message, sometimes it is at the bottom of that generated page
- check the Apache error logs (error.log)

I have seen this problem when users grab PHP from one location, and then
download PHP MapScript from another location - that will make your hair
go grey.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-09 Thread Stefan Schwarzer
 But hadn't tested mapserver yet… Did all the installation with the latest 
 Kyngchaos libraries.
 
 Running  "http://localhost/testphp.php";; but don't see any mapserver or 
 mapscript. Nothing in there.
 
 There is a "php_mapscript.so" in 
 "/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
 "extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
 "/usr/local/php5cgi/lib/php/extensions"".
>>> 
>>> No need to set extension_dir, it defaults to the correct dir, which is not 
>>> as you set it but includes the no-debug... subdir.
>>> 
 Restarted the server, "sudo /usr/sbin/apachectl restart".
>>> 
>>> graceful is all that's needed: sudo apachectl graceful, but it probably 
>>> doesn't matter.
>>> 
 But still no Mapscript in testphp.php… Did it really restart and load 
 php.ini now?. Any way to check that? It should work that way, no?
>> 
>> No, indeed, didn't matter. Still no mapserver/mapscript appearing in 
>> testphp.php. Had added "extension=php_mapscript.so" to php.ini before 
>> already.
>> 
>> What can I do? Thanks for any hints, as I am really stuck!
>> 
> 
> Whenever I get this stuck with loading mapscript, I try to:
> 
> - execute the php executable directly (php -i) and look for an error
> message, sometimes it is at the bottom of that generated page
> - check the Apache error logs (error.log)
> 
> I have seen this problem when users grab PHP from one location, and then
> download PHP MapScript from another location - that will make your hair
> go grey.

Thanks for those hints. But unfortunately, nothing. I checked the Apache error 
log before, and there is nothing there. At least nothing I think is important. 
I guess the MaxClients thing is not causing my mapsever to not appear, no?

[Tue Jul 10 07:09:58 2012] [notice] caught SIGTERM, shutting down
[Tue Jul 10 07:09:59 2012] [warn] Init: Session Cache is not configured [hint: 
SSLSessionCache]
WARNING: MaxClients of 150 exceeds ServerLimit value of 133 servers,
 lowering MaxClients to 133.  To increase, please see the ServerLimit
 directive.
[Tue Jul 10 07:10:01 2012] [warn] mod_bonjour: Skipping user 'xxx' - no valid 
index file.
[Tue Jul 10 07:10:01 2012] [notice] Digest: generating secret for digest 
authentication ...
[Tue Jul 10 07:10:01 2012] [notice] Digest: done
[Tue Jul 10 07:10:01 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 
OpenSSL/0.9.8r DAV/2 configured -- resuming normal operations


And the php -i it spitting out a long list, but no errors.

I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
source. But strange enough, every computer seems different, and I ran into a 
couple of challenges.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread Jeff McKenna
On 12-07-10 2:13 AM, Stefan Schwarzer wrote:
> 
> And the php -i it spitting out a long list, but no errors.

The important point with that 'php -i' command is if it contains a
'mapscript' section; then compare those results through Apache (does a
'phpinfo.php' file through your browser display a section for
'mapscript') - these are the issues to check.  Often, I'll be able to
load mapscript through the commandline, but Apache cannot - and this
will show you where you need to spend your time/effort.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread Stefan Schwarzer
>> 
>> And the php -i it spitting out a long list, but no errors.
> 
> The important point with that 'php -i' command is if it contains a
> 'mapscript' section; then compare those results through Apache (does a
> 'phpinfo.php' file through your browser display a section for
> 'mapscript') - these are the issues to check.  Often, I'll be able to
> load mapscript through the commandline, but Apache cannot - and this
> will show you where you need to spend your time/effort.

Ah, thanks for clarifying. But no, there are two "map" incidences, but they 
refer to Protocols (such as ftp, http…)


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread William Kyngesburye
On Jul 10, 2012, at 12:13 AM, Stefan Schwarzer wrote:

> Thanks for those hints. But unfortunately, nothing. I checked the Apache 
> error log before, and there is nothing there. At least nothing I think is 
> important. I guess the MaxClients thing is not causing my mapsever to not 
> appear, no?
> 
> [Tue Jul 10 07:09:58 2012] [notice] caught SIGTERM, shutting down
> [Tue Jul 10 07:09:59 2012] [warn] Init: Session Cache is not configured 
> [hint: SSLSessionCache]
> WARNING: MaxClients of 150 exceeds ServerLimit value of 133 servers,
> lowering MaxClients to 133.  To increase, please see the ServerLimit
> directive.
> [Tue Jul 10 07:10:01 2012] [warn] mod_bonjour: Skipping user 'xxx' - no valid 
> index file.
> [Tue Jul 10 07:10:01 2012] [notice] Digest: generating secret for digest 
> authentication ...
> [Tue Jul 10 07:10:01 2012] [notice] Digest: done
> [Tue Jul 10 07:10:01 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 
> OpenSSL/0.9.8r DAV/2 configured -- resuming normal operations
> 
> 
> And the php -i it spitting out a long list, but no errors.
> 
> I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
> source. But strange enough, every computer seems different, and I ran into a 
> couple of challenges.
> 
I wonder if Apache is still using the system PHP?  The PHP version at the top 
of phpinfo() should match what you installed (OS X 10.7 system PHP is 5.3.10, 
on 10.6 is 5.3.8).

Also, if the Apache log doesn't have anything, look at Console.app to see if 
there are any system errors (maybe it can't load a needed library).

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread Stefan Schwarzer
>> And the php -i it spitting out a long list, but no errors.
>> 
>> I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
>> source. But strange enough, every computer seems different, and I ran into a 
>> couple of challenges.
>> 
> I wonder if Apache is still using the system PHP?  The PHP version at the top 
> of phpinfo() should match what you installed (OS X 10.7 system PHP is 5.3.10, 
> on 10.6 is 5.3.8).
> 
> Also, if the Apache log doesn't have anything, look at Console.app to see if 
> there are any system errors (maybe it can't load a needed library).

Ha, good one. Thanks a lot! Indeed, the phpinfo shows 5.3.8, the php -i shows 
5.3.10. I am on OS X 10.7, however. 

What does that mean? I have a mixture of 10.6 and 10.7 on my machine? I have my 
Snow Leopard still installed on a spearate drive in the machine; does Apache 
load the php from there?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread Stefan Schwarzer

On Jul 10, 2012, at 4:15 PM, Stefan Schwarzer wrote:

>>> And the php -i it spitting out a long list, but no errors.
>>> 
>>> I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
>>> source. But strange enough, every computer seems different, and I ran into 
>>> a couple of challenges.
>>> 
>> I wonder if Apache is still using the system PHP?  The PHP version at the 
>> top of phpinfo() should match what you installed (OS X 10.7 system PHP is 
>> 5.3.10, on 10.6 is 5.3.8).
>> 
>> Also, if the Apache log doesn't have anything, look at Console.app to see if 
>> there are any system errors (maybe it can't load a needed library).
> 
> Ha, good one. Thanks a lot! Indeed, the phpinfo shows 5.3.8, the php -i shows 
> 5.3.10. I am on OS X 10.7, however. 
> 
> What does that mean? I have a mixture of 10.6 and 10.7 on my machine? I have 
> my Snow Leopard still installed on a spearate drive in the machine; does 
> Apache load the php from there?

It says in php -i:

Configuration File (php.ini) Path => /etc
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)

The php.ini is in "/usr/local/php5cgi/lib/php.ini"

So, what should I do? Thanks for any hints! I see slowly light at the end of 
the tunnel….
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-10 Thread William Kyngesburye
On Jul 10, 2012, at 9:15 AM, Stefan Schwarzer wrote:

>>> And the php -i it spitting out a long list, but no errors.
>>> 
>>> I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
>>> source. But strange enough, every computer seems different, and I ran into 
>>> a couple of challenges.
>>> 
>> I wonder if Apache is still using the system PHP?  The PHP version at the 
>> top of phpinfo() should match what you installed (OS X 10.7 system PHP is 
>> 5.3.10, on 10.6 is 5.3.8).
>> 
>> Also, if the Apache log doesn't have anything, look at Console.app to see if 
>> there are any system errors (maybe it can't load a needed library).
> 
> Ha, good one. Thanks a lot! Indeed, the phpinfo shows 5.3.8, the php -i shows 
> 5.3.10. I am on OS X 10.7, however. 
> 
> What does that mean? I have a mixture of 10.6 and 10.7 on my machine? I have 
> my Snow Leopard still installed on a spearate drive in the machine; does 
> Apache load the php from there?

My PHP installer is supposed to switch the PHP, but sometimes it doesn't.  
Possibly because the apache config file was altered in a way to break my grep.  
System updates are not supposed to change the apache config, but it's a 
possibility.

You can try running the script manually from the PHP disk image:

  sudo /Volumes/PHP\ 5/phpenable.sh cgi5

then

  sudo apachectl graceful


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-11 Thread Ne sar
Hi Andreas,

 thank you for your information.

 Regards.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php_mapscript not being loaded

2012-07-12 Thread Stefan Schwarzer
 And the php -i it spitting out a long list, but no errors.
 
 I have actually all PHP, GD, …, Mapserver from Kyngchaos. So, one single 
 source. But strange enough, every computer seems different, and I ran into 
 a couple of challenges.
 
>>> I wonder if Apache is still using the system PHP?  The PHP version at the 
>>> top of phpinfo() should match what you installed (OS X 10.7 system PHP is 
>>> 5.3.10, on 10.6 is 5.3.8).
>>> 
>>> Also, if the Apache log doesn't have anything, look at Console.app to see 
>>> if there are any system errors (maybe it can't load a needed library).
>> 
>> Ha, good one. Thanks a lot! Indeed, the phpinfo shows 5.3.8, the php -i 
>> shows 5.3.10. I am on OS X 10.7, however. 
>> 
>> What does that mean? I have a mixture of 10.6 and 10.7 on my machine? I have 
>> my Snow Leopard still installed on a spearate drive in the machine; does 
>> Apache load the php from there?
> 
> My PHP installer is supposed to switch the PHP, but sometimes it doesn't.  
> Possibly because the apache config file was altered in a way to break my 
> grep.  System updates are not supposed to change the apache config, but it's 
> a possibility.
> 
> You can try running the script manually from the PHP disk image:
> 
>  sudo /Volumes/PHP\ 5/phpenable.sh cgi5
> 
> then
> 
>  sudo apachectl graceful

Thanks so much. Although it didn't solve the problem, I checked again the php 
-i, and then the /usr/local/php5cgi/bin/php -i, as I recognized there were 
still two different versions. And suddenly saw that error message, mapserver 
which doesn't match the cairo framework. I guess that after the first 
installation a few weeks ago, I newly installed mapserver; but the version had 
changed meanwhile, and required another Cairo version too. Gosh, complicated 
this stuff. Now, it works. Thanks to everybody for the useful tips!

Stef
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users