473,395 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Call php server to interpret the script

Don
Hi,

I did a php script and tested with the browser by giving the full path
of script as URL under a domain name (ex :
http://www.AAA-tech.com/TEST/myScript.php), it works fine.
Then I launched the same script on the same machine (OS:Free BSD) by
typing :

cd ../public/www/TEST
/usr/local/bin/php myScript.php

the result :
<b>Warning</b>: imagecopyresampled(): requires GD 2.0 or later in
<b>/web/Xv/Xe/Xm/AAA-tech.com/public/www/TEST/myScript.php</b> on line
<b>80</b><br />

<b>Fatal error</b>: Call to undefined function: imagegif() in
<b>/web/Xv/Xe/Xm/AAA-tech.com/public/www/TEST/myScript.php</b> on line
<b>86</b><br />

Apparently, the interpretor /usr/local/bin/php is not the same version
as php server.

My question is :
How can I launch my php script by calling the php server to interpret it
correctly?

Thank you in advance

Don
Feb 19 '06 #1
1 1591
NC
Don wrote:

I did a php script and tested with the browser by giving the full
path of script as URL under a domain name (ex :
http://www.AAA-tech.com/TEST/myScript.php), it works fine.
Then I launched the same script on the same machine (OS:Free
BSD) by typing :

cd ../public/www/TEST
/usr/local/bin/php myScript.php

the result :
<b>Warning</b>: imagecopyresampled(): requires GD 2.0 or later in
<b>/web/Xv/Xe/Xm/AAA-tech.com/public/www/TEST/myScript.php</b>
on line <b>80</b><br />

<b>Fatal error</b>: Call to undefined function: imagegif() in
<b>/web/Xv/Xe/Xm/AAA-tech.com/public/www/TEST/myScript.php</b>
on line <b>86</b><br />

Apparently, the interpretor /usr/local/bin/php is not the same version
as php server.
Not necessarily; it's possible that the command-line interpreter simply
does not know where your php.ini is or lacks rights to read it...
My question is :
How can I launch my php script by calling the php server
to interpret it correctly?


Run /usr/local/bin/php -i and see what extensions are enabled and what
(if any) php.ini file is used. If the command-line interpreter does
not in fact use the same php.ini the Apache module does, you can force
it to use the correct php.ini by using the -c key. For more
information, run /usr/local/bin/php -?.

Cheers,
NC

Feb 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: deko | last post by:
Is it possible to call a php script from an html page? I have a TestPage.php that I want to convert to TestPage.html - but still call a php script from it. This is how my TestPage.php looks...
1
by: syed_saqib_ali | last post by:
Hi. I have MS Windows Server 2003, Enterprise Edition. It has MS Management Console 2.0, Version 5.2 and IIS Manager 6.0 I have a directory called "myDirs". Within this directory are 2...
3
by: Alexander Fillips | last post by:
Hi, my short question: is there a python object which can interpret java-script? the whole story ;-) I wrote some streaming-scripts for the xbox mediaplayer which supports python. for a...
4
by: John | last post by:
HI, I have a stupid beginners-question: How can I call a Link into another Frame (not response.redirect) in a Button_click event on Server side in C#? I know, I need a target and stuff, but...
2
by: sdfarmer | last post by:
I need to Name my menu Controls using a string Array like this: --------------------------------------------------------------- <script language="C#" runat="server"> public String MenuCtrlIds=new...
3
by: Jarod_24 | last post by:
My program (it's a webcrawler) downloads htmlpages and in some cases the html has <script> </script> tags in it that generates parts of the html. How can i interpret this javascript and get the...
3
by: Marshall | last post by:
Hello, I am wondering if it is possible to call a remote web service using ATLAS and if so, how. I have read several docs which show how to call a web service that is within the same project as...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.