Apache 2.2.3 PHP 4.4.5 Install Fails
I have Apache 2.2.3 installed and running on WinXP Pro SP2. I
installed PHP 4.4.5 and added the following lines in httpd.conf
PHPIniDir C:/PHP445/
LoadModule php4_module C:/PHP445/php4apache2.dll
When I restarted Apache, i got this error:
The Apache service reported the following error:
Quote:
View Complete Forum Thread with Replies
Related Forum Messages:
IIS Install Test Fails
I am trying to complete an install of PHP5 on a WIN2000 development PC running IIS. Everything is in place, including the php.ini file copy and the registration for the .php files. When I attempt to run my test file containing phpinfo() the file never loads. I don't get any error messages. It just keeps saying "Waiting for local host." in the status bar.
View Replies !
PECL Install Fails, Autoconf Problem
I'm trying to install the Fileinfo extensions from a PECL library called "fileinfo". The install fails because autoconf cannot be found. I have a custom installation of autoconf running out of my home directory (I do not have root access), so it's not in the default location (presumably something like /usr/bin/autoconf). I don't know how to manually force ./configure and make to look for autoconf in a custom location. I would guess it's something along the lines of: [server]$ ./configure PHP_AUTOCONF=/some/path But I can't find any reference to how this is done without root access, or if it's possible to manually assign a path to autoconf and autoheader at the command line (or by forcing a value into phpize itself). Here's what my shell output looks like: ================================ [server]$ pecl install fileinfo downloading Fileinfo-1.0.4.tgz ... Starting to download Fileinfo-1.0.4.tgz (5,835 bytes) ......done: 5,835 bytes 3 source files, building running: phpize Configuring for: PHP Api Version: 20020918 Zend Module Api No: 20020429 Zend Extension Api No: 20050606 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script. ERROR: `phpize' failed ================================
View Replies !
Make Install-headers Fails: #INST@21988#': No Such File Or Directory
I configured PHP 4.3.11 './configure' '--prefix=~/php-4.3.11' '--enable-memory-limit' '--enable-force-cgi-redirect' '--enable-track-vars' '--with-pcre-regex' '--with-mysql=shared' '--without-mm' '--enable-fastcgi' and executed "make; make install". But one of the targets fails: Installing header files: ~/php-4.3.11/include/php/ cp: cannot create regular file `/home/mburger/php-4.3.11/include/php/#INST@21988#': No such file or directory make: [install-headers] Error 1 (ignored) Does anybody know why the target "install-headers" fails? The installed executable "php" works as expected, but phpize fails because it cannot find the "devel" files.
View Replies !
Xmldocfile() Fails On Apache But Not On IIS
I am new to Apache and have installed the server alongside IIS. I put my website on Apache to test it out, and everything works except any php files that make use of xmldocfile(). On IIS it works fine, but not on Apache. Is there any special configuration I should have done in the config file for Apache to get this working?
View Replies !
Socket_connect() Fails Only When Called From Apache
I have made a php network client module which connect to an internal server and retrieve data using php socket functions. It worked fine but in some systems, it socket_connect() fails with 'Permission denied' error. There is no firewall or any network problem in that machine. Weird thing is that the error happens only when I call the php file from apache server. When I just execute the php code with php command line, it works fine. It looks just like apache blocks outgoing TCP/IP connection. System of the problem is Fedora Core 4 with httpd 2.0.54 and php 5.0.4 installed.
View Replies !
Curl Fails With Apache - But Works In Command Line
I am using PHP 5.1.2 with curl enabled. But whenever I try to use curl to fetch a url, it fails - 'curl_exec()' returns nothing. But if I try to execute the same file in CLI - like 'php curl.php', the script works properly. However if I try it in a browser, nothing is returned. Code:
View Replies !
PHP Install With Apache
I tried to install PHP 4.0.0 and then PHP-3.0.16 but failed both the times. I am working on i386/ Caldera Linux 2.2.14 My apache server (1.3.11) is working alright. I tried both the rpm and gz install packages. Here's what I did: # gunzip -c php-4.0.x.tar.gz | tar xf - # cd php-4.0.x #./configure --with-mysql-with-xml--with-apache=../apache-1.3.11--enable-track-vars how to install php4.0 or 3.0 to work with Apache and MySql?
View Replies !
Cannot Install Apache
I downloaded and installed apache_2.0.54-win32-x86-no_ssl.msi By running binApache -k install I receive th following message: <OS 10048>Normalerweise darf jede Socketadresse <Protokoll, Netzwerkadresse oder Anschluss> nur jeweils einmal verwendet werden. : make_sock could not bind to no listening sockets available, shutting down Unable to open logs
View Replies !
Install Apache
I have Apache HTTP Server 2.0.53 and PHP 4.3.10 programs and I want to install it on my computer so I can view .php pages offline (I don't have ADSL)? I tried myself but it doesn't work. Manual is complicated.
View Replies !
Apache Install
im using windows xp and im tryng to install apache/php/mysql when i installed apache i got this error: no installed service "apache2" What does this mean? i tried to look at the service but i dont see anything apache2?? This occured when i tried to start the apache. MY installation was very sucessfull and also what does this error means cannot make socket on 0.0.0.0 And forgive me for being so dumb in this apache /php after i installed the apache what are the things that i need to configure in httpd.conf to work in php?
View Replies !
PHP 5.2.1: Cli Does Load Php_mysql.dll While The Same Script Executed By Apache 2.2 Fails Call To Undefined Function Mysql_connect()
After I overcame some short_open_tag (thanks, Rik!) I encounter another strange php-behaviour. The script I just got to work on the windows-commandline obviously does as php.ini tells php to do and loads php_mysql.dll: E:ersDHCP>php ./extractLog.php .... some mysql-stuff, some output, OK The same script invoked by the webserver apache 2.2 entails an error: http://localhost/extractLog.php PHP Fatal error: Call to undefined function mysql_connect() My configuration php.ini does contain the line extension=php_mysql.dll and seems to be OK while I use the script from commandline. Is there anybody who can give me a hint where to cope with this error?Christian
View Replies !
Install Apache,MySQL And PHP
I may sound like a newbie, but I've started my new job and we are running on Windows XP where previously I was using LINUX , and now I want to install Apache,MySQL and PHP, not done this for a while. Been to php.net but confused as to which one to download, any helpers? Also where to install the other stuff.
View Replies !
Install Problem Apache Php
I have been struggling in my spare time configuring apache and php. I am running windows xp pro O/S. Here is the problem, if i install apache choosing the option "For all users on port 80 as a service, recommended", all works fine i can create php files and run them in my browsers but i have to be online, it won't work offline (I understand port 80 is the web, can i change it and how if yes?). Now if i install apache with the second option "only for the current user on port 8080, when started manually." in order to be doing what i really want which is to test my code offline on my PC, nothing will work.I get the console and don't know what to do with it.I am supposed to start apache manually but how?
View Replies !
Apache Php Cgi Install Problem
I am trying to install PHP 5.0.4 on Apache 2.0.54 on WinXP Pro SP2 as a cgi binary. Apache2 directory is c:/Apache2 htdocs is c:/Apache2/htdocs php is installed in c:/php This contains php.ini, php-cgi.exe and php5ts.dll and other files required for the module method of php installation are also present, but i think additional files being present should not cause any problem Directory containing php scripts is C:/Apache2/htdocs/php My httpd.conf file has #---------------------------------------------------------- ScriptAlias /php/ "C:/Apache2/htdocs/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "C:/php/php-cgi.exe" #ScriptAliasMatch ^/php(.*) C:/Apache2/htdocs/php$1 #---------------------------------------------------------- I get the error [Wed Feb 22 15:01:18 2006] [error] [client 127.0.0.1] C:/Apache2/htdocs/php/index.php is not executable; ensure interpreted scripts have "#!" first line [Wed Feb 22 15:01:18 2006] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Apache2/htdocs/php/index.php in the Apache error log. What could be the error? I have no experience in CGI - I only know it stands for Common Gateway Interface - is there something needed to be read up first? I assume when run in CGI mode, whatever you put in your "cgi" diectory (here it is c:/Apache2/htdocs/php) it will be treated as a script. Because if I try http://localhost/php/file.htm it still gives the same error. Also, if I put #! on the first line I get [Wed Feb 22 15:33:45 2006] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: index.php [Wed Feb 22 15:33:45 2006] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: C:/Apache2/htdocs/php/index.php or [Wed Feb 22 15:36:18 2006] [error] [client 127.0.0.1] (OS 193)%1 is not a valid Win32 application. : couldn't create child process: 720193: index.php [Wed Feb 22 15:36:18 2006] [error] [client 127.0.0.1] (OS 193)%1 is not a valid Win32 application. : couldn't spawn child process: C:/Apache2/htdocs/php/index.php Any suggested readings? I've googled the web and Google Groups but not able to get anything newer than what i know so far.
View Replies !
PHP Install On APACHE A Failure
I've been trying all day to configure PHP with Apache and it's been a nightmare I've tried every suggestion that is out there, including PHP's official manuals, and it's been nothing, but a failure. Code:
View Replies !
Install PHP5, Apache 2.2 And IIS
The book that I have talks you through the setup of both Apache and PHP. I allready have IIS installed. when I go to localhost:8080 I get an unable to find page come up. I have checked the error log and I get the following; [Wed Jan 31 13:28:58 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico I have checked for the file on my system and it is indeed not there. But surely not having a favicon is not a reason to shut it down?? If so I have downoloaded the latest full packages today, so seems a little strange that it is missing.
View Replies !
Apache Install Error
Just downloaded apache 2.o and it wont run. The error I keep gettin is "DocumentRoot not a directory" I downloaded it as was told so not sure wat the problem is. It's probably something really easy.
View Replies !
Win98 Apache And Php Install Not Wokring.
I have installed the latest Apache and PHP binaries (the PHP CGI executable release - not the ISAPI). I then configured the httpd.conf sciprt using the install.txt file from the PHP install and 2 reference books as guides. This got me to the point where I BELIEVE the PHP interpretor is kicking in for .php scripts. But when I try and browse the following page : <? php_info() ?> I get the following error : Fatal error: Call to undefined function: php_info() in e:/apache/htdocs/phptest.php on line 1 Code:
View Replies !
Install PHP5 And Apache 2.2.2 (Linux)
I'm running into the same problem that no doubt many are. I'm installing PHP 5.1.4 and Apache 2.2.2 on the same server, but Apache won't recognize the PHP module, saying it's garbled. I understand from reading various bug reports that PHP will release this option come 5.2.0, but I want to know if anybody has PHP 5.1.4 and Apache 2.2.2 working under Linux yet.
View Replies !
Install Prob With Php/cgi/unix/apache... Any Help Is Appreciated...
I'm running php as a cgi on unix server with apache. I modified my httpd.conf file to have AddType application/x-httpd-php .php Action application/x-httpd-php /cgi-bin/php ScriptAlias /cgi-bin/ "/disk2/opt/eai/visnetwork/cgi-bin/ in cgi-bin I have a link called php which points to the php executable which resides in /usr/freeware/bin/. when I point to any php file I get this message: Warning: Unexpected character in input: '' (ASCII=16) state=1 in /usr/freeware/bin/php on line 217 Warning: Unexpected character in input: '' (ASCII=8) state=1 in /usr/freeware/bin/php on line 217 Warning: Unexpected character in input: '' (ASCII=20) state=1 in /usr/freeware/bin/php on line 217 Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217 Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217 Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217 Parse error: parse error in /usr/freeware/bin/php on line 217 I think what is happening is that php is loading itself into the executable instead of the file that I'm linking to. I have verified this by running php on itself from the command line and I get the exact same error. I have a feeling I am overlooking some simple little detail. Can anyone help me out? I've been searching for days now and got a hot tip about this website.
View Replies !
Install Php4 And Php5 At The Same Time To Apache
Here is some note about installation together php4 and php5 on apache2. First you need is to edit with the help of hex editor php4apache2.dll (in my case, or php5apache2.dll) in php4 directory. You find "x-httpd-php" and replace with "x-httpd-plc" e.g. (I found 2 matches) Save your dll file and edit your apache config (httpd.conf) e.g. like: Code:
View Replies !
Install Php5 On A SuSE 9.3 Linux System Running Apache 2.0.49
I am trying to install php5 on a SuSE 9.3 Linux system running apache 2.0.49. For some reason,when attempting to restart the server,I get the following error: "Syntax error on line 26 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2-prefork/libphp5.so into server: /usr/lib64/apache2-prefork/libphp5.so: undefined symbol: php_session_create_id" Does anyone know what is causing this error,or what I can do to correct it?
View Replies !
Can't Install PHP - Keep Getting "Invalid Directory" Error Regarding The Path To Apache Httpd.h
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid Apache directory - unable to find httpd.h under /usr/local/apache/include So then I run this command: find / -name httpd.h which should find every file on my machine with the name "httpd.h". These are the results I get: /usr/local/apache/include/httpd.h /home/shelley/apache_1.3.36/src/include/httpd.h So I've rerun the ./configure command, using this first: --with-apache=/usr/local/apche/include and since that didn't work: --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h but I get the "Invalid directory" error with both addresses.
View Replies !
Can I Install Apache/MYSQL Side By Side With IIS?
However I also have a few sites I maintain that are Nix/PHP/MySQL. I would like to install PHP and MySQL on my windows machine. It would be ok if the PHP pages worked in the IIS environment such as http://localhost/index.php However I thinka better solution may be to install apache/php/mysql/phpmyadmin side by side with IIS. Would I be able to run it side by side with my IIS To get to IIS : http://localhost/index.asp To get to Apache: http://localapache/index.php I suppose I would like to use .htaccess locally to test mod_rewrites.
View Replies !
PHP Install Core Dump "make Install" PEAR On Solaris 9
php has been configured with the following two configure lines and core's during "make install" on the PEAR section. Is there something simple i'm missing? Any help would be appreciated. Environment: Solaris 9 php 5.2.1 GNU Make 3.81 gcc 4.1.1 ../configure --prefix=/opt/foo/php5 --enable-force-cgi-redirect -- enable-discard-path --enable-fastcgi --with-curl=/opt/foo --enable- sockets --with-zlib=/opt/foo --with-libxml-dir=/opt/foo --with- openssl=/opt/foo --with-nsapi=/opt/foo/sunone/current --enable-ftp -- with-ldap=/opt/foo/openldap --with-snmp=/opt/foo/net-snmp --enable- soap --with-xsl=/opt/foo --enable-libgcc --with-mysql=/opt/foo/mysql -- with-pear .....
View Replies !
Exec() Fails...help!
I'm very new to php, running apache 1.3.20 with php 4 on a 98 box just for home test development purposes there's probably an easier way/better alternative to do what i'm trying to do, but i'd be greatful for solutions not alternatives i'm trying to add a user to an .htpasswd file so need to exec("c:/apache/htdocs/htpasswd.exe -b .htpasswd user password) It would also be useful to run a mail server remotely with exec("c:mymailserver.exe") but neither will work, i tend to hear the standard windows error sound, but with no message. Apache error logs reveal nothing. What i'm trying to do may be impossible?, i'm new to the language so i don't know...or it may be a permissions problem? Or perhaps something totally seperate? If anyone has any ideas which may help i'd be very greatful for any advice you could give.
View Replies !
Gettext Fails Me
I can not get gettext to work at all under PHP. I run ubuntu 6.06.1 LTS, and the php5 package there announces that it supports gettext. Also, php -i sais gettext GetText Support =enabled, so it should be working. Here follows a minimal example that should be working, but isn't (gettext and msgfmt are the normal GNU gettext tools): [redhog@thalari:~/Projects/DemoWave]$ cat foo.php #! /usr/bin/php <?php bindtextdomain($argv[1], $_ENV['TEXTDOMAINDIR']); echo dgettext($argv[1], $argv[2]); ?> [redhog@thalari:~/Projects/DemoWave]$ cat locale/sv_SE/LC_MESSAGES/demowave.po # SOME DESCRIPTIVE TITLE. # Copyright (C) 2006 RedHog (Egil Möller) <redhog@redhog.org> # RedHog (Egil Möller) <redhog@redhog.org>, 2006 # msgid "" msgstr "" "Project-Id-Version: DemoWave 0.9" "POT-Creation-Date: Sun Oct 24 19:51:42 2004" "PO-Revision-Date: 2004-10-24 21:02+0200" "Last-Translator: RedHog (Egil Möller) <redhog@redhog.org>" "Language-Team: " "MIME-Version: 1.0" "Content-Type: text/plain; charset=UTF-8" "Content-Transfer-Encoding: " # msgid "A message" msgstr "Ett meddelande" [redhog@thalari:~/Projects/DemoWave]$ msgfmt -o locale/sv_SE/LC_MESSAGES/demowave.mo locale/sv_SE/LC_MESSAGES/demowave.po [redhog@thalari:~/Projects/DemoWave]$ ./foo.php demowave "A message" A message[redhog@thalari:~/Projects/DemoWave]$ [redhog@thalari:~/Projects/DemoWave]$ gettext demowave "A message" Ett meddelande[redhog@thalari:~/Projects/DemoWave]$ [redhog@thalari:~/Projects/DemoWave]$
View Replies !
PHP Upload Fails
I'm trying to create a form to upload PDF files to a server, these files can by huge (+150 MB), this shouldn't be a problem because it is a LAN network. But when I try to upload a 159 MB file to the server as a test, the browser acts as it was searching for the next page, probably is. But after 1 half hour still nothing happened? Now I solved this problem by installing an ASP script, but I don't want to use ASP cause it doesn't work on *nix. Smaller files (< 10MB) are no problem. These are uploaden and moved to the specified directory real fast.
View Replies !
PHP Build Fails With GD
I have libpng installed, and it keeps saying it can't find png.h. It's located in /usr/local/lib and I've tried pointing in the ./config to the directory, and it still says it can't find it. The install command to libpng did fail, but I copied the .h files manually and symlinked them in the lib/ directory. FreeBSD5.3-RELEASE i386 PHP 5.0.2 libpng 1.2.8
View Replies !
Mysql_connect Fails
i'm baffled. or maybe missing the obvious .... when requesting a particular page, which attempts to connect to my MySQL server, at least one user receives the 'Can't connect ...' message: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/www/users/.../xyz.inc.php on line 108 line 108 of the included file is: $link = mysql_connect ($h, $u, $p) ; the user has no problem with the rest of the site, but always has this problem if the page requested attempts to connect to the server. no other user has reported the problem and this user is reliable. i really can't see how the user's browser or firewall could cause this, but ....
View Replies !
The Following Code Fails
<?php $filename = "mess.xsl"; $xmldoc = domxml_open_file("mess.xml"); $xsldoc = domxml_xslt_stylesheet_file($filename); $result = $xsldoc->process($xmldoc); echo $xsldoc->result_dump_mem($result); ?> I try to output a message "welcome" in xml file onto the screen but it does nothing. If I execute raw the xsl file, I can see the message. Do you know why ?
View Replies !
Using Sessions, Pdf Fails In IE
I've been happily generating pdf files with fpdf for a long time. I just switched from hhttp authentication to sessions, and now pdf generation fails in IE but not in Foxfire. Does anyone know the fix for this?
View Replies !
DJ Expression Fails
provide an explanation why the following DJ regular expression woes with an invalid regular expression runtime error 107? Thanks Fields("legal description") Like "SEC [1-36] T[37-43]S R[9-20]W"
View Replies !
Query Fails
I have a query: $SQL = "SELECT * FROM table WHERE id=".$_GET['id']; But if I add order by to it: $SQL = "SELECT * FROM table WHERE id=".$_GET['id'] Order by table_id; It fails? I know it's something to do with the " being out of place, but surely it has to be there?
View Replies !
PHP CURL Fails
Trying to get curl running in the following environment: Vista with IIS7 PHP 5.2.0 Tried the following things: 1) Put copies of libeay32.dll and ssleay32.dll into windows/system32 2) Uncommented extension=php_curl.dll in php.ini 3) Declared PHP path and PHP/ext path in System Env variables 4) Verified IUSR has permissions to read/exec all DLLs. 5) Restared computer repeatedly. I get standard "Fatal error: Call to undefined function curl_init()" when I try to run curl,and there is no mention on curl in phpinfo().
View Replies !
Mkdir Fails
I have a mkdir script but it doesnt work, the file locations are correct 100% and so is $login but it doesnt create the folder and chmod it. <?php $login = $_GET['login']; mkdir("/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/$login"); chmod("/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/$login", 0777); Â ?>
View Replies !
Post Of Fetched Value Fails
I have a MySql db, in which I search for values to populate a selection box, as follows : <select size="1" name="customer"> <option selected="selected">(not queried)</option> <?php while($nt=mysql_fetch_array($result2)){ echo "<option value=$nt[customer]>$nt[customer]</option> ";} ?> </select> This works fine, all the customers appear with their complete names, including spaces if there are. When I do a submit of the php page containing this part of code and in this page I do a $customer=$_POST['customer']; then the value of $customer is cutted to the first <blank(space) encountered. E,g, : if in the selection box the customer name John Smith appears, then I get in the result page after the submission as customer=John When I make a selection box, with fixed populated values (so values not fetched from the db) then after the submission, I get the correct info (values are not cutted to the first space). Is there anybody out there that can give a solution for this strange (to me) behaviour ?
View Replies !
Setcookie Fails To Set Cookie!
Fourth attempt.. it fails now in login, I check by printing $_COOKIE['nordicnet_registration'] and there is no value there! Guys, what on earth do I do about this???? Here is the code that sets the cookie: if ($hasLoggedIn && ($row = mysql_fetch_row($query))) { setcookie('nordicnet_registration', $row['nnet_user_registrationnumber'], 0, '/'); @mysql_free_result($query); mysql_close($dbConn) or die('Could not close db'); $html .= $font . '<font color=000099>Takk for logging inn. For forsatte' . "<a href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " . ' target=_top>klikk her</a></font></font>'} else if (sizeof($_POST) > 0) { $errorMsg .= $font . '<font color=cc0000><li>Det finns en problem med db</li></font></font><p>' $hasLoggedIn = 0; } Because the PHP script is in a frame, instead of using header() I print out some text with a link <a href=mylink.php target=_top> for the user to click and to go to another page. By then the cookie should be registered, yet it's not there!
View Replies !
Sending Twice A Fdf Form Second One Fails
I have written a data handling tool in php and probably you all know already what are my problems. Lets explain: I have found some strange behaviour in Internet Explorer filling out a form to get some data to download. After saving the data file an additional dialogue is displayed on IE. This is not in the other browsers (mozilla, firefox) The possibilities are, open : file is opened from local view dir : shows dir close : it does close and an addtional usage of the data in the form is not possible but it is shown there. But I just only want to close the dialogue not the connection. If I use mozilla, firefox I could several time download the data file without an error. I have searched the web and probably does not have the best wording for the problem. But I don't have found a question or solution about this. Sorry, I am not an Internet Explorer Expert. Is this normal in this browser?
View Replies !
System() Function Fails
In a e-commerce site, our bank has given us a Java class that generates a key to validate an order. To make it work, it must be called something like this: /usr/sbin/java/bin/java -cp /home/users/mysite/tpv.zip CrURLtpv /home/users/mysite/ orderid:0016 ammount:12.00 moneda:XEU language:eng When via telnet I execute this command, it outputs a URL, which can be used to call the bank secure pay page. Now, obviously I need to get this URL from the PHP script, so I use the system() function and to my surprise I only get this error: Error occurred during initialization of VM Could not reserve enough space for code cache Any idea why is this happening? I'm sure the Java class is ok since it works properly when called from prompt. Does the system() function have any memory limitations, or something that may be altering the execution of the class? Is there any way to increase the ammount of memory that is available to the system() function to execute a command?
View Replies !
Trying To Make A Thumbnail But Fails
I created a file name image.php which contains only the following code: <?php function createThumbnail($picture,$thumb,$new_w,$new_h) { $extension=substr($picture,strrpos($picture,".")+1); switch (strtolower($extension)) { case "jpg": case "jpeg": $src_img=imagecreatefromjpeg($picture); break; case "png": $src_img=imagecreatefrompng($picture); break; case "gif": $src_img=imagecreatefromgif($picture); break; case "bmp": $src_img=imagecreatefromwbmp($picture); break; } $old_x=imagesx($src_img); $old_y=imagesy($src_img); if ($old_x > $old_y) { $thumb_w=$new_w; $thumb_h=$old_y*($new_h/$old_x); }elseif ($old_x < $old_y) { $thumb_w=$old_x*($new_w/$old_y); $thumb_h=$new_h; }else{ $thumb_w=$new_w; $thumb_h=$new_h; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thum b_w,$thumb_h,$old_x,$old_y); switch (strtolower($extension)) { case "jpg": case "jpeg": imagejpeg($dst_img,$thumb); break; case "png": imagepng($dst_img,$thumb); break; case "gif": imagegif($dst_img,$thumb); break; case "bmp": imagewbmp($dst_img,$thumb); break; } imagedestroy($dst_img); imagedestroy($src_img); } ?> This function successfully creates a thumbnail. The problem is that I include it in another page (with include_once, just if it matters) which creates a thumbnail, makes some db updates and then redirects to another page. When trying to redirect with header("Location: index.php"); it echos that header has already been sent from image.php. The problem appears immediatly on include (I deleted the code that calls the function to test it). I think it is because I am using imagejpg(); function which outputs to the browser but I don't know how to change this.
View Replies !
Compiling PHP With Freetype Fails
I have had a working PHP installation (4.3.1) on Redhat 8.0 with several extensions (including GD) that have been working well. Now I needed to add Freetype, because we'll need to use font manipulations with GD. So I tried to install Freetype 1.3, but the "make" gave me compilation errors. I then forgot about it and installed Freetype 2, without any problems. So I reconfigure php, no problems. My ./configure line is (new options from the last build are in bold): Code:
View Replies !
|