Sponsored Content
Top Forums Shell Programming and Scripting PHP 5 solaris opendir failure Post 302196639 by Esaia on Monday 19th of May 2008 05:23:30 AM
Old 05-19-2008
PHP 5 solaris opendir failure

Hello!

I've moved a web from my RHEL5 Apache/2.2.3 machine to a Sun Solaris 5.9 Apache/2.2.6 (Unix) PHP/5.2.5 mod_ssl/2.2.6 machine.

The web worked just fine on the rhel5 machine and most of the php pages works fine on the solaris machine to but not the one where I read a directory and prints out the files.

This is the code that does not work:
Code:
<?php
if ($handle = opendir('/the/directory')) {
    while (false !== ($file = readdir($handle))) {
       if(stripos($file, ".html")) {
          echo "<a href=waittimeofjobs/".$file.">".$file."</a><br/>";
       }
    }
    closedir($handle);
}
?>

It seems like that php just stops generating code when reaching this code because the source file gets empty, not even the static html tags gets written.

Is there some way to debug this?
Even if I remove the code and just puts a simple:
error_reporting(E_ALL);
the same thing happends, no code gets generated.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

solaris second cd failure

We have a problem on a Sparc Ultra 5 box when installing solaris. We boot from the CD-ROM then go through the install procedure adding IP address, domain, routing details, hard disk layout etc.. The problem arises when asked for the 2nd CD at this point you do get the option to "skip"... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

2. Programming

opendir() + customly created directories

Gday all In a program I am designing, I am using opendir() to test whether entries under a certain directory are sub-directories or not. This method works fine for the directory itself (.) and the parent directory (..), however it does not work for any sub-directories I manually create. i.e.... (5 Replies)
Discussion started by: JamesGoh
5 Replies

3. Shell Programming and Scripting

Failure of sending mail through sun solaris

Hi Friends, I tried to mail from my sun solaris 5.8 by: $mailx -v sridha_151086@yahoo.co.in Subject: Test mail This is the test mail!! . EOT The error message I got is: land% Sri... forward: /export/home/Sri/.forward.+: World writable directory Sri... forward:... (1 Reply)
Discussion started by: sridharnr
1 Replies

4. Solaris

Solaris 10 (05/09) xNTPD Startup Failure - How to Fix

Dear All, I installed the Solaris 2.10 (05/09) download on a Sparc platform, and wanted to configure the network time protocol daemon (xNTPD) to work as an NTP client. Of course there are many web sites that trumpet the advise to simply copy the ntp.client file to the ntp.conf file, and then... (2 Replies)
Discussion started by: iic1tls
2 Replies

5. Solaris

Solaris Re-installation failure

Hello Community. I had installed solaris 5.10 OS on an X86 server using a custom-jumpstart installation program and it was performed successfully. Due to some issues, i had to go for reinstallation using the same jumpstart but this time it failed giving below error. Starting Solaris... (1 Reply)
Discussion started by: mystition
1 Replies

6. Solaris

After power failure, SunFireV240 with SOLARIS 5.9 cannot start

SUNW, Sun Fire V240 Spare Sun OS Release 5.9 After a power failure we try to start the server We have the following messages: Thanks for your assistance (7 Replies)
Discussion started by: doudou2012
7 Replies

7. Programming

Opendir

code: #include<iostream> #include <dirent.h> using namespace std; int main() { DIR*dir; dir = opendir("/"); if (dir !=NULL) { struct dirent * abcd; while ((abcd=readdir (dir))!=NULL) { cout << abcd -> d_name; } }} output : this gives the output of Directory "/" ques : (1 Reply)
Discussion started by: console
1 Replies

8. Homework & Coursework Questions

Opendir

code: #include<iostream> #include <dirent.h> using namespace std; int main() { DIR*dir; dir = opendir("/"); if (dir !=NULL) { struct dirent * abcd; while ((abcd=readdir (dir))!=NULL) { cout << abcd -> d_name; } }} output : this gives the output of Directory "/" ques : (1 Reply)
Discussion started by: console
1 Replies
php-config(1)							Scripting Language						     php-config(1)

NAME
php-config - get information about PHP configuration and compile options SYNOPSIS
php-config [options] DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration. OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local --includes List of -I options with all include files --ldflags LD Flags which PHP was compiled with --libs Extra libraries which PHP was compiled with --extension-dir Directory where extensions are searched by default --include-dir Directory prefix where header files are installed by default --php-binary Full path to php CLI or CGI binary --php-sapis Show all SAPI modules available --configure-options Configure options to recreate configuration of current PHP installation --version PHP version --vernum PHP version as integer SEE ALSO php(1) VERSION INFORMATION
This manpage describes php, version 5.3.6-13ubuntu3.10. COPYRIGHT
Copyright (C) 1997-2010 The PHP Group This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: http://www.php.net/license/3_01.txt If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. The PHP Group 2010 php-config(1)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy